From bab5a4f976843311dc85c09d297dd5084f62942c Mon Sep 17 00:00:00 2001 From: Jacob Bryant Date: Thu, 25 May 2023 21:55:37 -0400 Subject: [PATCH 01/51] adding v2.1 strategies --- .env.local | 2 +- src/components/selectors/StrategySelector.tsx | 8 +- src/config/series.ts | 55 +- src/config/strategies.ts | 248 ++- src/contexts/ChainContext.tsx | 8 +- src/contexts/UserContext.tsx | 7 +- src/contracts/StrategyV21.d.ts | 1935 +++++++++++++++++ src/contracts/abis/StrategyV2_1.json | 627 ++++++ .../factories/StrategyV21__factory.ts | 1411 ++++++++++++ src/contracts/index.ts | 2 + src/hooks/actionHooks/useRemoveLiquidity.ts | 21 +- src/hooks/useChain.ts | 104 +- src/types/index.ts | 5 +- 13 files changed, 4333 insertions(+), 100 deletions(-) create mode 100644 src/contracts/StrategyV21.d.ts create mode 100644 src/contracts/abis/StrategyV2_1.json create mode 100644 src/contracts/factories/StrategyV21__factory.ts diff --git a/.env.local b/.env.local index 43798ae59..9717a7791 100644 --- a/.env.local +++ b/.env.local @@ -4,7 +4,7 @@ REACT_APP_VERSION=$npm_package_version REACT_APP_RPC_URL_1='https://eth-mainnet.g.alchemy.com/v2/ZXDCq5iy0KrKR0XjsqC6E4QG7Z_FuXDv' REACT_APP_RPC_URL_42161='https://arb-mainnet.g.alchemy.com/v2/vtMM4_eLnOvkjkdckprVw3cIa64EVkDZ' -REACT_APP_DEFAULT_FORK_RPC_URL='https://rpc.tenderly.co/fork/aeabe871-354c-4a8d-998f-4a1c4b24d590' +REACT_APP_DEFAULT_FORK_RPC_URL='https://rpc.tenderly.co/fork/55b1a40f-14c2-40f6-9922-3c2dbfc9ff2c' REACT_APP_LOCALHOST_RPC_URL='http://127.0.0.1:8545' REACT_APP_RPC_URL_421611='https://arb-rinkeby.g.alchemy.com/v2/AY_Q_Uy-Kcfwmf5In5qwG636vaOIoA8L' diff --git a/src/components/selectors/StrategySelector.tsx b/src/components/selectors/StrategySelector.tsx index 0df77311b..a8b29f13e 100644 --- a/src/components/selectors/StrategySelector.tsx +++ b/src/components/selectors/StrategySelector.tsx @@ -89,9 +89,9 @@ const StrategySelectItem = ({ style={{ position: 'absolute', marginTop: '-1em', marginLeft: '17em' }} elevation="small" > - - +{returns?.rewardsAPY}% - + + +{returns?.rewardsAPY}% + )} @@ -140,7 +140,7 @@ const StrategySelector = ({ inputValue }: IStrategySelectorProps) => { useEffect(() => { const opts = Array.from(strategyMap?.values()!); const filteredOpts = opts - .filter((_st) => _st.type === 'V2' || (_st.type === 'V1' && !_st.associatedStrategy)) + .filter((_st) => _st.type === 'V2.1' || _st.type === 'V2' || (_st.type === 'V1' && !_st.associatedStrategy)) .filter((_st) => !_st.currentSeries?.hideSeries && _st.active) .filter((_st) => _st.baseId === selectedBase?.proxyId && !_st.currentSeries?.seriesIsMature) .sort((a, b) => a.currentSeries?.maturity! - b.currentSeries?.maturity!); diff --git a/src/config/series.ts b/src/config/series.ts index 8a2b83094..a3ec44ec6 100644 --- a/src/config/series.ts +++ b/src/config/series.ts @@ -59,21 +59,21 @@ const WETH_2306 = '0x0030ff00028b'; const DAI_2306 = '0x0031ff00028b'; const USDC_2306 = '0x0032ff00028b'; const FRAX_2306 = '0x0138ff00028b'; -const USDT_2306 = '0x00a0ff00028b'; +const USDT_2306 = '0x00a0ff00028b'; // 2306_R - RECOVERY series const WETH_2306_R = '0x0030ff00028c'; -const DAI_2306_R = '0x0031ff00028c'; -const USDC_2306_R = '0x0032ff00028c'; -const FRAX_2306_R = ''; -const USDT_2306_R = '0x00A0ff00028c'; +const DAI_2306_R = '0x0031ff00028c'; +const USDC_2306_R = '0x0032ff00028c'; +const FRAX_2306_R = ''; +const USDT_2306_R = '0x00A0ff00028c'; // 2309 -const WETH_2309 = '0x0030ff00028e'; -const DAI_2309 = '0x0031ff00028e'; -const USDC_2309 = '0x0032ff00028e'; -const FRAX_2309 = '0x0138ff00028e'; -const USDT_2309 = '0x00a0ff00028e'; +const WETH_2309 = '0x0030ff00028e'; +const DAI_2309 = '0x0031ff00028e'; +const USDC_2309 = '0x0032ff00028e'; +const FRAX_2309 = '0x0138ff00028e'; +const USDT_2309 = '0x00a0ff00028e'; export const validateSeries = async (provider: BaseProvider, cauldronAddress: string) => { const preText = '### SERIES SET VALIDATION ERROR ### '; @@ -144,7 +144,6 @@ export const SERIES = new Map>(); SERIES.set( 1, new Map([ - // [ // DAI_2112, // { @@ -163,7 +162,7 @@ SERIES.set( // poolVersion: '1', // ts: '58454204609', // g1: '17524406870024074035', - // g2: '19417625340746896437', + // g2: '19417625340746896437', // }, // ], // [ @@ -610,8 +609,8 @@ SERIES.set( }, ], - /** - * 2306 + /** + * 2306 * */ [ WETH_2306, @@ -710,10 +709,10 @@ SERIES.set( maturity: 1688137200, name: 'FYETH2306', symbol: 'FYETH2306', - address: '0xc8110b03629211b946c2783637ABC9402b50EcDf', + address: '0xc8110b03629211b946c2783637ABC9402b50EcDf', decimals: 18, version: '1', - poolAddress: '0x60995D90B45169eB04F1ea9463443a62B83ab1c1', + poolAddress: '0x60995D90B45169eB04F1ea9463443a62B83ab1c1', poolName: 'FYETH2306 LP', poolSymbol: 'FYETH2306LP', poolVersion: '1', @@ -733,7 +732,7 @@ SERIES.set( address: '0xc7f12Ea237bE7BE6028285052CF3727EaF0e597B', decimals: 18, version: '1', - poolAddress: '0x0bdF152f6d899F4B63b9554ED98D9b9d22FFdee4', + poolAddress: '0x0bdF152f6d899F4B63b9554ED98D9b9d22FFdee4', poolName: 'FYDAI2306 LP', poolSymbol: 'FYDAI2306LP', poolVersion: '1', @@ -790,7 +789,7 @@ SERIES.set( maturity: 1688137200, name: 'FYUSDT2306', symbol: 'FYUSDT2306', - address: '0xD28380De0e7093AC62bCb88610b9f4f4Fb58Be74', + address: '0xD28380De0e7093AC62bCb88610b9f4f4Fb58Be74', decimals: 6, version: '1', poolAddress: '0x6E38B8d9dedd967961508708183678b4EC1B1E33', @@ -804,7 +803,7 @@ SERIES.set( ], /** - * 2309 + * 2309 * */ [ WETH_2309, @@ -1219,7 +1218,7 @@ SERIES.set( address: '0x523803c57a497c3AD0E850766c8276D4864edEA5', decimals: 18, version: '1', - poolAddress: '0x2769ABE33010c710e24eA6aF8A2683C630BbD7D0', + poolAddress: '0x0989731871baacd9dd043aba9c2937df96a6891b', // poolName: 'FYETH2306 LP', poolSymbol: 'FYETH2306LP', poolVersion: '1', @@ -1240,7 +1239,7 @@ SERIES.set( address: '0x60a6A7fabe11ff36cbE917a17666848f0FF3A60a', decimals: 18, version: '1', - poolAddress: '0x02DbfAca22DF7e86897aDF65eb74188D79DAbeA6', + poolAddress: '0x22564ba8a8601008c1146e58ead358c0bbafe17a', // poolName: 'FYDAI2306 LP', poolSymbol: 'FYDAI2306LP', poolVersion: '1', @@ -1261,7 +1260,7 @@ SERIES.set( address: '0xcbb7eba13f9e1d97b2138f588f5ca2f5167f06cc', decimals: 6, version: '1', - poolAddress: '0x536edc2a3db3bfe558cae74cedccd30f07f7121b', + poolAddress: '0x6befdb94b58396949f7839dd4131d0cc11a79b35', // poolName: 'FYUSDC2306 LP', poolSymbol: 'FYUSDC2306LP', poolVersion: '1', @@ -1282,7 +1281,7 @@ SERIES.set( address: '0x035072cb2912daab7b578f468bd6f0d32a269e32', decimals: 6, version: '1', - poolAddress: '0xc6078e090641cC32b05a7F3F102F272A4Ee19867', + poolAddress: '0x8ae587684abffccd57547b24da4b8ff1cc7f7e9d', // poolName: 'FYUSDT2306 LP', poolSymbol: 'FYUSDT2306LP', poolVersion: '1', @@ -1325,7 +1324,7 @@ SERIES.set( address: '0x5Bb78E530D9365aeF75664c5093e40B0001F7CCd', decimals: 6, version: '1', - poolAddress: '0xa98F3211997FDB072B6a8E2C2A26C34BC447f873', + poolAddress: '0x0af81ebc2087ae12bfd16160ba6ca6b76532bdb7', // poolName: 'FYUSDC2309 LP', poolSymbol: 'FYUSDC2309LP', poolVersion: '1', @@ -1346,7 +1345,7 @@ SERIES.set( address: '0xd947360575E6F01Ce7A210C12F2EE37F5ab12d11', decimals: 18, version: '1', - poolAddress: '0x3EA4618cE652eaB330F00935FD075F5Cb614e689', + poolAddress: '0xe309307160e093609c62de25d22a97281ebf837a', // poolName: 'FYETH2309 LP', poolSymbol: 'FYETH2309LP', poolVersion: '1', @@ -1367,7 +1366,7 @@ SERIES.set( address: '0xEE508c827a8990c04798B242fa801C5351012B23', decimals: 18, version: '1', - poolAddress: '0x9a364e874258D6B76091D928ce69512Cd905EE68', + poolAddress: '0x1ba8533654517c6731d2c43424a09f887bf5d57d', // poolName: 'FYDAI2309 LP', poolSymbol: 'FYDAI2309LP', poolVersion: '1', @@ -1388,7 +1387,7 @@ SERIES.set( address: '0x9B19889794A30056A1E5Be118ee0a6647B184c5f', decimals: 6, version: '1', - poolAddress: '0xf0bA5Cf116321A89b35b2d146aE5B861Bd9c23D3', + poolAddress: '0xd7cf0b7fe1d19a22d52bfce4cddc5aefc41ddca2', // poolName: 'FYUSDT2309 LP', poolSymbol: 'FYUSDT2309LP', poolVersion: '1', @@ -1397,7 +1396,5 @@ SERIES.set( g2: '20496382304121724017', }, ], - - ]) ); diff --git a/src/config/strategies.ts b/src/config/strategies.ts index 03d70df63..9db058ca4 100644 --- a/src/config/strategies.ts +++ b/src/config/strategies.ts @@ -5,6 +5,7 @@ import { DAI, FRAX, USDC, WETH, USDT } from './assets'; export enum StrategyType { V1 = 'V1', V2 = 'V2', + V2_1 = 'V2.1', } export interface StrategyInfo { @@ -24,12 +25,255 @@ const STRATEGIES = new Map(); STRATEGIES.set(1, [ /* V1 strategies */ - - ]); STRATEGIES.set(42161, [ + { + id: '', + address: '0xE779cd75E6c574d83D3FD6C92F3CBE31DD32B1E1', + associatedStrategy: '0x5aeB4EFaAA0d27bd606D618BD74Fe883062eAfd0', + type: StrategyType.V1, + symbol: 'YSDAI6MMS', + baseId: DAI, + name: 'Yield Strategy DAI 6M Mar Sep', + decimals: 18, + version: '1', + }, + { + id: '', + address: '0x92A5B31310a3ED4546e0541197a32101fCfBD5c8', + associatedStrategy: '0x3b4FFD93CE5fCf97e61AA8275Ec241C76cC01a47', + type: StrategyType.V1, + symbol: 'YSUSDC6MMS', + baseId: USDC, + name: 'Yield Strategy USDC 6M Mar Sep', + decimals: 6, + version: '1', + }, + { + id: '', + address: '0xD5B43b2550751d372025d048553352ac60f27151', + associatedStrategy: '0x5582b8398FB586F1b79edd1a6e83f1c5aa558955', + type: StrategyType.V1, + symbol: 'YSETH6MMS', + baseId: WETH, + name: 'Yield Strategy ETH 6M Mar Sep', + decimals: 18, + version: '1', + }, + { + id: '', + address: '0xa3cAF61FD23d374ce13c742E4E9fA9FAc23Ddae6', + associatedStrategy: '0x4276BEaA49DE905eED06FCDc0aD438a19D3861DD', + type: StrategyType.V1, + symbol: 'YSDAI6MJD', + baseId: DAI, + name: 'Yield Strategy DAI 6M Jun Dec', + decimals: 18, + version: '1', + }, + { + id: '', + address: '0x54F08092e3256131954dD57C04647De8b2E7A9a9', + associatedStrategy: '0x33e6B154efC7021dD55464c4e11a6AfE1f3D0635', + type: StrategyType.V1, + symbol: 'YSUSDC6MJD', + baseId: USDC, + name: 'Yield Strategy USDC 6M Jun Dec', + decimals: 6, + version: '1', + }, + { + id: '', + address: '0x3353E1E2976DBbc191a739871faA8E6E9D2622c7', + associatedStrategy: '0xad1983745D6c739537fEaB5bed45795f47A940b3', + type: StrategyType.V1, + symbol: 'YSETH6MJD', + baseId: WETH, + name: 'Yield Strategy ETH 6M Jun Dec', + decimals: 18, + version: '1', + }, + + //V2 Strategies + { + id: '', + address: '0xad1983745D6c739537fEaB5bed45795f47A940b3', + type: StrategyType.V2, + associatedStrategy: '0x3353E1E2976DBbc191a739871faA8E6E9D2622c7', + symbol: 'YSETH6MJD', + baseId: WETH, + name: 'Yield Strategy ETH 6M Jun Dec', + decimals: 18, + version: '1', + }, + { + id: '', + address: '0x4276BEaA49DE905eED06FCDc0aD438a19D3861DD', + type: StrategyType.V2, + associatedStrategy: '0xa3cAF61FD23d374ce13c742E4E9fA9FAc23Ddae6', + symbol: 'YSDAI6MJD', + baseId: DAI, + name: 'Yield Strategy DAI 6M Jun Dec', + decimals: 18, + version: '1', + }, + { + id: '', + address: '0x33e6B154efC7021dD55464c4e11a6AfE1f3D0635', + associatedStrategy: '0x54F08092e3256131954dD57C04647De8b2E7A9a9', + symbol: 'YSUSDC6MJD', + baseId: USDC, + name: 'Yield Strategy USDC 6M Jun Dec', + decimals: 6, + type: StrategyType.V2, + version: '1', + }, + + { + id: '', + address: '0x861509a3fa7d87faa0154aae2cb6c1f92639339a', + type: StrategyType.V2, + symbol: 'YSUSDT6MJD', + baseId: USDT, + name: 'Yield Strategy USDT 6M Jun Dec', + decimals: 6, + version: '1', + }, + + { + id: '', + address: '0xfe2aba5ba890af0ee8b6f2d488b1f85c9e7c5643', + type: StrategyType.V2, + symbol: 'YSUSDT6MMS', + baseId: USDT, + name: 'Yield Strategy USDT 6M Mar Sep', + decimals: 6, + version: '1', + }, + { + id: '', + address: '0x3b4FFD93CE5fCf97e61AA8275Ec241C76cC01a47', + type: StrategyType.V2, + associatedStrategy: '0x92A5B31310a3ED4546e0541197a32101fCfBD5c8', + symbol: 'YSUSDC6MMS', + baseId: USDC, + name: 'Yield Strategy USDC 6M Mar Sep', + decimals: 6, + version: '1', + }, + { + id: '', + address: '0x5582b8398FB586F1b79edd1a6e83f1c5aa558955', + type: StrategyType.V2, + associatedStrategy: '0xD5B43b2550751d372025d048553352ac60f27151', + symbol: 'YSETH6MMS', + baseId: WETH, + name: 'Yield Strategy ETH 6M Mar Sep', + decimals: 18, + version: '1', + }, + { + id: '', + address: '0x5aeB4EFaAA0d27bd606D618BD74Fe883062eAfd0', + type: StrategyType.V2, + associatedStrategy: '0xE779cd75E6c574d83D3FD6C92F3CBE31DD32B1E1', + symbol: 'YSDAI6MMS', + baseId: DAI, + name: 'Yield Strategy DAI 6M Mar Sep', + decimals: 18, + version: '1', + }, + // V2.1 strategies + { + id: '', + address: '0xaf3fc3dfbb469e6c96cf74ddd891fde0b7fb2cf1', + type: StrategyType.V2_1, + associatedStrategy: '0x5aeB4EFaAA0d27bd606D618BD74Fe883062eAfd0', + symbol: 'YSDAI6MMS', + baseId: DAI, + name: 'Yield Strategy DAI 6M Mar Sep', + decimals: 18, + version: '1', + }, + { + id: '', + address: '0xfcd718510f4795b0c19e28a9a6ee153e4062e7ea', + type: StrategyType.V2_1, + associatedStrategy: '0xfe2aba5ba890af0ee8b6f2d488b1f85c9e7c5643', + symbol: 'YSUSDT6MMS', + baseId: USDT, + name: 'Yield Strategy USDT 6M Mar Sep', + decimals: 6, + version: '1', + }, + { + id: '', + address: '0x230a444bec25e179b57a21788ce60ff29c388af4', + associatedStrategy: '0x33e6B154efC7021dD55464c4e11a6AfE1f3D0635', + symbol: 'YSUSDC6MJD', + baseId: USDC, + name: 'Yield Strategy USDC 6M Jun Dec', + decimals: 6, + type: StrategyType.V2_1, + version: '1', + }, + { + id: '', + address: '0x0180044122b3e4ab527cd35b8b219d995639cc5c', + type: StrategyType.V2_1, + associatedStrategy: '0x861509a3fa7d87faa0154aae2cb6c1f92639339a', + symbol: 'YSUSDT6MJD', + baseId: USDT, + name: 'Yield Strategy USDT 6M Jun Dec', + decimals: 6, + version: '1', + }, + { + id: '', + address: '0x16603b22a081cd7ee81f1910b6dcff940adf5bfc', + type: StrategyType.V2_1, + associatedStrategy: '0x3b4FFD93CE5fCf97e61AA8275Ec241C76cC01a47', + symbol: 'YSUSDC6MMS', + baseId: USDC, + name: 'Yield Strategy USDC 6M Mar Sep', + decimals: 6, + version: '1', + }, + { + id: '', + address: '0xf35f409ea81200d83a8c190f27b9eec32ecd8a5a', + type: StrategyType.V2_1, + associatedStrategy: '0x5582b8398FB586F1b79edd1a6e83f1c5aa558955', + symbol: 'YSETH6MMS', + baseId: WETH, + name: 'Yield Strategy ETH 6M Mar Sep', + decimals: 18, + version: '1', + }, + { + id: '', + address: '0x51d3071136d8c32949d8917b90c790fa014ba85d', + type: StrategyType.V2_1, + associatedStrategy: '0xad1983745D6c739537fEaB5bed45795f47A940b3', + symbol: 'YSETH6MJD', + baseId: WETH, + name: 'Yield Strategy ETH 6M Jun Dec', + decimals: 18, + version: '1', + }, + { + id: '', + address: '0x4003b3efa31bae38869db29e9d6593e01659281c', + type: StrategyType.V2_1, + associatedStrategy: '0x4276BEaA49DE905eED06FCDc0aD438a19D3861DD', + symbol: 'YSDAI6MJD', + baseId: DAI, + name: 'Yield Strategy DAI 6M Jun Dec', + decimals: 18, + version: '1', + }, ]); export default STRATEGIES; diff --git a/src/contexts/ChainContext.tsx b/src/contexts/ChainContext.tsx index 286488fb6..37e876382 100644 --- a/src/contexts/ChainContext.tsx +++ b/src/contexts/ChainContext.tsx @@ -1,6 +1,7 @@ import React, { createContext, Dispatch, ReactNode, useCallback, useEffect, useReducer, useContext } from 'react'; import { BigNumber, Contract } from 'ethers'; import { format } from 'date-fns'; +import { StrategyType } from '../config/strategies'; import { useCachedState } from '../hooks/generalHooks'; @@ -219,7 +220,7 @@ const ChainProvider = ({ children }: { children: ReactNode }) => { poolContract, fyTokenContract, - hideSeries: series.hideSeries || false , + hideSeries: series.hideSeries || false, fullDate: format(new Date(series.maturity * 1000), 'dd MMMM yyyy'), displayName: format(new Date(series.maturity * 1000), 'dd MMM yyyy'), @@ -289,7 +290,10 @@ const ChainProvider = ({ children }: { children: ReactNode }) => { /* Attach contract instance */ const _chargeStrategy = useCallback( (strategy: any) => { - const Strategy = contractTypes.Strategy__factory.connect(strategy.address, provider); + const Strategy = + strategy.type === StrategyType.V2_1 + ? contractTypes.StrategyV21__factory.connect(strategy.address, provider) + : contractTypes.Strategy__factory.connect(strategy.address, provider); return { ...strategy, strategyContract: Strategy, diff --git a/src/contexts/UserContext.tsx b/src/contexts/UserContext.tsx index 265f3ef3f..fcb324f33 100644 --- a/src/contexts/UserContext.tsx +++ b/src/contexts/UserContext.tsx @@ -483,8 +483,9 @@ const UserProvider = ({ children }: { children: ReactNode }) => { // _strategy.rewardsRate?.gt(ZERO_BN) && signer ? await stratConnected.callStatic.claim(account) : ZERO_BN; // console.log(accountRewards.gt(ZERO_BN) ? accountRewards.toString() : 'no rewards'); - /* We check if the strategy has been supersecced by a v2 version */ - const hasAnUpdatedVersion = _strategy.type === 'V1' && !!_strategy.associatedStrategy; + /* We check if the strategy has been supersecced by a v2.1 version */ + const hasAnUpdatedVersion = + (_strategy.type === 'V1' || _strategy.type === 'V2') && !!_strategy.associatedStrategy; // TODO - will need to update this for V2.1 i imagine - V2s will also have an updated version /* Attatch the current series (if any) */ const currentSeries = _seriesList.find((s: ISeriesRoot) => @@ -526,7 +527,7 @@ const UserProvider = ({ children }: { children: ReactNode }) => { } /* Decide if stragtegy should be 'active' */ - const isActive = _strategy.type === 'V2' || _strategy.type === 'V1'; // && !_strategy.associatedStrategy) + const isActive = _strategy.type === 'V2.1' || _strategy.type === 'V2' || _strategy.type === 'V1'; // && !_strategy.associatedStrategy) return { ..._strategy, diff --git a/src/contracts/StrategyV21.d.ts b/src/contracts/StrategyV21.d.ts new file mode 100644 index 000000000..fbb09b39c --- /dev/null +++ b/src/contracts/StrategyV21.d.ts @@ -0,0 +1,1935 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + BaseContract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import type { TypedEventFilter, TypedEvent, TypedListener } from "./common"; + +interface StrategyV21Interface extends ethers.utils.Interface { + functions: { + "DOMAIN_SEPARATOR()": FunctionFragment; + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "PERMIT_TYPEHASH()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "base()": FunctionFragment; + "baseCached()": FunctionFragment; + "burn(address)": FunctionFragment; + "burnDivested(address)": FunctionFragment; + "burnPoolTokens(address,uint256)": FunctionFragment; + "buyFYToken(address,address)": FunctionFragment; + "claim(address)": FunctionFragment; + "decimals()": FunctionFragment; + "deploymentChainId()": FunctionFragment; + "divest()": FunctionFragment; + "eject()": FunctionFragment; + "fyToken()": FunctionFragment; + "fyTokenCached()": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "init(address)": FunctionFragment; + "invest(address)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "maturity()": FunctionFragment; + "mint(address)": FunctionFragment; + "mintDivested(address)": FunctionFragment; + "name()": FunctionFragment; + "nonces(address)": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "pool()": FunctionFragment; + "poolCached()": FunctionFragment; + "remit(address)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "restart()": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "rewards(address)": FunctionFragment; + "rewardsPerToken()": FunctionFragment; + "rewardsPeriod()": FunctionFragment; + "rewardsToken()": FunctionFragment; + "setRewards(uint32,uint32,uint96)": FunctionFragment; + "setRewardsToken(address)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "state()": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "version()": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "DOMAIN_SEPARATOR", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "PERMIT_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "allowance", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData(functionFragment: "base", values?: undefined): string; + encodeFunctionData( + functionFragment: "baseCached", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "burn", values: [string]): string; + encodeFunctionData( + functionFragment: "burnDivested", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "burnPoolTokens", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "buyFYToken", + values: [string, string] + ): string; + encodeFunctionData(functionFragment: "claim", values: [string]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "deploymentChainId", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "divest", values?: undefined): string; + encodeFunctionData(functionFragment: "eject", values?: undefined): string; + encodeFunctionData(functionFragment: "fyToken", values?: undefined): string; + encodeFunctionData( + functionFragment: "fyTokenCached", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [BytesLike, string] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [BytesLike[], string] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [BytesLike, string] + ): string; + encodeFunctionData(functionFragment: "init", values: [string]): string; + encodeFunctionData(functionFragment: "invest", values: [string]): string; + encodeFunctionData(functionFragment: "lockRole", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "maturity", values?: undefined): string; + encodeFunctionData(functionFragment: "mint", values: [string]): string; + encodeFunctionData( + functionFragment: "mintDivested", + values: [string] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "nonces", values: [string]): string; + encodeFunctionData( + functionFragment: "permit", + values: [ + string, + string, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData(functionFragment: "pool", values?: undefined): string; + encodeFunctionData( + functionFragment: "poolCached", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "remit", values: [string]): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [BytesLike, string] + ): string; + encodeFunctionData(functionFragment: "restart", values?: undefined): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [BytesLike, string] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [BytesLike[], string] + ): string; + encodeFunctionData(functionFragment: "rewards", values: [string]): string; + encodeFunctionData( + functionFragment: "rewardsPerToken", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "rewardsPeriod", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "rewardsToken", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "setRewards", + values: [BigNumberish, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setRewardsToken", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [BytesLike, BytesLike] + ): string; + encodeFunctionData(functionFragment: "state", values?: undefined): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [string, string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + + decodeFunctionResult( + functionFragment: "DOMAIN_SEPARATOR", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "PERMIT_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "base", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "baseCached", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "burnDivested", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "burnPoolTokens", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "buyFYToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "deploymentChainId", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "divest", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "eject", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "fyToken", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "fyTokenCached", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "init", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "invest", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "maturity", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "mintDivested", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "poolCached", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "remit", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "restart", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "rewards", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "rewardsPerToken", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "rewardsPeriod", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "rewardsToken", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setRewards", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setRewardsToken", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "state", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "Claimed(address,address,uint256)": EventFragment; + "Divested(address,uint256,uint256)": EventFragment; + "Drained(address,uint256)": EventFragment; + "Ejected(address,uint256,uint256,uint256)": EventFragment; + "Invested(address,uint256,uint256)": EventFragment; + "RewardsPerTokenUpdated(uint256)": EventFragment; + "RewardsSet(uint32,uint32,uint256)": EventFragment; + "RewardsTokenSet(address)": EventFragment; + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + "SoldFYToken(uint256,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + "UserRewardsUpdated(address,uint256,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Claimed"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Divested"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Drained"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Ejected"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Invested"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RewardsPerTokenUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RewardsSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RewardsTokenSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SoldFYToken"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; + getEvent(nameOrSignatureOrTopic: "UserRewardsUpdated"): EventFragment; +} + +export type ApprovalEvent = TypedEvent< + [string, string, BigNumber] & { + owner: string; + spender: string; + value: BigNumber; + } +>; + +export type ClaimedEvent = TypedEvent< + [string, string, BigNumber] & { + user: string; + receiver: string; + claimed: BigNumber; + } +>; + +export type DivestedEvent = TypedEvent< + [string, BigNumber, BigNumber] & { + pool: string; + lpTokenDivested: BigNumber; + baseObtained: BigNumber; + } +>; + +export type DrainedEvent = TypedEvent< + [string, BigNumber] & { pool: string; lpTokenDivested: BigNumber } +>; + +export type EjectedEvent = TypedEvent< + [string, BigNumber, BigNumber, BigNumber] & { + pool: string; + lpTokenDivested: BigNumber; + baseObtained: BigNumber; + fyTokenObtained: BigNumber; + } +>; + +export type InvestedEvent = TypedEvent< + [string, BigNumber, BigNumber] & { + pool: string; + baseInvested: BigNumber; + lpTokensObtained: BigNumber; + } +>; + +export type RewardsPerTokenUpdatedEvent = TypedEvent< + [BigNumber] & { accumulated: BigNumber } +>; + +export type RewardsSetEvent = TypedEvent< + [number, number, BigNumber] & { start: number; end: number; rate: BigNumber } +>; + +export type RewardsTokenSetEvent = TypedEvent<[string] & { token: string }>; + +export type RoleAdminChangedEvent = TypedEvent< + [string, string] & { role: string; newAdminRole: string } +>; + +export type RoleGrantedEvent = TypedEvent< + [string, string, string] & { role: string; account: string; sender: string } +>; + +export type RoleRevokedEvent = TypedEvent< + [string, string, string] & { role: string; account: string; sender: string } +>; + +export type SoldFYTokenEvent = TypedEvent< + [BigNumber, BigNumber] & { soldFYToken: BigNumber; returnedBase: BigNumber } +>; + +export type TransferEvent = TypedEvent< + [string, string, BigNumber] & { from: string; to: string; value: BigNumber } +>; + +export type UserRewardsUpdatedEvent = TypedEvent< + [string, BigNumber, BigNumber] & { + user: string; + userRewards: BigNumber; + paidRewardPerToken: BigNumber; + } +>; + +export class StrategyV21 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: StrategyV21Interface; + + functions: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: string, + wad: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(guy: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + base(overrides?: CallOverrides): Promise<[string]>; + + baseCached(overrides?: CallOverrides): Promise<[BigNumber]>; + + "burn(address)"( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "burn(address,address,uint256,uint256)"( + arg0: string, + arg1: string, + arg2: BigNumberish, + arg3: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + burnDivested( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + burnPoolTokens( + pool_: string, + poolTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + buyFYToken( + fyTokenTo: string, + baseTo: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + claim( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + deploymentChainId(overrides?: CallOverrides): Promise<[BigNumber]>; + + divest( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + eject( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + fyToken(overrides?: CallOverrides): Promise<[string]>; + + fyTokenCached(overrides?: CallOverrides): Promise<[BigNumber]>; + + getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise<[string]>; + + grantRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + grantRoles( + roles: BytesLike[], + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + hasRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + init( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + invest( + pool_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + lockRole( + role: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + maturity(overrides?: CallOverrides): Promise<[number]>; + + mint( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + mintDivested( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise<[string]>; + + nonces(arg0: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + permit( + owner: string, + spender: string, + amount: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + pool(overrides?: CallOverrides): Promise<[string]>; + + poolCached(overrides?: CallOverrides): Promise<[BigNumber]>; + + remit( + user: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + renounceRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + restart( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + revokeRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + revokeRoles( + roles: BytesLike[], + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + rewards( + arg0: string, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { accumulated: BigNumber; checkpoint: BigNumber } + >; + + rewardsPerToken( + overrides?: CallOverrides + ): Promise< + [BigNumber, number, BigNumber] & { + accumulated: BigNumber; + lastUpdated: number; + rate: BigNumber; + } + >; + + rewardsPeriod( + overrides?: CallOverrides + ): Promise<[number, number] & { start: number; end: number }>; + + rewardsToken(overrides?: CallOverrides): Promise<[string]>; + + setRewards( + start: BigNumberish, + end: BigNumberish, + rate: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setRewardsToken( + rewardsToken_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setRoleAdmin( + role: BytesLike, + adminRole: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + state(overrides?: CallOverrides): Promise<[number]>; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + dst: string, + wad: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + src: string, + dst: string, + wad: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + version(overrides?: CallOverrides): Promise<[string]>; + }; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + wad: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(guy: string, overrides?: CallOverrides): Promise; + + base(overrides?: CallOverrides): Promise; + + baseCached(overrides?: CallOverrides): Promise; + + "burn(address)"( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "burn(address,address,uint256,uint256)"( + arg0: string, + arg1: string, + arg2: BigNumberish, + arg3: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + burnDivested( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + burnPoolTokens( + pool_: string, + poolTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + buyFYToken( + fyTokenTo: string, + baseTo: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + claim( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + divest( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + eject( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + fyToken(overrides?: CallOverrides): Promise; + + fyTokenCached(overrides?: CallOverrides): Promise; + + getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise; + + grantRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + grantRoles( + roles: BytesLike[], + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + hasRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + init( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + invest( + pool_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + lockRole( + role: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + maturity(overrides?: CallOverrides): Promise; + + mint( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + mintDivested( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces(arg0: string, overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + amount: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + pool(overrides?: CallOverrides): Promise; + + poolCached(overrides?: CallOverrides): Promise; + + remit( + user: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + renounceRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + restart( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + revokeRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + revokeRoles( + roles: BytesLike[], + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + rewards( + arg0: string, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { accumulated: BigNumber; checkpoint: BigNumber } + >; + + rewardsPerToken( + overrides?: CallOverrides + ): Promise< + [BigNumber, number, BigNumber] & { + accumulated: BigNumber; + lastUpdated: number; + rate: BigNumber; + } + >; + + rewardsPeriod( + overrides?: CallOverrides + ): Promise<[number, number] & { start: number; end: number }>; + + rewardsToken(overrides?: CallOverrides): Promise; + + setRewards( + start: BigNumberish, + end: BigNumberish, + rate: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setRewardsToken( + rewardsToken_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setRoleAdmin( + role: BytesLike, + adminRole: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + state(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: string, + wad: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + src: string, + dst: string, + wad: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + version(overrides?: CallOverrides): Promise; + + callStatic: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + wad: BigNumberish, + overrides?: CallOverrides + ): Promise; + + balanceOf(guy: string, overrides?: CallOverrides): Promise; + + base(overrides?: CallOverrides): Promise; + + baseCached(overrides?: CallOverrides): Promise; + + "burn(address)"(to: string, overrides?: CallOverrides): Promise; + + "burn(address,address,uint256,uint256)"( + arg0: string, + arg1: string, + arg2: BigNumberish, + arg3: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber, BigNumber, BigNumber]>; + + burnDivested(to: string, overrides?: CallOverrides): Promise; + + burnPoolTokens( + pool_: string, + poolTokens: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { + baseReceived: BigNumber; + fyTokenReceived: BigNumber; + } + >; + + buyFYToken( + fyTokenTo: string, + baseTo: string, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { + soldFYToken: BigNumber; + returnedBase: BigNumber; + } + >; + + claim(to: string, overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + divest(overrides?: CallOverrides): Promise; + + eject( + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { + baseReceived: BigNumber; + fyTokenReceived: BigNumber; + } + >; + + fyToken(overrides?: CallOverrides): Promise; + + fyTokenCached(overrides?: CallOverrides): Promise; + + getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise; + + grantRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: BytesLike[], + account: string, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + init( + to: string, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + baseIn: BigNumber; + fyTokenIn: BigNumber; + minted: BigNumber; + } + >; + + invest(pool_: string, overrides?: CallOverrides): Promise; + + lockRole(role: BytesLike, overrides?: CallOverrides): Promise; + + maturity(overrides?: CallOverrides): Promise; + + mint(to: string, overrides?: CallOverrides): Promise; + + mintDivested(to: string, overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces(arg0: string, overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + amount: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + pool(overrides?: CallOverrides): Promise; + + poolCached(overrides?: CallOverrides): Promise; + + remit(user: string, overrides?: CallOverrides): Promise; + + renounceRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + restart(overrides?: CallOverrides): Promise; + + revokeRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: BytesLike[], + account: string, + overrides?: CallOverrides + ): Promise; + + rewards( + arg0: string, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { accumulated: BigNumber; checkpoint: BigNumber } + >; + + rewardsPerToken( + overrides?: CallOverrides + ): Promise< + [BigNumber, number, BigNumber] & { + accumulated: BigNumber; + lastUpdated: number; + rate: BigNumber; + } + >; + + rewardsPeriod( + overrides?: CallOverrides + ): Promise<[number, number] & { start: number; end: number }>; + + rewardsToken(overrides?: CallOverrides): Promise; + + setRewards( + start: BigNumberish, + end: BigNumberish, + rate: BigNumberish, + overrides?: CallOverrides + ): Promise; + + setRewardsToken( + rewardsToken_: string, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: BytesLike, + adminRole: BytesLike, + overrides?: CallOverrides + ): Promise; + + state(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: string, + wad: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transferFrom( + src: string, + dst: string, + wad: BigNumberish, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + }; + + filters: { + "Approval(address,address,uint256)"( + owner?: string | null, + spender?: string | null, + value?: null + ): TypedEventFilter< + [string, string, BigNumber], + { owner: string; spender: string; value: BigNumber } + >; + + Approval( + owner?: string | null, + spender?: string | null, + value?: null + ): TypedEventFilter< + [string, string, BigNumber], + { owner: string; spender: string; value: BigNumber } + >; + + "Claimed(address,address,uint256)"( + user?: null, + receiver?: null, + claimed?: null + ): TypedEventFilter< + [string, string, BigNumber], + { user: string; receiver: string; claimed: BigNumber } + >; + + Claimed( + user?: null, + receiver?: null, + claimed?: null + ): TypedEventFilter< + [string, string, BigNumber], + { user: string; receiver: string; claimed: BigNumber } + >; + + "Divested(address,uint256,uint256)"( + pool?: string | null, + lpTokenDivested?: null, + baseObtained?: null + ): TypedEventFilter< + [string, BigNumber, BigNumber], + { pool: string; lpTokenDivested: BigNumber; baseObtained: BigNumber } + >; + + Divested( + pool?: string | null, + lpTokenDivested?: null, + baseObtained?: null + ): TypedEventFilter< + [string, BigNumber, BigNumber], + { pool: string; lpTokenDivested: BigNumber; baseObtained: BigNumber } + >; + + "Drained(address,uint256)"( + pool?: string | null, + lpTokenDivested?: null + ): TypedEventFilter< + [string, BigNumber], + { pool: string; lpTokenDivested: BigNumber } + >; + + Drained( + pool?: string | null, + lpTokenDivested?: null + ): TypedEventFilter< + [string, BigNumber], + { pool: string; lpTokenDivested: BigNumber } + >; + + "Ejected(address,uint256,uint256,uint256)"( + pool?: string | null, + lpTokenDivested?: null, + baseObtained?: null, + fyTokenObtained?: null + ): TypedEventFilter< + [string, BigNumber, BigNumber, BigNumber], + { + pool: string; + lpTokenDivested: BigNumber; + baseObtained: BigNumber; + fyTokenObtained: BigNumber; + } + >; + + Ejected( + pool?: string | null, + lpTokenDivested?: null, + baseObtained?: null, + fyTokenObtained?: null + ): TypedEventFilter< + [string, BigNumber, BigNumber, BigNumber], + { + pool: string; + lpTokenDivested: BigNumber; + baseObtained: BigNumber; + fyTokenObtained: BigNumber; + } + >; + + "Invested(address,uint256,uint256)"( + pool?: string | null, + baseInvested?: null, + lpTokensObtained?: null + ): TypedEventFilter< + [string, BigNumber, BigNumber], + { pool: string; baseInvested: BigNumber; lpTokensObtained: BigNumber } + >; + + Invested( + pool?: string | null, + baseInvested?: null, + lpTokensObtained?: null + ): TypedEventFilter< + [string, BigNumber, BigNumber], + { pool: string; baseInvested: BigNumber; lpTokensObtained: BigNumber } + >; + + "RewardsPerTokenUpdated(uint256)"( + accumulated?: null + ): TypedEventFilter<[BigNumber], { accumulated: BigNumber }>; + + RewardsPerTokenUpdated( + accumulated?: null + ): TypedEventFilter<[BigNumber], { accumulated: BigNumber }>; + + "RewardsSet(uint32,uint32,uint256)"( + start?: null, + end?: null, + rate?: null + ): TypedEventFilter< + [number, number, BigNumber], + { start: number; end: number; rate: BigNumber } + >; + + RewardsSet( + start?: null, + end?: null, + rate?: null + ): TypedEventFilter< + [number, number, BigNumber], + { start: number; end: number; rate: BigNumber } + >; + + "RewardsTokenSet(address)"( + token?: null + ): TypedEventFilter<[string], { token: string }>; + + RewardsTokenSet( + token?: null + ): TypedEventFilter<[string], { token: string }>; + + "RoleAdminChanged(bytes4,bytes4)"( + role?: BytesLike | null, + newAdminRole?: BytesLike | null + ): TypedEventFilter< + [string, string], + { role: string; newAdminRole: string } + >; + + RoleAdminChanged( + role?: BytesLike | null, + newAdminRole?: BytesLike | null + ): TypedEventFilter< + [string, string], + { role: string; newAdminRole: string } + >; + + "RoleGranted(bytes4,address,address)"( + role?: BytesLike | null, + account?: string | null, + sender?: string | null + ): TypedEventFilter< + [string, string, string], + { role: string; account: string; sender: string } + >; + + RoleGranted( + role?: BytesLike | null, + account?: string | null, + sender?: string | null + ): TypedEventFilter< + [string, string, string], + { role: string; account: string; sender: string } + >; + + "RoleRevoked(bytes4,address,address)"( + role?: BytesLike | null, + account?: string | null, + sender?: string | null + ): TypedEventFilter< + [string, string, string], + { role: string; account: string; sender: string } + >; + + RoleRevoked( + role?: BytesLike | null, + account?: string | null, + sender?: string | null + ): TypedEventFilter< + [string, string, string], + { role: string; account: string; sender: string } + >; + + "SoldFYToken(uint256,uint256)"( + soldFYToken?: null, + returnedBase?: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { soldFYToken: BigNumber; returnedBase: BigNumber } + >; + + SoldFYToken( + soldFYToken?: null, + returnedBase?: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { soldFYToken: BigNumber; returnedBase: BigNumber } + >; + + "Transfer(address,address,uint256)"( + from?: string | null, + to?: string | null, + value?: null + ): TypedEventFilter< + [string, string, BigNumber], + { from: string; to: string; value: BigNumber } + >; + + Transfer( + from?: string | null, + to?: string | null, + value?: null + ): TypedEventFilter< + [string, string, BigNumber], + { from: string; to: string; value: BigNumber } + >; + + "UserRewardsUpdated(address,uint256,uint256)"( + user?: null, + userRewards?: null, + paidRewardPerToken?: null + ): TypedEventFilter< + [string, BigNumber, BigNumber], + { user: string; userRewards: BigNumber; paidRewardPerToken: BigNumber } + >; + + UserRewardsUpdated( + user?: null, + userRewards?: null, + paidRewardPerToken?: null + ): TypedEventFilter< + [string, BigNumber, BigNumber], + { user: string; userRewards: BigNumber; paidRewardPerToken: BigNumber } + >; + }; + + estimateGas: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + wad: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(guy: string, overrides?: CallOverrides): Promise; + + base(overrides?: CallOverrides): Promise; + + baseCached(overrides?: CallOverrides): Promise; + + "burn(address)"( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "burn(address,address,uint256,uint256)"( + arg0: string, + arg1: string, + arg2: BigNumberish, + arg3: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + burnDivested( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + burnPoolTokens( + pool_: string, + poolTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + buyFYToken( + fyTokenTo: string, + baseTo: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + claim( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + divest( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + eject( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + fyToken(overrides?: CallOverrides): Promise; + + fyTokenCached(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: BytesLike, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + grantRoles( + roles: BytesLike[], + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + hasRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + init( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + invest( + pool_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + lockRole( + role: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + maturity(overrides?: CallOverrides): Promise; + + mint( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + mintDivested( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces(arg0: string, overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + amount: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + pool(overrides?: CallOverrides): Promise; + + poolCached(overrides?: CallOverrides): Promise; + + remit( + user: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + renounceRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + restart( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + revokeRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + revokeRoles( + roles: BytesLike[], + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + rewards(arg0: string, overrides?: CallOverrides): Promise; + + rewardsPerToken(overrides?: CallOverrides): Promise; + + rewardsPeriod(overrides?: CallOverrides): Promise; + + rewardsToken(overrides?: CallOverrides): Promise; + + setRewards( + start: BigNumberish, + end: BigNumberish, + rate: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setRewardsToken( + rewardsToken_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setRoleAdmin( + role: BytesLike, + adminRole: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + state(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: string, + wad: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + src: string, + dst: string, + wad: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + version(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + wad: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf( + guy: string, + overrides?: CallOverrides + ): Promise; + + base(overrides?: CallOverrides): Promise; + + baseCached(overrides?: CallOverrides): Promise; + + "burn(address)"( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "burn(address,address,uint256,uint256)"( + arg0: string, + arg1: string, + arg2: BigNumberish, + arg3: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + burnDivested( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + burnPoolTokens( + pool_: string, + poolTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + buyFYToken( + fyTokenTo: string, + baseTo: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + claim( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + divest( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + eject( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + fyToken(overrides?: CallOverrides): Promise; + + fyTokenCached(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: BytesLike, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + grantRoles( + roles: BytesLike[], + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + hasRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + init( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + invest( + pool_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + lockRole( + role: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + maturity(overrides?: CallOverrides): Promise; + + mint( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + mintDivested( + to: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces( + arg0: string, + overrides?: CallOverrides + ): Promise; + + permit( + owner: string, + spender: string, + amount: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + pool(overrides?: CallOverrides): Promise; + + poolCached(overrides?: CallOverrides): Promise; + + remit( + user: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + renounceRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + restart( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + revokeRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + revokeRoles( + roles: BytesLike[], + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + rewards( + arg0: string, + overrides?: CallOverrides + ): Promise; + + rewardsPerToken(overrides?: CallOverrides): Promise; + + rewardsPeriod(overrides?: CallOverrides): Promise; + + rewardsToken(overrides?: CallOverrides): Promise; + + setRewards( + start: BigNumberish, + end: BigNumberish, + rate: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setRewardsToken( + rewardsToken_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setRoleAdmin( + role: BytesLike, + adminRole: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + state(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: string, + wad: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + src: string, + dst: string, + wad: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + version(overrides?: CallOverrides): Promise; + }; +} diff --git a/src/contracts/abis/StrategyV2_1.json b/src/contracts/abis/StrategyV2_1.json new file mode 100644 index 000000000..10ced3073 --- /dev/null +++ b/src/contracts/abis/StrategyV2_1.json @@ -0,0 +1,627 @@ +[ + { + "inputs": [ + { "internalType": "string", "name": "name_", "type": "string" }, + { "internalType": "string", "name": "symbol_", "type": "string" }, + { "internalType": "contract IFYToken", "name": "fyToken_", "type": "address" } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "address", "name": "user", "type": "address" }, + { "indexed": false, "internalType": "address", "name": "receiver", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "claimed", "type": "uint256" } + ], + "name": "Claimed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "pool", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "lpTokenDivested", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "baseObtained", "type": "uint256" } + ], + "name": "Divested", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "pool", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "lpTokenDivested", "type": "uint256" } + ], + "name": "Drained", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "pool", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "lpTokenDivested", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "baseObtained", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "fyTokenObtained", "type": "uint256" } + ], + "name": "Ejected", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "pool", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "baseInvested", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "lpTokensObtained", "type": "uint256" } + ], + "name": "Invested", + "type": "event" + }, + { + "anonymous": false, + "inputs": [{ "indexed": false, "internalType": "uint256", "name": "accumulated", "type": "uint256" }], + "name": "RewardsPerTokenUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "uint32", "name": "start", "type": "uint32" }, + { "indexed": false, "internalType": "uint32", "name": "end", "type": "uint32" }, + { "indexed": false, "internalType": "uint256", "name": "rate", "type": "uint256" } + ], + "name": "RewardsSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [{ "indexed": false, "internalType": "contract IERC20", "name": "token", "type": "address" }], + "name": "RewardsTokenSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "bytes4", "name": "role", "type": "bytes4" }, + { "indexed": true, "internalType": "bytes4", "name": "newAdminRole", "type": "bytes4" } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "bytes4", "name": "role", "type": "bytes4" }, + { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "sender", "type": "address" } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "bytes4", "name": "role", "type": "bytes4" }, + { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "sender", "type": "address" } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "uint256", "name": "soldFYToken", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "returnedBase", "type": "uint256" } + ], + "name": "SoldFYToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "address", "name": "user", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "userRewards", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "paidRewardPerToken", "type": "uint256" } + ], + "name": "UserRewardsUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "LOCK", + "outputs": [{ "internalType": "bytes4", "name": "", "type": "bytes4" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "LOCK8605463013", + "outputs": [{ "internalType": "bytes4", "name": "", "type": "bytes4" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PERMIT_TYPEHASH", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ROOT", + "outputs": [{ "internalType": "bytes4", "name": "", "type": "bytes4" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ROOT4146650865", + "outputs": [{ "internalType": "bytes4", "name": "", "type": "bytes4" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "owner", "type": "address" }, + { "internalType": "address", "name": "spender", "type": "address" } + ], + "name": "allowance", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "wad", "type": "uint256" } + ], + "name": "approve", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "guy", "type": "address" }], + "name": "balanceOf", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "base", + "outputs": [{ "internalType": "contract IERC20", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "baseCached", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "to", "type": "address" }], + "name": "burn", + "outputs": [{ "internalType": "uint256", "name": "poolTokensObtained", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "", "type": "address" }, + { "internalType": "address", "name": "", "type": "address" }, + { "internalType": "uint256", "name": "", "type": "uint256" }, + { "internalType": "uint256", "name": "", "type": "uint256" } + ], + "name": "burn", + "outputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" }, + { "internalType": "uint256", "name": "", "type": "uint256" }, + { "internalType": "uint256", "name": "", "type": "uint256" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "to", "type": "address" }], + "name": "burnDivested", + "outputs": [{ "internalType": "uint256", "name": "baseObtained", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "contract IPool", "name": "pool_", "type": "address" }, + { "internalType": "uint256", "name": "poolTokens", "type": "uint256" } + ], + "name": "burnPoolTokens", + "outputs": [ + { "internalType": "uint256", "name": "baseReceived", "type": "uint256" }, + { "internalType": "uint256", "name": "fyTokenReceived", "type": "uint256" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "fyTokenTo", "type": "address" }, + { "internalType": "address", "name": "baseTo", "type": "address" } + ], + "name": "buyFYToken", + "outputs": [ + { "internalType": "uint256", "name": "soldFYToken", "type": "uint256" }, + { "internalType": "uint256", "name": "returnedBase", "type": "uint256" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "to", "type": "address" }], + "name": "claim", + "outputs": [{ "internalType": "uint256", "name": "claiming", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "deploymentChainId", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "divest", + "outputs": [{ "internalType": "uint256", "name": "baseObtained", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "eject", + "outputs": [ + { "internalType": "uint256", "name": "baseReceived", "type": "uint256" }, + { "internalType": "uint256", "name": "fyTokenReceived", "type": "uint256" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "fyToken", + "outputs": [{ "internalType": "contract IFYToken", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fyTokenCached", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "bytes4", "name": "role", "type": "bytes4" }], + "name": "getRoleAdmin", + "outputs": [{ "internalType": "bytes4", "name": "", "type": "bytes4" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes4", "name": "role", "type": "bytes4" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes4[]", "name": "roles", "type": "bytes4[]" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "grantRoles", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes4", "name": "role", "type": "bytes4" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "hasRole", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "to", "type": "address" }], + "name": "init", + "outputs": [ + { "internalType": "uint256", "name": "baseIn", "type": "uint256" }, + { "internalType": "uint256", "name": "fyTokenIn", "type": "uint256" }, + { "internalType": "uint256", "name": "minted", "type": "uint256" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "contract IPool", "name": "pool_", "type": "address" }], + "name": "invest", + "outputs": [{ "internalType": "uint256", "name": "poolTokensObtained", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "bytes4", "name": "role", "type": "bytes4" }], + "name": "lockRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "maturity", + "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "to", "type": "address" }], + "name": "mint", + "outputs": [{ "internalType": "uint256", "name": "minted", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "to", "type": "address" }], + "name": "mintDivested", + "outputs": [{ "internalType": "uint256", "name": "minted", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "nonces", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "owner", "type": "address" }, + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "uint256", "name": "deadline", "type": "uint256" }, + { "internalType": "uint8", "name": "v", "type": "uint8" }, + { "internalType": "bytes32", "name": "r", "type": "bytes32" }, + { "internalType": "bytes32", "name": "s", "type": "bytes32" } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pool", + "outputs": [{ "internalType": "contract IPool", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "poolCached", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "user", "type": "address" }], + "name": "remit", + "outputs": [{ "internalType": "uint256", "name": "claiming", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes4", "name": "role", "type": "bytes4" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "restart", + "outputs": [{ "internalType": "uint256", "name": "baseIn", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes4", "name": "role", "type": "bytes4" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes4[]", "name": "roles", "type": "bytes4[]" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "revokeRoles", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "rewards", + "outputs": [ + { "internalType": "uint128", "name": "accumulated", "type": "uint128" }, + { "internalType": "uint128", "name": "checkpoint", "type": "uint128" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardsPerToken", + "outputs": [ + { "internalType": "uint128", "name": "accumulated", "type": "uint128" }, + { "internalType": "uint32", "name": "lastUpdated", "type": "uint32" }, + { "internalType": "uint96", "name": "rate", "type": "uint96" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardsPeriod", + "outputs": [ + { "internalType": "uint32", "name": "start", "type": "uint32" }, + { "internalType": "uint32", "name": "end", "type": "uint32" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardsToken", + "outputs": [{ "internalType": "contract IERC20", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint32", "name": "start", "type": "uint32" }, + { "internalType": "uint32", "name": "end", "type": "uint32" }, + { "internalType": "uint96", "name": "rate", "type": "uint96" } + ], + "name": "setRewards", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "contract IERC20", "name": "rewardsToken_", "type": "address" }], + "name": "setRewardsToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes4", "name": "role", "type": "bytes4" }, + { "internalType": "bytes4", "name": "adminRole", "type": "bytes4" } + ], + "name": "setRoleAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "state", + "outputs": [{ "internalType": "enum Strategy.State", "name": "", "type": "uint8" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "dst", "type": "address" }, + { "internalType": "uint256", "name": "wad", "type": "uint256" } + ], + "name": "transfer", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "src", "type": "address" }, + { "internalType": "address", "name": "dst", "type": "address" }, + { "internalType": "uint256", "name": "wad", "type": "uint256" } + ], + "name": "transferFrom", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "pure", + "type": "function" + } +] diff --git a/src/contracts/factories/StrategyV21__factory.ts b/src/contracts/factories/StrategyV21__factory.ts new file mode 100644 index 000000000..bbc330a7e --- /dev/null +++ b/src/contracts/factories/StrategyV21__factory.ts @@ -0,0 +1,1411 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import { Provider } from "@ethersproject/providers"; +import type { StrategyV21, StrategyV21Interface } from "../StrategyV21"; + +const _abi = [ + { + inputs: [ + { + internalType: "string", + name: "name_", + type: "string", + }, + { + internalType: "string", + name: "symbol_", + type: "string", + }, + { + internalType: "contract IFYToken", + name: "fyToken_", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "receiver", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "claimed", + type: "uint256", + }, + ], + name: "Claimed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "pool", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "lpTokenDivested", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "baseObtained", + type: "uint256", + }, + ], + name: "Divested", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "pool", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "lpTokenDivested", + type: "uint256", + }, + ], + name: "Drained", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "pool", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "lpTokenDivested", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "baseObtained", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "fyTokenObtained", + type: "uint256", + }, + ], + name: "Ejected", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "pool", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "baseInvested", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "lpTokensObtained", + type: "uint256", + }, + ], + name: "Invested", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "accumulated", + type: "uint256", + }, + ], + name: "RewardsPerTokenUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint32", + name: "start", + type: "uint32", + }, + { + indexed: false, + internalType: "uint32", + name: "end", + type: "uint32", + }, + { + indexed: false, + internalType: "uint256", + name: "rate", + type: "uint256", + }, + ], + name: "RewardsSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "contract IERC20", + name: "token", + type: "address", + }, + ], + name: "RewardsTokenSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes4", + name: "role", + type: "bytes4", + }, + { + indexed: true, + internalType: "bytes4", + name: "newAdminRole", + type: "bytes4", + }, + ], + name: "RoleAdminChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes4", + name: "role", + type: "bytes4", + }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleGranted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes4", + name: "role", + type: "bytes4", + }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleRevoked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "soldFYToken", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "returnedBase", + type: "uint256", + }, + ], + name: "SoldFYToken", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "userRewards", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "paidRewardPerToken", + type: "uint256", + }, + ], + name: "UserRewardsUpdated", + type: "event", + }, + { + inputs: [], + name: "DOMAIN_SEPARATOR", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "LOCK", + outputs: [ + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "LOCK8605463013", + outputs: [ + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "PERMIT_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "ROOT", + outputs: [ + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "ROOT4146650865", + outputs: [ + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "wad", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "guy", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "base", + outputs: [ + { + internalType: "contract IERC20", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "baseCached", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "burn", + outputs: [ + { + internalType: "uint256", + name: "poolTokensObtained", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "burn", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "burnDivested", + outputs: [ + { + internalType: "uint256", + name: "baseObtained", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IPool", + name: "pool_", + type: "address", + }, + { + internalType: "uint256", + name: "poolTokens", + type: "uint256", + }, + ], + name: "burnPoolTokens", + outputs: [ + { + internalType: "uint256", + name: "baseReceived", + type: "uint256", + }, + { + internalType: "uint256", + name: "fyTokenReceived", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "fyTokenTo", + type: "address", + }, + { + internalType: "address", + name: "baseTo", + type: "address", + }, + ], + name: "buyFYToken", + outputs: [ + { + internalType: "uint256", + name: "soldFYToken", + type: "uint256", + }, + { + internalType: "uint256", + name: "returnedBase", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "claim", + outputs: [ + { + internalType: "uint256", + name: "claiming", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "deploymentChainId", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "divest", + outputs: [ + { + internalType: "uint256", + name: "baseObtained", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "eject", + outputs: [ + { + internalType: "uint256", + name: "baseReceived", + type: "uint256", + }, + { + internalType: "uint256", + name: "fyTokenReceived", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "fyToken", + outputs: [ + { + internalType: "contract IFYToken", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "fyTokenCached", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "role", + type: "bytes4", + }, + ], + name: "getRoleAdmin", + outputs: [ + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "role", + type: "bytes4", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "grantRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4[]", + name: "roles", + type: "bytes4[]", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "grantRoles", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "role", + type: "bytes4", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "hasRole", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "init", + outputs: [ + { + internalType: "uint256", + name: "baseIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "fyTokenIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "minted", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IPool", + name: "pool_", + type: "address", + }, + ], + name: "invest", + outputs: [ + { + internalType: "uint256", + name: "poolTokensObtained", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "role", + type: "bytes4", + }, + ], + name: "lockRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "maturity", + outputs: [ + { + internalType: "uint32", + name: "", + type: "uint32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "mint", + outputs: [ + { + internalType: "uint256", + name: "minted", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "mintDivested", + outputs: [ + { + internalType: "uint256", + name: "minted", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "nonces", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "permit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "pool", + outputs: [ + { + internalType: "contract IPool", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "poolCached", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "user", + type: "address", + }, + ], + name: "remit", + outputs: [ + { + internalType: "uint256", + name: "claiming", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "role", + type: "bytes4", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "renounceRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "restart", + outputs: [ + { + internalType: "uint256", + name: "baseIn", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "role", + type: "bytes4", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "revokeRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4[]", + name: "roles", + type: "bytes4[]", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "revokeRoles", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "rewards", + outputs: [ + { + internalType: "uint128", + name: "accumulated", + type: "uint128", + }, + { + internalType: "uint128", + name: "checkpoint", + type: "uint128", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "rewardsPerToken", + outputs: [ + { + internalType: "uint128", + name: "accumulated", + type: "uint128", + }, + { + internalType: "uint32", + name: "lastUpdated", + type: "uint32", + }, + { + internalType: "uint96", + name: "rate", + type: "uint96", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "rewardsPeriod", + outputs: [ + { + internalType: "uint32", + name: "start", + type: "uint32", + }, + { + internalType: "uint32", + name: "end", + type: "uint32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "rewardsToken", + outputs: [ + { + internalType: "contract IERC20", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint32", + name: "start", + type: "uint32", + }, + { + internalType: "uint32", + name: "end", + type: "uint32", + }, + { + internalType: "uint96", + name: "rate", + type: "uint96", + }, + ], + name: "setRewards", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IERC20", + name: "rewardsToken_", + type: "address", + }, + ], + name: "setRewardsToken", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "role", + type: "bytes4", + }, + { + internalType: "bytes4", + name: "adminRole", + type: "bytes4", + }, + ], + name: "setRoleAdmin", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "state", + outputs: [ + { + internalType: "enum Strategy.State", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "dst", + type: "address", + }, + { + internalType: "uint256", + name: "wad", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "src", + type: "address", + }, + { + internalType: "address", + name: "dst", + type: "address", + }, + { + internalType: "uint256", + name: "wad", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "pure", + type: "function", + }, +]; + +export class StrategyV21__factory { + static readonly abi = _abi; + static createInterface(): StrategyV21Interface { + return new utils.Interface(_abi) as StrategyV21Interface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): StrategyV21 { + return new Contract(address, _abi, signerOrProvider) as StrategyV21; + } +} diff --git a/src/contracts/index.ts b/src/contracts/index.ts index eb26a04ae..55e17b7aa 100644 --- a/src/contracts/index.ts +++ b/src/contracts/index.ts @@ -20,6 +20,7 @@ export type { LadleStorage } from "./LadleStorage"; export type { NotionalMultiOracle } from "./NotionalMultiOracle"; export type { Pool } from "./Pool"; export type { Strategy } from "./Strategy"; +export type { StrategyV21 } from "./StrategyV21"; export type { Transfer1155Module } from "./Transfer1155Module"; export type { UniswapV3Oracle } from "./UniswapV3Oracle"; export type { Witch } from "./Witch"; @@ -46,6 +47,7 @@ export { LadleStorage__factory } from "./factories/LadleStorage__factory"; export { NotionalMultiOracle__factory } from "./factories/NotionalMultiOracle__factory"; export { Pool__factory } from "./factories/Pool__factory"; export { Strategy__factory } from "./factories/Strategy__factory"; +export { StrategyV21__factory } from "./factories/StrategyV21__factory"; export { Transfer1155Module__factory } from "./factories/Transfer1155Module__factory"; export { UniswapV3Oracle__factory } from "./factories/UniswapV3Oracle__factory"; export { Witch__factory } from "./factories/Witch__factory"; diff --git a/src/hooks/actionHooks/useRemoveLiquidity.ts b/src/hooks/actionHooks/useRemoveLiquidity.ts index 146912797..f4658ddf3 100644 --- a/src/hooks/actionHooks/useRemoveLiquidity.ts +++ b/src/hooks/actionHooks/useRemoveLiquidity.ts @@ -91,7 +91,6 @@ export const useRemoveLiquidity = () => { if (!contracts) return; if (!isActionAllowed(ActionCodes.REMOVE_LIQUIDITY)) return; // return if action is not allowed - /* generate the reproducible txCode for tx tracking and tracing */ const txCode = getTxCode(ActionCodes.REMOVE_LIQUIDITY, series.id); @@ -328,13 +327,29 @@ export const useRemoveLiquidity = () => { ignoreIf: !_strategy || _strategy.type === StrategyType.V2 || !_associatedStrategyContract, }, - /* If removing from a V2 strategy, simply burn fromm strategy to the pool address */ + /* with new strats version V2.1, we also need to burn the V2 tokens to the V2.1 strategies */ + { + operation: LadleActions.Fn.ROUTE, + args: [_strategy.associatedStrategy || series.poolAddress] as RoutedActions.Args.BURN_STRATEGY_TOKENS, + fnName: RoutedActions.Fn.BURN_STRATEGY_TOKENS, + targetContract: _strategy.strategyContract, + ignoreIf: !_strategy || _strategy.type === StrategyType.V2_1, + }, + { + operation: LadleActions.Fn.ROUTE, + args: [series.poolAddress] as RoutedActions.Args.BURN_STRATEGY_TOKENS, + fnName: RoutedActions.Fn.BURN_STRATEGY_TOKENS, + targetContract: _associatedStrategyContract, + ignoreIf: !_strategy || _strategy.type === StrategyType.V2_1 || !_associatedStrategyContract, + }, + + /* If removing from a V2.1 strategy, simply burn fromm strategy to the pool address */ { operation: LadleActions.Fn.ROUTE, args: [series.poolAddress] as RoutedActions.Args.BURN_STRATEGY_TOKENS, fnName: RoutedActions.Fn.BURN_STRATEGY_TOKENS, targetContract: _strategy.strategyContract, - ignoreIf: !_strategy || _strategy.type === StrategyType.V1, + ignoreIf: !_strategy || _strategy.type === StrategyType.V1 || _strategy.type === StrategyType.V2, }, /** diff --git a/src/hooks/useChain.ts b/src/hooks/useChain.ts index 674eaac49..05fc11408 100644 --- a/src/hooks/useChain.ts +++ b/src/hooks/useChain.ts @@ -51,70 +51,68 @@ export const useChain = () => { * * @returns { Promise } */ const transact = async (calls: ICallData[], txCode: string): Promise => { - - toast.warn('Transactions via the UI have been paused due to a reported issue. All funds are safe. Please follow our Twitter account for more information.') + // toast.warn('Transactions via the UI have been paused due to a reported issue. All funds are safe. Please follow our Twitter account for more information.') + + // return; - return; + if (!contracts) return; - // if (!contracts) return; - // /* Set the router contract instance, ladle by default */ - // const _contract: Contract = contracts.get(ContractNames.LADLE)?.connect(signer!) as Ladle; + const _contract: Contract = contracts.get(ContractNames.LADLE)?.connect(signer!) as Ladle; // /* First, filter out any ignored calls */ - // const _calls = calls.filter((call: ICallData) => !call.ignoreIf); - // console.log('Batch multicalls: ', _calls); + const _calls = calls.filter((call: ICallData) => !call.ignoreIf); + console.log('Batch multicalls: ', _calls); // /* Encode each of the calls OR preEncoded route calls */ - // const encodedCalls = _calls.map((call: ICallData) => { - // /* 'pre-encode' routed calls if required */ - // if (call.operation === LadleActions.Fn.ROUTE || call.operation === LadleActions.Fn.MODULE) { - // if (call.fnName && call.targetContract) { - // console.log('contract', call.targetContract); - // console.log('fnName', call.fnName); - // console.log('args', call.args); - // const encodedFn = (call.targetContract as Contract).interface.encodeFunctionData(call.fnName, call.args); - - // if (call.operation === LadleActions.Fn.ROUTE) - // return _contract.interface.encodeFunctionData(LadleActions.Fn.ROUTE, [ - // call.targetContract.address, - // encodedFn, - // ]); - - // if (call.operation === LadleActions.Fn.MODULE) - // return _contract.interface.encodeFunctionData(LadleActions.Fn.MODULE, [ - // call.targetContract.address, - // encodedFn, - // ]); - // } - // throw new Error('Function name and contract target required for routing/ module interaction'); - // } - // /* else */ - // return _contract.interface.encodeFunctionData(call.operation as string, call.args); - // }); + const encodedCalls = _calls.map((call: ICallData) => { + /* 'pre-encode' routed calls if required */ + if (call.operation === LadleActions.Fn.ROUTE || call.operation === LadleActions.Fn.MODULE) { + if (call.fnName && call.targetContract) { + console.log('contract', call.targetContract); + console.log('fnName', call.fnName); + console.log('args', call.args); + const encodedFn = (call.targetContract as Contract).interface.encodeFunctionData(call.fnName, call.args); + + if (call.operation === LadleActions.Fn.ROUTE) + return _contract.interface.encodeFunctionData(LadleActions.Fn.ROUTE, [ + call.targetContract.address, + encodedFn, + ]); + + if (call.operation === LadleActions.Fn.MODULE) + return _contract.interface.encodeFunctionData(LadleActions.Fn.MODULE, [ + call.targetContract.address, + encodedFn, + ]); + } + throw new Error('Function name and contract target required for routing/ module interaction'); + } + /* else */ + return _contract.interface.encodeFunctionData(call.operation as string, call.args); + }); // /* calculate the value sent */ - // const batchValue = _getCallValue(_calls); + const batchValue = _getCallValue(_calls); // /* calculate the gas required */ - // let gasEst: BigNumber; - // // let gasEstFail: boolean = false; - // try { - // gasEst = await _contract.estimateGas.batch(encodedCalls, { value: batchValue } as PayableOverrides); - // console.log('Auto gas estimate:', gasEst.mul(135).div(100).toString()); - // } catch (e: any) { - // gasEst = BigNumber.from(500000); - // /* handle if the tx if going to fail and transactions aren't forced */ - // if (!forceTransactions) return handleTxWillFail(e.error, txCode, e.transaction); - // } - - // /* Finally, send out the transaction */ - // return handleTx( - // () => - // _contract.batch(encodedCalls, { value: batchValue, gasLimit: gasEst.mul(120).div(100) } as PayableOverrides), - // txCode - // ); - + let gasEst: BigNumber; + // let gasEstFail: boolean = false; + try { + gasEst = await _contract.estimateGas.batch(encodedCalls, { value: batchValue } as PayableOverrides); + console.log('Auto gas estimate:', gasEst.mul(135).div(100).toString()); + } catch (e: any) { + gasEst = BigNumber.from(500000); + /* handle if the tx if going to fail and transactions aren't forced */ + if (!forceTransactions) return handleTxWillFail(e.error, txCode, e.transaction); + } + + /* Finally, send out the transaction */ + return handleTx( + () => + _contract.batch(encodedCalls, { value: batchValue, gasLimit: gasEst.mul(120).div(100) } as PayableOverrides), + txCode + ); }; /** diff --git a/src/types/index.ts b/src/types/index.ts index a98078793..018333886 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -111,7 +111,7 @@ export interface ISeriesRoot extends ISignable { oppEndColor: string; seriesMark: ReactNode; - + allowActions: (ActionCodes | 'allow_all' | 'allow_none')[]; } @@ -198,7 +198,7 @@ export interface IStrategyRoot extends ISignable { decimals: number; strategyContract: Strategy; startBlock: Block; - type: 'V1' | 'V2'; + type: 'V1' | 'V2' | 'V2.1'; associatedStrategy?: string; } @@ -239,7 +239,6 @@ export interface ISeries extends ISeriesRoot { currentInvariant?: BigNumber; initInvariant?: BigNumber; startBlock: Block; - } export interface IDummyVault extends IVaultRoot {} From 3f3faaed4da749da59e3bf4b8c977e2a145d7c47 Mon Sep 17 00:00:00 2001 From: Jacob Bryant Date: Fri, 26 May 2023 10:48:31 -0400 Subject: [PATCH 02/51] updating strats/pools for new fork --- .env.local | 2 +- src/config/series.ts | 16 ++++++++-------- src/config/strategies.ts | 39 +++++++++++++++++++++++---------------- 3 files changed, 32 insertions(+), 25 deletions(-) diff --git a/.env.local b/.env.local index 9717a7791..e7d05f433 100644 --- a/.env.local +++ b/.env.local @@ -4,7 +4,7 @@ REACT_APP_VERSION=$npm_package_version REACT_APP_RPC_URL_1='https://eth-mainnet.g.alchemy.com/v2/ZXDCq5iy0KrKR0XjsqC6E4QG7Z_FuXDv' REACT_APP_RPC_URL_42161='https://arb-mainnet.g.alchemy.com/v2/vtMM4_eLnOvkjkdckprVw3cIa64EVkDZ' -REACT_APP_DEFAULT_FORK_RPC_URL='https://rpc.tenderly.co/fork/55b1a40f-14c2-40f6-9922-3c2dbfc9ff2c' +REACT_APP_DEFAULT_FORK_RPC_URL='https://rpc.tenderly.co/fork/8af83c2a-fd18-4e2a-b472-d19c884eea54' REACT_APP_LOCALHOST_RPC_URL='http://127.0.0.1:8545' REACT_APP_RPC_URL_421611='https://arb-rinkeby.g.alchemy.com/v2/AY_Q_Uy-Kcfwmf5In5qwG636vaOIoA8L' diff --git a/src/config/series.ts b/src/config/series.ts index a3ec44ec6..8c116c4d4 100644 --- a/src/config/series.ts +++ b/src/config/series.ts @@ -1218,7 +1218,7 @@ SERIES.set( address: '0x523803c57a497c3AD0E850766c8276D4864edEA5', decimals: 18, version: '1', - poolAddress: '0x0989731871baacd9dd043aba9c2937df96a6891b', // + poolAddress: '0x16b879e16c43716355aab2b6be2e8c25d535a97a', // poolName: 'FYETH2306 LP', poolSymbol: 'FYETH2306LP', poolVersion: '1', @@ -1239,7 +1239,7 @@ SERIES.set( address: '0x60a6A7fabe11ff36cbE917a17666848f0FF3A60a', decimals: 18, version: '1', - poolAddress: '0x22564ba8a8601008c1146e58ead358c0bbafe17a', // + poolAddress: '0x4f6ce8ba6a41e05c037563098eb202cde7067888', // poolName: 'FYDAI2306 LP', poolSymbol: 'FYDAI2306LP', poolVersion: '1', @@ -1260,7 +1260,7 @@ SERIES.set( address: '0xcbb7eba13f9e1d97b2138f588f5ca2f5167f06cc', decimals: 6, version: '1', - poolAddress: '0x6befdb94b58396949f7839dd4131d0cc11a79b35', // + poolAddress: '0xf3257886fd89b360be83aefb6c782292fdc79dac', // poolName: 'FYUSDC2306 LP', poolSymbol: 'FYUSDC2306LP', poolVersion: '1', @@ -1281,7 +1281,7 @@ SERIES.set( address: '0x035072cb2912daab7b578f468bd6f0d32a269e32', decimals: 6, version: '1', - poolAddress: '0x8ae587684abffccd57547b24da4b8ff1cc7f7e9d', // + poolAddress: '0xb09c9a055ef76a8c6901fdfd1e830b449fc811ff', // poolName: 'FYUSDT2306 LP', poolSymbol: 'FYUSDT2306LP', poolVersion: '1', @@ -1324,7 +1324,7 @@ SERIES.set( address: '0x5Bb78E530D9365aeF75664c5093e40B0001F7CCd', decimals: 6, version: '1', - poolAddress: '0x0af81ebc2087ae12bfd16160ba6ca6b76532bdb7', // + poolAddress: '0xb3968390ae08ceb4111d3c0002fe8378126a0a34', // poolName: 'FYUSDC2309 LP', poolSymbol: 'FYUSDC2309LP', poolVersion: '1', @@ -1345,7 +1345,7 @@ SERIES.set( address: '0xd947360575E6F01Ce7A210C12F2EE37F5ab12d11', decimals: 18, version: '1', - poolAddress: '0xe309307160e093609c62de25d22a97281ebf837a', // + poolAddress: '0xc18baca1f5ed437233c7312a8a0b86020f3243ef', // poolName: 'FYETH2309 LP', poolSymbol: 'FYETH2309LP', poolVersion: '1', @@ -1366,7 +1366,7 @@ SERIES.set( address: '0xEE508c827a8990c04798B242fa801C5351012B23', decimals: 18, version: '1', - poolAddress: '0x1ba8533654517c6731d2c43424a09f887bf5d57d', // + poolAddress: '0xe12fb10698698596b67a6bce73038aaf7d3627d4', // poolName: 'FYDAI2309 LP', poolSymbol: 'FYDAI2309LP', poolVersion: '1', @@ -1387,7 +1387,7 @@ SERIES.set( address: '0x9B19889794A30056A1E5Be118ee0a6647B184c5f', decimals: 6, version: '1', - poolAddress: '0xd7cf0b7fe1d19a22d52bfce4cddc5aefc41ddca2', // + poolAddress: '0xb7ae92d44fe10b2fb9e701946da7074d8bea823b', // poolName: 'FYUSDT2309 LP', poolSymbol: 'FYUSDT2309LP', poolVersion: '1', diff --git a/src/config/strategies.ts b/src/config/strategies.ts index 9db058ca4..3a1e096be 100644 --- a/src/config/strategies.ts +++ b/src/config/strategies.ts @@ -188,9 +188,9 @@ STRATEGIES.set(42161, [ // V2.1 strategies { id: '', - address: '0xaf3fc3dfbb469e6c96cf74ddd891fde0b7fb2cf1', + address: '0x96b87c0aacb01a09c0de249238d56c6d3a9629a8', // type: StrategyType.V2_1, - associatedStrategy: '0x5aeB4EFaAA0d27bd606D618BD74Fe883062eAfd0', + associatedStrategy: '0x5aeB4EFaAA0d27bd606D618BD74Fe883062eAfd0', // v2 strat symbol: 'YSDAI6MMS', baseId: DAI, name: 'Yield Strategy DAI 6M Mar Sep', @@ -199,9 +199,9 @@ STRATEGIES.set(42161, [ }, { id: '', - address: '0xfcd718510f4795b0c19e28a9a6ee153e4062e7ea', + address: '0x29a98294d9da369458d33ed9dd69f0dd36f14484', // type: StrategyType.V2_1, - associatedStrategy: '0xfe2aba5ba890af0ee8b6f2d488b1f85c9e7c5643', + associatedStrategy: '0xfe2aba5ba890af0ee8b6f2d488b1f85c9e7c5643', // v2 strat symbol: 'YSUSDT6MMS', baseId: USDT, name: 'Yield Strategy USDT 6M Mar Sep', @@ -210,8 +210,8 @@ STRATEGIES.set(42161, [ }, { id: '', - address: '0x230a444bec25e179b57a21788ce60ff29c388af4', - associatedStrategy: '0x33e6B154efC7021dD55464c4e11a6AfE1f3D0635', + address: '0xbd54fa0318f8337023548f42566637ebcc57fb51', // + associatedStrategy: '0x33e6B154efC7021dD55464c4e11a6AfE1f3D0635', // v2 strat symbol: 'YSUSDC6MJD', baseId: USDC, name: 'Yield Strategy USDC 6M Jun Dec', @@ -221,9 +221,9 @@ STRATEGIES.set(42161, [ }, { id: '', - address: '0x0180044122b3e4ab527cd35b8b219d995639cc5c', + address: '0xf5fd98286fd9d3d94cd63098cc3ce0df5891de73', // type: StrategyType.V2_1, - associatedStrategy: '0x861509a3fa7d87faa0154aae2cb6c1f92639339a', + associatedStrategy: '0x861509a3fa7d87faa0154aae2cb6c1f92639339a', // v2 strat symbol: 'YSUSDT6MJD', baseId: USDT, name: 'Yield Strategy USDT 6M Jun Dec', @@ -232,9 +232,9 @@ STRATEGIES.set(42161, [ }, { id: '', - address: '0x16603b22a081cd7ee81f1910b6dcff940adf5bfc', + address: '0xd9446472697d0616a0183dad96567bbe5edd1dd4', // type: StrategyType.V2_1, - associatedStrategy: '0x3b4FFD93CE5fCf97e61AA8275Ec241C76cC01a47', + associatedStrategy: '0x3b4FFD93CE5fCf97e61AA8275Ec241C76cC01a47', // v2 strat symbol: 'YSUSDC6MMS', baseId: USDC, name: 'Yield Strategy USDC 6M Mar Sep', @@ -243,9 +243,9 @@ STRATEGIES.set(42161, [ }, { id: '', - address: '0xf35f409ea81200d83a8c190f27b9eec32ecd8a5a', + address: '0xfab75a23dd3ecc91d866cb151cee7830857f49cc', // type: StrategyType.V2_1, - associatedStrategy: '0x5582b8398FB586F1b79edd1a6e83f1c5aa558955', + associatedStrategy: '0x5582b8398FB586F1b79edd1a6e83f1c5aa558955', // v2 strat symbol: 'YSETH6MMS', baseId: WETH, name: 'Yield Strategy ETH 6M Mar Sep', @@ -254,9 +254,9 @@ STRATEGIES.set(42161, [ }, { id: '', - address: '0x51d3071136d8c32949d8917b90c790fa014ba85d', + address: '0xc315b7b54b496b0d986684f4682e1d7acfb997e9', // type: StrategyType.V2_1, - associatedStrategy: '0xad1983745D6c739537fEaB5bed45795f47A940b3', + associatedStrategy: '0xad1983745D6c739537fEaB5bed45795f47A940b3', // v2 strat symbol: 'YSETH6MJD', baseId: WETH, name: 'Yield Strategy ETH 6M Jun Dec', @@ -265,15 +265,22 @@ STRATEGIES.set(42161, [ }, { id: '', - address: '0x4003b3efa31bae38869db29e9d6593e01659281c', + address: '0x38069499bd940ce637b3ed19c2cbc9df498d90d5', // type: StrategyType.V2_1, - associatedStrategy: '0x4276BEaA49DE905eED06FCDc0aD438a19D3861DD', + associatedStrategy: '0x4276BEaA49DE905eED06FCDc0aD438a19D3861DD', // v2 strat symbol: 'YSDAI6MJD', baseId: DAI, name: 'Yield Strategy DAI 6M Jun Dec', decimals: 18, version: '1', }, + + /* + v1 have an associatedStrategy to a v2 strategy, + v2 have an associated strategy to a v1 strategy, + v2.1 have an associated strategy to a v2 strategy + is this right? + */ ]); export default STRATEGIES; From 3dd82887cefb7a4bd6c5a4b4410e3a206fe488e6 Mon Sep 17 00:00:00 2001 From: Jacob Bryant Date: Fri, 26 May 2023 11:28:11 -0400 Subject: [PATCH 03/51] showing just v2.1 strats --- src/components/selectors/StrategySelector.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/selectors/StrategySelector.tsx b/src/components/selectors/StrategySelector.tsx index a8b29f13e..855c6a617 100644 --- a/src/components/selectors/StrategySelector.tsx +++ b/src/components/selectors/StrategySelector.tsx @@ -140,10 +140,11 @@ const StrategySelector = ({ inputValue }: IStrategySelectorProps) => { useEffect(() => { const opts = Array.from(strategyMap?.values()!); const filteredOpts = opts - .filter((_st) => _st.type === 'V2.1' || _st.type === 'V2' || (_st.type === 'V1' && !_st.associatedStrategy)) + .filter((_st) => _st.type === 'V2.1') .filter((_st) => !_st.currentSeries?.hideSeries && _st.active) .filter((_st) => _st.baseId === selectedBase?.proxyId && !_st.currentSeries?.seriesIsMature) .sort((a, b) => a.currentSeries?.maturity! - b.currentSeries?.maturity!); + setOptions(filteredOpts); }, [selectedBase, strategyMap, selectedStrategy]); From 562f6336adf7043a155f66e5e1d2a33c84e7a44b Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Mon, 29 May 2023 10:38:51 +0100 Subject: [PATCH 04/51] hasUpdatedVersion check: use strategyType --- src/contexts/UserContext.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/contexts/UserContext.tsx b/src/contexts/UserContext.tsx index fcb324f33..25fd8ae22 100644 --- a/src/contexts/UserContext.tsx +++ b/src/contexts/UserContext.tsx @@ -35,6 +35,7 @@ import { formatUnits } from 'ethers/lib/utils'; import useBalances, { BalanceData } from '../hooks/useBalances'; import useAccountPlus from '../hooks/useAccountPlus'; import { ContractNames } from '../config/contracts'; +import { StrategyType } from '../config/strategies'; const initState: IUserContextState = { userLoading: false, @@ -484,8 +485,7 @@ const UserProvider = ({ children }: { children: ReactNode }) => { // console.log(accountRewards.gt(ZERO_BN) ? accountRewards.toString() : 'no rewards'); /* We check if the strategy has been supersecced by a v2.1 version */ - const hasAnUpdatedVersion = - (_strategy.type === 'V1' || _strategy.type === 'V2') && !!_strategy.associatedStrategy; // TODO - will need to update this for V2.1 i imagine - V2s will also have an updated version + const hasAnUpdatedVersion = (_strategy.type === StrategyType.V2 || _strategy.type === StrategyType.V1); /* Attatch the current series (if any) */ const currentSeries = _seriesList.find((s: ISeriesRoot) => From 372093d522a7394cbdd5479eb6625e10996d74ac Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Mon, 29 May 2023 10:55:48 +0100 Subject: [PATCH 05/51] refactor: 'isActive' > 'disabled' for readability. --- src/components/selectors/StrategySelector.tsx | 8 ++++---- src/config/strategies.ts | 1 + src/contexts/UserContext.tsx | 7 +------ src/types/index.ts | 2 +- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/components/selectors/StrategySelector.tsx b/src/components/selectors/StrategySelector.tsx index 855c6a617..37f7b38ad 100644 --- a/src/components/selectors/StrategySelector.tsx +++ b/src/components/selectors/StrategySelector.tsx @@ -141,7 +141,7 @@ const StrategySelector = ({ inputValue }: IStrategySelectorProps) => { const opts = Array.from(strategyMap?.values()!); const filteredOpts = opts .filter((_st) => _st.type === 'V2.1') - .filter((_st) => !_st.currentSeries?.hideSeries && _st.active) + .filter((_st) => !_st.currentSeries?.hideSeries && !_st.disabled) .filter((_st) => _st.baseId === selectedBase?.proxyId && !_st.currentSeries?.seriesIsMature) .sort((a, b) => a.currentSeries?.maturity! - b.currentSeries?.maturity!); @@ -150,7 +150,7 @@ const StrategySelector = ({ inputValue }: IStrategySelectorProps) => { const handleSelect = (_strategy: IStrategy) => { diagnostics && console.log('SELECTED: ', _strategy.address, 'VERSION: ', _strategy.type); - if (_strategy.active) { + if (!_strategy.disabled) { diagnostics && console.log('Strategy selected: ', _strategy.address); userActions.setSelectedStrategy(_strategy); userActions.setSelectedSeries(_strategy.currentSeries!); @@ -164,8 +164,8 @@ const StrategySelector = ({ inputValue }: IStrategySelectorProps) => { /* if strategy already selected, no need to set explicitly again */ if (selectedStrategy) return; const opts: IStrategy[] = Array.from(strategyMap.values()) - .filter((_st) => _st.type === 'V2' || (_st.type === 'V1' && !_st.associatedStrategy)) - .filter((_st) => !_st.currentSeries?.hideSeries && _st.active) + .filter((_st) => _st.type === 'V2.1') // we only want to show V2.1 strategies in the selector for now. + .filter((_st) => !_st.currentSeries?.hideSeries && !_st.disabled) .filter((_st: IStrategy) => _st.baseId === selectedBase?.proxyId && !_st.currentSeries?.seriesIsMature); /* select strategy with rewards */ diff --git a/src/config/strategies.ts b/src/config/strategies.ts index 3a1e096be..6e6de352e 100644 --- a/src/config/strategies.ts +++ b/src/config/strategies.ts @@ -18,6 +18,7 @@ export interface StrategyInfo { baseId?: string; decimals?: number; version?: string; + active?:boolean; } // map each chain id to its corresponding strategies' data diff --git a/src/contexts/UserContext.tsx b/src/contexts/UserContext.tsx index 25fd8ae22..779f9e105 100644 --- a/src/contexts/UserContext.tsx +++ b/src/contexts/UserContext.tsx @@ -484,7 +484,7 @@ const UserProvider = ({ children }: { children: ReactNode }) => { // _strategy.rewardsRate?.gt(ZERO_BN) && signer ? await stratConnected.callStatic.claim(account) : ZERO_BN; // console.log(accountRewards.gt(ZERO_BN) ? accountRewards.toString() : 'no rewards'); - /* We check if the strategy has been supersecced by a v2.1 version */ + /* We check if the strategy has been supersecced by a newer version */ const hasAnUpdatedVersion = (_strategy.type === StrategyType.V2 || _strategy.type === StrategyType.V1); /* Attatch the current series (if any) */ @@ -526,9 +526,6 @@ const UserProvider = ({ children }: { children: ReactNode }) => { rewardsTokenAddress = undefined; } - /* Decide if stragtegy should be 'active' */ - const isActive = _strategy.type === 'V2.1' || _strategy.type === 'V2' || _strategy.type === 'V1'; // && !_strategy.associatedStrategy) - return { ..._strategy, strategyTotalSupply, @@ -544,7 +541,6 @@ const UserProvider = ({ children }: { children: ReactNode }) => { currentPoolAddr: currentPoolAddr as string | undefined, - active: isActive, rewardsRate, rewardsPeriod, rewardsTokenAddress, @@ -555,7 +551,6 @@ const UserProvider = ({ children }: { children: ReactNode }) => { return { ..._strategy, currentSeries: undefined, - active: false, }; }) ); diff --git a/src/types/index.ts b/src/types/index.ts index 018333886..a53842361 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -200,6 +200,7 @@ export interface IStrategyRoot extends ISignable { startBlock: Block; type: 'V1' | 'V2' | 'V2.1'; associatedStrategy?: string; + disabled?: boolean; } export interface IVaultRoot { @@ -266,7 +267,6 @@ export interface IVault extends IVaultRoot { export interface IStrategy extends IStrategyRoot { currentSeries: ISeries | undefined; - active: boolean; currentSeriesAddr?: string; currentPoolAddr?: string; From 966982732dcdf14e60da9166a290e1fe64b72a95 Mon Sep 17 00:00:00 2001 From: marcomariscal Date: Tue, 30 May 2023 10:16:09 -0700 Subject: [PATCH 06/51] fix: deps and StrategyType --- src/components/selectors/StrategySelector.tsx | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/components/selectors/StrategySelector.tsx b/src/components/selectors/StrategySelector.tsx index 37f7b38ad..17401d5bd 100644 --- a/src/components/selectors/StrategySelector.tsx +++ b/src/components/selectors/StrategySelector.tsx @@ -11,6 +11,7 @@ import Skeleton from '../wraps/SkeletonWrap'; import { SettingsContext } from '../../contexts/SettingsContext'; import { ZERO_BN } from '../../utils/constants'; import useStrategyReturns, { IReturns } from '../../hooks/useStrategyReturns'; +import { StrategyType } from '../../config/strategies'; const StyledBox = styled(Box)` -webkit-transition: transform 0.3s ease-in-out; @@ -131,7 +132,10 @@ const StrategySelector = ({ inputValue }: IStrategySelectorProps) => { settingsState: { diagnostics }, } = useContext(SettingsContext); - const { userState, userActions } = useContext(UserContext); + const { + userState, + userActions: { setSelectedSeries, setSelectedStrategy }, + } = useContext(UserContext); const { selectedStrategy, selectedBase, strategiesLoading, strategyMap, seriesMap } = userState; const [options, setOptions] = useState([]); @@ -140,7 +144,7 @@ const StrategySelector = ({ inputValue }: IStrategySelectorProps) => { useEffect(() => { const opts = Array.from(strategyMap?.values()!); const filteredOpts = opts - .filter((_st) => _st.type === 'V2.1') + .filter((_st) => _st.type === StrategyType.V2_1) .filter((_st) => !_st.currentSeries?.hideSeries && !_st.disabled) .filter((_st) => _st.baseId === selectedBase?.proxyId && !_st.currentSeries?.seriesIsMature) .sort((a, b) => a.currentSeries?.maturity! - b.currentSeries?.maturity!); @@ -152,8 +156,8 @@ const StrategySelector = ({ inputValue }: IStrategySelectorProps) => { diagnostics && console.log('SELECTED: ', _strategy.address, 'VERSION: ', _strategy.type); if (!_strategy.disabled) { diagnostics && console.log('Strategy selected: ', _strategy.address); - userActions.setSelectedStrategy(_strategy); - userActions.setSelectedSeries(_strategy.currentSeries!); + setSelectedStrategy(_strategy); + setSelectedSeries(_strategy.currentSeries!); } else { toast.info('Strategy coming soon'); } @@ -164,25 +168,25 @@ const StrategySelector = ({ inputValue }: IStrategySelectorProps) => { /* if strategy already selected, no need to set explicitly again */ if (selectedStrategy) return; const opts: IStrategy[] = Array.from(strategyMap.values()) - .filter((_st) => _st.type === 'V2.1') // we only want to show V2.1 strategies in the selector for now. + .filter((_st) => _st.type === StrategyType.V2_1) // we only want to show V2.1 strategies in the selector for now. .filter((_st) => !_st.currentSeries?.hideSeries && !_st.disabled) - .filter((_st: IStrategy) => _st.baseId === selectedBase?.proxyId && !_st.currentSeries?.seriesIsMature); + .filter((_st) => _st.baseId === selectedBase?.proxyId && !_st.currentSeries?.seriesIsMature); /* select strategy with rewards */ const strategyWithRewards = opts.find((s) => s.rewardsRate?.gt(ZERO_BN)); if (strategyWithRewards) { - userActions.setSelectedStrategy(strategyWithRewards); + setSelectedStrategy(strategyWithRewards); return; } /* select strategy with existing balance */ const strategyWithBalance = opts.find((_st) => _st?.accountBalance?.gt(ZERO_BN)); if (strategyWithBalance) { - userActions.setSelectedStrategy(strategyWithBalance); + setSelectedStrategy(strategyWithBalance); return; } /* else set a random one as a last resort */ - userActions.setSelectedStrategy(opts[Math.floor(Math.random() * opts.length)]); - }, [selectedBase, strategyMap]); + setSelectedStrategy(opts[Math.floor(Math.random() * opts.length)]); + }, [selectedBase, selectedStrategy, setSelectedStrategy, strategyMap]); return ( From 38d0cce1363fec65f0fa6ded9d2b8639ebb3e4a6 Mon Sep 17 00:00:00 2001 From: marcomariscal Date: Tue, 30 May 2023 10:17:42 -0700 Subject: [PATCH 07/51] fix: filter logic --- src/components/selectors/StrategySelector.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/selectors/StrategySelector.tsx b/src/components/selectors/StrategySelector.tsx index 17401d5bd..02875d562 100644 --- a/src/components/selectors/StrategySelector.tsx +++ b/src/components/selectors/StrategySelector.tsx @@ -145,7 +145,7 @@ const StrategySelector = ({ inputValue }: IStrategySelectorProps) => { const opts = Array.from(strategyMap?.values()!); const filteredOpts = opts .filter((_st) => _st.type === StrategyType.V2_1) - .filter((_st) => !_st.currentSeries?.hideSeries && !_st.disabled) + .filter((_st) => _st.currentSeries?.hideSeries || _st.disabled) .filter((_st) => _st.baseId === selectedBase?.proxyId && !_st.currentSeries?.seriesIsMature) .sort((a, b) => a.currentSeries?.maturity! - b.currentSeries?.maturity!); @@ -169,7 +169,7 @@ const StrategySelector = ({ inputValue }: IStrategySelectorProps) => { if (selectedStrategy) return; const opts: IStrategy[] = Array.from(strategyMap.values()) .filter((_st) => _st.type === StrategyType.V2_1) // we only want to show V2.1 strategies in the selector for now. - .filter((_st) => !_st.currentSeries?.hideSeries && !_st.disabled) + .filter((_st) => _st.currentSeries?.hideSeries || _st.disabled) .filter((_st) => _st.baseId === selectedBase?.proxyId && !_st.currentSeries?.seriesIsMature); /* select strategy with rewards */ From ba63c2b66f3116a509a2a7faa9575d5eea070368 Mon Sep 17 00:00:00 2001 From: marcomariscal Date: Tue, 30 May 2023 10:21:40 -0700 Subject: [PATCH 08/51] fix: filter logic --- src/components/selectors/StrategySelector.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/selectors/StrategySelector.tsx b/src/components/selectors/StrategySelector.tsx index 02875d562..00a515d84 100644 --- a/src/components/selectors/StrategySelector.tsx +++ b/src/components/selectors/StrategySelector.tsx @@ -145,7 +145,7 @@ const StrategySelector = ({ inputValue }: IStrategySelectorProps) => { const opts = Array.from(strategyMap?.values()!); const filteredOpts = opts .filter((_st) => _st.type === StrategyType.V2_1) - .filter((_st) => _st.currentSeries?.hideSeries || _st.disabled) + .filter((_st) => !_st.currentSeries?.hideSeries || !_st.disabled) .filter((_st) => _st.baseId === selectedBase?.proxyId && !_st.currentSeries?.seriesIsMature) .sort((a, b) => a.currentSeries?.maturity! - b.currentSeries?.maturity!); @@ -169,7 +169,7 @@ const StrategySelector = ({ inputValue }: IStrategySelectorProps) => { if (selectedStrategy) return; const opts: IStrategy[] = Array.from(strategyMap.values()) .filter((_st) => _st.type === StrategyType.V2_1) // we only want to show V2.1 strategies in the selector for now. - .filter((_st) => _st.currentSeries?.hideSeries || _st.disabled) + .filter((_st) => !_st.currentSeries?.hideSeries || !_st.disabled) .filter((_st) => _st.baseId === selectedBase?.proxyId && !_st.currentSeries?.seriesIsMature); /* select strategy with rewards */ From b767ad004a084aac485a84fffa95554d0602fcc2 Mon Sep 17 00:00:00 2001 From: marcomariscal Date: Tue, 30 May 2023 10:22:46 -0700 Subject: [PATCH 09/51] chore: remove unused --- src/components/selectors/StrategySelector.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/components/selectors/StrategySelector.tsx b/src/components/selectors/StrategySelector.tsx index 00a515d84..c514db9cc 100644 --- a/src/components/selectors/StrategySelector.tsx +++ b/src/components/selectors/StrategySelector.tsx @@ -212,8 +212,6 @@ const StrategySelector = ({ inputValue }: IStrategySelectorProps) => { selected={selected} displayName={displayName} returns={returns} - // apy={returns.blendedAPY} - // extra={ returns.} /> ); })} From 4081c7204c7ffb4f8f19ad150cc5b74a1b596df4 Mon Sep 17 00:00:00 2001 From: Jacob Bryant Date: Tue, 30 May 2023 15:41:10 -0400 Subject: [PATCH 10/51] removing dupe burn function from ABI --- src/contracts/StrategyV21.d.ts | 50 +++------------------------- src/contracts/abis/StrategyV2_1.json | 16 --------- 2 files changed, 5 insertions(+), 61 deletions(-) diff --git a/src/contracts/StrategyV21.d.ts b/src/contracts/StrategyV21.d.ts index fbb09b39c..ff38a8c89 100644 --- a/src/contracts/StrategyV21.d.ts +++ b/src/contracts/StrategyV21.d.ts @@ -540,19 +540,11 @@ export class StrategyV21 extends BaseContract { baseCached(overrides?: CallOverrides): Promise<[BigNumber]>; - "burn(address)"( + burn( to: string, overrides?: Overrides & { from?: string | Promise } ): Promise; - "burn(address,address,uint256,uint256)"( - arg0: string, - arg1: string, - arg2: BigNumberish, - arg3: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - burnDivested( to: string, overrides?: Overrides & { from?: string | Promise } @@ -777,19 +769,11 @@ export class StrategyV21 extends BaseContract { baseCached(overrides?: CallOverrides): Promise; - "burn(address)"( + burn( to: string, overrides?: Overrides & { from?: string | Promise } ): Promise; - "burn(address,address,uint256,uint256)"( - arg0: string, - arg1: string, - arg2: BigNumberish, - arg3: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - burnDivested( to: string, overrides?: Overrides & { from?: string | Promise } @@ -1014,15 +998,7 @@ export class StrategyV21 extends BaseContract { baseCached(overrides?: CallOverrides): Promise; - "burn(address)"(to: string, overrides?: CallOverrides): Promise; - - "burn(address,address,uint256,uint256)"( - arg0: string, - arg1: string, - arg2: BigNumberish, - arg3: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber, BigNumber, BigNumber]>; + burn(to: string, overrides?: CallOverrides): Promise; burnDivested(to: string, overrides?: CallOverrides): Promise; @@ -1503,19 +1479,11 @@ export class StrategyV21 extends BaseContract { baseCached(overrides?: CallOverrides): Promise; - "burn(address)"( + burn( to: string, overrides?: Overrides & { from?: string | Promise } ): Promise; - "burn(address,address,uint256,uint256)"( - arg0: string, - arg1: string, - arg2: BigNumberish, - arg3: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - burnDivested( to: string, overrides?: Overrides & { from?: string | Promise } @@ -1732,19 +1700,11 @@ export class StrategyV21 extends BaseContract { baseCached(overrides?: CallOverrides): Promise; - "burn(address)"( + burn( to: string, overrides?: Overrides & { from?: string | Promise } ): Promise; - "burn(address,address,uint256,uint256)"( - arg0: string, - arg1: string, - arg2: BigNumberish, - arg3: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - burnDivested( to: string, overrides?: Overrides & { from?: string | Promise } diff --git a/src/contracts/abis/StrategyV2_1.json b/src/contracts/abis/StrategyV2_1.json index 10ced3073..bbfced031 100644 --- a/src/contracts/abis/StrategyV2_1.json +++ b/src/contracts/abis/StrategyV2_1.json @@ -238,22 +238,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "uint256", "name": "", "type": "uint256" }, - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "name": "burn", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" }, - { "internalType": "uint256", "name": "", "type": "uint256" }, - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [{ "internalType": "address", "name": "to", "type": "address" }], "name": "burnDivested", From fb25730da120b54c7d2348f70906c1ab350d6845 Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Thu, 1 Jun 2023 09:48:13 +0100 Subject: [PATCH 11/51] updated associated strategies --- src/config/strategies.ts | 63 +++++++++++++-------- src/hooks/actionHooks/useRemoveLiquidity.ts | 58 +++++++++++++------ 2 files changed, 81 insertions(+), 40 deletions(-) diff --git a/src/config/strategies.ts b/src/config/strategies.ts index 6e6de352e..72c681ab4 100644 --- a/src/config/strategies.ts +++ b/src/config/strategies.ts @@ -5,20 +5,24 @@ import { DAI, FRAX, USDC, WETH, USDT } from './assets'; export enum StrategyType { V1 = 'V1', V2 = 'V2', - V2_1 = 'V2.1', + V2_1 = 'V2_1', } +type AssociatedStrategy = { + [value in StrategyType]?: string; +}; + export interface StrategyInfo { id: string; address: string; type: StrategyType; - associatedStrategy?: string; // if V2 strategy, then the V1 associated strategy (and vice versa) + associatedStrategy?: AssociatedStrategy; // if V2 strategy, then the V1 associated strategy (and vice versa) symbol?: string; name?: string; baseId?: string; decimals?: number; version?: string; - active?:boolean; + active?: boolean; } // map each chain id to its corresponding strategies' data @@ -32,7 +36,10 @@ STRATEGIES.set(42161, [ { id: '', address: '0xE779cd75E6c574d83D3FD6C92F3CBE31DD32B1E1', - associatedStrategy: '0x5aeB4EFaAA0d27bd606D618BD74Fe883062eAfd0', + associatedStrategy: { + V2: '0x5aeB4EFaAA0d27bd606D618BD74Fe883062eAfd0', + V2_1: '0x96b87c0aacb01a09c0de249238d56c6d3a9629a8', + }, type: StrategyType.V1, symbol: 'YSDAI6MMS', baseId: DAI, @@ -43,7 +50,10 @@ STRATEGIES.set(42161, [ { id: '', address: '0x92A5B31310a3ED4546e0541197a32101fCfBD5c8', - associatedStrategy: '0x3b4FFD93CE5fCf97e61AA8275Ec241C76cC01a47', + associatedStrategy: { + V2: '0x3b4FFD93CE5fCf97e61AA8275Ec241C76cC01a47', + V2_1: '0xbd54fa0318f8337023548f42566637ebcc57fb51', + }, type: StrategyType.V1, symbol: 'YSUSDC6MMS', baseId: USDC, @@ -54,7 +64,10 @@ STRATEGIES.set(42161, [ { id: '', address: '0xD5B43b2550751d372025d048553352ac60f27151', - associatedStrategy: '0x5582b8398FB586F1b79edd1a6e83f1c5aa558955', + associatedStrategy: { + V2: '0x5582b8398FB586F1b79edd1a6e83f1c5aa558955', + V2_1: '0xfab75a23dd3ecc91d866cb151cee7830857f49cc', + }, type: StrategyType.V1, symbol: 'YSETH6MMS', baseId: WETH, @@ -65,7 +78,10 @@ STRATEGIES.set(42161, [ { id: '', address: '0xa3cAF61FD23d374ce13c742E4E9fA9FAc23Ddae6', - associatedStrategy: '0x4276BEaA49DE905eED06FCDc0aD438a19D3861DD', + associatedStrategy: { + V2: '0x4276BEaA49DE905eED06FCDc0aD438a19D3861DD', + V2_1: '0xc315b7b54b496b0d986684f4682e1d7acfb997e9', + }, type: StrategyType.V1, symbol: 'YSDAI6MJD', baseId: DAI, @@ -76,7 +92,10 @@ STRATEGIES.set(42161, [ { id: '', address: '0x54F08092e3256131954dD57C04647De8b2E7A9a9', - associatedStrategy: '0x33e6B154efC7021dD55464c4e11a6AfE1f3D0635', + associatedStrategy: { + V2: '0x33e6B154efC7021dD55464c4e11a6AfE1f3D0635', + V2_1: '0x38069499bd940ce637b3ed19c2cbc9df498d90d5', + }, type: StrategyType.V1, symbol: 'YSUSDC6MJD', baseId: USDC, @@ -87,7 +106,10 @@ STRATEGIES.set(42161, [ { id: '', address: '0x3353E1E2976DBbc191a739871faA8E6E9D2622c7', - associatedStrategy: '0xad1983745D6c739537fEaB5bed45795f47A940b3', + associatedStrategy: { + V2: '0xad1983745D6c739537fEaB5bed45795f47A940b3', + V2_1: '0xc315b7b54b496b0d986684f4682e1d7acfb997e9', + }, type: StrategyType.V1, symbol: 'YSETH6MJD', baseId: WETH, @@ -101,7 +123,7 @@ STRATEGIES.set(42161, [ id: '', address: '0xad1983745D6c739537fEaB5bed45795f47A940b3', type: StrategyType.V2, - associatedStrategy: '0x3353E1E2976DBbc191a739871faA8E6E9D2622c7', + associatedStrategy: { V2_1: '0xc315b7b54b496b0d986684f4682e1d7acfb997e9' }, symbol: 'YSETH6MJD', baseId: WETH, name: 'Yield Strategy ETH 6M Jun Dec', @@ -112,7 +134,7 @@ STRATEGIES.set(42161, [ id: '', address: '0x4276BEaA49DE905eED06FCDc0aD438a19D3861DD', type: StrategyType.V2, - associatedStrategy: '0xa3cAF61FD23d374ce13c742E4E9fA9FAc23Ddae6', + associatedStrategy: { V2_1: '0x38069499bd940ce637b3ed19c2cbc9df498d90d5' }, symbol: 'YSDAI6MJD', baseId: DAI, name: 'Yield Strategy DAI 6M Jun Dec', @@ -122,7 +144,7 @@ STRATEGIES.set(42161, [ { id: '', address: '0x33e6B154efC7021dD55464c4e11a6AfE1f3D0635', - associatedStrategy: '0x54F08092e3256131954dD57C04647De8b2E7A9a9', + associatedStrategy: { V2_1: '0xbd54fa0318f8337023548f42566637ebcc57fb51' }, symbol: 'YSUSDC6MJD', baseId: USDC, name: 'Yield Strategy USDC 6M Jun Dec', @@ -134,6 +156,7 @@ STRATEGIES.set(42161, [ { id: '', address: '0x861509a3fa7d87faa0154aae2cb6c1f92639339a', + associatedStrategy: { V2_1: '0xf5fd98286fd9d3d94cd63098cc3ce0df5891de73' }, type: StrategyType.V2, symbol: 'YSUSDT6MJD', baseId: USDT, @@ -145,6 +168,7 @@ STRATEGIES.set(42161, [ { id: '', address: '0xfe2aba5ba890af0ee8b6f2d488b1f85c9e7c5643', + associatedStrategy : { V2_1: '0x29a98294d9da369458d33ed9dd69f0dd36f14484'}, type: StrategyType.V2, symbol: 'YSUSDT6MMS', baseId: USDT, @@ -157,7 +181,7 @@ STRATEGIES.set(42161, [ id: '', address: '0x3b4FFD93CE5fCf97e61AA8275Ec241C76cC01a47', type: StrategyType.V2, - associatedStrategy: '0x92A5B31310a3ED4546e0541197a32101fCfBD5c8', + associatedStrategy: { V2_1: '0xd9446472697d0616a0183dad96567bbe5edd1dd4' }, symbol: 'YSUSDC6MMS', baseId: USDC, name: 'Yield Strategy USDC 6M Mar Sep', @@ -168,7 +192,7 @@ STRATEGIES.set(42161, [ id: '', address: '0x5582b8398FB586F1b79edd1a6e83f1c5aa558955', type: StrategyType.V2, - associatedStrategy: '0xD5B43b2550751d372025d048553352ac60f27151', + associatedStrategy: { V2_1: '0xfab75a23dd3ecc91d866cb151cee7830857f49cc' }, symbol: 'YSETH6MMS', baseId: WETH, name: 'Yield Strategy ETH 6M Mar Sep', @@ -179,19 +203,19 @@ STRATEGIES.set(42161, [ id: '', address: '0x5aeB4EFaAA0d27bd606D618BD74Fe883062eAfd0', type: StrategyType.V2, - associatedStrategy: '0xE779cd75E6c574d83D3FD6C92F3CBE31DD32B1E1', + associatedStrategy: { V2_1: '0x96b87c0aacb01a09c0de249238d56c6d3a9629a8' }, symbol: 'YSDAI6MMS', baseId: DAI, name: 'Yield Strategy DAI 6M Mar Sep', decimals: 18, version: '1', }, + // V2.1 strategies { id: '', address: '0x96b87c0aacb01a09c0de249238d56c6d3a9629a8', // type: StrategyType.V2_1, - associatedStrategy: '0x5aeB4EFaAA0d27bd606D618BD74Fe883062eAfd0', // v2 strat symbol: 'YSDAI6MMS', baseId: DAI, name: 'Yield Strategy DAI 6M Mar Sep', @@ -202,7 +226,6 @@ STRATEGIES.set(42161, [ id: '', address: '0x29a98294d9da369458d33ed9dd69f0dd36f14484', // type: StrategyType.V2_1, - associatedStrategy: '0xfe2aba5ba890af0ee8b6f2d488b1f85c9e7c5643', // v2 strat symbol: 'YSUSDT6MMS', baseId: USDT, name: 'Yield Strategy USDT 6M Mar Sep', @@ -212,7 +235,6 @@ STRATEGIES.set(42161, [ { id: '', address: '0xbd54fa0318f8337023548f42566637ebcc57fb51', // - associatedStrategy: '0x33e6B154efC7021dD55464c4e11a6AfE1f3D0635', // v2 strat symbol: 'YSUSDC6MJD', baseId: USDC, name: 'Yield Strategy USDC 6M Jun Dec', @@ -224,7 +246,6 @@ STRATEGIES.set(42161, [ id: '', address: '0xf5fd98286fd9d3d94cd63098cc3ce0df5891de73', // type: StrategyType.V2_1, - associatedStrategy: '0x861509a3fa7d87faa0154aae2cb6c1f92639339a', // v2 strat symbol: 'YSUSDT6MJD', baseId: USDT, name: 'Yield Strategy USDT 6M Jun Dec', @@ -235,7 +256,6 @@ STRATEGIES.set(42161, [ id: '', address: '0xd9446472697d0616a0183dad96567bbe5edd1dd4', // type: StrategyType.V2_1, - associatedStrategy: '0x3b4FFD93CE5fCf97e61AA8275Ec241C76cC01a47', // v2 strat symbol: 'YSUSDC6MMS', baseId: USDC, name: 'Yield Strategy USDC 6M Mar Sep', @@ -246,7 +266,6 @@ STRATEGIES.set(42161, [ id: '', address: '0xfab75a23dd3ecc91d866cb151cee7830857f49cc', // type: StrategyType.V2_1, - associatedStrategy: '0x5582b8398FB586F1b79edd1a6e83f1c5aa558955', // v2 strat symbol: 'YSETH6MMS', baseId: WETH, name: 'Yield Strategy ETH 6M Mar Sep', @@ -257,7 +276,6 @@ STRATEGIES.set(42161, [ id: '', address: '0xc315b7b54b496b0d986684f4682e1d7acfb997e9', // type: StrategyType.V2_1, - associatedStrategy: '0xad1983745D6c739537fEaB5bed45795f47A940b3', // v2 strat symbol: 'YSETH6MJD', baseId: WETH, name: 'Yield Strategy ETH 6M Jun Dec', @@ -268,7 +286,6 @@ STRATEGIES.set(42161, [ id: '', address: '0x38069499bd940ce637b3ed19c2cbc9df498d90d5', // type: StrategyType.V2_1, - associatedStrategy: '0x4276BEaA49DE905eED06FCDc0aD438a19D3861DD', // v2 strat symbol: 'YSDAI6MJD', baseId: DAI, name: 'Yield Strategy DAI 6M Jun Dec', diff --git a/src/hooks/actionHooks/useRemoveLiquidity.ts b/src/hooks/actionHooks/useRemoveLiquidity.ts index f4658ddf3..53d66bef9 100644 --- a/src/hooks/actionHooks/useRemoveLiquidity.ts +++ b/src/hooks/actionHooks/useRemoveLiquidity.ts @@ -98,8 +98,12 @@ export const useRemoveLiquidity = () => { const _strategy: any = selectedStrategy!; const _input = ethers.utils.parseUnits(input, _base.decimals); - const _associatedStrategyContract = _strategy.associatedStrategy - ? Strategy__factory.connect(_strategy.associatedStrategy, provider) + const associated_V2_Contract = _strategy.associatedStrategy.V2 + ? Strategy__factory.connect(_strategy.associatedStrategy.V2, provider) + : undefined; + + const associated_V2_1_Contract = _strategy.associatedStrategy.V2_1 + ? Strategy__factory.connect(_strategy.associatedStrategy.V2_1, provider) : undefined; const ladleAddress = contracts.get(ContractNames.LADLE)?.address; @@ -311,45 +315,65 @@ export const useRemoveLiquidity = () => { ignoreIf: !_strategy, }, - /** If removing from a V1 strategy, we need to burn the tokens to either the associated v2 strategy or the pool if the is no associatedStrategy */ + /** + * MIGRATE FROM V1 STRATEGY + * If removing from a V1 strategy, we need to + * 1. burn the tokens to the associated v2 strategy + * 2. burn v2 strategies to the associated v2.1 strategy + * */ + + { + operation: LadleActions.Fn.ROUTE, + args: [_strategy.associatedStrategy.V2] as RoutedActions.Args.BURN_STRATEGY_TOKENS, + fnName: RoutedActions.Fn.BURN_STRATEGY_TOKENS, + targetContract: _strategy.strategyContract, // v1 in this case + ignoreIf: !_strategy || _strategy.type !== StrategyType.V1, + }, { operation: LadleActions.Fn.ROUTE, - args: [_strategy.associatedStrategy || series.poolAddress] as RoutedActions.Args.BURN_STRATEGY_TOKENS, + args: [_strategy.associatedStrategy.V2_1] as RoutedActions.Args.BURN_STRATEGY_TOKENS, fnName: RoutedActions.Fn.BURN_STRATEGY_TOKENS, - targetContract: _strategy.strategyContract, - ignoreIf: !_strategy || _strategy.type === StrategyType.V2, + targetContract: associated_V2_Contract, + ignoreIf: !_strategy || _strategy.type !== StrategyType.V1, }, { operation: LadleActions.Fn.ROUTE, args: [series.poolAddress] as RoutedActions.Args.BURN_STRATEGY_TOKENS, fnName: RoutedActions.Fn.BURN_STRATEGY_TOKENS, - targetContract: _associatedStrategyContract, - ignoreIf: !_strategy || _strategy.type === StrategyType.V2 || !_associatedStrategyContract, + targetContract: associated_V2_1_Contract, + ignoreIf: !_strategy || _strategy.type !== StrategyType.V1, }, - /* with new strats version V2.1, we also need to burn the V2 tokens to the V2.1 strategies */ + /** + * MIGRATE FROM V2 STRATEGY + * If removing from a V2 strategy, we need to + * 1. burn v2 strategies to the associated v2.1 strategy + * */ { operation: LadleActions.Fn.ROUTE, - args: [_strategy.associatedStrategy || series.poolAddress] as RoutedActions.Args.BURN_STRATEGY_TOKENS, + args: [_strategy.associatedStrategy.V2_1] as RoutedActions.Args.BURN_STRATEGY_TOKENS, fnName: RoutedActions.Fn.BURN_STRATEGY_TOKENS, - targetContract: _strategy.strategyContract, - ignoreIf: !_strategy || _strategy.type === StrategyType.V2_1, + targetContract: _strategy.strategyContract, // v2 in this case + ignoreIf: !_strategy || _strategy.type !== StrategyType.V2, }, { operation: LadleActions.Fn.ROUTE, args: [series.poolAddress] as RoutedActions.Args.BURN_STRATEGY_TOKENS, fnName: RoutedActions.Fn.BURN_STRATEGY_TOKENS, - targetContract: _associatedStrategyContract, - ignoreIf: !_strategy || _strategy.type === StrategyType.V2_1 || !_associatedStrategyContract, + targetContract: associated_V2_1_Contract, + ignoreIf: !_strategy || _strategy.type !== StrategyType.V2, }, - /* If removing from a V2.1 strategy, simply burn fromm strategy to the pool address */ + + /** + * If removing DIRECTLY from a V2.1 strategy, simply burn from strategy to the pool address + * */ { operation: LadleActions.Fn.ROUTE, args: [series.poolAddress] as RoutedActions.Args.BURN_STRATEGY_TOKENS, fnName: RoutedActions.Fn.BURN_STRATEGY_TOKENS, - targetContract: _strategy.strategyContract, - ignoreIf: !_strategy || _strategy.type === StrategyType.V1 || _strategy.type === StrategyType.V2, + targetContract: _strategy.strategyContract, // v2.1 in this case + ignoreIf: !_strategy || _strategy.type !== StrategyType.V2_1, }, /** From 42701f1d48dd3593c94d21e95b1ef1719e056bf6 Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Thu, 1 Jun 2023 10:32:20 +0100 Subject: [PATCH 12/51] update addresses and ids --- .env.local | 2 +- src/config/strategies.ts | 60 ++++++++++++++++++++-------------------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/.env.local b/.env.local index e7d05f433..f865d88e5 100644 --- a/.env.local +++ b/.env.local @@ -4,7 +4,7 @@ REACT_APP_VERSION=$npm_package_version REACT_APP_RPC_URL_1='https://eth-mainnet.g.alchemy.com/v2/ZXDCq5iy0KrKR0XjsqC6E4QG7Z_FuXDv' REACT_APP_RPC_URL_42161='https://arb-mainnet.g.alchemy.com/v2/vtMM4_eLnOvkjkdckprVw3cIa64EVkDZ' -REACT_APP_DEFAULT_FORK_RPC_URL='https://rpc.tenderly.co/fork/8af83c2a-fd18-4e2a-b472-d19c884eea54' +REACT_APP_DEFAULT_FORK_RPC_URL='https://rpc.tenderly.co/fork/29d59b62-1c40-4099-af37-c7ac8abb59fe' REACT_APP_LOCALHOST_RPC_URL='http://127.0.0.1:8545' REACT_APP_RPC_URL_421611='https://arb-rinkeby.g.alchemy.com/v2/AY_Q_Uy-Kcfwmf5In5qwG636vaOIoA8L' diff --git a/src/config/strategies.ts b/src/config/strategies.ts index 72c681ab4..1d7bdd60e 100644 --- a/src/config/strategies.ts +++ b/src/config/strategies.ts @@ -34,7 +34,7 @@ STRATEGIES.set(1, [ STRATEGIES.set(42161, [ { - id: '', + id: 'YSDAI6MMS', address: '0xE779cd75E6c574d83D3FD6C92F3CBE31DD32B1E1', associatedStrategy: { V2: '0x5aeB4EFaAA0d27bd606D618BD74Fe883062eAfd0', @@ -48,7 +48,7 @@ STRATEGIES.set(42161, [ version: '1', }, { - id: '', + id: 'YSUSDC6MMS', address: '0x92A5B31310a3ED4546e0541197a32101fCfBD5c8', associatedStrategy: { V2: '0x3b4FFD93CE5fCf97e61AA8275Ec241C76cC01a47', @@ -62,7 +62,7 @@ STRATEGIES.set(42161, [ version: '1', }, { - id: '', + id: 'YSETH6MMS', address: '0xD5B43b2550751d372025d048553352ac60f27151', associatedStrategy: { V2: '0x5582b8398FB586F1b79edd1a6e83f1c5aa558955', @@ -76,7 +76,7 @@ STRATEGIES.set(42161, [ version: '1', }, { - id: '', + id: 'YSDAI6MJD', address: '0xa3cAF61FD23d374ce13c742E4E9fA9FAc23Ddae6', associatedStrategy: { V2: '0x4276BEaA49DE905eED06FCDc0aD438a19D3861DD', @@ -90,7 +90,7 @@ STRATEGIES.set(42161, [ version: '1', }, { - id: '', + id: 'YSUSDC6MJD', address: '0x54F08092e3256131954dD57C04647De8b2E7A9a9', associatedStrategy: { V2: '0x33e6B154efC7021dD55464c4e11a6AfE1f3D0635', @@ -104,7 +104,7 @@ STRATEGIES.set(42161, [ version: '1', }, { - id: '', + id: 'YSETH6MJD', address: '0x3353E1E2976DBbc191a739871faA8E6E9D2622c7', associatedStrategy: { V2: '0xad1983745D6c739537fEaB5bed45795f47A940b3', @@ -120,7 +120,7 @@ STRATEGIES.set(42161, [ //V2 Strategies { - id: '', + id: '0x1030FF000FFE', address: '0xad1983745D6c739537fEaB5bed45795f47A940b3', type: StrategyType.V2, associatedStrategy: { V2_1: '0xc315b7b54b496b0d986684f4682e1d7acfb997e9' }, @@ -131,7 +131,7 @@ STRATEGIES.set(42161, [ version: '1', }, { - id: '', + id: '0x1031FF000FFE', address: '0x4276BEaA49DE905eED06FCDc0aD438a19D3861DD', type: StrategyType.V2, associatedStrategy: { V2_1: '0x38069499bd940ce637b3ed19c2cbc9df498d90d5' }, @@ -142,7 +142,7 @@ STRATEGIES.set(42161, [ version: '1', }, { - id: '', + id: '0x1032FF000FFE', address: '0x33e6B154efC7021dD55464c4e11a6AfE1f3D0635', associatedStrategy: { V2_1: '0xbd54fa0318f8337023548f42566637ebcc57fb51' }, symbol: 'YSUSDC6MJD', @@ -154,7 +154,7 @@ STRATEGIES.set(42161, [ }, { - id: '', + id: '0x10A0FF000FFE', address: '0x861509a3fa7d87faa0154aae2cb6c1f92639339a', associatedStrategy: { V2_1: '0xf5fd98286fd9d3d94cd63098cc3ce0df5891de73' }, type: StrategyType.V2, @@ -166,7 +166,7 @@ STRATEGIES.set(42161, [ }, { - id: '', + id: '0x10A0FF000FFF', address: '0xfe2aba5ba890af0ee8b6f2d488b1f85c9e7c5643', associatedStrategy : { V2_1: '0x29a98294d9da369458d33ed9dd69f0dd36f14484'}, type: StrategyType.V2, @@ -178,7 +178,7 @@ STRATEGIES.set(42161, [ }, { - id: '', + id: '0x1032FF000FFF', address: '0x3b4FFD93CE5fCf97e61AA8275Ec241C76cC01a47', type: StrategyType.V2, associatedStrategy: { V2_1: '0xd9446472697d0616a0183dad96567bbe5edd1dd4' }, @@ -189,7 +189,7 @@ STRATEGIES.set(42161, [ version: '1', }, { - id: '', + id: '0x1030FF000FFF', address: '0x5582b8398FB586F1b79edd1a6e83f1c5aa558955', type: StrategyType.V2, associatedStrategy: { V2_1: '0xfab75a23dd3ecc91d866cb151cee7830857f49cc' }, @@ -200,7 +200,7 @@ STRATEGIES.set(42161, [ version: '1', }, { - id: '', + id: '0x1031FF000FFF', address: '0x5aeB4EFaAA0d27bd606D618BD74Fe883062eAfd0', type: StrategyType.V2, associatedStrategy: { V2_1: '0x96b87c0aacb01a09c0de249238d56c6d3a9629a8' }, @@ -213,8 +213,8 @@ STRATEGIES.set(42161, [ // V2.1 strategies { - id: '', - address: '0x96b87c0aacb01a09c0de249238d56c6d3a9629a8', // + id: '0x1031FF000001', + address: '0x4771522accAC6fEcf89A6365cEaF05667ed95886', // type: StrategyType.V2_1, symbol: 'YSDAI6MMS', baseId: DAI, @@ -223,8 +223,8 @@ STRATEGIES.set(42161, [ version: '1', }, { - id: '', - address: '0x29a98294d9da369458d33ed9dd69f0dd36f14484', // + id: '0x10A0FF000001', + address: '0x2C918C4db3843F715556c65646f9E4a04C4BfBa6', // type: StrategyType.V2_1, symbol: 'YSUSDT6MMS', baseId: USDT, @@ -233,8 +233,8 @@ STRATEGIES.set(42161, [ version: '1', }, { - id: '', - address: '0xbd54fa0318f8337023548f42566637ebcc57fb51', // + id: '0x1032FF000000', + address: '0xCeAf1CBf0CFDD1f7Ea4C1C850c0bC032a60431DB', // symbol: 'YSUSDC6MJD', baseId: USDC, name: 'Yield Strategy USDC 6M Jun Dec', @@ -243,8 +243,8 @@ STRATEGIES.set(42161, [ version: '1', }, { - id: '', - address: '0xf5fd98286fd9d3d94cd63098cc3ce0df5891de73', // + id: '0x10A0FF000000', + address: '0x8b814aD71e611e7a38eE64Ec16ce421A477956e1', // type: StrategyType.V2_1, symbol: 'YSUSDT6MJD', baseId: USDT, @@ -253,8 +253,8 @@ STRATEGIES.set(42161, [ version: '1', }, { - id: '', - address: '0xd9446472697d0616a0183dad96567bbe5edd1dd4', // + id: '0x1032FF000001', + address: '0x7012aF43F8a3c1141Ee4e955CC568Ad2af59C3fa', // type: StrategyType.V2_1, symbol: 'YSUSDC6MMS', baseId: USDC, @@ -263,8 +263,8 @@ STRATEGIES.set(42161, [ version: '1', }, { - id: '', - address: '0xfab75a23dd3ecc91d866cb151cee7830857f49cc', // + id: '0x1030FF000001', + address: '0x0A4B2e37BFEF8e54DeA997A87749A403353134e8', // type: StrategyType.V2_1, symbol: 'YSETH6MMS', baseId: WETH, @@ -273,8 +273,8 @@ STRATEGIES.set(42161, [ version: '1', }, { - id: '', - address: '0xc315b7b54b496b0d986684f4682e1d7acfb997e9', // + id: '0x1030FF000000', + address: '0xC7D2E96Ca94E1870605c286268313785886D2257', // type: StrategyType.V2_1, symbol: 'YSETH6MJD', baseId: WETH, @@ -283,8 +283,8 @@ STRATEGIES.set(42161, [ version: '1', }, { - id: '', - address: '0x38069499bd940ce637b3ed19c2cbc9df498d90d5', // + id: '0x1031FF000000', + address: '0x9847D09cb0eEA77f7875A6904BFA22AE06b34CCE', // type: StrategyType.V2_1, symbol: 'YSDAI6MJD', baseId: DAI, From da980106e45b21533534fa655a362da4022e7443 Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Thu, 1 Jun 2023 10:39:40 +0100 Subject: [PATCH 13/51] update all strat associations --- src/config/strategies.ts | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/config/strategies.ts b/src/config/strategies.ts index 1d7bdd60e..b1625501c 100644 --- a/src/config/strategies.ts +++ b/src/config/strategies.ts @@ -38,7 +38,7 @@ STRATEGIES.set(42161, [ address: '0xE779cd75E6c574d83D3FD6C92F3CBE31DD32B1E1', associatedStrategy: { V2: '0x5aeB4EFaAA0d27bd606D618BD74Fe883062eAfd0', - V2_1: '0x96b87c0aacb01a09c0de249238d56c6d3a9629a8', + V2_1: '0x4771522accAC6fEcf89A6365cEaF05667ed95886', }, type: StrategyType.V1, symbol: 'YSDAI6MMS', @@ -52,7 +52,7 @@ STRATEGIES.set(42161, [ address: '0x92A5B31310a3ED4546e0541197a32101fCfBD5c8', associatedStrategy: { V2: '0x3b4FFD93CE5fCf97e61AA8275Ec241C76cC01a47', - V2_1: '0xbd54fa0318f8337023548f42566637ebcc57fb51', + V2_1: '0x7012aF43F8a3c1141Ee4e955CC568Ad2af59C3fa', }, type: StrategyType.V1, symbol: 'YSUSDC6MMS', @@ -66,7 +66,7 @@ STRATEGIES.set(42161, [ address: '0xD5B43b2550751d372025d048553352ac60f27151', associatedStrategy: { V2: '0x5582b8398FB586F1b79edd1a6e83f1c5aa558955', - V2_1: '0xfab75a23dd3ecc91d866cb151cee7830857f49cc', + V2_1: '0x0A4B2e37BFEF8e54DeA997A87749A403353134e8', }, type: StrategyType.V1, symbol: 'YSETH6MMS', @@ -80,7 +80,7 @@ STRATEGIES.set(42161, [ address: '0xa3cAF61FD23d374ce13c742E4E9fA9FAc23Ddae6', associatedStrategy: { V2: '0x4276BEaA49DE905eED06FCDc0aD438a19D3861DD', - V2_1: '0xc315b7b54b496b0d986684f4682e1d7acfb997e9', + V2_1: '0x9847D09cb0eEA77f7875A6904BFA22AE06b34CCE', }, type: StrategyType.V1, symbol: 'YSDAI6MJD', @@ -94,7 +94,7 @@ STRATEGIES.set(42161, [ address: '0x54F08092e3256131954dD57C04647De8b2E7A9a9', associatedStrategy: { V2: '0x33e6B154efC7021dD55464c4e11a6AfE1f3D0635', - V2_1: '0x38069499bd940ce637b3ed19c2cbc9df498d90d5', + V2_1: '0xCeAf1CBf0CFDD1f7Ea4C1C850c0bC032a60431DB', }, type: StrategyType.V1, symbol: 'YSUSDC6MJD', @@ -108,7 +108,7 @@ STRATEGIES.set(42161, [ address: '0x3353E1E2976DBbc191a739871faA8E6E9D2622c7', associatedStrategy: { V2: '0xad1983745D6c739537fEaB5bed45795f47A940b3', - V2_1: '0xc315b7b54b496b0d986684f4682e1d7acfb997e9', + V2_1: '0xC7D2E96Ca94E1870605c286268313785886D2257', }, type: StrategyType.V1, symbol: 'YSETH6MJD', @@ -123,7 +123,7 @@ STRATEGIES.set(42161, [ id: '0x1030FF000FFE', address: '0xad1983745D6c739537fEaB5bed45795f47A940b3', type: StrategyType.V2, - associatedStrategy: { V2_1: '0xc315b7b54b496b0d986684f4682e1d7acfb997e9' }, + associatedStrategy: { V2_1: '0xC7D2E96Ca94E1870605c286268313785886D2257' }, symbol: 'YSETH6MJD', baseId: WETH, name: 'Yield Strategy ETH 6M Jun Dec', @@ -134,7 +134,7 @@ STRATEGIES.set(42161, [ id: '0x1031FF000FFE', address: '0x4276BEaA49DE905eED06FCDc0aD438a19D3861DD', type: StrategyType.V2, - associatedStrategy: { V2_1: '0x38069499bd940ce637b3ed19c2cbc9df498d90d5' }, + associatedStrategy: { V2_1: '0x9847D09cb0eEA77f7875A6904BFA22AE06b34CCE' }, symbol: 'YSDAI6MJD', baseId: DAI, name: 'Yield Strategy DAI 6M Jun Dec', @@ -144,7 +144,7 @@ STRATEGIES.set(42161, [ { id: '0x1032FF000FFE', address: '0x33e6B154efC7021dD55464c4e11a6AfE1f3D0635', - associatedStrategy: { V2_1: '0xbd54fa0318f8337023548f42566637ebcc57fb51' }, + associatedStrategy: { V2_1: '0xCeAf1CBf0CFDD1f7Ea4C1C850c0bC032a60431DB' }, symbol: 'YSUSDC6MJD', baseId: USDC, name: 'Yield Strategy USDC 6M Jun Dec', @@ -156,7 +156,7 @@ STRATEGIES.set(42161, [ { id: '0x10A0FF000FFE', address: '0x861509a3fa7d87faa0154aae2cb6c1f92639339a', - associatedStrategy: { V2_1: '0xf5fd98286fd9d3d94cd63098cc3ce0df5891de73' }, + associatedStrategy: { V2_1: '0x8b814aD71e611e7a38eE64Ec16ce421A477956e1' }, type: StrategyType.V2, symbol: 'YSUSDT6MJD', baseId: USDT, @@ -168,7 +168,7 @@ STRATEGIES.set(42161, [ { id: '0x10A0FF000FFF', address: '0xfe2aba5ba890af0ee8b6f2d488b1f85c9e7c5643', - associatedStrategy : { V2_1: '0x29a98294d9da369458d33ed9dd69f0dd36f14484'}, + associatedStrategy : { V2_1: '0x2C918C4db3843F715556c65646f9E4a04C4BfBa6'}, type: StrategyType.V2, symbol: 'YSUSDT6MMS', baseId: USDT, @@ -181,7 +181,7 @@ STRATEGIES.set(42161, [ id: '0x1032FF000FFF', address: '0x3b4FFD93CE5fCf97e61AA8275Ec241C76cC01a47', type: StrategyType.V2, - associatedStrategy: { V2_1: '0xd9446472697d0616a0183dad96567bbe5edd1dd4' }, + associatedStrategy: { V2_1: '0x7012aF43F8a3c1141Ee4e955CC568Ad2af59C3fa' }, symbol: 'YSUSDC6MMS', baseId: USDC, name: 'Yield Strategy USDC 6M Mar Sep', @@ -192,7 +192,7 @@ STRATEGIES.set(42161, [ id: '0x1030FF000FFF', address: '0x5582b8398FB586F1b79edd1a6e83f1c5aa558955', type: StrategyType.V2, - associatedStrategy: { V2_1: '0xfab75a23dd3ecc91d866cb151cee7830857f49cc' }, + associatedStrategy: { V2_1: '0x0A4B2e37BFEF8e54DeA997A87749A403353134e8' }, symbol: 'YSETH6MMS', baseId: WETH, name: 'Yield Strategy ETH 6M Mar Sep', @@ -203,7 +203,7 @@ STRATEGIES.set(42161, [ id: '0x1031FF000FFF', address: '0x5aeB4EFaAA0d27bd606D618BD74Fe883062eAfd0', type: StrategyType.V2, - associatedStrategy: { V2_1: '0x96b87c0aacb01a09c0de249238d56c6d3a9629a8' }, + associatedStrategy: { V2_1: '0x4771522accAC6fEcf89A6365cEaF05667ed95886' }, symbol: 'YSDAI6MMS', baseId: DAI, name: 'Yield Strategy DAI 6M Mar Sep', From 56041d3f6d6865b592782cfa7fa5efa1b72f9e8d Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Thu, 1 Jun 2023 10:46:30 +0100 Subject: [PATCH 14/51] add in some safety measures --- src/hooks/actionHooks/useRemoveLiquidity.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/hooks/actionHooks/useRemoveLiquidity.ts b/src/hooks/actionHooks/useRemoveLiquidity.ts index 53d66bef9..9c3937516 100644 --- a/src/hooks/actionHooks/useRemoveLiquidity.ts +++ b/src/hooks/actionHooks/useRemoveLiquidity.ts @@ -106,6 +106,10 @@ export const useRemoveLiquidity = () => { ? Strategy__factory.connect(_strategy.associatedStrategy.V2_1, provider) : undefined; + /* some saftey */ + if ( associated_V2_Contract == undefined && _strategy.type === StrategyType.V1) return; // abort if strat 1 and no associated v2 strategy + if ( associated_V2_1_Contract == undefined && _strategy.type !== StrategyType.V2_1) return; // abort if not strat 2.1 and no associated strategy + const ladleAddress = contracts.get(ContractNames.LADLE)?.address; const [[cachedSharesReserves, cachedFyTokenReserves], totalSupply] = await Promise.all([ From 42bd864c9ef4e88976eafe229eaea9adaa906420 Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Thu, 1 Jun 2023 10:55:47 +0100 Subject: [PATCH 15/51] updated pool addresses --- src/config/series.ts | 16 ++++++++-------- src/hooks/actionHooks/useRemoveLiquidity.ts | 1 - 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/config/series.ts b/src/config/series.ts index 8c116c4d4..f5167a5e8 100644 --- a/src/config/series.ts +++ b/src/config/series.ts @@ -1218,7 +1218,7 @@ SERIES.set( address: '0x523803c57a497c3AD0E850766c8276D4864edEA5', decimals: 18, version: '1', - poolAddress: '0x16b879e16c43716355aab2b6be2e8c25d535a97a', // + poolAddress: '0x3e0a639c4a6D4d39a0DeAE07c228Ff080de55eeE', // poolName: 'FYETH2306 LP', poolSymbol: 'FYETH2306LP', poolVersion: '1', @@ -1239,7 +1239,7 @@ SERIES.set( address: '0x60a6A7fabe11ff36cbE917a17666848f0FF3A60a', decimals: 18, version: '1', - poolAddress: '0x4f6ce8ba6a41e05c037563098eb202cde7067888', // + poolAddress: '0xB71dB5f70FE5Af728Db8C05930d48553E5a0eB98', // poolName: 'FYDAI2306 LP', poolSymbol: 'FYDAI2306LP', poolVersion: '1', @@ -1260,7 +1260,7 @@ SERIES.set( address: '0xcbb7eba13f9e1d97b2138f588f5ca2f5167f06cc', decimals: 6, version: '1', - poolAddress: '0xf3257886fd89b360be83aefb6c782292fdc79dac', // + poolAddress: '0x530648558a27fe1d1BfC7356F67a34f4a7f06B6D', // poolName: 'FYUSDC2306 LP', poolSymbol: 'FYUSDC2306LP', poolVersion: '1', @@ -1281,7 +1281,7 @@ SERIES.set( address: '0x035072cb2912daab7b578f468bd6f0d32a269e32', decimals: 6, version: '1', - poolAddress: '0xb09c9a055ef76a8c6901fdfd1e830b449fc811ff', // + poolAddress: '0x7388f277441b3E1f3388f0464244e469fEA30e41', // poolName: 'FYUSDT2306 LP', poolSymbol: 'FYUSDT2306LP', poolVersion: '1', @@ -1324,7 +1324,7 @@ SERIES.set( address: '0x5Bb78E530D9365aeF75664c5093e40B0001F7CCd', decimals: 6, version: '1', - poolAddress: '0xb3968390ae08ceb4111d3c0002fe8378126a0a34', // + poolAddress: '0xf7F6eB1b097F60673e65347C83d83Cb4ade82a0B', // poolName: 'FYUSDC2309 LP', poolSymbol: 'FYUSDC2309LP', poolVersion: '1', @@ -1345,7 +1345,7 @@ SERIES.set( address: '0xd947360575E6F01Ce7A210C12F2EE37F5ab12d11', decimals: 18, version: '1', - poolAddress: '0xc18baca1f5ed437233c7312a8a0b86020f3243ef', // + poolAddress: '0x54D47f765fA247AfEE226fDf919392CdaC6cbb2E', // poolName: 'FYETH2309 LP', poolSymbol: 'FYETH2309LP', poolVersion: '1', @@ -1366,7 +1366,7 @@ SERIES.set( address: '0xEE508c827a8990c04798B242fa801C5351012B23', decimals: 18, version: '1', - poolAddress: '0xe12fb10698698596b67a6bce73038aaf7d3627d4', // + poolAddress: '0xbc62d88182ffA86918d0129f5bD35Dea8df9213a', // poolName: 'FYDAI2309 LP', poolSymbol: 'FYDAI2309LP', poolVersion: '1', @@ -1387,7 +1387,7 @@ SERIES.set( address: '0x9B19889794A30056A1E5Be118ee0a6647B184c5f', decimals: 6, version: '1', - poolAddress: '0xb7ae92d44fe10b2fb9e701946da7074d8bea823b', // + poolAddress: '0x1EEc5ED8E01E0232F5ab2D70bB00231250aB2e7A', // poolName: 'FYUSDT2309 LP', poolSymbol: 'FYUSDT2309LP', poolVersion: '1', diff --git a/src/hooks/actionHooks/useRemoveLiquidity.ts b/src/hooks/actionHooks/useRemoveLiquidity.ts index 9c3937516..0e3bb7dce 100644 --- a/src/hooks/actionHooks/useRemoveLiquidity.ts +++ b/src/hooks/actionHooks/useRemoveLiquidity.ts @@ -368,7 +368,6 @@ export const useRemoveLiquidity = () => { ignoreIf: !_strategy || _strategy.type !== StrategyType.V2, }, - /** * If removing DIRECTLY from a V2.1 strategy, simply burn from strategy to the pool address * */ From f785044a7ad3bd828b4a78e3d0de123b3a396f81 Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Thu, 1 Jun 2023 11:03:55 +0100 Subject: [PATCH 16/51] update contracts --- src/config/contracts.ts | 3 + src/contracts/AccumulatorOracle.ts | 866 ++++++ src/contracts/Cauldron.ts | 2104 ++++++++++++++ src/contracts/ChainlinkMultiOracle.ts | 803 ++++++ src/contracts/ChainlinkUSDOracle.ts | 759 +++++ src/contracts/CompositeMultiOracle.ts | 881 ++++++ src/contracts/CompoundMultiOracle.ts | 764 +++++ src/contracts/ConvexJoin.ts | 1279 +++++++++ src/contracts/ConvexLadleModule.ts | 507 ++++ src/contracts/ERC1155.ts | 529 ++++ src/contracts/ERC20.ts | 384 +++ src/contracts/ERC20Permit.ts | 560 ++++ src/contracts/FYToken.ts | 1553 +++++++++++ src/contracts/Join.ts | 900 ++++++ src/contracts/Join1155.ts | 983 +++++++ src/contracts/Ladle.ts | 2200 +++++++++++++++ src/contracts/LadleStorage.ts | 419 +++ src/contracts/NotionalMultiOracle.ts | 802 ++++++ src/contracts/Pool.ts | 2475 +++++++++++++++++ src/contracts/Strategy.ts | 1914 +++++++++++++ src/contracts/StrategyV2_1.ts | 2019 ++++++++++++++ src/contracts/Transfer1155Module.ts | 483 ++++ src/contracts/UniswapV3Oracle.ts | 888 ++++++ src/contracts/Witch.ts | 1026 +++++++ src/contracts/WitchV2.ts | 1580 +++++++++++ src/contracts/WrapEtherModule.ts | 459 +++ src/contracts/YearnVaultMultiOracle.ts | 785 ++++++ src/contracts/abis/Assert.sol | 1 + src/contracts/common.ts | 46 + .../factories/AccumulatorOracle__factory.ts | 4 +- src/contracts/factories/Cauldron__factory.ts | 4 +- .../ChainlinkMultiOracle__factory.ts | 4 +- .../factories/ChainlinkUSDOracle__factory.ts | 4 +- .../CompositeMultiOracle__factory.ts | 4 +- .../factories/CompoundMultiOracle__factory.ts | 4 +- .../factories/ConvexJoin__factory.ts | 4 +- .../factories/ConvexLadleModule__factory.ts | 4 +- src/contracts/factories/ERC1155__factory.ts | 4 +- .../factories/ERC20Permit__factory.ts | 4 +- src/contracts/factories/ERC20__factory.ts | 4 +- src/contracts/factories/FYToken__factory.ts | 4 +- src/contracts/factories/Join1155__factory.ts | 4 +- src/contracts/factories/Join__factory.ts | 4 +- .../factories/LadleStorage__factory.ts | 4 +- src/contracts/factories/Ladle__factory.ts | 4 +- .../factories/NotionalMultiOracle__factory.ts | 4 +- src/contracts/factories/Pool__factory.ts | 4 +- .../factories/StrategyV2_1__factory.ts | 1367 +++++++++ src/contracts/factories/Strategy__factory.ts | 4 +- .../factories/Transfer1155Module__factory.ts | 4 +- .../factories/UniswapV3Oracle__factory.ts | 4 +- src/contracts/factories/WitchV2__factory.ts | 4 +- src/contracts/factories/Witch__factory.ts | 4 +- .../factories/WrapEtherModule__factory.ts | 4 +- .../YearnVaultMultiOracle__factory.ts | 4 +- src/contracts/factories/index.ts | 29 + src/contracts/index.ts | 6 +- 57 files changed, 29421 insertions(+), 53 deletions(-) create mode 100644 src/contracts/AccumulatorOracle.ts create mode 100644 src/contracts/Cauldron.ts create mode 100644 src/contracts/ChainlinkMultiOracle.ts create mode 100644 src/contracts/ChainlinkUSDOracle.ts create mode 100644 src/contracts/CompositeMultiOracle.ts create mode 100644 src/contracts/CompoundMultiOracle.ts create mode 100644 src/contracts/ConvexJoin.ts create mode 100644 src/contracts/ConvexLadleModule.ts create mode 100644 src/contracts/ERC1155.ts create mode 100644 src/contracts/ERC20.ts create mode 100644 src/contracts/ERC20Permit.ts create mode 100644 src/contracts/FYToken.ts create mode 100644 src/contracts/Join.ts create mode 100644 src/contracts/Join1155.ts create mode 100644 src/contracts/Ladle.ts create mode 100644 src/contracts/LadleStorage.ts create mode 100644 src/contracts/NotionalMultiOracle.ts create mode 100644 src/contracts/Pool.ts create mode 100644 src/contracts/Strategy.ts create mode 100644 src/contracts/StrategyV2_1.ts create mode 100644 src/contracts/Transfer1155Module.ts create mode 100644 src/contracts/UniswapV3Oracle.ts create mode 100644 src/contracts/Witch.ts create mode 100644 src/contracts/WitchV2.ts create mode 100644 src/contracts/WrapEtherModule.ts create mode 100644 src/contracts/YearnVaultMultiOracle.ts create mode 100644 src/contracts/abis/Assert.sol create mode 100644 src/contracts/common.ts create mode 100644 src/contracts/factories/StrategyV2_1__factory.ts create mode 100644 src/contracts/factories/index.ts diff --git a/src/config/contracts.ts b/src/config/contracts.ts index e2d1679f9..004a2821b 100644 --- a/src/config/contracts.ts +++ b/src/config/contracts.ts @@ -8,6 +8,7 @@ export enum ContractNames { WRAP_ETHER_MODULE = 'WrapEtherModule', CONVEX_LADLE_MODULE = 'ConvexLadleModule', TRANSFER_1155_MODULE = 'Transfer1155Module', + ASSERT = 'Assert', } export type ContractMap = Map; @@ -28,6 +29,7 @@ const contractAddresses: ContractAddresses = { [ContractNames.TRANSFER_1155_MODULE, '0x97f1d43A217aDD678bB6Dcd3C5D51F40b6729d06'], [ContractNames.WRAP_ETHER_MODULE, '0x22768FCaFe7BB9F03e31cb49823d1Ece30C0b8eA'], [ContractNames.CONVEX_LADLE_MODULE, '0x9Bf195997581C99cef8be95a3a816Ca19Cf1A3e6'], + [ContractNames.ASSERT, '0x40f0b18c7a41c04f848c033ed7f9178d9c5a80d8'], ]), ], [ @@ -38,6 +40,7 @@ const contractAddresses: ContractAddresses = { [ContractNames.WITCH, '0x08173D0885B00BDD640aaE57D05AbB74cd00d669'], [ContractNames.WITCHV2, '0x07c2c74811cb14a5003c3ccff7ec436d504fffb6'], [ContractNames.WRAP_ETHER_MODULE, '0x4cd01ed221d6d198e2656c16c32803bf78134568'], + [ContractNames.ASSERT, '0x40f0b18c7a41c04f848c033ed7f9178d9c5a80d8'], ]), ], ]), diff --git a/src/contracts/AccumulatorOracle.ts b/src/contracts/AccumulatorOracle.ts new file mode 100644 index 000000000..1a4e4d6a5 --- /dev/null +++ b/src/contracts/AccumulatorOracle.ts @@ -0,0 +1,866 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface AccumulatorOracleInterface extends utils.Interface { + functions: { + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "get(bytes32,bytes32,uint256)": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "peek(bytes32,bytes32,uint256)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "setSource(bytes6,bytes6,uint256,uint256)": FunctionFragment; + "sources(bytes6,bytes6)": FunctionFragment; + "updatePerSecondRate(bytes6,bytes6,uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "LOCK" + | "LOCK8605463013" + | "ROOT" + | "ROOT4146650865" + | "get" + | "getRoleAdmin" + | "grantRole" + | "grantRoles" + | "hasRole" + | "lockRole" + | "peek" + | "renounceRole" + | "revokeRole" + | "revokeRoles" + | "setRoleAdmin" + | "setSource" + | "sources" + | "updatePerSecondRate" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "get", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "peek", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setSource", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "sources", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "updatePerSecondRate", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "get", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "peek", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setSource", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "sources", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "updatePerSecondRate", + data: BytesLike + ): Result; + + events: { + "PerSecondRateUpdated(bytes6,bytes6,uint256)": EventFragment; + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + "SourceSet(bytes6,bytes6,uint256,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "PerSecondRateUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SourceSet"): EventFragment; +} + +export interface PerSecondRateUpdatedEventObject { + baseId: string; + kind: string; + perSecondRate: BigNumber; +} +export type PerSecondRateUpdatedEvent = TypedEvent< + [string, string, BigNumber], + PerSecondRateUpdatedEventObject +>; + +export type PerSecondRateUpdatedEventFilter = + TypedEventFilter; + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface SourceSetEventObject { + baseId: string; + kind: string; + startRate: BigNumber; + perSecondRate: BigNumber; +} +export type SourceSetEvent = TypedEvent< + [string, string, BigNumber, BigNumber], + SourceSetEventObject +>; + +export type SourceSetEventFilter = TypedEventFilter; + +export interface AccumulatorOracle extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: AccumulatorOracleInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + get( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { accumulated: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + kindId: PromiseOrValue, + startRate: PromiseOrValue, + perSecondRate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + perSecondRate: BigNumber; + accumulated: BigNumber; + lastUpdated: BigNumber; + } + >; + + updatePerSecondRate( + baseId: PromiseOrValue, + kindId: PromiseOrValue, + perSecondRate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { accumulated: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + kindId: PromiseOrValue, + startRate: PromiseOrValue, + perSecondRate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + perSecondRate: BigNumber; + accumulated: BigNumber; + lastUpdated: BigNumber; + } + >; + + updatePerSecondRate( + baseId: PromiseOrValue, + kindId: PromiseOrValue, + perSecondRate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { accumulated: BigNumber; updateTime: BigNumber } + >; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + peek( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { accumulated: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setSource( + baseId: PromiseOrValue, + kindId: PromiseOrValue, + startRate: PromiseOrValue, + perSecondRate: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + perSecondRate: BigNumber; + accumulated: BigNumber; + lastUpdated: BigNumber; + } + >; + + updatePerSecondRate( + baseId: PromiseOrValue, + kindId: PromiseOrValue, + perSecondRate: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "PerSecondRateUpdated(bytes6,bytes6,uint256)"( + baseId?: PromiseOrValue | null, + kind?: PromiseOrValue | null, + perSecondRate?: null + ): PerSecondRateUpdatedEventFilter; + PerSecondRateUpdated( + baseId?: PromiseOrValue | null, + kind?: PromiseOrValue | null, + perSecondRate?: null + ): PerSecondRateUpdatedEventFilter; + + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + + "SourceSet(bytes6,bytes6,uint256,uint256)"( + baseId?: PromiseOrValue | null, + kind?: PromiseOrValue | null, + startRate?: null, + perSecondRate?: null + ): SourceSetEventFilter; + SourceSet( + baseId?: PromiseOrValue | null, + kind?: PromiseOrValue | null, + startRate?: null, + perSecondRate?: null + ): SourceSetEventFilter; + }; + + estimateGas: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + kindId: PromiseOrValue, + startRate: PromiseOrValue, + perSecondRate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + updatePerSecondRate( + baseId: PromiseOrValue, + kindId: PromiseOrValue, + perSecondRate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + kindId: PromiseOrValue, + startRate: PromiseOrValue, + perSecondRate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + updatePerSecondRate( + baseId: PromiseOrValue, + kindId: PromiseOrValue, + perSecondRate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/contracts/Cauldron.ts b/src/contracts/Cauldron.ts new file mode 100644 index 000000000..dd5103e53 --- /dev/null +++ b/src/contracts/Cauldron.ts @@ -0,0 +1,2104 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export declare namespace DataTypes { + export type VaultStruct = { + owner: PromiseOrValue; + seriesId: PromiseOrValue; + ilkId: PromiseOrValue; + }; + + export type VaultStructOutput = [string, string, string] & { + owner: string; + seriesId: string; + ilkId: string; + }; + + export type BalancesStruct = { + art: PromiseOrValue; + ink: PromiseOrValue; + }; + + export type BalancesStructOutput = [BigNumber, BigNumber] & { + art: BigNumber; + ink: BigNumber; + }; +} + +export interface CauldronInterface extends utils.Interface { + functions: { + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "accrual(bytes6)": FunctionFragment; + "addAsset(bytes6,address)": FunctionFragment; + "addIlks(bytes6,bytes6[])": FunctionFragment; + "addSeries(bytes6,bytes6,address)": FunctionFragment; + "assets(bytes6)": FunctionFragment; + "balances(bytes12)": FunctionFragment; + "build(address,bytes12,bytes6,bytes6)": FunctionFragment; + "debt(bytes6,bytes6)": FunctionFragment; + "debtFromBase(bytes6,uint128)": FunctionFragment; + "debtToBase(bytes6,uint128)": FunctionFragment; + "destroy(bytes12)": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "give(bytes12,address)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "ilks(bytes6,bytes6)": FunctionFragment; + "lendingOracles(bytes6)": FunctionFragment; + "level(bytes12)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "mature(bytes6)": FunctionFragment; + "pour(bytes12,int128,int128)": FunctionFragment; + "ratesAtMaturity(bytes6)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "roll(bytes12,bytes6,int128)": FunctionFragment; + "series(bytes6)": FunctionFragment; + "setDebtLimits(bytes6,bytes6,uint96,uint24,uint8)": FunctionFragment; + "setLendingOracle(bytes6,address)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "setSpotOracle(bytes6,bytes6,address,uint32)": FunctionFragment; + "slurp(bytes12,uint128,uint128)": FunctionFragment; + "spotOracles(bytes6,bytes6)": FunctionFragment; + "stir(bytes12,bytes12,uint128,uint128)": FunctionFragment; + "tweak(bytes12,bytes6,bytes6)": FunctionFragment; + "vaults(bytes12)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "LOCK" + | "LOCK8605463013" + | "ROOT" + | "ROOT4146650865" + | "accrual" + | "addAsset" + | "addIlks" + | "addSeries" + | "assets" + | "balances" + | "build" + | "debt" + | "debtFromBase" + | "debtToBase" + | "destroy" + | "getRoleAdmin" + | "give" + | "grantRole" + | "grantRoles" + | "hasRole" + | "ilks" + | "lendingOracles" + | "level" + | "lockRole" + | "mature" + | "pour" + | "ratesAtMaturity" + | "renounceRole" + | "revokeRole" + | "revokeRoles" + | "roll" + | "series" + | "setDebtLimits" + | "setLendingOracle" + | "setRoleAdmin" + | "setSpotOracle" + | "slurp" + | "spotOracles" + | "stir" + | "tweak" + | "vaults" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "accrual", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "addAsset", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "addIlks", + values: [PromiseOrValue, PromiseOrValue[]] + ): string; + encodeFunctionData( + functionFragment: "addSeries", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assets", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "balances", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "build", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "debt", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "debtFromBase", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "debtToBase", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "destroy", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "give", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "ilks", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lendingOracles", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "level", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "mature", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "pour", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "ratesAtMaturity", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "roll", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "series", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setDebtLimits", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "setLendingOracle", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setSpotOracle", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "slurp", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "spotOracles", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "stir", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "tweak", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "vaults", + values: [PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "accrual", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "addAsset", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "addIlks", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "addSeries", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "assets", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balances", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "build", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "debt", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "debtFromBase", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "debtToBase", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "destroy", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "give", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "ilks", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "lendingOracles", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "level", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "mature", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pour", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ratesAtMaturity", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "roll", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "series", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setDebtLimits", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setLendingOracle", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setSpotOracle", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "slurp", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "spotOracles", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "stir", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "tweak", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "vaults", data: BytesLike): Result; + + events: { + "AssetAdded(bytes6,address)": EventFragment; + "DebtLimitsSet(bytes6,bytes6,uint96,uint24,uint8)": EventFragment; + "IlkAdded(bytes6,bytes6)": EventFragment; + "RateOracleAdded(bytes6,address)": EventFragment; + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + "SeriesAdded(bytes6,bytes6,address)": EventFragment; + "SeriesMatured(bytes6,uint256)": EventFragment; + "SpotOracleAdded(bytes6,bytes6,address,uint32)": EventFragment; + "VaultBuilt(bytes12,address,bytes6,bytes6)": EventFragment; + "VaultDestroyed(bytes12)": EventFragment; + "VaultGiven(bytes12,address)": EventFragment; + "VaultPoured(bytes12,bytes6,bytes6,int128,int128)": EventFragment; + "VaultRolled(bytes12,bytes6,uint128)": EventFragment; + "VaultStirred(bytes12,bytes12,uint128,uint128)": EventFragment; + "VaultTweaked(bytes12,bytes6,bytes6)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "AssetAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DebtLimitsSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "IlkAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RateOracleAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SeriesAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SeriesMatured"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SpotOracleAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VaultBuilt"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VaultDestroyed"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VaultGiven"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VaultPoured"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VaultRolled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VaultStirred"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VaultTweaked"): EventFragment; +} + +export interface AssetAddedEventObject { + assetId: string; + asset: string; +} +export type AssetAddedEvent = TypedEvent< + [string, string], + AssetAddedEventObject +>; + +export type AssetAddedEventFilter = TypedEventFilter; + +export interface DebtLimitsSetEventObject { + baseId: string; + ilkId: string; + max: BigNumber; + min: number; + dec: number; +} +export type DebtLimitsSetEvent = TypedEvent< + [string, string, BigNumber, number, number], + DebtLimitsSetEventObject +>; + +export type DebtLimitsSetEventFilter = TypedEventFilter; + +export interface IlkAddedEventObject { + seriesId: string; + ilkId: string; +} +export type IlkAddedEvent = TypedEvent<[string, string], IlkAddedEventObject>; + +export type IlkAddedEventFilter = TypedEventFilter; + +export interface RateOracleAddedEventObject { + baseId: string; + oracle: string; +} +export type RateOracleAddedEvent = TypedEvent< + [string, string], + RateOracleAddedEventObject +>; + +export type RateOracleAddedEventFilter = TypedEventFilter; + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface SeriesAddedEventObject { + seriesId: string; + baseId: string; + fyToken: string; +} +export type SeriesAddedEvent = TypedEvent< + [string, string, string], + SeriesAddedEventObject +>; + +export type SeriesAddedEventFilter = TypedEventFilter; + +export interface SeriesMaturedEventObject { + seriesId: string; + rateAtMaturity: BigNumber; +} +export type SeriesMaturedEvent = TypedEvent< + [string, BigNumber], + SeriesMaturedEventObject +>; + +export type SeriesMaturedEventFilter = TypedEventFilter; + +export interface SpotOracleAddedEventObject { + baseId: string; + ilkId: string; + oracle: string; + ratio: number; +} +export type SpotOracleAddedEvent = TypedEvent< + [string, string, string, number], + SpotOracleAddedEventObject +>; + +export type SpotOracleAddedEventFilter = TypedEventFilter; + +export interface VaultBuiltEventObject { + vaultId: string; + owner: string; + seriesId: string; + ilkId: string; +} +export type VaultBuiltEvent = TypedEvent< + [string, string, string, string], + VaultBuiltEventObject +>; + +export type VaultBuiltEventFilter = TypedEventFilter; + +export interface VaultDestroyedEventObject { + vaultId: string; +} +export type VaultDestroyedEvent = TypedEvent< + [string], + VaultDestroyedEventObject +>; + +export type VaultDestroyedEventFilter = TypedEventFilter; + +export interface VaultGivenEventObject { + vaultId: string; + receiver: string; +} +export type VaultGivenEvent = TypedEvent< + [string, string], + VaultGivenEventObject +>; + +export type VaultGivenEventFilter = TypedEventFilter; + +export interface VaultPouredEventObject { + vaultId: string; + seriesId: string; + ilkId: string; + ink: BigNumber; + art: BigNumber; +} +export type VaultPouredEvent = TypedEvent< + [string, string, string, BigNumber, BigNumber], + VaultPouredEventObject +>; + +export type VaultPouredEventFilter = TypedEventFilter; + +export interface VaultRolledEventObject { + vaultId: string; + seriesId: string; + art: BigNumber; +} +export type VaultRolledEvent = TypedEvent< + [string, string, BigNumber], + VaultRolledEventObject +>; + +export type VaultRolledEventFilter = TypedEventFilter; + +export interface VaultStirredEventObject { + from: string; + to: string; + ink: BigNumber; + art: BigNumber; +} +export type VaultStirredEvent = TypedEvent< + [string, string, BigNumber, BigNumber], + VaultStirredEventObject +>; + +export type VaultStirredEventFilter = TypedEventFilter; + +export interface VaultTweakedEventObject { + vaultId: string; + seriesId: string; + ilkId: string; +} +export type VaultTweakedEvent = TypedEvent< + [string, string, string], + VaultTweakedEventObject +>; + +export type VaultTweakedEventFilter = TypedEventFilter; + +export interface Cauldron extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: CauldronInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + accrual( + seriesId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addAsset( + assetId: PromiseOrValue, + asset: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addIlks( + seriesId: PromiseOrValue, + ilkIds: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addSeries( + seriesId: PromiseOrValue, + baseId: PromiseOrValue, + fyToken: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + assets( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + balances( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber, BigNumber] & { art: BigNumber; ink: BigNumber }>; + + build( + owner: PromiseOrValue, + vaultId: PromiseOrValue, + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + debt( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, number, number, BigNumber] & { + max: BigNumber; + min: number; + dec: number; + sum: BigNumber; + } + >; + + debtFromBase( + seriesId: PromiseOrValue, + base: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + debtToBase( + seriesId: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + destroy( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + give( + vaultId: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + ilks( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + lendingOracles( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + level( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mature( + seriesId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + pour( + vaultId: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + ratesAtMaturity( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + roll( + vaultId: PromiseOrValue, + newSeriesId: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + series( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, string, number] & { + fyToken: string; + baseId: string; + maturity: number; + } + >; + + setDebtLimits( + baseId: PromiseOrValue, + ilkId: PromiseOrValue, + max: PromiseOrValue, + min: PromiseOrValue, + dec: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setLendingOracle( + baseId: PromiseOrValue, + oracle: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSpotOracle( + baseId: PromiseOrValue, + ilkId: PromiseOrValue, + oracle: PromiseOrValue, + ratio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + slurp( + vaultId: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + spotOracles( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string, number] & { oracle: string; ratio: number }>; + + stir( + from: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tweak( + vaultId: PromiseOrValue, + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + vaults( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, string, string] & { + owner: string; + seriesId: string; + ilkId: string; + } + >; + }; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + accrual( + seriesId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addAsset( + assetId: PromiseOrValue, + asset: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addIlks( + seriesId: PromiseOrValue, + ilkIds: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addSeries( + seriesId: PromiseOrValue, + baseId: PromiseOrValue, + fyToken: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + assets( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balances( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber, BigNumber] & { art: BigNumber; ink: BigNumber }>; + + build( + owner: PromiseOrValue, + vaultId: PromiseOrValue, + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + debt( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, number, number, BigNumber] & { + max: BigNumber; + min: number; + dec: number; + sum: BigNumber; + } + >; + + debtFromBase( + seriesId: PromiseOrValue, + base: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + debtToBase( + seriesId: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + destroy( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + give( + vaultId: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ilks( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lendingOracles( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + level( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mature( + seriesId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + pour( + vaultId: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + ratesAtMaturity( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + roll( + vaultId: PromiseOrValue, + newSeriesId: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + series( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, string, number] & { + fyToken: string; + baseId: string; + maturity: number; + } + >; + + setDebtLimits( + baseId: PromiseOrValue, + ilkId: PromiseOrValue, + max: PromiseOrValue, + min: PromiseOrValue, + dec: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setLendingOracle( + baseId: PromiseOrValue, + oracle: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSpotOracle( + baseId: PromiseOrValue, + ilkId: PromiseOrValue, + oracle: PromiseOrValue, + ratio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + slurp( + vaultId: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + spotOracles( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string, number] & { oracle: string; ratio: number }>; + + stir( + from: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tweak( + vaultId: PromiseOrValue, + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + vaults( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, string, string] & { + owner: string; + seriesId: string; + ilkId: string; + } + >; + + callStatic: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + accrual( + seriesId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + addAsset( + assetId: PromiseOrValue, + asset: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + addIlks( + seriesId: PromiseOrValue, + ilkIds: PromiseOrValue[], + overrides?: CallOverrides + ): Promise; + + addSeries( + seriesId: PromiseOrValue, + baseId: PromiseOrValue, + fyToken: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + assets( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balances( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber, BigNumber] & { art: BigNumber; ink: BigNumber }>; + + build( + owner: PromiseOrValue, + vaultId: PromiseOrValue, + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + debt( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, number, number, BigNumber] & { + max: BigNumber; + min: number; + dec: number; + sum: BigNumber; + } + >; + + debtFromBase( + seriesId: PromiseOrValue, + base: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + debtToBase( + seriesId: PromiseOrValue, + art: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + destroy( + vaultId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + give( + vaultId: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ilks( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lendingOracles( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + level( + vaultId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + mature( + seriesId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pour( + vaultId: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ratesAtMaturity( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + roll( + vaultId: PromiseOrValue, + newSeriesId: PromiseOrValue, + art: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[DataTypes.VaultStructOutput, DataTypes.BalancesStructOutput]>; + + series( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, string, number] & { + fyToken: string; + baseId: string; + maturity: number; + } + >; + + setDebtLimits( + baseId: PromiseOrValue, + ilkId: PromiseOrValue, + max: PromiseOrValue, + min: PromiseOrValue, + dec: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setLendingOracle( + baseId: PromiseOrValue, + oracle: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setSpotOracle( + baseId: PromiseOrValue, + ilkId: PromiseOrValue, + oracle: PromiseOrValue, + ratio: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + slurp( + vaultId: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + spotOracles( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string, number] & { oracle: string; ratio: number }>; + + stir( + from: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [DataTypes.BalancesStructOutput, DataTypes.BalancesStructOutput] + >; + + tweak( + vaultId: PromiseOrValue, + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + vaults( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, string, string] & { + owner: string; + seriesId: string; + ilkId: string; + } + >; + }; + + filters: { + "AssetAdded(bytes6,address)"( + assetId?: PromiseOrValue | null, + asset?: PromiseOrValue | null + ): AssetAddedEventFilter; + AssetAdded( + assetId?: PromiseOrValue | null, + asset?: PromiseOrValue | null + ): AssetAddedEventFilter; + + "DebtLimitsSet(bytes6,bytes6,uint96,uint24,uint8)"( + baseId?: PromiseOrValue | null, + ilkId?: PromiseOrValue | null, + max?: null, + min?: null, + dec?: null + ): DebtLimitsSetEventFilter; + DebtLimitsSet( + baseId?: PromiseOrValue | null, + ilkId?: PromiseOrValue | null, + max?: null, + min?: null, + dec?: null + ): DebtLimitsSetEventFilter; + + "IlkAdded(bytes6,bytes6)"( + seriesId?: PromiseOrValue | null, + ilkId?: PromiseOrValue | null + ): IlkAddedEventFilter; + IlkAdded( + seriesId?: PromiseOrValue | null, + ilkId?: PromiseOrValue | null + ): IlkAddedEventFilter; + + "RateOracleAdded(bytes6,address)"( + baseId?: PromiseOrValue | null, + oracle?: PromiseOrValue | null + ): RateOracleAddedEventFilter; + RateOracleAdded( + baseId?: PromiseOrValue | null, + oracle?: PromiseOrValue | null + ): RateOracleAddedEventFilter; + + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + + "SeriesAdded(bytes6,bytes6,address)"( + seriesId?: PromiseOrValue | null, + baseId?: PromiseOrValue | null, + fyToken?: PromiseOrValue | null + ): SeriesAddedEventFilter; + SeriesAdded( + seriesId?: PromiseOrValue | null, + baseId?: PromiseOrValue | null, + fyToken?: PromiseOrValue | null + ): SeriesAddedEventFilter; + + "SeriesMatured(bytes6,uint256)"( + seriesId?: PromiseOrValue | null, + rateAtMaturity?: null + ): SeriesMaturedEventFilter; + SeriesMatured( + seriesId?: PromiseOrValue | null, + rateAtMaturity?: null + ): SeriesMaturedEventFilter; + + "SpotOracleAdded(bytes6,bytes6,address,uint32)"( + baseId?: PromiseOrValue | null, + ilkId?: PromiseOrValue | null, + oracle?: PromiseOrValue | null, + ratio?: null + ): SpotOracleAddedEventFilter; + SpotOracleAdded( + baseId?: PromiseOrValue | null, + ilkId?: PromiseOrValue | null, + oracle?: PromiseOrValue | null, + ratio?: null + ): SpotOracleAddedEventFilter; + + "VaultBuilt(bytes12,address,bytes6,bytes6)"( + vaultId?: PromiseOrValue | null, + owner?: PromiseOrValue | null, + seriesId?: PromiseOrValue | null, + ilkId?: null + ): VaultBuiltEventFilter; + VaultBuilt( + vaultId?: PromiseOrValue | null, + owner?: PromiseOrValue | null, + seriesId?: PromiseOrValue | null, + ilkId?: null + ): VaultBuiltEventFilter; + + "VaultDestroyed(bytes12)"( + vaultId?: PromiseOrValue | null + ): VaultDestroyedEventFilter; + VaultDestroyed( + vaultId?: PromiseOrValue | null + ): VaultDestroyedEventFilter; + + "VaultGiven(bytes12,address)"( + vaultId?: PromiseOrValue | null, + receiver?: PromiseOrValue | null + ): VaultGivenEventFilter; + VaultGiven( + vaultId?: PromiseOrValue | null, + receiver?: PromiseOrValue | null + ): VaultGivenEventFilter; + + "VaultPoured(bytes12,bytes6,bytes6,int128,int128)"( + vaultId?: PromiseOrValue | null, + seriesId?: PromiseOrValue | null, + ilkId?: PromiseOrValue | null, + ink?: null, + art?: null + ): VaultPouredEventFilter; + VaultPoured( + vaultId?: PromiseOrValue | null, + seriesId?: PromiseOrValue | null, + ilkId?: PromiseOrValue | null, + ink?: null, + art?: null + ): VaultPouredEventFilter; + + "VaultRolled(bytes12,bytes6,uint128)"( + vaultId?: PromiseOrValue | null, + seriesId?: PromiseOrValue | null, + art?: null + ): VaultRolledEventFilter; + VaultRolled( + vaultId?: PromiseOrValue | null, + seriesId?: PromiseOrValue | null, + art?: null + ): VaultRolledEventFilter; + + "VaultStirred(bytes12,bytes12,uint128,uint128)"( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + ink?: null, + art?: null + ): VaultStirredEventFilter; + VaultStirred( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + ink?: null, + art?: null + ): VaultStirredEventFilter; + + "VaultTweaked(bytes12,bytes6,bytes6)"( + vaultId?: PromiseOrValue | null, + seriesId?: PromiseOrValue | null, + ilkId?: PromiseOrValue | null + ): VaultTweakedEventFilter; + VaultTweaked( + vaultId?: PromiseOrValue | null, + seriesId?: PromiseOrValue | null, + ilkId?: PromiseOrValue | null + ): VaultTweakedEventFilter; + }; + + estimateGas: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + accrual( + seriesId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addAsset( + assetId: PromiseOrValue, + asset: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addIlks( + seriesId: PromiseOrValue, + ilkIds: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addSeries( + seriesId: PromiseOrValue, + baseId: PromiseOrValue, + fyToken: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + assets( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balances( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + build( + owner: PromiseOrValue, + vaultId: PromiseOrValue, + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + debt( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + debtFromBase( + seriesId: PromiseOrValue, + base: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + debtToBase( + seriesId: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + destroy( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + give( + vaultId: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ilks( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lendingOracles( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + level( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mature( + seriesId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + pour( + vaultId: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + ratesAtMaturity( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + roll( + vaultId: PromiseOrValue, + newSeriesId: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + series( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setDebtLimits( + baseId: PromiseOrValue, + ilkId: PromiseOrValue, + max: PromiseOrValue, + min: PromiseOrValue, + dec: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setLendingOracle( + baseId: PromiseOrValue, + oracle: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSpotOracle( + baseId: PromiseOrValue, + ilkId: PromiseOrValue, + oracle: PromiseOrValue, + ratio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + slurp( + vaultId: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + spotOracles( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + stir( + from: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tweak( + vaultId: PromiseOrValue, + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + vaults( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + accrual( + seriesId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addAsset( + assetId: PromiseOrValue, + asset: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addIlks( + seriesId: PromiseOrValue, + ilkIds: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addSeries( + seriesId: PromiseOrValue, + baseId: PromiseOrValue, + fyToken: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + assets( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balances( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + build( + owner: PromiseOrValue, + vaultId: PromiseOrValue, + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + debt( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + debtFromBase( + seriesId: PromiseOrValue, + base: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + debtToBase( + seriesId: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + destroy( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + give( + vaultId: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ilks( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lendingOracles( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + level( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mature( + seriesId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + pour( + vaultId: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + ratesAtMaturity( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + roll( + vaultId: PromiseOrValue, + newSeriesId: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + series( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setDebtLimits( + baseId: PromiseOrValue, + ilkId: PromiseOrValue, + max: PromiseOrValue, + min: PromiseOrValue, + dec: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setLendingOracle( + baseId: PromiseOrValue, + oracle: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSpotOracle( + baseId: PromiseOrValue, + ilkId: PromiseOrValue, + oracle: PromiseOrValue, + ratio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + slurp( + vaultId: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + spotOracles( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + stir( + from: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tweak( + vaultId: PromiseOrValue, + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + vaults( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/src/contracts/ChainlinkMultiOracle.ts b/src/contracts/ChainlinkMultiOracle.ts new file mode 100644 index 000000000..4ab5c9363 --- /dev/null +++ b/src/contracts/ChainlinkMultiOracle.ts @@ -0,0 +1,803 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface ChainlinkMultiOracleInterface extends utils.Interface { + functions: { + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "get(bytes32,bytes32,uint256)": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "peek(bytes32,bytes32,uint256)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "setSource(bytes6,address,bytes6,address,address)": FunctionFragment; + "sources(bytes6,bytes6)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "LOCK" + | "LOCK8605463013" + | "ROOT" + | "ROOT4146650865" + | "get" + | "getRoleAdmin" + | "grantRole" + | "grantRoles" + | "hasRole" + | "lockRole" + | "peek" + | "renounceRole" + | "revokeRole" + | "revokeRoles" + | "setRoleAdmin" + | "setSource" + | "sources" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "get", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "peek", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setSource", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "sources", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "get", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "peek", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setSource", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "sources", data: BytesLike): Result; + + events: { + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + "SourceSet(bytes6,address,bytes6,address,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SourceSet"): EventFragment; +} + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface SourceSetEventObject { + baseId: string; + base: string; + quoteId: string; + quote: string; + source: string; +} +export type SourceSetEvent = TypedEvent< + [string, string, string, string, string], + SourceSetEventObject +>; + +export type SourceSetEventFilter = TypedEventFilter; + +export interface ChainlinkMultiOracle extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ChainlinkMultiOracleInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + base: PromiseOrValue, + quoteId: PromiseOrValue, + quote: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, number, number, boolean] & { + source: string; + baseDecimals: number; + quoteDecimals: number; + inverse: boolean; + } + >; + }; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + base: PromiseOrValue, + quoteId: PromiseOrValue, + quote: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, number, number, boolean] & { + source: string; + baseDecimals: number; + quoteDecimals: number; + inverse: boolean; + } + >; + + callStatic: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setSource( + baseId: PromiseOrValue, + base: PromiseOrValue, + quoteId: PromiseOrValue, + quote: PromiseOrValue, + source: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, number, number, boolean] & { + source: string; + baseDecimals: number; + quoteDecimals: number; + inverse: boolean; + } + >; + }; + + filters: { + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + + "SourceSet(bytes6,address,bytes6,address,address)"( + baseId?: PromiseOrValue | null, + base?: null, + quoteId?: PromiseOrValue | null, + quote?: null, + source?: PromiseOrValue | null + ): SourceSetEventFilter; + SourceSet( + baseId?: PromiseOrValue | null, + base?: null, + quoteId?: PromiseOrValue | null, + quote?: null, + source?: PromiseOrValue | null + ): SourceSetEventFilter; + }; + + estimateGas: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + base: PromiseOrValue, + quoteId: PromiseOrValue, + quote: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + base: PromiseOrValue, + quoteId: PromiseOrValue, + quote: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/src/contracts/ChainlinkUSDOracle.ts b/src/contracts/ChainlinkUSDOracle.ts new file mode 100644 index 000000000..d177b34ff --- /dev/null +++ b/src/contracts/ChainlinkUSDOracle.ts @@ -0,0 +1,759 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface ChainlinkUSDOracleInterface extends utils.Interface { + functions: { + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "get(bytes32,bytes32,uint256)": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "peek(bytes32,bytes32,uint256)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "setSource(bytes6,address,address)": FunctionFragment; + "sources(bytes6)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "LOCK" + | "LOCK8605463013" + | "ROOT" + | "ROOT4146650865" + | "get" + | "getRoleAdmin" + | "grantRole" + | "grantRoles" + | "hasRole" + | "lockRole" + | "peek" + | "renounceRole" + | "revokeRole" + | "revokeRoles" + | "setRoleAdmin" + | "setSource" + | "sources" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "get", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "peek", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setSource", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "sources", + values: [PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "get", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "peek", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setSource", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "sources", data: BytesLike): Result; + + events: { + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + "SourceSet(bytes6,address,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SourceSet"): EventFragment; +} + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface SourceSetEventObject { + baseId: string; + base: string; + source: string; +} +export type SourceSetEvent = TypedEvent< + [string, string, string], + SourceSetEventObject +>; + +export type SourceSetEventFilter = TypedEventFilter; + +export interface ChainlinkUSDOracle extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ChainlinkUSDOracleInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + base: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string, number] & { source: string; baseDecimals: number }>; + }; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + base: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string, number] & { source: string; baseDecimals: number }>; + + callStatic: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setSource( + baseId: PromiseOrValue, + base: PromiseOrValue, + source: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sources( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string, number] & { source: string; baseDecimals: number }>; + }; + + filters: { + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + + "SourceSet(bytes6,address,address)"( + baseId?: PromiseOrValue | null, + base?: null, + source?: PromiseOrValue | null + ): SourceSetEventFilter; + SourceSet( + baseId?: PromiseOrValue | null, + base?: null, + source?: PromiseOrValue | null + ): SourceSetEventFilter; + }; + + estimateGas: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + base: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + base: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/src/contracts/CompositeMultiOracle.ts b/src/contracts/CompositeMultiOracle.ts new file mode 100644 index 000000000..9647d1983 --- /dev/null +++ b/src/contracts/CompositeMultiOracle.ts @@ -0,0 +1,881 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface CompositeMultiOracleInterface extends utils.Interface { + functions: { + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "get(bytes32,bytes32,uint256)": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "paths(bytes6,bytes6,uint256)": FunctionFragment; + "peek(bytes32,bytes32,uint256)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "setPath(bytes6,bytes6,bytes6[])": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "setSource(bytes6,bytes6,address)": FunctionFragment; + "sources(bytes6,bytes6)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "LOCK" + | "LOCK8605463013" + | "ROOT" + | "ROOT4146650865" + | "get" + | "getRoleAdmin" + | "grantRole" + | "grantRoles" + | "hasRole" + | "lockRole" + | "paths" + | "peek" + | "renounceRole" + | "revokeRole" + | "revokeRoles" + | "setPath" + | "setRoleAdmin" + | "setSource" + | "sources" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "get", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "paths", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "peek", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setPath", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[] + ] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setSource", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "sources", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "get", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "paths", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "peek", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setPath", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setSource", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "sources", data: BytesLike): Result; + + events: { + "PathSet(bytes6,bytes6,bytes6[])": EventFragment; + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + "SourceSet(bytes6,bytes6,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "PathSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SourceSet"): EventFragment; +} + +export interface PathSetEventObject { + baseId: string; + quoteId: string; + path: string[]; +} +export type PathSetEvent = TypedEvent< + [string, string, string[]], + PathSetEventObject +>; + +export type PathSetEventFilter = TypedEventFilter; + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface SourceSetEventObject { + baseId: string; + quoteId: string; + source: string; +} +export type SourceSetEvent = TypedEvent< + [string, string, string], + SourceSetEventObject +>; + +export type SourceSetEventFilter = TypedEventFilter; + +export interface CompositeMultiOracle extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: CompositeMultiOracleInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + get( + base: PromiseOrValue, + quote: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + paths( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + peek( + base: PromiseOrValue, + quote: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setPath( + base: PromiseOrValue, + quote: PromiseOrValue, + path: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + }; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + quote: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + paths( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + peek( + base: PromiseOrValue, + quote: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setPath( + base: PromiseOrValue, + quote: PromiseOrValue, + path: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + callStatic: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + quote: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + paths( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + peek( + base: PromiseOrValue, + quote: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setPath( + base: PromiseOrValue, + quote: PromiseOrValue, + path: PromiseOrValue[], + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setSource( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + source: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "PathSet(bytes6,bytes6,bytes6[])"( + baseId?: PromiseOrValue | null, + quoteId?: PromiseOrValue | null, + path?: PromiseOrValue[] | null + ): PathSetEventFilter; + PathSet( + baseId?: PromiseOrValue | null, + quoteId?: PromiseOrValue | null, + path?: PromiseOrValue[] | null + ): PathSetEventFilter; + + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + + "SourceSet(bytes6,bytes6,address)"( + baseId?: PromiseOrValue | null, + quoteId?: PromiseOrValue | null, + source?: PromiseOrValue | null + ): SourceSetEventFilter; + SourceSet( + baseId?: PromiseOrValue | null, + quoteId?: PromiseOrValue | null, + source?: PromiseOrValue | null + ): SourceSetEventFilter; + }; + + estimateGas: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + quote: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + paths( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + peek( + base: PromiseOrValue, + quote: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setPath( + base: PromiseOrValue, + quote: PromiseOrValue, + path: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + quote: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + paths( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + peek( + base: PromiseOrValue, + quote: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setPath( + base: PromiseOrValue, + quote: PromiseOrValue, + path: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/src/contracts/CompoundMultiOracle.ts b/src/contracts/CompoundMultiOracle.ts new file mode 100644 index 000000000..2b4604469 --- /dev/null +++ b/src/contracts/CompoundMultiOracle.ts @@ -0,0 +1,764 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface CompoundMultiOracleInterface extends utils.Interface { + functions: { + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "get(bytes32,bytes32,uint256)": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "peek(bytes32,bytes32,uint256)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "setSource(bytes6,bytes6,address)": FunctionFragment; + "sources(bytes6,bytes6)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "LOCK" + | "LOCK8605463013" + | "ROOT" + | "ROOT4146650865" + | "get" + | "getRoleAdmin" + | "grantRole" + | "grantRoles" + | "hasRole" + | "lockRole" + | "peek" + | "renounceRole" + | "revokeRole" + | "revokeRoles" + | "setRoleAdmin" + | "setSource" + | "sources" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "get", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "peek", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setSource", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "sources", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "get", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "peek", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setSource", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "sources", data: BytesLike): Result; + + events: { + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + "SourceSet(bytes6,bytes6,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SourceSet"): EventFragment; +} + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface SourceSetEventObject { + baseId: string; + kind: string; + source: string; +} +export type SourceSetEvent = TypedEvent< + [string, string, string], + SourceSetEventObject +>; + +export type SourceSetEventFilter = TypedEventFilter; + +export interface CompoundMultiOracle extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: CompoundMultiOracleInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + get( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { accumulator: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + base: PromiseOrValue, + kind: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + }; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { accumulator: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + base: PromiseOrValue, + kind: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + callStatic: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { accumulator: BigNumber; updateTime: BigNumber } + >; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + peek( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { accumulator: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setSource( + base: PromiseOrValue, + kind: PromiseOrValue, + source: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + + "SourceSet(bytes6,bytes6,address)"( + baseId?: PromiseOrValue | null, + kind?: PromiseOrValue | null, + source?: PromiseOrValue | null + ): SourceSetEventFilter; + SourceSet( + baseId?: PromiseOrValue | null, + kind?: PromiseOrValue | null, + source?: PromiseOrValue | null + ): SourceSetEventFilter; + }; + + estimateGas: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + base: PromiseOrValue, + kind: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + base: PromiseOrValue, + kind: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/src/contracts/ConvexJoin.ts b/src/contracts/ConvexJoin.ts new file mode 100644 index 000000000..cf7bb4a82 --- /dev/null +++ b/src/contracts/ConvexJoin.ts @@ -0,0 +1,1279 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export declare namespace ConvexJoin { + export type EarnedDataStruct = { + token: PromiseOrValue; + amount: PromiseOrValue; + }; + + export type EarnedDataStructOutput = [string, BigNumber] & { + token: string; + amount: BigNumber; + }; +} + +export interface ConvexJoinInterface extends utils.Interface { + functions: { + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "addRewards()": FunctionFragment; + "addVault(bytes12)": FunctionFragment; + "asset()": FunctionFragment; + "cauldron()": FunctionFragment; + "checkpoint(address)": FunctionFragment; + "convexPool()": FunctionFragment; + "convexPoolId()": FunctionFragment; + "convexToken()": FunctionFragment; + "crv()": FunctionFragment; + "cvx()": FunctionFragment; + "earned(address)": FunctionFragment; + "exit(address,uint128)": FunctionFragment; + "getReward(address)": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "join(address,uint128)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "managed_assets()": FunctionFragment; + "registeredRewards(address)": FunctionFragment; + "removeVault(bytes12,address)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "retrieve(address,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "rewards(uint256)": FunctionFragment; + "setApprovals()": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "storedBalance()": FunctionFragment; + "vaults(address,uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "LOCK" + | "LOCK8605463013" + | "ROOT" + | "ROOT4146650865" + | "addRewards" + | "addVault" + | "asset" + | "cauldron" + | "checkpoint" + | "convexPool" + | "convexPoolId" + | "convexToken" + | "crv" + | "cvx" + | "earned" + | "exit" + | "getReward" + | "getRoleAdmin" + | "grantRole" + | "grantRoles" + | "hasRole" + | "join" + | "lockRole" + | "managed_assets" + | "registeredRewards" + | "removeVault" + | "renounceRole" + | "retrieve" + | "revokeRole" + | "revokeRoles" + | "rewards" + | "setApprovals" + | "setRoleAdmin" + | "storedBalance" + | "vaults" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "addRewards", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "addVault", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "asset", values?: undefined): string; + encodeFunctionData(functionFragment: "cauldron", values?: undefined): string; + encodeFunctionData( + functionFragment: "checkpoint", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "convexPool", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "convexPoolId", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "convexToken", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "crv", values?: undefined): string; + encodeFunctionData(functionFragment: "cvx", values?: undefined): string; + encodeFunctionData( + functionFragment: "earned", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "exit", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getReward", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "join", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "managed_assets", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "registeredRewards", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "removeVault", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "retrieve", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "rewards", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setApprovals", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "storedBalance", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "vaults", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "addRewards", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "addVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "asset", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "cauldron", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "checkpoint", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "convexPool", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "convexPoolId", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "convexToken", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "crv", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "cvx", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "earned", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "exit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getReward", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "join", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "managed_assets", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "registeredRewards", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeVault", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "retrieve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "rewards", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setApprovals", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "storedBalance", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "vaults", data: BytesLike): Result; + + events: { + "Deposited(address,address,uint256,bool)": EventFragment; + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + "VaultAdded(address,bytes12)": EventFragment; + "VaultRemoved(address,bytes12)": EventFragment; + "Withdrawn(address,uint256,bool)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Deposited"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VaultAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VaultRemoved"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Withdrawn"): EventFragment; +} + +export interface DepositedEventObject { + _user: string; + _account: string; + _amount: BigNumber; + _wrapped: boolean; +} +export type DepositedEvent = TypedEvent< + [string, string, BigNumber, boolean], + DepositedEventObject +>; + +export type DepositedEventFilter = TypedEventFilter; + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface VaultAddedEventObject { + account: string; + vaultId: string; +} +export type VaultAddedEvent = TypedEvent< + [string, string], + VaultAddedEventObject +>; + +export type VaultAddedEventFilter = TypedEventFilter; + +export interface VaultRemovedEventObject { + account: string; + vaultId: string; +} +export type VaultRemovedEvent = TypedEvent< + [string, string], + VaultRemovedEventObject +>; + +export type VaultRemovedEventFilter = TypedEventFilter; + +export interface WithdrawnEventObject { + _user: string; + _amount: BigNumber; + _unwrapped: boolean; +} +export type WithdrawnEvent = TypedEvent< + [string, BigNumber, boolean], + WithdrawnEventObject +>; + +export type WithdrawnEventFilter = TypedEventFilter; + +export interface ConvexJoin extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ConvexJoinInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + addRewards( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addVault( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + asset(overrides?: CallOverrides): Promise<[string]>; + + cauldron(overrides?: CallOverrides): Promise<[string]>; + + checkpoint( + _account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + convexPool(overrides?: CallOverrides): Promise<[string]>; + + convexPoolId(overrides?: CallOverrides): Promise<[BigNumber]>; + + convexToken(overrides?: CallOverrides): Promise<[string]>; + + crv(overrides?: CallOverrides): Promise<[string]>; + + cvx(overrides?: CallOverrides): Promise<[string]>; + + earned( + _account: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [ConvexJoin.EarnedDataStructOutput[]] & { + claimable: ConvexJoin.EarnedDataStructOutput[]; + } + >; + + exit( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getReward( + _account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + join( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + managed_assets(overrides?: CallOverrides): Promise<[BigNumber]>; + + registeredRewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + removeVault( + vaultId: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + rewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, string, BigNumber, BigNumber] & { + reward_token: string; + reward_pool: string; + reward_integral: BigNumber; + reward_remaining: BigNumber; + } + >; + + setApprovals( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + storedBalance(overrides?: CallOverrides): Promise<[BigNumber]>; + + vaults( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + }; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + addRewards( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addVault( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + asset(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + checkpoint( + _account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + convexPool(overrides?: CallOverrides): Promise; + + convexPoolId(overrides?: CallOverrides): Promise; + + convexToken(overrides?: CallOverrides): Promise; + + crv(overrides?: CallOverrides): Promise; + + cvx(overrides?: CallOverrides): Promise; + + earned( + _account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + exit( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getReward( + _account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + join( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + managed_assets(overrides?: CallOverrides): Promise; + + registeredRewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeVault( + vaultId: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + rewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, string, BigNumber, BigNumber] & { + reward_token: string; + reward_pool: string; + reward_integral: BigNumber; + reward_remaining: BigNumber; + } + >; + + setApprovals( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + storedBalance(overrides?: CallOverrides): Promise; + + vaults( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + callStatic: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + addRewards(overrides?: CallOverrides): Promise; + + addVault( + vaultId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + asset(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + checkpoint( + _account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + convexPool(overrides?: CallOverrides): Promise; + + convexPoolId(overrides?: CallOverrides): Promise; + + convexToken(overrides?: CallOverrides): Promise; + + crv(overrides?: CallOverrides): Promise; + + cvx(overrides?: CallOverrides): Promise; + + earned( + _account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + exit( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getReward( + _account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + join( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + managed_assets(overrides?: CallOverrides): Promise; + + registeredRewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeVault( + vaultId: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + rewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, string, BigNumber, BigNumber] & { + reward_token: string; + reward_pool: string; + reward_integral: BigNumber; + reward_remaining: BigNumber; + } + >; + + setApprovals(overrides?: CallOverrides): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + storedBalance(overrides?: CallOverrides): Promise; + + vaults( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "Deposited(address,address,uint256,bool)"( + _user?: PromiseOrValue | null, + _account?: PromiseOrValue | null, + _amount?: null, + _wrapped?: null + ): DepositedEventFilter; + Deposited( + _user?: PromiseOrValue | null, + _account?: PromiseOrValue | null, + _amount?: null, + _wrapped?: null + ): DepositedEventFilter; + + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + + "VaultAdded(address,bytes12)"( + account?: PromiseOrValue | null, + vaultId?: PromiseOrValue | null + ): VaultAddedEventFilter; + VaultAdded( + account?: PromiseOrValue | null, + vaultId?: PromiseOrValue | null + ): VaultAddedEventFilter; + + "VaultRemoved(address,bytes12)"( + account?: PromiseOrValue | null, + vaultId?: PromiseOrValue | null + ): VaultRemovedEventFilter; + VaultRemoved( + account?: PromiseOrValue | null, + vaultId?: PromiseOrValue | null + ): VaultRemovedEventFilter; + + "Withdrawn(address,uint256,bool)"( + _user?: PromiseOrValue | null, + _amount?: null, + _unwrapped?: null + ): WithdrawnEventFilter; + Withdrawn( + _user?: PromiseOrValue | null, + _amount?: null, + _unwrapped?: null + ): WithdrawnEventFilter; + }; + + estimateGas: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + addRewards( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addVault( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + asset(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + checkpoint( + _account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + convexPool(overrides?: CallOverrides): Promise; + + convexPoolId(overrides?: CallOverrides): Promise; + + convexToken(overrides?: CallOverrides): Promise; + + crv(overrides?: CallOverrides): Promise; + + cvx(overrides?: CallOverrides): Promise; + + earned( + _account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + exit( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getReward( + _account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + join( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + managed_assets(overrides?: CallOverrides): Promise; + + registeredRewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeVault( + vaultId: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + rewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setApprovals( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + storedBalance(overrides?: CallOverrides): Promise; + + vaults( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + addRewards( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addVault( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + asset(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + checkpoint( + _account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + convexPool(overrides?: CallOverrides): Promise; + + convexPoolId(overrides?: CallOverrides): Promise; + + convexToken(overrides?: CallOverrides): Promise; + + crv(overrides?: CallOverrides): Promise; + + cvx(overrides?: CallOverrides): Promise; + + earned( + _account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + exit( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getReward( + _account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + join( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + managed_assets(overrides?: CallOverrides): Promise; + + registeredRewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeVault( + vaultId: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + rewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setApprovals( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + storedBalance(overrides?: CallOverrides): Promise; + + vaults( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/src/contracts/ConvexLadleModule.ts b/src/contracts/ConvexLadleModule.ts new file mode 100644 index 000000000..a046d678c --- /dev/null +++ b/src/contracts/ConvexLadleModule.ts @@ -0,0 +1,507 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface ConvexLadleModuleInterface extends utils.Interface { + functions: { + "addVault(address,bytes12)": FunctionFragment; + "borrowingFee()": FunctionFragment; + "cauldron()": FunctionFragment; + "integrations(address)": FunctionFragment; + "joins(bytes6)": FunctionFragment; + "modules(address)": FunctionFragment; + "pools(bytes6)": FunctionFragment; + "removeVault(address,bytes12,address)": FunctionFragment; + "router()": FunctionFragment; + "tokens(address)": FunctionFragment; + "weth()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "addVault" + | "borrowingFee" + | "cauldron" + | "integrations" + | "joins" + | "modules" + | "pools" + | "removeVault" + | "router" + | "tokens" + | "weth" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "addVault", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "borrowingFee", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "cauldron", values?: undefined): string; + encodeFunctionData( + functionFragment: "integrations", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "joins", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "modules", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "pools", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "removeVault", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData(functionFragment: "router", values?: undefined): string; + encodeFunctionData( + functionFragment: "tokens", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "weth", values?: undefined): string; + + decodeFunctionResult(functionFragment: "addVault", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "borrowingFee", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "cauldron", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "integrations", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "joins", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "modules", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pools", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "removeVault", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "tokens", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "weth", data: BytesLike): Result; + + events: { + "FeeSet(uint256)": EventFragment; + "IntegrationAdded(address,bool)": EventFragment; + "JoinAdded(bytes6,address)": EventFragment; + "ModuleAdded(address,bool)": EventFragment; + "PoolAdded(bytes6,address)": EventFragment; + "TokenAdded(address,bool)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "FeeSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "IntegrationAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "JoinAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ModuleAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PoolAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TokenAdded"): EventFragment; +} + +export interface FeeSetEventObject { + fee: BigNumber; +} +export type FeeSetEvent = TypedEvent<[BigNumber], FeeSetEventObject>; + +export type FeeSetEventFilter = TypedEventFilter; + +export interface IntegrationAddedEventObject { + integration: string; + set: boolean; +} +export type IntegrationAddedEvent = TypedEvent< + [string, boolean], + IntegrationAddedEventObject +>; + +export type IntegrationAddedEventFilter = + TypedEventFilter; + +export interface JoinAddedEventObject { + assetId: string; + join: string; +} +export type JoinAddedEvent = TypedEvent<[string, string], JoinAddedEventObject>; + +export type JoinAddedEventFilter = TypedEventFilter; + +export interface ModuleAddedEventObject { + module: string; + set: boolean; +} +export type ModuleAddedEvent = TypedEvent< + [string, boolean], + ModuleAddedEventObject +>; + +export type ModuleAddedEventFilter = TypedEventFilter; + +export interface PoolAddedEventObject { + seriesId: string; + pool: string; +} +export type PoolAddedEvent = TypedEvent<[string, string], PoolAddedEventObject>; + +export type PoolAddedEventFilter = TypedEventFilter; + +export interface TokenAddedEventObject { + token: string; + set: boolean; +} +export type TokenAddedEvent = TypedEvent< + [string, boolean], + TokenAddedEventObject +>; + +export type TokenAddedEventFilter = TypedEventFilter; + +export interface ConvexLadleModule extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ConvexLadleModuleInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + addVault( + convexJoin: PromiseOrValue, + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + borrowingFee(overrides?: CallOverrides): Promise<[BigNumber]>; + + cauldron(overrides?: CallOverrides): Promise<[string]>; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + removeVault( + convexJoin: PromiseOrValue, + vaultId: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + router(overrides?: CallOverrides): Promise<[string]>; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + weth(overrides?: CallOverrides): Promise<[string]>; + }; + + addVault( + convexJoin: PromiseOrValue, + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeVault( + convexJoin: PromiseOrValue, + vaultId: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + weth(overrides?: CallOverrides): Promise; + + callStatic: { + addVault( + convexJoin: PromiseOrValue, + vaultId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeVault( + convexJoin: PromiseOrValue, + vaultId: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + weth(overrides?: CallOverrides): Promise; + }; + + filters: { + "FeeSet(uint256)"(fee?: null): FeeSetEventFilter; + FeeSet(fee?: null): FeeSetEventFilter; + + "IntegrationAdded(address,bool)"( + integration?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): IntegrationAddedEventFilter; + IntegrationAdded( + integration?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): IntegrationAddedEventFilter; + + "JoinAdded(bytes6,address)"( + assetId?: PromiseOrValue | null, + join?: PromiseOrValue | null + ): JoinAddedEventFilter; + JoinAdded( + assetId?: PromiseOrValue | null, + join?: PromiseOrValue | null + ): JoinAddedEventFilter; + + "ModuleAdded(address,bool)"( + module?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): ModuleAddedEventFilter; + ModuleAdded( + module?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): ModuleAddedEventFilter; + + "PoolAdded(bytes6,address)"( + seriesId?: PromiseOrValue | null, + pool?: PromiseOrValue | null + ): PoolAddedEventFilter; + PoolAdded( + seriesId?: PromiseOrValue | null, + pool?: PromiseOrValue | null + ): PoolAddedEventFilter; + + "TokenAdded(address,bool)"( + token?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): TokenAddedEventFilter; + TokenAdded( + token?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): TokenAddedEventFilter; + }; + + estimateGas: { + addVault( + convexJoin: PromiseOrValue, + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeVault( + convexJoin: PromiseOrValue, + vaultId: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + weth(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + addVault( + convexJoin: PromiseOrValue, + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeVault( + convexJoin: PromiseOrValue, + vaultId: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + weth(overrides?: CallOverrides): Promise; + }; +} diff --git a/src/contracts/ERC1155.ts b/src/contracts/ERC1155.ts new file mode 100644 index 000000000..c74194545 --- /dev/null +++ b/src/contracts/ERC1155.ts @@ -0,0 +1,529 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface ERC1155Interface extends utils.Interface { + functions: { + "balanceOf(address,uint256)": FunctionFragment; + "balanceOfBatch(address[],uint256[])": FunctionFragment; + "isApprovedForAll(address,address)": FunctionFragment; + "safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)": FunctionFragment; + "safeTransferFrom(address,address,uint256,uint256,bytes)": FunctionFragment; + "setApprovalForAll(address,bool)": FunctionFragment; + "supportsInterface(bytes4)": FunctionFragment; + "uri(uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "balanceOf" + | "balanceOfBatch" + | "isApprovedForAll" + | "safeBatchTransferFrom" + | "safeTransferFrom" + | "setApprovalForAll" + | "supportsInterface" + | "uri" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "balanceOf", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "balanceOfBatch", + values: [PromiseOrValue[], PromiseOrValue[]] + ): string; + encodeFunctionData( + functionFragment: "isApprovedForAll", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "safeBatchTransferFrom", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue[], + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "safeTransferFrom", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "setApprovalForAll", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "supportsInterface", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "uri", + values: [PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "balanceOfBatch", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isApprovedForAll", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "safeBatchTransferFrom", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "safeTransferFrom", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setApprovalForAll", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "uri", data: BytesLike): Result; + + events: { + "ApprovalForAll(address,address,bool)": EventFragment; + "TransferBatch(address,address,address,uint256[],uint256[])": EventFragment; + "TransferSingle(address,address,address,uint256,uint256)": EventFragment; + "URI(string,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "ApprovalForAll"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TransferBatch"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TransferSingle"): EventFragment; + getEvent(nameOrSignatureOrTopic: "URI"): EventFragment; +} + +export interface ApprovalForAllEventObject { + owner: string; + operator: string; + approved: boolean; +} +export type ApprovalForAllEvent = TypedEvent< + [string, string, boolean], + ApprovalForAllEventObject +>; + +export type ApprovalForAllEventFilter = TypedEventFilter; + +export interface TransferBatchEventObject { + operator: string; + from: string; + to: string; + ids: BigNumber[]; + amounts: BigNumber[]; +} +export type TransferBatchEvent = TypedEvent< + [string, string, string, BigNumber[], BigNumber[]], + TransferBatchEventObject +>; + +export type TransferBatchEventFilter = TypedEventFilter; + +export interface TransferSingleEventObject { + operator: string; + from: string; + to: string; + id: BigNumber; + amount: BigNumber; +} +export type TransferSingleEvent = TypedEvent< + [string, string, string, BigNumber, BigNumber], + TransferSingleEventObject +>; + +export type TransferSingleEventFilter = TypedEventFilter; + +export interface URIEventObject { + value: string; + id: BigNumber; +} +export type URIEvent = TypedEvent<[string, BigNumber], URIEventObject>; + +export type URIEventFilter = TypedEventFilter; + +export interface ERC1155 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ERC1155Interface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + balanceOf( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + balanceOfBatch( + owners: PromiseOrValue[], + ids: PromiseOrValue[], + overrides?: CallOverrides + ): Promise<[BigNumber[]] & { balances: BigNumber[] }>; + + isApprovedForAll( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + safeBatchTransferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + ids: PromiseOrValue[], + amounts: PromiseOrValue[], + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + safeTransferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + id: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setApprovalForAll( + operator: PromiseOrValue, + approved: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + supportsInterface( + interfaceId: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + uri( + id: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + }; + + balanceOf( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balanceOfBatch( + owners: PromiseOrValue[], + ids: PromiseOrValue[], + overrides?: CallOverrides + ): Promise; + + isApprovedForAll( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + safeBatchTransferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + ids: PromiseOrValue[], + amounts: PromiseOrValue[], + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + safeTransferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + id: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setApprovalForAll( + operator: PromiseOrValue, + approved: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + supportsInterface( + interfaceId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uri( + id: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + callStatic: { + balanceOf( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balanceOfBatch( + owners: PromiseOrValue[], + ids: PromiseOrValue[], + overrides?: CallOverrides + ): Promise; + + isApprovedForAll( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + safeBatchTransferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + ids: PromiseOrValue[], + amounts: PromiseOrValue[], + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + safeTransferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + id: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setApprovalForAll( + operator: PromiseOrValue, + approved: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uri( + id: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "ApprovalForAll(address,address,bool)"( + owner?: PromiseOrValue | null, + operator?: PromiseOrValue | null, + approved?: null + ): ApprovalForAllEventFilter; + ApprovalForAll( + owner?: PromiseOrValue | null, + operator?: PromiseOrValue | null, + approved?: null + ): ApprovalForAllEventFilter; + + "TransferBatch(address,address,address,uint256[],uint256[])"( + operator?: PromiseOrValue | null, + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + ids?: null, + amounts?: null + ): TransferBatchEventFilter; + TransferBatch( + operator?: PromiseOrValue | null, + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + ids?: null, + amounts?: null + ): TransferBatchEventFilter; + + "TransferSingle(address,address,address,uint256,uint256)"( + operator?: PromiseOrValue | null, + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + id?: null, + amount?: null + ): TransferSingleEventFilter; + TransferSingle( + operator?: PromiseOrValue | null, + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + id?: null, + amount?: null + ): TransferSingleEventFilter; + + "URI(string,uint256)"( + value?: null, + id?: PromiseOrValue | null + ): URIEventFilter; + URI(value?: null, id?: PromiseOrValue | null): URIEventFilter; + }; + + estimateGas: { + balanceOf( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balanceOfBatch( + owners: PromiseOrValue[], + ids: PromiseOrValue[], + overrides?: CallOverrides + ): Promise; + + isApprovedForAll( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + safeBatchTransferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + ids: PromiseOrValue[], + amounts: PromiseOrValue[], + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + safeTransferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + id: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setApprovalForAll( + operator: PromiseOrValue, + approved: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + supportsInterface( + interfaceId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uri( + id: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + balanceOf( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balanceOfBatch( + owners: PromiseOrValue[], + ids: PromiseOrValue[], + overrides?: CallOverrides + ): Promise; + + isApprovedForAll( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + safeBatchTransferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + ids: PromiseOrValue[], + amounts: PromiseOrValue[], + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + safeTransferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + id: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setApprovalForAll( + operator: PromiseOrValue, + approved: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + supportsInterface( + interfaceId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uri( + id: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/src/contracts/ERC20.ts b/src/contracts/ERC20.ts new file mode 100644 index 000000000..33e576e15 --- /dev/null +++ b/src/contracts/ERC20.ts @@ -0,0 +1,384 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface ERC20Interface extends utils.Interface { + functions: { + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "decimals()": FunctionFragment; + "name()": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "allowance" + | "approve" + | "balanceOf" + | "decimals" + | "name" + | "symbol" + | "totalSupply" + | "transfer" + | "transferFrom" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "allowance", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "balanceOf", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export interface ApprovalEventObject { + owner: string; + spender: string; + value: BigNumber; +} +export type ApprovalEvent = TypedEvent< + [string, string, BigNumber], + ApprovalEventObject +>; + +export type ApprovalEventFilter = TypedEventFilter; + +export interface TransferEventObject { + from: string; + to: string; + value: BigNumber; +} +export type TransferEvent = TypedEvent< + [string, string, BigNumber], + TransferEventObject +>; + +export type TransferEventFilter = TypedEventFilter; + +export interface ERC20 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ERC20Interface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "Approval(address,address,uint256)"( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + value?: null + ): ApprovalEventFilter; + Approval( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + value?: null + ): ApprovalEventFilter; + + "Transfer(address,address,uint256)"( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null + ): TransferEventFilter; + Transfer( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null + ): TransferEventFilter; + }; + + estimateGas: { + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/contracts/ERC20Permit.ts b/src/contracts/ERC20Permit.ts new file mode 100644 index 000000000..1a1560af1 --- /dev/null +++ b/src/contracts/ERC20Permit.ts @@ -0,0 +1,560 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface ERC20PermitInterface extends utils.Interface { + functions: { + "DOMAIN_SEPARATOR()": FunctionFragment; + "PERMIT_TYPEHASH()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "decimals()": FunctionFragment; + "deploymentChainId()": FunctionFragment; + "name()": FunctionFragment; + "nonces(address)": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "version()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "DOMAIN_SEPARATOR" + | "PERMIT_TYPEHASH" + | "allowance" + | "approve" + | "balanceOf" + | "decimals" + | "deploymentChainId" + | "name" + | "nonces" + | "permit" + | "symbol" + | "totalSupply" + | "transfer" + | "transferFrom" + | "version" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "DOMAIN_SEPARATOR", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "PERMIT_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "allowance", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "balanceOf", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "deploymentChainId", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "nonces", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "permit", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + + decodeFunctionResult( + functionFragment: "DOMAIN_SEPARATOR", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "PERMIT_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "deploymentChainId", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export interface ApprovalEventObject { + owner: string; + spender: string; + value: BigNumber; +} +export type ApprovalEvent = TypedEvent< + [string, string, BigNumber], + ApprovalEventObject +>; + +export type ApprovalEventFilter = TypedEventFilter; + +export interface TransferEventObject { + from: string; + to: string; + value: BigNumber; +} +export type TransferEvent = TypedEvent< + [string, string, BigNumber], + TransferEventObject +>; + +export type TransferEventFilter = TypedEventFilter; + +export interface ERC20Permit extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ERC20PermitInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + deploymentChainId(overrides?: CallOverrides): Promise<[BigNumber]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + version(overrides?: CallOverrides): Promise<[string]>; + }; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + version(overrides?: CallOverrides): Promise; + + callStatic: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + }; + + filters: { + "Approval(address,address,uint256)"( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + value?: null + ): ApprovalEventFilter; + Approval( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + value?: null + ): ApprovalEventFilter; + + "Transfer(address,address,uint256)"( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null + ): TransferEventFilter; + Transfer( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null + ): TransferEventFilter; + }; + + estimateGas: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + version(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + version(overrides?: CallOverrides): Promise; + }; +} diff --git a/src/contracts/FYToken.ts b/src/contracts/FYToken.ts new file mode 100644 index 000000000..398fe1560 --- /dev/null +++ b/src/contracts/FYToken.ts @@ -0,0 +1,1553 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface FYTokenInterface extends utils.Interface { + functions: { + "DOMAIN_SEPARATOR()": FunctionFragment; + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "PERMIT_TYPEHASH()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "accrual()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "burn(address,uint256)": FunctionFragment; + "chiAtMaturity()": FunctionFragment; + "decimals()": FunctionFragment; + "deploymentChainId()": FunctionFragment; + "flashFee(address,uint256)": FunctionFragment; + "flashLoan(address,address,uint256,bytes)": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "join()": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "mature()": FunctionFragment; + "maturity()": FunctionFragment; + "maxFlashLoan(address)": FunctionFragment; + "mint(address,uint256)": FunctionFragment; + "mintWithUnderlying(address,uint256)": FunctionFragment; + "name()": FunctionFragment; + "nonces(address)": FunctionFragment; + "oracle()": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "point(bytes32,address)": FunctionFragment; + "redeem(address,uint256)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "underlying()": FunctionFragment; + "underlyingId()": FunctionFragment; + "version()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "DOMAIN_SEPARATOR" + | "LOCK" + | "LOCK8605463013" + | "PERMIT_TYPEHASH" + | "ROOT" + | "ROOT4146650865" + | "accrual" + | "allowance" + | "approve" + | "balanceOf" + | "burn" + | "chiAtMaturity" + | "decimals" + | "deploymentChainId" + | "flashFee" + | "flashLoan" + | "getRoleAdmin" + | "grantRole" + | "grantRoles" + | "hasRole" + | "join" + | "lockRole" + | "mature" + | "maturity" + | "maxFlashLoan" + | "mint" + | "mintWithUnderlying" + | "name" + | "nonces" + | "oracle" + | "permit" + | "point" + | "redeem" + | "renounceRole" + | "revokeRole" + | "revokeRoles" + | "setRoleAdmin" + | "symbol" + | "totalSupply" + | "transfer" + | "transferFrom" + | "underlying" + | "underlyingId" + | "version" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "DOMAIN_SEPARATOR", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "PERMIT_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "accrual", values?: undefined): string; + encodeFunctionData( + functionFragment: "allowance", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "balanceOf", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "burn", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "chiAtMaturity", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "deploymentChainId", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "flashFee", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "flashLoan", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "join", values?: undefined): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "mature", values?: undefined): string; + encodeFunctionData(functionFragment: "maturity", values?: undefined): string; + encodeFunctionData( + functionFragment: "maxFlashLoan", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "mint", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "mintWithUnderlying", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "nonces", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "oracle", values?: undefined): string; + encodeFunctionData( + functionFragment: "permit", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "point", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "redeem", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "underlying", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "underlyingId", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + + decodeFunctionResult( + functionFragment: "DOMAIN_SEPARATOR", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "PERMIT_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "accrual", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "chiAtMaturity", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "deploymentChainId", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "flashFee", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "flashLoan", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "join", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "mature", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "maturity", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "maxFlashLoan", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "mintWithUnderlying", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "oracle", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "point", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "redeem", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "underlying", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "underlyingId", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "Point(bytes32,address)": EventFragment; + "Redeemed(address,address,uint256,uint256)": EventFragment; + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + "SeriesMatured(uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Point"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Redeemed"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SeriesMatured"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export interface ApprovalEventObject { + owner: string; + spender: string; + value: BigNumber; +} +export type ApprovalEvent = TypedEvent< + [string, string, BigNumber], + ApprovalEventObject +>; + +export type ApprovalEventFilter = TypedEventFilter; + +export interface PointEventObject { + param: string; + value: string; +} +export type PointEvent = TypedEvent<[string, string], PointEventObject>; + +export type PointEventFilter = TypedEventFilter; + +export interface RedeemedEventObject { + from: string; + to: string; + amount: BigNumber; + redeemed: BigNumber; +} +export type RedeemedEvent = TypedEvent< + [string, string, BigNumber, BigNumber], + RedeemedEventObject +>; + +export type RedeemedEventFilter = TypedEventFilter; + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface SeriesMaturedEventObject { + chiAtMaturity: BigNumber; +} +export type SeriesMaturedEvent = TypedEvent< + [BigNumber], + SeriesMaturedEventObject +>; + +export type SeriesMaturedEventFilter = TypedEventFilter; + +export interface TransferEventObject { + from: string; + to: string; + value: BigNumber; +} +export type TransferEvent = TypedEvent< + [string, string, BigNumber], + TransferEventObject +>; + +export type TransferEventFilter = TypedEventFilter; + +export interface FYToken extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: FYTokenInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + accrual( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + burn( + from: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + chiAtMaturity(overrides?: CallOverrides): Promise<[BigNumber]>; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + deploymentChainId(overrides?: CallOverrides): Promise<[BigNumber]>; + + flashFee( + token: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + flashLoan( + receiver: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + join(overrides?: CallOverrides): Promise<[string]>; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mature( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + maturity(overrides?: CallOverrides): Promise<[BigNumber]>; + + maxFlashLoan( + token: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + mint( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mintWithUnderlying( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise<[string]>; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + oracle(overrides?: CallOverrides): Promise<[string]>; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + point( + param: PromiseOrValue, + value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + redeem( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + underlying(overrides?: CallOverrides): Promise<[string]>; + + underlyingId(overrides?: CallOverrides): Promise<[string]>; + + version(overrides?: CallOverrides): Promise<[string]>; + }; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + accrual( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + burn( + from: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + chiAtMaturity(overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + flashFee( + token: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + flashLoan( + receiver: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + join(overrides?: CallOverrides): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mature( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + maturity(overrides?: CallOverrides): Promise; + + maxFlashLoan( + token: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + mint( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mintWithUnderlying( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + oracle(overrides?: CallOverrides): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + point( + param: PromiseOrValue, + value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + redeem( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + underlying(overrides?: CallOverrides): Promise; + + underlyingId(overrides?: CallOverrides): Promise; + + version(overrides?: CallOverrides): Promise; + + callStatic: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + accrual(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + burn( + from: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + chiAtMaturity(overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + flashFee( + token: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + flashLoan( + receiver: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + join(overrides?: CallOverrides): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + mature(overrides?: CallOverrides): Promise; + + maturity(overrides?: CallOverrides): Promise; + + maxFlashLoan( + token: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + mint( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + mintWithUnderlying( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + oracle(overrides?: CallOverrides): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + point( + param: PromiseOrValue, + value: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + redeem( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + underlying(overrides?: CallOverrides): Promise; + + underlyingId(overrides?: CallOverrides): Promise; + + version(overrides?: CallOverrides): Promise; + }; + + filters: { + "Approval(address,address,uint256)"( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + value?: null + ): ApprovalEventFilter; + Approval( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + value?: null + ): ApprovalEventFilter; + + "Point(bytes32,address)"( + param?: PromiseOrValue | null, + value?: null + ): PointEventFilter; + Point( + param?: PromiseOrValue | null, + value?: null + ): PointEventFilter; + + "Redeemed(address,address,uint256,uint256)"( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null, + redeemed?: null + ): RedeemedEventFilter; + Redeemed( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null, + redeemed?: null + ): RedeemedEventFilter; + + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + + "SeriesMatured(uint256)"(chiAtMaturity?: null): SeriesMaturedEventFilter; + SeriesMatured(chiAtMaturity?: null): SeriesMaturedEventFilter; + + "Transfer(address,address,uint256)"( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null + ): TransferEventFilter; + Transfer( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null + ): TransferEventFilter; + }; + + estimateGas: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + accrual( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + burn( + from: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + chiAtMaturity(overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + flashFee( + token: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + flashLoan( + receiver: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + join(overrides?: CallOverrides): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mature( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + maturity(overrides?: CallOverrides): Promise; + + maxFlashLoan( + token: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + mint( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mintWithUnderlying( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + oracle(overrides?: CallOverrides): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + point( + param: PromiseOrValue, + value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + redeem( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + underlying(overrides?: CallOverrides): Promise; + + underlyingId(overrides?: CallOverrides): Promise; + + version(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + accrual( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + burn( + from: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + chiAtMaturity(overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + flashFee( + token: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + flashLoan( + receiver: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + join(overrides?: CallOverrides): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mature( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + maturity(overrides?: CallOverrides): Promise; + + maxFlashLoan( + token: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + mint( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mintWithUnderlying( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + oracle(overrides?: CallOverrides): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + point( + param: PromiseOrValue, + value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + redeem( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + underlying(overrides?: CallOverrides): Promise; + + underlyingId(overrides?: CallOverrides): Promise; + + version(overrides?: CallOverrides): Promise; + }; +} diff --git a/src/contracts/Join.ts b/src/contracts/Join.ts new file mode 100644 index 000000000..ffa7bc3eb --- /dev/null +++ b/src/contracts/Join.ts @@ -0,0 +1,900 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface JoinInterface extends utils.Interface { + functions: { + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "asset()": FunctionFragment; + "exit(address,uint128)": FunctionFragment; + "flashFee(address,uint256)": FunctionFragment; + "flashFeeFactor()": FunctionFragment; + "flashLoan(address,address,uint256,bytes)": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "join(address,uint128)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "maxFlashLoan(address)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "retrieve(address,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "setFlashFeeFactor(uint256)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "storedBalance()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "LOCK" + | "LOCK8605463013" + | "ROOT" + | "ROOT4146650865" + | "asset" + | "exit" + | "flashFee" + | "flashFeeFactor" + | "flashLoan" + | "getRoleAdmin" + | "grantRole" + | "grantRoles" + | "hasRole" + | "join" + | "lockRole" + | "maxFlashLoan" + | "renounceRole" + | "retrieve" + | "revokeRole" + | "revokeRoles" + | "setFlashFeeFactor" + | "setRoleAdmin" + | "storedBalance" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "asset", values?: undefined): string; + encodeFunctionData( + functionFragment: "exit", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "flashFee", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "flashFeeFactor", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "flashLoan", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "join", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "maxFlashLoan", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "retrieve", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setFlashFeeFactor", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "storedBalance", + values?: undefined + ): string; + + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "asset", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "exit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "flashFee", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "flashFeeFactor", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "flashLoan", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "join", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "maxFlashLoan", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "retrieve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setFlashFeeFactor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "storedBalance", + data: BytesLike + ): Result; + + events: { + "FlashFeeFactorSet(uint256)": EventFragment; + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "FlashFeeFactorSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; +} + +export interface FlashFeeFactorSetEventObject { + fee: BigNumber; +} +export type FlashFeeFactorSetEvent = TypedEvent< + [BigNumber], + FlashFeeFactorSetEventObject +>; + +export type FlashFeeFactorSetEventFilter = + TypedEventFilter; + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface Join extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: JoinInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + asset(overrides?: CallOverrides): Promise<[string]>; + + exit( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + flashFee( + token: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + flashFeeFactor(overrides?: CallOverrides): Promise<[BigNumber]>; + + flashLoan( + receiver: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + join( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + maxFlashLoan( + token: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setFlashFeeFactor( + flashFeeFactor_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + storedBalance(overrides?: CallOverrides): Promise<[BigNumber]>; + }; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + asset(overrides?: CallOverrides): Promise; + + exit( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + flashFee( + token: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + flashFeeFactor(overrides?: CallOverrides): Promise; + + flashLoan( + receiver: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + join( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + maxFlashLoan( + token: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setFlashFeeFactor( + flashFeeFactor_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + storedBalance(overrides?: CallOverrides): Promise; + + callStatic: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + asset(overrides?: CallOverrides): Promise; + + exit( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + flashFee( + token: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + flashFeeFactor(overrides?: CallOverrides): Promise; + + flashLoan( + receiver: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + join( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + maxFlashLoan( + token: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setFlashFeeFactor( + flashFeeFactor_: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + storedBalance(overrides?: CallOverrides): Promise; + }; + + filters: { + "FlashFeeFactorSet(uint256)"( + fee?: PromiseOrValue | null + ): FlashFeeFactorSetEventFilter; + FlashFeeFactorSet( + fee?: PromiseOrValue | null + ): FlashFeeFactorSetEventFilter; + + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + }; + + estimateGas: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + asset(overrides?: CallOverrides): Promise; + + exit( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + flashFee( + token: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + flashFeeFactor(overrides?: CallOverrides): Promise; + + flashLoan( + receiver: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + join( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + maxFlashLoan( + token: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setFlashFeeFactor( + flashFeeFactor_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + storedBalance(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + asset(overrides?: CallOverrides): Promise; + + exit( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + flashFee( + token: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + flashFeeFactor(overrides?: CallOverrides): Promise; + + flashLoan( + receiver: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + join( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + maxFlashLoan( + token: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setFlashFeeFactor( + flashFeeFactor_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + storedBalance(overrides?: CallOverrides): Promise; + }; +} diff --git a/src/contracts/Join1155.ts b/src/contracts/Join1155.ts new file mode 100644 index 000000000..8392759ee --- /dev/null +++ b/src/contracts/Join1155.ts @@ -0,0 +1,983 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface Join1155Interface extends utils.Interface { + functions: { + "FLASH_LOANS_DISABLED()": FunctionFragment; + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "asset()": FunctionFragment; + "exit(address,uint128)": FunctionFragment; + "flashFeeFactor()": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "id()": FunctionFragment; + "join(address,uint128)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)": FunctionFragment; + "onERC1155Received(address,address,uint256,uint256,bytes)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "retrieve(address,address)": FunctionFragment; + "retrieveERC1155(address,uint256,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "storedBalance()": FunctionFragment; + "supportsInterface(bytes4)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "FLASH_LOANS_DISABLED" + | "LOCK" + | "LOCK8605463013" + | "ROOT" + | "ROOT4146650865" + | "asset" + | "exit" + | "flashFeeFactor" + | "getRoleAdmin" + | "grantRole" + | "grantRoles" + | "hasRole" + | "id" + | "join" + | "lockRole" + | "onERC1155BatchReceived" + | "onERC1155Received" + | "renounceRole" + | "retrieve" + | "retrieveERC1155" + | "revokeRole" + | "revokeRoles" + | "setRoleAdmin" + | "storedBalance" + | "supportsInterface" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "FLASH_LOANS_DISABLED", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "asset", values?: undefined): string; + encodeFunctionData( + functionFragment: "exit", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "flashFeeFactor", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "id", values?: undefined): string; + encodeFunctionData( + functionFragment: "join", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "onERC1155BatchReceived", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue[], + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "onERC1155Received", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "retrieve", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "retrieveERC1155", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "storedBalance", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "supportsInterface", + values: [PromiseOrValue] + ): string; + + decodeFunctionResult( + functionFragment: "FLASH_LOANS_DISABLED", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "asset", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "exit", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "flashFeeFactor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "id", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "join", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "onERC1155BatchReceived", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "onERC1155Received", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "retrieve", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "retrieveERC1155", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "storedBalance", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + + events: { + "FlashFeeFactorSet(uint256)": EventFragment; + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "FlashFeeFactorSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; +} + +export interface FlashFeeFactorSetEventObject { + fee: BigNumber; +} +export type FlashFeeFactorSetEvent = TypedEvent< + [BigNumber], + FlashFeeFactorSetEventObject +>; + +export type FlashFeeFactorSetEventFilter = + TypedEventFilter; + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface Join1155 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: Join1155Interface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + FLASH_LOANS_DISABLED(overrides?: CallOverrides): Promise<[BigNumber]>; + + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + asset(overrides?: CallOverrides): Promise<[string]>; + + exit( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + flashFeeFactor(overrides?: CallOverrides): Promise<[BigNumber]>; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + id(overrides?: CallOverrides): Promise<[BigNumber]>; + + join( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onERC1155BatchReceived( + _operator: PromiseOrValue, + _from: PromiseOrValue, + _ids: PromiseOrValue[], + _values: PromiseOrValue[], + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onERC1155Received( + _operator: PromiseOrValue, + _from: PromiseOrValue, + _id: PromiseOrValue, + _value: PromiseOrValue, + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveERC1155( + token: PromiseOrValue, + id_: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + storedBalance(overrides?: CallOverrides): Promise<[BigNumber]>; + + supportsInterface( + interfaceID: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + }; + + FLASH_LOANS_DISABLED(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + asset(overrides?: CallOverrides): Promise; + + exit( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + flashFeeFactor(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + id(overrides?: CallOverrides): Promise; + + join( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onERC1155BatchReceived( + _operator: PromiseOrValue, + _from: PromiseOrValue, + _ids: PromiseOrValue[], + _values: PromiseOrValue[], + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onERC1155Received( + _operator: PromiseOrValue, + _from: PromiseOrValue, + _id: PromiseOrValue, + _value: PromiseOrValue, + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveERC1155( + token: PromiseOrValue, + id_: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + storedBalance(overrides?: CallOverrides): Promise; + + supportsInterface( + interfaceID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + callStatic: { + FLASH_LOANS_DISABLED(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + asset(overrides?: CallOverrides): Promise; + + exit( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + flashFeeFactor(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + id(overrides?: CallOverrides): Promise; + + join( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onERC1155BatchReceived( + _operator: PromiseOrValue, + _from: PromiseOrValue, + _ids: PromiseOrValue[], + _values: PromiseOrValue[], + _data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onERC1155Received( + _operator: PromiseOrValue, + _from: PromiseOrValue, + _id: PromiseOrValue, + _value: PromiseOrValue, + _data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + retrieveERC1155( + token: PromiseOrValue, + id_: PromiseOrValue, + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + storedBalance(overrides?: CallOverrides): Promise; + + supportsInterface( + interfaceID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "FlashFeeFactorSet(uint256)"( + fee?: PromiseOrValue | null + ): FlashFeeFactorSetEventFilter; + FlashFeeFactorSet( + fee?: PromiseOrValue | null + ): FlashFeeFactorSetEventFilter; + + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + }; + + estimateGas: { + FLASH_LOANS_DISABLED(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + asset(overrides?: CallOverrides): Promise; + + exit( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + flashFeeFactor(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + id(overrides?: CallOverrides): Promise; + + join( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onERC1155BatchReceived( + _operator: PromiseOrValue, + _from: PromiseOrValue, + _ids: PromiseOrValue[], + _values: PromiseOrValue[], + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onERC1155Received( + _operator: PromiseOrValue, + _from: PromiseOrValue, + _id: PromiseOrValue, + _value: PromiseOrValue, + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveERC1155( + token: PromiseOrValue, + id_: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + storedBalance(overrides?: CallOverrides): Promise; + + supportsInterface( + interfaceID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + FLASH_LOANS_DISABLED( + overrides?: CallOverrides + ): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + asset(overrides?: CallOverrides): Promise; + + exit( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + flashFeeFactor(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + id(overrides?: CallOverrides): Promise; + + join( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onERC1155BatchReceived( + _operator: PromiseOrValue, + _from: PromiseOrValue, + _ids: PromiseOrValue[], + _values: PromiseOrValue[], + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onERC1155Received( + _operator: PromiseOrValue, + _from: PromiseOrValue, + _id: PromiseOrValue, + _value: PromiseOrValue, + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveERC1155( + token: PromiseOrValue, + id_: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + storedBalance(overrides?: CallOverrides): Promise; + + supportsInterface( + interfaceID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/src/contracts/Ladle.ts b/src/contracts/Ladle.ts new file mode 100644 index 000000000..8671fc4ba --- /dev/null +++ b/src/contracts/Ladle.ts @@ -0,0 +1,2200 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export declare namespace DataTypes { + export type VaultStruct = { + owner: PromiseOrValue; + seriesId: PromiseOrValue; + ilkId: PromiseOrValue; + }; + + export type VaultStructOutput = [string, string, string] & { + owner: string; + seriesId: string; + ilkId: string; + }; +} + +export interface LadleInterface extends utils.Interface { + functions: { + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "addIntegration(address,bool)": FunctionFragment; + "addJoin(bytes6,address)": FunctionFragment; + "addModule(address,bool)": FunctionFragment; + "addPool(bytes6,address)": FunctionFragment; + "addToken(address,bool)": FunctionFragment; + "batch(bytes[])": FunctionFragment; + "borrowingFee()": FunctionFragment; + "build(bytes6,bytes6,uint8)": FunctionFragment; + "cauldron()": FunctionFragment; + "close(bytes12,address,int128,int128)": FunctionFragment; + "closeFromLadle(bytes12,address)": FunctionFragment; + "destroy(bytes12)": FunctionFragment; + "exitEther(address)": FunctionFragment; + "forwardDaiPermit(address,address,uint256,uint256,bool,uint8,bytes32,bytes32)": FunctionFragment; + "forwardPermit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "give(bytes12,address)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "integrations(address)": FunctionFragment; + "joinEther(bytes6)": FunctionFragment; + "joins(bytes6)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "moduleCall(address,bytes)": FunctionFragment; + "modules(address)": FunctionFragment; + "pools(bytes6)": FunctionFragment; + "pour(bytes12,address,int128,int128)": FunctionFragment; + "redeem(bytes6,address,uint256)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "repay(bytes12,address,int128,uint128)": FunctionFragment; + "repayFromLadle(bytes12,address)": FunctionFragment; + "repayVault(bytes12,address,int128,uint128)": FunctionFragment; + "retrieve(address,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "roll(bytes12,bytes6,uint8,uint128)": FunctionFragment; + "route(address,bytes)": FunctionFragment; + "router()": FunctionFragment; + "serve(bytes12,address,uint128,uint128,uint128)": FunctionFragment; + "setFee(uint256)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "stir(bytes12,bytes12,uint128,uint128)": FunctionFragment; + "tokens(address)": FunctionFragment; + "transfer(address,address,uint128)": FunctionFragment; + "tweak(bytes12,bytes6,bytes6)": FunctionFragment; + "weth()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "LOCK" + | "LOCK8605463013" + | "ROOT" + | "ROOT4146650865" + | "addIntegration" + | "addJoin" + | "addModule" + | "addPool" + | "addToken" + | "batch" + | "borrowingFee" + | "build" + | "cauldron" + | "close" + | "closeFromLadle" + | "destroy" + | "exitEther" + | "forwardDaiPermit" + | "forwardPermit" + | "getRoleAdmin" + | "give" + | "grantRole" + | "grantRoles" + | "hasRole" + | "integrations" + | "joinEther" + | "joins" + | "lockRole" + | "moduleCall" + | "modules" + | "pools" + | "pour" + | "redeem" + | "renounceRole" + | "repay" + | "repayFromLadle" + | "repayVault" + | "retrieve" + | "revokeRole" + | "revokeRoles" + | "roll" + | "route" + | "router" + | "serve" + | "setFee" + | "setRoleAdmin" + | "stir" + | "tokens" + | "transfer" + | "tweak" + | "weth" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "addIntegration", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "addJoin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "addModule", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "addPool", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "addToken", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "batch", + values: [PromiseOrValue[]] + ): string; + encodeFunctionData( + functionFragment: "borrowingFee", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "build", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData(functionFragment: "cauldron", values?: undefined): string; + encodeFunctionData( + functionFragment: "close", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "closeFromLadle", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "destroy", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "exitEther", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "forwardDaiPermit", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "forwardPermit", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "give", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "integrations", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "joinEther", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "joins", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "moduleCall", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "modules", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "pools", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "pour", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "redeem", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "repay", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "repayFromLadle", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "repayVault", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "retrieve", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "roll", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "route", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "router", values?: undefined): string; + encodeFunctionData( + functionFragment: "serve", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "setFee", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "stir", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "tokens", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "tweak", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData(functionFragment: "weth", values?: undefined): string; + + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "addIntegration", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "addJoin", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "addModule", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "addPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "addToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "batch", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "borrowingFee", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "build", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "cauldron", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "close", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "closeFromLadle", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "destroy", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "exitEther", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "forwardDaiPermit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "forwardPermit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "give", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "integrations", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "joinEther", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "joins", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "moduleCall", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "modules", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pools", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pour", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "redeem", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "repay", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "repayFromLadle", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "repayVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "retrieve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "roll", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "route", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "serve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setFee", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "stir", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "tokens", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "tweak", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "weth", data: BytesLike): Result; + + events: { + "FeeSet(uint256)": EventFragment; + "IntegrationAdded(address,bool)": EventFragment; + "JoinAdded(bytes6,address)": EventFragment; + "ModuleAdded(address,bool)": EventFragment; + "PoolAdded(bytes6,address)": EventFragment; + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + "TokenAdded(address,bool)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "FeeSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "IntegrationAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "JoinAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ModuleAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PoolAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TokenAdded"): EventFragment; +} + +export interface FeeSetEventObject { + fee: BigNumber; +} +export type FeeSetEvent = TypedEvent<[BigNumber], FeeSetEventObject>; + +export type FeeSetEventFilter = TypedEventFilter; + +export interface IntegrationAddedEventObject { + integration: string; + set: boolean; +} +export type IntegrationAddedEvent = TypedEvent< + [string, boolean], + IntegrationAddedEventObject +>; + +export type IntegrationAddedEventFilter = + TypedEventFilter; + +export interface JoinAddedEventObject { + assetId: string; + join: string; +} +export type JoinAddedEvent = TypedEvent<[string, string], JoinAddedEventObject>; + +export type JoinAddedEventFilter = TypedEventFilter; + +export interface ModuleAddedEventObject { + module: string; + set: boolean; +} +export type ModuleAddedEvent = TypedEvent< + [string, boolean], + ModuleAddedEventObject +>; + +export type ModuleAddedEventFilter = TypedEventFilter; + +export interface PoolAddedEventObject { + seriesId: string; + pool: string; +} +export type PoolAddedEvent = TypedEvent<[string, string], PoolAddedEventObject>; + +export type PoolAddedEventFilter = TypedEventFilter; + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface TokenAddedEventObject { + token: string; + set: boolean; +} +export type TokenAddedEvent = TypedEvent< + [string, boolean], + TokenAddedEventObject +>; + +export type TokenAddedEventFilter = TypedEventFilter; + +export interface Ladle extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: LadleInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + addIntegration( + integration: PromiseOrValue, + set: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addJoin( + assetId: PromiseOrValue, + join: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addModule( + module: PromiseOrValue, + set: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addPool( + seriesId: PromiseOrValue, + pool: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addToken( + token: PromiseOrValue, + set: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + batch( + calls: PromiseOrValue[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + borrowingFee(overrides?: CallOverrides): Promise<[BigNumber]>; + + build( + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + salt: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + cauldron(overrides?: CallOverrides): Promise<[string]>; + + close( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + closeFromLadle( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + destroy( + vaultId_: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + exitEther( + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + forwardDaiPermit( + token: PromiseOrValue, + spender: PromiseOrValue, + nonce: PromiseOrValue, + deadline: PromiseOrValue, + allowed: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + forwardPermit( + token: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + give( + vaultId_: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + joinEther( + etherId: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + moduleCall( + module: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + pour( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + redeem( + seriesId: PromiseOrValue, + to: PromiseOrValue, + wad: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + repay( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + min: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + repayFromLadle( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + repayVault( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + max: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + roll( + vaultId_: PromiseOrValue, + newSeriesId: PromiseOrValue, + loan: PromiseOrValue, + max: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + route( + integration: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + router(overrides?: CallOverrides): Promise<[string]>; + + serve( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + base: PromiseOrValue, + max: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + setFee( + fee: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + stir( + from: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + transfer( + token: PromiseOrValue, + receiver: PromiseOrValue, + wad: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + tweak( + vaultId_: PromiseOrValue, + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + weth(overrides?: CallOverrides): Promise<[string]>; + }; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + addIntegration( + integration: PromiseOrValue, + set: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addJoin( + assetId: PromiseOrValue, + join: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addModule( + module: PromiseOrValue, + set: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addPool( + seriesId: PromiseOrValue, + pool: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addToken( + token: PromiseOrValue, + set: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + batch( + calls: PromiseOrValue[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + borrowingFee(overrides?: CallOverrides): Promise; + + build( + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + salt: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + close( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + closeFromLadle( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + destroy( + vaultId_: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + exitEther( + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + forwardDaiPermit( + token: PromiseOrValue, + spender: PromiseOrValue, + nonce: PromiseOrValue, + deadline: PromiseOrValue, + allowed: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + forwardPermit( + token: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + give( + vaultId_: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joinEther( + etherId: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + moduleCall( + module: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pour( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + redeem( + seriesId: PromiseOrValue, + to: PromiseOrValue, + wad: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + repay( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + min: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + repayFromLadle( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + repayVault( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + max: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + roll( + vaultId_: PromiseOrValue, + newSeriesId: PromiseOrValue, + loan: PromiseOrValue, + max: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + route( + integration: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + router(overrides?: CallOverrides): Promise; + + serve( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + base: PromiseOrValue, + max: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + setFee( + fee: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + stir( + from: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transfer( + token: PromiseOrValue, + receiver: PromiseOrValue, + wad: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + tweak( + vaultId_: PromiseOrValue, + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + weth(overrides?: CallOverrides): Promise; + + callStatic: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + addIntegration( + integration: PromiseOrValue, + set: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + addJoin( + assetId: PromiseOrValue, + join: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + addModule( + module: PromiseOrValue, + set: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + addPool( + seriesId: PromiseOrValue, + pool: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + addToken( + token: PromiseOrValue, + set: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + batch( + calls: PromiseOrValue[], + overrides?: CallOverrides + ): Promise; + + borrowingFee(overrides?: CallOverrides): Promise; + + build( + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + salt: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string, DataTypes.VaultStructOutput]>; + + cauldron(overrides?: CallOverrides): Promise; + + close( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + closeFromLadle( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + destroy( + vaultId_: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + exitEther( + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + forwardDaiPermit( + token: PromiseOrValue, + spender: PromiseOrValue, + nonce: PromiseOrValue, + deadline: PromiseOrValue, + allowed: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + forwardPermit( + token: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + give( + vaultId_: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joinEther( + etherId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + moduleCall( + module: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pour( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + redeem( + seriesId: PromiseOrValue, + to: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + repay( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + min: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + repayFromLadle( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + repayVault( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + max: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + roll( + vaultId_: PromiseOrValue, + newSeriesId: PromiseOrValue, + loan: PromiseOrValue, + max: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [DataTypes.VaultStructOutput, BigNumber] & { + vault: DataTypes.VaultStructOutput; + newDebt: BigNumber; + } + >; + + route( + integration: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + router(overrides?: CallOverrides): Promise; + + serve( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + base: PromiseOrValue, + max: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setFee( + fee: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + stir( + from: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transfer( + token: PromiseOrValue, + receiver: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + tweak( + vaultId_: PromiseOrValue, + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + weth(overrides?: CallOverrides): Promise; + }; + + filters: { + "FeeSet(uint256)"(fee?: null): FeeSetEventFilter; + FeeSet(fee?: null): FeeSetEventFilter; + + "IntegrationAdded(address,bool)"( + integration?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): IntegrationAddedEventFilter; + IntegrationAdded( + integration?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): IntegrationAddedEventFilter; + + "JoinAdded(bytes6,address)"( + assetId?: PromiseOrValue | null, + join?: PromiseOrValue | null + ): JoinAddedEventFilter; + JoinAdded( + assetId?: PromiseOrValue | null, + join?: PromiseOrValue | null + ): JoinAddedEventFilter; + + "ModuleAdded(address,bool)"( + module?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): ModuleAddedEventFilter; + ModuleAdded( + module?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): ModuleAddedEventFilter; + + "PoolAdded(bytes6,address)"( + seriesId?: PromiseOrValue | null, + pool?: PromiseOrValue | null + ): PoolAddedEventFilter; + PoolAdded( + seriesId?: PromiseOrValue | null, + pool?: PromiseOrValue | null + ): PoolAddedEventFilter; + + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + + "TokenAdded(address,bool)"( + token?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): TokenAddedEventFilter; + TokenAdded( + token?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): TokenAddedEventFilter; + }; + + estimateGas: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + addIntegration( + integration: PromiseOrValue, + set: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addJoin( + assetId: PromiseOrValue, + join: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addModule( + module: PromiseOrValue, + set: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addPool( + seriesId: PromiseOrValue, + pool: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addToken( + token: PromiseOrValue, + set: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + batch( + calls: PromiseOrValue[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + borrowingFee(overrides?: CallOverrides): Promise; + + build( + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + salt: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + close( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + closeFromLadle( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + destroy( + vaultId_: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + exitEther( + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + forwardDaiPermit( + token: PromiseOrValue, + spender: PromiseOrValue, + nonce: PromiseOrValue, + deadline: PromiseOrValue, + allowed: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + forwardPermit( + token: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + give( + vaultId_: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joinEther( + etherId: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + moduleCall( + module: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pour( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + redeem( + seriesId: PromiseOrValue, + to: PromiseOrValue, + wad: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + repay( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + min: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + repayFromLadle( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + repayVault( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + max: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + roll( + vaultId_: PromiseOrValue, + newSeriesId: PromiseOrValue, + loan: PromiseOrValue, + max: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + route( + integration: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + router(overrides?: CallOverrides): Promise; + + serve( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + base: PromiseOrValue, + max: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + setFee( + fee: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + stir( + from: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transfer( + token: PromiseOrValue, + receiver: PromiseOrValue, + wad: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + tweak( + vaultId_: PromiseOrValue, + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + weth(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + addIntegration( + integration: PromiseOrValue, + set: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addJoin( + assetId: PromiseOrValue, + join: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addModule( + module: PromiseOrValue, + set: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addPool( + seriesId: PromiseOrValue, + pool: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addToken( + token: PromiseOrValue, + set: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + batch( + calls: PromiseOrValue[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + borrowingFee(overrides?: CallOverrides): Promise; + + build( + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + salt: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + close( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + closeFromLadle( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + destroy( + vaultId_: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + exitEther( + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + forwardDaiPermit( + token: PromiseOrValue, + spender: PromiseOrValue, + nonce: PromiseOrValue, + deadline: PromiseOrValue, + allowed: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + forwardPermit( + token: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + give( + vaultId_: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joinEther( + etherId: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + moduleCall( + module: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pour( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + redeem( + seriesId: PromiseOrValue, + to: PromiseOrValue, + wad: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + repay( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + min: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + repayFromLadle( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + repayVault( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + max: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + roll( + vaultId_: PromiseOrValue, + newSeriesId: PromiseOrValue, + loan: PromiseOrValue, + max: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + route( + integration: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + router(overrides?: CallOverrides): Promise; + + serve( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + base: PromiseOrValue, + max: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + setFee( + fee: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + stir( + from: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transfer( + token: PromiseOrValue, + receiver: PromiseOrValue, + wad: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + tweak( + vaultId_: PromiseOrValue, + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + weth(overrides?: CallOverrides): Promise; + }; +} diff --git a/src/contracts/LadleStorage.ts b/src/contracts/LadleStorage.ts new file mode 100644 index 000000000..413c9f27b --- /dev/null +++ b/src/contracts/LadleStorage.ts @@ -0,0 +1,419 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface LadleStorageInterface extends utils.Interface { + functions: { + "borrowingFee()": FunctionFragment; + "cauldron()": FunctionFragment; + "integrations(address)": FunctionFragment; + "joins(bytes6)": FunctionFragment; + "modules(address)": FunctionFragment; + "pools(bytes6)": FunctionFragment; + "router()": FunctionFragment; + "tokens(address)": FunctionFragment; + "weth()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "borrowingFee" + | "cauldron" + | "integrations" + | "joins" + | "modules" + | "pools" + | "router" + | "tokens" + | "weth" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "borrowingFee", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "cauldron", values?: undefined): string; + encodeFunctionData( + functionFragment: "integrations", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "joins", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "modules", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "pools", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "router", values?: undefined): string; + encodeFunctionData( + functionFragment: "tokens", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "weth", values?: undefined): string; + + decodeFunctionResult( + functionFragment: "borrowingFee", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "cauldron", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "integrations", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "joins", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "modules", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pools", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "tokens", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "weth", data: BytesLike): Result; + + events: { + "FeeSet(uint256)": EventFragment; + "IntegrationAdded(address,bool)": EventFragment; + "JoinAdded(bytes6,address)": EventFragment; + "ModuleAdded(address,bool)": EventFragment; + "PoolAdded(bytes6,address)": EventFragment; + "TokenAdded(address,bool)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "FeeSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "IntegrationAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "JoinAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ModuleAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PoolAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TokenAdded"): EventFragment; +} + +export interface FeeSetEventObject { + fee: BigNumber; +} +export type FeeSetEvent = TypedEvent<[BigNumber], FeeSetEventObject>; + +export type FeeSetEventFilter = TypedEventFilter; + +export interface IntegrationAddedEventObject { + integration: string; + set: boolean; +} +export type IntegrationAddedEvent = TypedEvent< + [string, boolean], + IntegrationAddedEventObject +>; + +export type IntegrationAddedEventFilter = + TypedEventFilter; + +export interface JoinAddedEventObject { + assetId: string; + join: string; +} +export type JoinAddedEvent = TypedEvent<[string, string], JoinAddedEventObject>; + +export type JoinAddedEventFilter = TypedEventFilter; + +export interface ModuleAddedEventObject { + module: string; + set: boolean; +} +export type ModuleAddedEvent = TypedEvent< + [string, boolean], + ModuleAddedEventObject +>; + +export type ModuleAddedEventFilter = TypedEventFilter; + +export interface PoolAddedEventObject { + seriesId: string; + pool: string; +} +export type PoolAddedEvent = TypedEvent<[string, string], PoolAddedEventObject>; + +export type PoolAddedEventFilter = TypedEventFilter; + +export interface TokenAddedEventObject { + token: string; + set: boolean; +} +export type TokenAddedEvent = TypedEvent< + [string, boolean], + TokenAddedEventObject +>; + +export type TokenAddedEventFilter = TypedEventFilter; + +export interface LadleStorage extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: LadleStorageInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + borrowingFee(overrides?: CallOverrides): Promise<[BigNumber]>; + + cauldron(overrides?: CallOverrides): Promise<[string]>; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + router(overrides?: CallOverrides): Promise<[string]>; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + weth(overrides?: CallOverrides): Promise<[string]>; + }; + + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + weth(overrides?: CallOverrides): Promise; + + callStatic: { + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + weth(overrides?: CallOverrides): Promise; + }; + + filters: { + "FeeSet(uint256)"(fee?: null): FeeSetEventFilter; + FeeSet(fee?: null): FeeSetEventFilter; + + "IntegrationAdded(address,bool)"( + integration?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): IntegrationAddedEventFilter; + IntegrationAdded( + integration?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): IntegrationAddedEventFilter; + + "JoinAdded(bytes6,address)"( + assetId?: PromiseOrValue | null, + join?: PromiseOrValue | null + ): JoinAddedEventFilter; + JoinAdded( + assetId?: PromiseOrValue | null, + join?: PromiseOrValue | null + ): JoinAddedEventFilter; + + "ModuleAdded(address,bool)"( + module?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): ModuleAddedEventFilter; + ModuleAdded( + module?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): ModuleAddedEventFilter; + + "PoolAdded(bytes6,address)"( + seriesId?: PromiseOrValue | null, + pool?: PromiseOrValue | null + ): PoolAddedEventFilter; + PoolAdded( + seriesId?: PromiseOrValue | null, + pool?: PromiseOrValue | null + ): PoolAddedEventFilter; + + "TokenAdded(address,bool)"( + token?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): TokenAddedEventFilter; + TokenAdded( + token?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): TokenAddedEventFilter; + }; + + estimateGas: { + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + weth(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + weth(overrides?: CallOverrides): Promise; + }; +} diff --git a/src/contracts/NotionalMultiOracle.ts b/src/contracts/NotionalMultiOracle.ts new file mode 100644 index 000000000..f139e7745 --- /dev/null +++ b/src/contracts/NotionalMultiOracle.ts @@ -0,0 +1,802 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface NotionalMultiOracleInterface extends utils.Interface { + functions: { + "FCASH_DECIMALS()": FunctionFragment; + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "get(bytes32,bytes32,uint256)": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "peek(bytes32,bytes32,uint256)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "setSource(bytes6,bytes6,address)": FunctionFragment; + "sources(bytes6,bytes6)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "FCASH_DECIMALS" + | "LOCK" + | "LOCK8605463013" + | "ROOT" + | "ROOT4146650865" + | "get" + | "getRoleAdmin" + | "grantRole" + | "grantRoles" + | "hasRole" + | "lockRole" + | "peek" + | "renounceRole" + | "revokeRole" + | "revokeRoles" + | "setRoleAdmin" + | "setSource" + | "sources" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "FCASH_DECIMALS", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "get", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "peek", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setSource", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "sources", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult( + functionFragment: "FCASH_DECIMALS", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "get", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "peek", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setSource", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "sources", data: BytesLike): Result; + + events: { + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + "SourceSet(bytes6,bytes6,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SourceSet"): EventFragment; +} + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface SourceSetEventObject { + notionalId: string; + underlyingId: string; + underlying: string; +} +export type SourceSetEvent = TypedEvent< + [string, string, string], + SourceSetEventObject +>; + +export type SourceSetEventFilter = TypedEventFilter; + +export interface NotionalMultiOracle extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: NotionalMultiOracleInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + FCASH_DECIMALS(overrides?: CallOverrides): Promise<[number]>; + + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + notionalId: PromiseOrValue, + underlyingId: PromiseOrValue, + underlying: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [number, number, boolean] & { + baseDecimals: number; + quoteDecimals: number; + set: boolean; + } + >; + }; + + FCASH_DECIMALS(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + notionalId: PromiseOrValue, + underlyingId: PromiseOrValue, + underlying: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [number, number, boolean] & { + baseDecimals: number; + quoteDecimals: number; + set: boolean; + } + >; + + callStatic: { + FCASH_DECIMALS(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setSource( + notionalId: PromiseOrValue, + underlyingId: PromiseOrValue, + underlying: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [number, number, boolean] & { + baseDecimals: number; + quoteDecimals: number; + set: boolean; + } + >; + }; + + filters: { + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + + "SourceSet(bytes6,bytes6,address)"( + notionalId?: PromiseOrValue | null, + underlyingId?: PromiseOrValue | null, + underlying?: null + ): SourceSetEventFilter; + SourceSet( + notionalId?: PromiseOrValue | null, + underlyingId?: PromiseOrValue | null, + underlying?: null + ): SourceSetEventFilter; + }; + + estimateGas: { + FCASH_DECIMALS(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + notionalId: PromiseOrValue, + underlyingId: PromiseOrValue, + underlying: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + FCASH_DECIMALS(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + notionalId: PromiseOrValue, + underlyingId: PromiseOrValue, + underlying: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/src/contracts/Pool.ts b/src/contracts/Pool.ts new file mode 100644 index 000000000..13e751de4 --- /dev/null +++ b/src/contracts/Pool.ts @@ -0,0 +1,2475 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface PoolInterface extends utils.Interface { + functions: { + "DOMAIN_SEPARATOR()": FunctionFragment; + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "PERMIT_TYPEHASH()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "base()": FunctionFragment; + "baseDecimals()": FunctionFragment; + "baseToken()": FunctionFragment; + "burn(address,address,uint256,uint256)": FunctionFragment; + "burnForBase(address,uint256,uint256)": FunctionFragment; + "buyBase(address,uint128,uint128)": FunctionFragment; + "buyBasePreview(uint128)": FunctionFragment; + "buyFYToken(address,uint128,uint128)": FunctionFragment; + "buyFYTokenPreview(uint128)": FunctionFragment; + "cumulativeRatioLast()": FunctionFragment; + "currentCumulativeRatio()": FunctionFragment; + "decimals()": FunctionFragment; + "deploymentChainId()": FunctionFragment; + "fyToken()": FunctionFragment; + "g1()": FunctionFragment; + "g1Fee()": FunctionFragment; + "g2()": FunctionFragment; + "getBaseBalance()": FunctionFragment; + "getC()": FunctionFragment; + "getCache()": FunctionFragment; + "getCurrentSharePrice()": FunctionFragment; + "getFYTokenBalance()": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "getSharesBalance()": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "init(address)": FunctionFragment; + "invariant()": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "maturity()": FunctionFragment; + "maxBaseIn()": FunctionFragment; + "maxBaseOut()": FunctionFragment; + "maxFYTokenIn()": FunctionFragment; + "maxFYTokenOut()": FunctionFragment; + "mint(address,address,uint256,uint256)": FunctionFragment; + "mintWithBase(address,address,uint256,uint256,uint256)": FunctionFragment; + "mu()": FunctionFragment; + "name()": FunctionFragment; + "nonces(address)": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "retrieveBase(address)": FunctionFragment; + "retrieveFYToken(address)": FunctionFragment; + "retrieveShares(address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "scaleFactor()": FunctionFragment; + "sellBase(address,uint128)": FunctionFragment; + "sellBasePreview(uint128)": FunctionFragment; + "sellFYToken(address,uint128)": FunctionFragment; + "sellFYTokenPreview(uint128)": FunctionFragment; + "setFees(uint16)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "sharesToken()": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "ts()": FunctionFragment; + "unwrap(address)": FunctionFragment; + "unwrapPreview(uint256)": FunctionFragment; + "version()": FunctionFragment; + "wrap(address)": FunctionFragment; + "wrapPreview(uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "DOMAIN_SEPARATOR" + | "LOCK" + | "LOCK8605463013" + | "PERMIT_TYPEHASH" + | "ROOT" + | "ROOT4146650865" + | "allowance" + | "approve" + | "balanceOf" + | "base" + | "baseDecimals" + | "baseToken" + | "burn" + | "burnForBase" + | "buyBase" + | "buyBasePreview" + | "buyFYToken" + | "buyFYTokenPreview" + | "cumulativeRatioLast" + | "currentCumulativeRatio" + | "decimals" + | "deploymentChainId" + | "fyToken" + | "g1" + | "g1Fee" + | "g2" + | "getBaseBalance" + | "getC" + | "getCache" + | "getCurrentSharePrice" + | "getFYTokenBalance" + | "getRoleAdmin" + | "getSharesBalance" + | "grantRole" + | "grantRoles" + | "hasRole" + | "init" + | "invariant" + | "lockRole" + | "maturity" + | "maxBaseIn" + | "maxBaseOut" + | "maxFYTokenIn" + | "maxFYTokenOut" + | "mint" + | "mintWithBase" + | "mu" + | "name" + | "nonces" + | "permit" + | "renounceRole" + | "retrieveBase" + | "retrieveFYToken" + | "retrieveShares" + | "revokeRole" + | "revokeRoles" + | "scaleFactor" + | "sellBase" + | "sellBasePreview" + | "sellFYToken" + | "sellFYTokenPreview" + | "setFees" + | "setRoleAdmin" + | "sharesToken" + | "symbol" + | "totalSupply" + | "transfer" + | "transferFrom" + | "ts" + | "unwrap" + | "unwrapPreview" + | "version" + | "wrap" + | "wrapPreview" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "DOMAIN_SEPARATOR", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "PERMIT_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "allowance", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "balanceOf", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "base", values?: undefined): string; + encodeFunctionData( + functionFragment: "baseDecimals", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "baseToken", values?: undefined): string; + encodeFunctionData( + functionFragment: "burn", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "burnForBase", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "buyBase", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "buyBasePreview", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "buyFYToken", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "buyFYTokenPreview", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "cumulativeRatioLast", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "currentCumulativeRatio", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "deploymentChainId", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "fyToken", values?: undefined): string; + encodeFunctionData(functionFragment: "g1", values?: undefined): string; + encodeFunctionData(functionFragment: "g1Fee", values?: undefined): string; + encodeFunctionData(functionFragment: "g2", values?: undefined): string; + encodeFunctionData( + functionFragment: "getBaseBalance", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "getC", values?: undefined): string; + encodeFunctionData(functionFragment: "getCache", values?: undefined): string; + encodeFunctionData( + functionFragment: "getCurrentSharePrice", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getFYTokenBalance", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getSharesBalance", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "init", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "invariant", values?: undefined): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "maturity", values?: undefined): string; + encodeFunctionData(functionFragment: "maxBaseIn", values?: undefined): string; + encodeFunctionData( + functionFragment: "maxBaseOut", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "maxFYTokenIn", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "maxFYTokenOut", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "mint", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "mintWithBase", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData(functionFragment: "mu", values?: undefined): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "nonces", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "permit", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "retrieveBase", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "retrieveFYToken", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "retrieveShares", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "scaleFactor", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "sellBase", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "sellBasePreview", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "sellFYToken", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "sellFYTokenPreview", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setFees", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "sharesToken", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData(functionFragment: "ts", values?: undefined): string; + encodeFunctionData( + functionFragment: "unwrap", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "unwrapPreview", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + encodeFunctionData( + functionFragment: "wrap", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "wrapPreview", + values: [PromiseOrValue] + ): string; + + decodeFunctionResult( + functionFragment: "DOMAIN_SEPARATOR", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "PERMIT_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "base", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "baseDecimals", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "baseToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "burnForBase", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "buyBase", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "buyBasePreview", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "buyFYToken", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "buyFYTokenPreview", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "cumulativeRatioLast", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "currentCumulativeRatio", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "deploymentChainId", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "fyToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "g1", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "g1Fee", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "g2", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getBaseBalance", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getC", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getCache", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getCurrentSharePrice", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getFYTokenBalance", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getSharesBalance", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "init", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "invariant", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "maturity", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "maxBaseIn", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "maxBaseOut", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "maxFYTokenIn", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "maxFYTokenOut", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "mintWithBase", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "mu", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "retrieveBase", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "retrieveFYToken", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "retrieveShares", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "scaleFactor", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "sellBase", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "sellBasePreview", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "sellFYToken", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "sellFYTokenPreview", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setFees", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "sharesToken", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ts", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "unwrap", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "unwrapPreview", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "wrap", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "wrapPreview", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "FeesSet(uint16)": EventFragment; + "Liquidity(uint32,address,address,address,int256,int256,int256)": EventFragment; + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + "Sync(uint112,uint112,uint256)": EventFragment; + "Trade(uint32,address,address,int256,int256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + "gg()": EventFragment; + "gm()": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "FeesSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Liquidity"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Sync"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Trade"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; + getEvent(nameOrSignatureOrTopic: "gg"): EventFragment; + getEvent(nameOrSignatureOrTopic: "gm"): EventFragment; +} + +export interface ApprovalEventObject { + owner: string; + spender: string; + value: BigNumber; +} +export type ApprovalEvent = TypedEvent< + [string, string, BigNumber], + ApprovalEventObject +>; + +export type ApprovalEventFilter = TypedEventFilter; + +export interface FeesSetEventObject { + g1Fee: number; +} +export type FeesSetEvent = TypedEvent<[number], FeesSetEventObject>; + +export type FeesSetEventFilter = TypedEventFilter; + +export interface LiquidityEventObject { + maturity: number; + from: string; + to: string; + fyTokenTo: string; + base: BigNumber; + fyTokens: BigNumber; + poolTokens: BigNumber; +} +export type LiquidityEvent = TypedEvent< + [number, string, string, string, BigNumber, BigNumber, BigNumber], + LiquidityEventObject +>; + +export type LiquidityEventFilter = TypedEventFilter; + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface SyncEventObject { + baseCached: BigNumber; + fyTokenCached: BigNumber; + cumulativeBalancesRatio: BigNumber; +} +export type SyncEvent = TypedEvent< + [BigNumber, BigNumber, BigNumber], + SyncEventObject +>; + +export type SyncEventFilter = TypedEventFilter; + +export interface TradeEventObject { + maturity: number; + from: string; + to: string; + base: BigNumber; + fyTokens: BigNumber; +} +export type TradeEvent = TypedEvent< + [number, string, string, BigNumber, BigNumber], + TradeEventObject +>; + +export type TradeEventFilter = TypedEventFilter; + +export interface TransferEventObject { + from: string; + to: string; + value: BigNumber; +} +export type TransferEvent = TypedEvent< + [string, string, BigNumber], + TransferEventObject +>; + +export type TransferEventFilter = TypedEventFilter; + +export interface ggEventObject {} +export type ggEvent = TypedEvent<[], ggEventObject>; + +export type ggEventFilter = TypedEventFilter; + +export interface gmEventObject {} +export type gmEvent = TypedEvent<[], gmEventObject>; + +export type gmEventFilter = TypedEventFilter; + +export interface Pool extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: PoolInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + base(overrides?: CallOverrides): Promise<[string]>; + + baseDecimals(overrides?: CallOverrides): Promise<[BigNumber]>; + + baseToken(overrides?: CallOverrides): Promise<[string]>; + + burn( + baseTo: PromiseOrValue, + fyTokenTo: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + burnForBase( + to: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + buyBase( + to: PromiseOrValue, + baseOut: PromiseOrValue, + max: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + buyBasePreview( + baseOut: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber] & { fyTokenIn: BigNumber }>; + + buyFYToken( + to: PromiseOrValue, + fyTokenOut: PromiseOrValue, + max: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + buyFYTokenPreview( + fyTokenOut: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber] & { baseIn: BigNumber }>; + + cumulativeRatioLast(overrides?: CallOverrides): Promise<[BigNumber]>; + + currentCumulativeRatio( + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { + currentCumulativeRatio_: BigNumber; + blockTimestampCurrent: BigNumber; + } + >; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + deploymentChainId(overrides?: CallOverrides): Promise<[BigNumber]>; + + fyToken(overrides?: CallOverrides): Promise<[string]>; + + g1(overrides?: CallOverrides): Promise<[BigNumber]>; + + g1Fee(overrides?: CallOverrides): Promise<[number]>; + + g2(overrides?: CallOverrides): Promise<[BigNumber]>; + + getBaseBalance(overrides?: CallOverrides): Promise<[BigNumber]>; + + getC(overrides?: CallOverrides): Promise<[BigNumber]>; + + getCache( + overrides?: CallOverrides + ): Promise<[BigNumber, BigNumber, number, number]>; + + getCurrentSharePrice(overrides?: CallOverrides): Promise<[BigNumber]>; + + getFYTokenBalance(overrides?: CallOverrides): Promise<[BigNumber]>; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + getSharesBalance(overrides?: CallOverrides): Promise<[BigNumber]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + init( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + invariant( + overrides?: CallOverrides + ): Promise<[BigNumber] & { result: BigNumber }>; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + maturity(overrides?: CallOverrides): Promise<[number]>; + + maxBaseIn( + overrides?: CallOverrides + ): Promise<[BigNumber] & { baseIn: BigNumber }>; + + maxBaseOut( + overrides?: CallOverrides + ): Promise<[BigNumber] & { baseOut: BigNumber }>; + + maxFYTokenIn( + overrides?: CallOverrides + ): Promise<[BigNumber] & { fyTokenIn: BigNumber }>; + + maxFYTokenOut( + overrides?: CallOverrides + ): Promise<[BigNumber] & { fyTokenOut: BigNumber }>; + + mint( + to: PromiseOrValue, + remainder: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mintWithBase( + to: PromiseOrValue, + remainder: PromiseOrValue, + fyTokenToBuy: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mu(overrides?: CallOverrides): Promise<[BigNumber]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveBase( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveFYToken( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveShares( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + scaleFactor(overrides?: CallOverrides): Promise<[BigNumber]>; + + sellBase( + to: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sellBasePreview( + baseIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber] & { fyTokenOut: BigNumber }>; + + sellFYToken( + to: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sellFYTokenPreview( + fyTokenIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber] & { baseOut: BigNumber }>; + + setFees( + g1Fee_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sharesToken(overrides?: CallOverrides): Promise<[string]>; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + ts(overrides?: CallOverrides): Promise<[BigNumber]>; + + unwrap( + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + unwrapPreview( + shares: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber] & { assets: BigNumber }>; + + version(overrides?: CallOverrides): Promise<[string]>; + + wrap( + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + wrapPreview( + assets: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber] & { shares: BigNumber }>; + }; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + base(overrides?: CallOverrides): Promise; + + baseDecimals(overrides?: CallOverrides): Promise; + + baseToken(overrides?: CallOverrides): Promise; + + burn( + baseTo: PromiseOrValue, + fyTokenTo: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + burnForBase( + to: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + buyBase( + to: PromiseOrValue, + baseOut: PromiseOrValue, + max: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + buyBasePreview( + baseOut: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + buyFYToken( + to: PromiseOrValue, + fyTokenOut: PromiseOrValue, + max: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + buyFYTokenPreview( + fyTokenOut: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + cumulativeRatioLast(overrides?: CallOverrides): Promise; + + currentCumulativeRatio( + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { + currentCumulativeRatio_: BigNumber; + blockTimestampCurrent: BigNumber; + } + >; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + fyToken(overrides?: CallOverrides): Promise; + + g1(overrides?: CallOverrides): Promise; + + g1Fee(overrides?: CallOverrides): Promise; + + g2(overrides?: CallOverrides): Promise; + + getBaseBalance(overrides?: CallOverrides): Promise; + + getC(overrides?: CallOverrides): Promise; + + getCache( + overrides?: CallOverrides + ): Promise<[BigNumber, BigNumber, number, number]>; + + getCurrentSharePrice(overrides?: CallOverrides): Promise; + + getFYTokenBalance(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getSharesBalance(overrides?: CallOverrides): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + init( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + invariant(overrides?: CallOverrides): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + maturity(overrides?: CallOverrides): Promise; + + maxBaseIn(overrides?: CallOverrides): Promise; + + maxBaseOut(overrides?: CallOverrides): Promise; + + maxFYTokenIn(overrides?: CallOverrides): Promise; + + maxFYTokenOut(overrides?: CallOverrides): Promise; + + mint( + to: PromiseOrValue, + remainder: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mintWithBase( + to: PromiseOrValue, + remainder: PromiseOrValue, + fyTokenToBuy: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mu(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveBase( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveFYToken( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveShares( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + scaleFactor(overrides?: CallOverrides): Promise; + + sellBase( + to: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sellBasePreview( + baseIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sellFYToken( + to: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sellFYTokenPreview( + fyTokenIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setFees( + g1Fee_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sharesToken(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + ts(overrides?: CallOverrides): Promise; + + unwrap( + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + unwrapPreview( + shares: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + wrap( + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + wrapPreview( + assets: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + callStatic: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + base(overrides?: CallOverrides): Promise; + + baseDecimals(overrides?: CallOverrides): Promise; + + baseToken(overrides?: CallOverrides): Promise; + + burn( + baseTo: PromiseOrValue, + fyTokenTo: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + lpTokensBurned: BigNumber; + baseOut: BigNumber; + fyTokenOut: BigNumber; + } + >; + + burnForBase( + to: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { lpTokensBurned: BigNumber; baseOut: BigNumber } + >; + + buyBase( + to: PromiseOrValue, + baseOut: PromiseOrValue, + max: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + buyBasePreview( + baseOut: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + buyFYToken( + to: PromiseOrValue, + fyTokenOut: PromiseOrValue, + max: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + buyFYTokenPreview( + fyTokenOut: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + cumulativeRatioLast(overrides?: CallOverrides): Promise; + + currentCumulativeRatio( + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { + currentCumulativeRatio_: BigNumber; + blockTimestampCurrent: BigNumber; + } + >; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + fyToken(overrides?: CallOverrides): Promise; + + g1(overrides?: CallOverrides): Promise; + + g1Fee(overrides?: CallOverrides): Promise; + + g2(overrides?: CallOverrides): Promise; + + getBaseBalance(overrides?: CallOverrides): Promise; + + getC(overrides?: CallOverrides): Promise; + + getCache( + overrides?: CallOverrides + ): Promise<[BigNumber, BigNumber, number, number]>; + + getCurrentSharePrice(overrides?: CallOverrides): Promise; + + getFYTokenBalance(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getSharesBalance(overrides?: CallOverrides): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + init( + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + baseIn: BigNumber; + fyTokenIn: BigNumber; + lpTokensMinted: BigNumber; + } + >; + + invariant(overrides?: CallOverrides): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + maturity(overrides?: CallOverrides): Promise; + + maxBaseIn(overrides?: CallOverrides): Promise; + + maxBaseOut(overrides?: CallOverrides): Promise; + + maxFYTokenIn(overrides?: CallOverrides): Promise; + + maxFYTokenOut(overrides?: CallOverrides): Promise; + + mint( + to: PromiseOrValue, + remainder: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + baseIn: BigNumber; + fyTokenIn: BigNumber; + lpTokensMinted: BigNumber; + } + >; + + mintWithBase( + to: PromiseOrValue, + remainder: PromiseOrValue, + fyTokenToBuy: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + baseIn: BigNumber; + fyTokenIn: BigNumber; + lpTokensMinted: BigNumber; + } + >; + + mu(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + retrieveBase( + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + retrieveFYToken( + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + retrieveShares( + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + scaleFactor(overrides?: CallOverrides): Promise; + + sellBase( + to: PromiseOrValue, + min: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sellBasePreview( + baseIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sellFYToken( + to: PromiseOrValue, + min: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sellFYTokenPreview( + fyTokenIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setFees( + g1Fee_: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sharesToken(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ts(overrides?: CallOverrides): Promise; + + unwrap( + receiver: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + unwrapPreview( + shares: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + wrap( + receiver: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + wrapPreview( + assets: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "Approval(address,address,uint256)"( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + value?: null + ): ApprovalEventFilter; + Approval( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + value?: null + ): ApprovalEventFilter; + + "FeesSet(uint16)"(g1Fee?: null): FeesSetEventFilter; + FeesSet(g1Fee?: null): FeesSetEventFilter; + + "Liquidity(uint32,address,address,address,int256,int256,int256)"( + maturity?: null, + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + fyTokenTo?: PromiseOrValue | null, + base?: null, + fyTokens?: null, + poolTokens?: null + ): LiquidityEventFilter; + Liquidity( + maturity?: null, + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + fyTokenTo?: PromiseOrValue | null, + base?: null, + fyTokens?: null, + poolTokens?: null + ): LiquidityEventFilter; + + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + + "Sync(uint112,uint112,uint256)"( + baseCached?: null, + fyTokenCached?: null, + cumulativeBalancesRatio?: null + ): SyncEventFilter; + Sync( + baseCached?: null, + fyTokenCached?: null, + cumulativeBalancesRatio?: null + ): SyncEventFilter; + + "Trade(uint32,address,address,int256,int256)"( + maturity?: null, + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + base?: null, + fyTokens?: null + ): TradeEventFilter; + Trade( + maturity?: null, + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + base?: null, + fyTokens?: null + ): TradeEventFilter; + + "Transfer(address,address,uint256)"( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null + ): TransferEventFilter; + Transfer( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null + ): TransferEventFilter; + + "gg()"(): ggEventFilter; + gg(): ggEventFilter; + + "gm()"(): gmEventFilter; + gm(): gmEventFilter; + }; + + estimateGas: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + base(overrides?: CallOverrides): Promise; + + baseDecimals(overrides?: CallOverrides): Promise; + + baseToken(overrides?: CallOverrides): Promise; + + burn( + baseTo: PromiseOrValue, + fyTokenTo: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + burnForBase( + to: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + buyBase( + to: PromiseOrValue, + baseOut: PromiseOrValue, + max: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + buyBasePreview( + baseOut: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + buyFYToken( + to: PromiseOrValue, + fyTokenOut: PromiseOrValue, + max: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + buyFYTokenPreview( + fyTokenOut: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + cumulativeRatioLast(overrides?: CallOverrides): Promise; + + currentCumulativeRatio(overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + fyToken(overrides?: CallOverrides): Promise; + + g1(overrides?: CallOverrides): Promise; + + g1Fee(overrides?: CallOverrides): Promise; + + g2(overrides?: CallOverrides): Promise; + + getBaseBalance(overrides?: CallOverrides): Promise; + + getC(overrides?: CallOverrides): Promise; + + getCache(overrides?: CallOverrides): Promise; + + getCurrentSharePrice(overrides?: CallOverrides): Promise; + + getFYTokenBalance(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getSharesBalance(overrides?: CallOverrides): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + init( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + invariant(overrides?: CallOverrides): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + maturity(overrides?: CallOverrides): Promise; + + maxBaseIn(overrides?: CallOverrides): Promise; + + maxBaseOut(overrides?: CallOverrides): Promise; + + maxFYTokenIn(overrides?: CallOverrides): Promise; + + maxFYTokenOut(overrides?: CallOverrides): Promise; + + mint( + to: PromiseOrValue, + remainder: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mintWithBase( + to: PromiseOrValue, + remainder: PromiseOrValue, + fyTokenToBuy: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mu(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveBase( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveFYToken( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveShares( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + scaleFactor(overrides?: CallOverrides): Promise; + + sellBase( + to: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sellBasePreview( + baseIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sellFYToken( + to: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sellFYTokenPreview( + fyTokenIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setFees( + g1Fee_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sharesToken(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + ts(overrides?: CallOverrides): Promise; + + unwrap( + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + unwrapPreview( + shares: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + wrap( + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + wrapPreview( + assets: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + base(overrides?: CallOverrides): Promise; + + baseDecimals(overrides?: CallOverrides): Promise; + + baseToken(overrides?: CallOverrides): Promise; + + burn( + baseTo: PromiseOrValue, + fyTokenTo: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + burnForBase( + to: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + buyBase( + to: PromiseOrValue, + baseOut: PromiseOrValue, + max: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + buyBasePreview( + baseOut: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + buyFYToken( + to: PromiseOrValue, + fyTokenOut: PromiseOrValue, + max: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + buyFYTokenPreview( + fyTokenOut: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + cumulativeRatioLast( + overrides?: CallOverrides + ): Promise; + + currentCumulativeRatio( + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + fyToken(overrides?: CallOverrides): Promise; + + g1(overrides?: CallOverrides): Promise; + + g1Fee(overrides?: CallOverrides): Promise; + + g2(overrides?: CallOverrides): Promise; + + getBaseBalance(overrides?: CallOverrides): Promise; + + getC(overrides?: CallOverrides): Promise; + + getCache(overrides?: CallOverrides): Promise; + + getCurrentSharePrice( + overrides?: CallOverrides + ): Promise; + + getFYTokenBalance(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getSharesBalance(overrides?: CallOverrides): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + init( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + invariant(overrides?: CallOverrides): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + maturity(overrides?: CallOverrides): Promise; + + maxBaseIn(overrides?: CallOverrides): Promise; + + maxBaseOut(overrides?: CallOverrides): Promise; + + maxFYTokenIn(overrides?: CallOverrides): Promise; + + maxFYTokenOut(overrides?: CallOverrides): Promise; + + mint( + to: PromiseOrValue, + remainder: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mintWithBase( + to: PromiseOrValue, + remainder: PromiseOrValue, + fyTokenToBuy: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mu(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveBase( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveFYToken( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveShares( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + scaleFactor(overrides?: CallOverrides): Promise; + + sellBase( + to: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sellBasePreview( + baseIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sellFYToken( + to: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sellFYTokenPreview( + fyTokenIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setFees( + g1Fee_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sharesToken(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + ts(overrides?: CallOverrides): Promise; + + unwrap( + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + unwrapPreview( + shares: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + wrap( + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + wrapPreview( + assets: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/src/contracts/Strategy.ts b/src/contracts/Strategy.ts new file mode 100644 index 000000000..22f4c1457 --- /dev/null +++ b/src/contracts/Strategy.ts @@ -0,0 +1,1914 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface StrategyInterface extends utils.Interface { + functions: { + "DOMAIN_SEPARATOR()": FunctionFragment; + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "PERMIT_TYPEHASH()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "base()": FunctionFragment; + "baseId()": FunctionFragment; + "baseJoin()": FunctionFragment; + "burn(address)": FunctionFragment; + "burnForBase(address)": FunctionFragment; + "cached()": FunctionFragment; + "cauldron()": FunctionFragment; + "claim(address)": FunctionFragment; + "decimals()": FunctionFragment; + "deploymentChainId()": FunctionFragment; + "endPool()": FunctionFragment; + "fyToken()": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "ladle()": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "mint(address)": FunctionFragment; + "name()": FunctionFragment; + "nextPool()": FunctionFragment; + "nextSeriesId()": FunctionFragment; + "nonces(address)": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "pool()": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "resetTokenJoin()": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "rewards(address)": FunctionFragment; + "rewardsPerToken()": FunctionFragment; + "rewardsPeriod()": FunctionFragment; + "rewardsToken()": FunctionFragment; + "seriesId()": FunctionFragment; + "setNextPool(address,bytes6)": FunctionFragment; + "setRewards(uint32,uint32,uint96)": FunctionFragment; + "setRewardsToken(address)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "setTokenId(bytes6)": FunctionFragment; + "setYield(address)": FunctionFragment; + "startPool(uint256,uint256)": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "version()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "DOMAIN_SEPARATOR" + | "LOCK" + | "LOCK8605463013" + | "PERMIT_TYPEHASH" + | "ROOT" + | "ROOT4146650865" + | "allowance" + | "approve" + | "balanceOf" + | "base" + | "baseId" + | "baseJoin" + | "burn" + | "burnForBase" + | "cached" + | "cauldron" + | "claim" + | "decimals" + | "deploymentChainId" + | "endPool" + | "fyToken" + | "getRoleAdmin" + | "grantRole" + | "grantRoles" + | "hasRole" + | "ladle" + | "lockRole" + | "mint" + | "name" + | "nextPool" + | "nextSeriesId" + | "nonces" + | "permit" + | "pool" + | "renounceRole" + | "resetTokenJoin" + | "revokeRole" + | "revokeRoles" + | "rewards" + | "rewardsPerToken" + | "rewardsPeriod" + | "rewardsToken" + | "seriesId" + | "setNextPool" + | "setRewards" + | "setRewardsToken" + | "setRoleAdmin" + | "setTokenId" + | "setYield" + | "startPool" + | "symbol" + | "totalSupply" + | "transfer" + | "transferFrom" + | "version" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "DOMAIN_SEPARATOR", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "PERMIT_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "allowance", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "balanceOf", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "base", values?: undefined): string; + encodeFunctionData(functionFragment: "baseId", values?: undefined): string; + encodeFunctionData(functionFragment: "baseJoin", values?: undefined): string; + encodeFunctionData( + functionFragment: "burn", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "burnForBase", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "cached", values?: undefined): string; + encodeFunctionData(functionFragment: "cauldron", values?: undefined): string; + encodeFunctionData( + functionFragment: "claim", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "deploymentChainId", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "endPool", values?: undefined): string; + encodeFunctionData(functionFragment: "fyToken", values?: undefined): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "ladle", values?: undefined): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "mint", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "nextPool", values?: undefined): string; + encodeFunctionData( + functionFragment: "nextSeriesId", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "nonces", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "permit", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData(functionFragment: "pool", values?: undefined): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "resetTokenJoin", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "rewards", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "rewardsPerToken", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "rewardsPeriod", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "rewardsToken", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "seriesId", values?: undefined): string; + encodeFunctionData( + functionFragment: "setNextPool", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setRewards", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "setRewardsToken", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setTokenId", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setYield", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "startPool", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + + decodeFunctionResult( + functionFragment: "DOMAIN_SEPARATOR", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "PERMIT_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "base", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "baseId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "baseJoin", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "burnForBase", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "cached", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "cauldron", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "deploymentChainId", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "endPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "fyToken", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "ladle", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nextPool", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "nextSeriesId", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pool", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "resetTokenJoin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "rewards", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "rewardsPerToken", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "rewardsPeriod", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "rewardsToken", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "seriesId", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setNextPool", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setRewards", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setRewardsToken", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setTokenId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setYield", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "startPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "Claimed(address,uint256)": EventFragment; + "NextPoolSet(address,bytes6)": EventFragment; + "PoolEnded(address)": EventFragment; + "PoolStarted(address)": EventFragment; + "RewardsPerTokenUpdated(uint256)": EventFragment; + "RewardsSet(uint32,uint32,uint256)": EventFragment; + "RewardsTokenSet(address)": EventFragment; + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + "TokenIdSet(bytes6)": EventFragment; + "TokenJoinReset(address)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + "UserRewardsUpdated(address,uint256,uint256)": EventFragment; + "YieldSet(address,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Claimed"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NextPoolSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PoolEnded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PoolStarted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RewardsPerTokenUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RewardsSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RewardsTokenSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TokenIdSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TokenJoinReset"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; + getEvent(nameOrSignatureOrTopic: "UserRewardsUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "YieldSet"): EventFragment; +} + +export interface ApprovalEventObject { + owner: string; + spender: string; + value: BigNumber; +} +export type ApprovalEvent = TypedEvent< + [string, string, BigNumber], + ApprovalEventObject +>; + +export type ApprovalEventFilter = TypedEventFilter; + +export interface ClaimedEventObject { + receiver: string; + claimed: BigNumber; +} +export type ClaimedEvent = TypedEvent<[string, BigNumber], ClaimedEventObject>; + +export type ClaimedEventFilter = TypedEventFilter; + +export interface NextPoolSetEventObject { + pool: string; + seriesId: string; +} +export type NextPoolSetEvent = TypedEvent< + [string, string], + NextPoolSetEventObject +>; + +export type NextPoolSetEventFilter = TypedEventFilter; + +export interface PoolEndedEventObject { + pool: string; +} +export type PoolEndedEvent = TypedEvent<[string], PoolEndedEventObject>; + +export type PoolEndedEventFilter = TypedEventFilter; + +export interface PoolStartedEventObject { + pool: string; +} +export type PoolStartedEvent = TypedEvent<[string], PoolStartedEventObject>; + +export type PoolStartedEventFilter = TypedEventFilter; + +export interface RewardsPerTokenUpdatedEventObject { + accumulated: BigNumber; +} +export type RewardsPerTokenUpdatedEvent = TypedEvent< + [BigNumber], + RewardsPerTokenUpdatedEventObject +>; + +export type RewardsPerTokenUpdatedEventFilter = + TypedEventFilter; + +export interface RewardsSetEventObject { + start: number; + end: number; + rate: BigNumber; +} +export type RewardsSetEvent = TypedEvent< + [number, number, BigNumber], + RewardsSetEventObject +>; + +export type RewardsSetEventFilter = TypedEventFilter; + +export interface RewardsTokenSetEventObject { + token: string; +} +export type RewardsTokenSetEvent = TypedEvent< + [string], + RewardsTokenSetEventObject +>; + +export type RewardsTokenSetEventFilter = TypedEventFilter; + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface TokenIdSetEventObject { + id: string; +} +export type TokenIdSetEvent = TypedEvent<[string], TokenIdSetEventObject>; + +export type TokenIdSetEventFilter = TypedEventFilter; + +export interface TokenJoinResetEventObject { + join: string; +} +export type TokenJoinResetEvent = TypedEvent< + [string], + TokenJoinResetEventObject +>; + +export type TokenJoinResetEventFilter = TypedEventFilter; + +export interface TransferEventObject { + from: string; + to: string; + value: BigNumber; +} +export type TransferEvent = TypedEvent< + [string, string, BigNumber], + TransferEventObject +>; + +export type TransferEventFilter = TypedEventFilter; + +export interface UserRewardsUpdatedEventObject { + user: string; + userRewards: BigNumber; + paidRewardPerToken: BigNumber; +} +export type UserRewardsUpdatedEvent = TypedEvent< + [string, BigNumber, BigNumber], + UserRewardsUpdatedEventObject +>; + +export type UserRewardsUpdatedEventFilter = + TypedEventFilter; + +export interface YieldSetEventObject { + ladle: string; + cauldron: string; +} +export type YieldSetEvent = TypedEvent<[string, string], YieldSetEventObject>; + +export type YieldSetEventFilter = TypedEventFilter; + +export interface Strategy extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: StrategyInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + base(overrides?: CallOverrides): Promise<[string]>; + + baseId(overrides?: CallOverrides): Promise<[string]>; + + baseJoin(overrides?: CallOverrides): Promise<[string]>; + + burn( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + burnForBase( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + cached(overrides?: CallOverrides): Promise<[BigNumber]>; + + cauldron(overrides?: CallOverrides): Promise<[string]>; + + claim( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + deploymentChainId(overrides?: CallOverrides): Promise<[BigNumber]>; + + endPool( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + fyToken(overrides?: CallOverrides): Promise<[string]>; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + ladle(overrides?: CallOverrides): Promise<[string]>; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mint( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise<[string]>; + + nextPool(overrides?: CallOverrides): Promise<[string]>; + + nextSeriesId(overrides?: CallOverrides): Promise<[string]>; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + pool(overrides?: CallOverrides): Promise<[string]>; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + resetTokenJoin( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + rewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { accumulated: BigNumber; checkpoint: BigNumber } + >; + + rewardsPerToken( + overrides?: CallOverrides + ): Promise< + [BigNumber, number, BigNumber] & { + accumulated: BigNumber; + lastUpdated: number; + rate: BigNumber; + } + >; + + rewardsPeriod( + overrides?: CallOverrides + ): Promise<[number, number] & { start: number; end: number }>; + + rewardsToken(overrides?: CallOverrides): Promise<[string]>; + + seriesId(overrides?: CallOverrides): Promise<[string]>; + + setNextPool( + pool_: PromiseOrValue, + seriesId_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRewards( + start: PromiseOrValue, + end: PromiseOrValue, + rate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRewardsToken( + rewardsToken_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setTokenId( + baseId_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setYield( + ladle_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + startPool( + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + version(overrides?: CallOverrides): Promise<[string]>; + }; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + base(overrides?: CallOverrides): Promise; + + baseId(overrides?: CallOverrides): Promise; + + baseJoin(overrides?: CallOverrides): Promise; + + burn( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + burnForBase( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + cached(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + claim( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + endPool( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + fyToken(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ladle(overrides?: CallOverrides): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mint( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + nextPool(overrides?: CallOverrides): Promise; + + nextSeriesId(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + pool(overrides?: CallOverrides): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + resetTokenJoin( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + rewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { accumulated: BigNumber; checkpoint: BigNumber } + >; + + rewardsPerToken( + overrides?: CallOverrides + ): Promise< + [BigNumber, number, BigNumber] & { + accumulated: BigNumber; + lastUpdated: number; + rate: BigNumber; + } + >; + + rewardsPeriod( + overrides?: CallOverrides + ): Promise<[number, number] & { start: number; end: number }>; + + rewardsToken(overrides?: CallOverrides): Promise; + + seriesId(overrides?: CallOverrides): Promise; + + setNextPool( + pool_: PromiseOrValue, + seriesId_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRewards( + start: PromiseOrValue, + end: PromiseOrValue, + rate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRewardsToken( + rewardsToken_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setTokenId( + baseId_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setYield( + ladle_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + startPool( + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + version(overrides?: CallOverrides): Promise; + + callStatic: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + base(overrides?: CallOverrides): Promise; + + baseId(overrides?: CallOverrides): Promise; + + baseJoin(overrides?: CallOverrides): Promise; + + burn( + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + burnForBase( + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + cached(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + claim( + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + endPool(overrides?: CallOverrides): Promise; + + fyToken(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ladle(overrides?: CallOverrides): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + mint( + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + nextPool(overrides?: CallOverrides): Promise; + + nextSeriesId(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pool(overrides?: CallOverrides): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + resetTokenJoin(overrides?: CallOverrides): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + rewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { accumulated: BigNumber; checkpoint: BigNumber } + >; + + rewardsPerToken( + overrides?: CallOverrides + ): Promise< + [BigNumber, number, BigNumber] & { + accumulated: BigNumber; + lastUpdated: number; + rate: BigNumber; + } + >; + + rewardsPeriod( + overrides?: CallOverrides + ): Promise<[number, number] & { start: number; end: number }>; + + rewardsToken(overrides?: CallOverrides): Promise; + + seriesId(overrides?: CallOverrides): Promise; + + setNextPool( + pool_: PromiseOrValue, + seriesId_: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRewards( + start: PromiseOrValue, + end: PromiseOrValue, + rate: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRewardsToken( + rewardsToken_: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setTokenId( + baseId_: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setYield( + ladle_: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + startPool( + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + }; + + filters: { + "Approval(address,address,uint256)"( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + value?: null + ): ApprovalEventFilter; + Approval( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + value?: null + ): ApprovalEventFilter; + + "Claimed(address,uint256)"( + receiver?: null, + claimed?: null + ): ClaimedEventFilter; + Claimed(receiver?: null, claimed?: null): ClaimedEventFilter; + + "NextPoolSet(address,bytes6)"( + pool?: PromiseOrValue | null, + seriesId?: PromiseOrValue | null + ): NextPoolSetEventFilter; + NextPoolSet( + pool?: PromiseOrValue | null, + seriesId?: PromiseOrValue | null + ): NextPoolSetEventFilter; + + "PoolEnded(address)"(pool?: null): PoolEndedEventFilter; + PoolEnded(pool?: null): PoolEndedEventFilter; + + "PoolStarted(address)"(pool?: null): PoolStartedEventFilter; + PoolStarted(pool?: null): PoolStartedEventFilter; + + "RewardsPerTokenUpdated(uint256)"( + accumulated?: null + ): RewardsPerTokenUpdatedEventFilter; + RewardsPerTokenUpdated( + accumulated?: null + ): RewardsPerTokenUpdatedEventFilter; + + "RewardsSet(uint32,uint32,uint256)"( + start?: null, + end?: null, + rate?: null + ): RewardsSetEventFilter; + RewardsSet(start?: null, end?: null, rate?: null): RewardsSetEventFilter; + + "RewardsTokenSet(address)"(token?: null): RewardsTokenSetEventFilter; + RewardsTokenSet(token?: null): RewardsTokenSetEventFilter; + + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + + "TokenIdSet(bytes6)"(id?: null): TokenIdSetEventFilter; + TokenIdSet(id?: null): TokenIdSetEventFilter; + + "TokenJoinReset(address)"(join?: null): TokenJoinResetEventFilter; + TokenJoinReset(join?: null): TokenJoinResetEventFilter; + + "Transfer(address,address,uint256)"( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null + ): TransferEventFilter; + Transfer( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null + ): TransferEventFilter; + + "UserRewardsUpdated(address,uint256,uint256)"( + user?: null, + userRewards?: null, + paidRewardPerToken?: null + ): UserRewardsUpdatedEventFilter; + UserRewardsUpdated( + user?: null, + userRewards?: null, + paidRewardPerToken?: null + ): UserRewardsUpdatedEventFilter; + + "YieldSet(address,address)"( + ladle?: null, + cauldron?: null + ): YieldSetEventFilter; + YieldSet(ladle?: null, cauldron?: null): YieldSetEventFilter; + }; + + estimateGas: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + base(overrides?: CallOverrides): Promise; + + baseId(overrides?: CallOverrides): Promise; + + baseJoin(overrides?: CallOverrides): Promise; + + burn( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + burnForBase( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + cached(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + claim( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + endPool( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + fyToken(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ladle(overrides?: CallOverrides): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mint( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + nextPool(overrides?: CallOverrides): Promise; + + nextSeriesId(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + pool(overrides?: CallOverrides): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + resetTokenJoin( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + rewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + rewardsPerToken(overrides?: CallOverrides): Promise; + + rewardsPeriod(overrides?: CallOverrides): Promise; + + rewardsToken(overrides?: CallOverrides): Promise; + + seriesId(overrides?: CallOverrides): Promise; + + setNextPool( + pool_: PromiseOrValue, + seriesId_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRewards( + start: PromiseOrValue, + end: PromiseOrValue, + rate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRewardsToken( + rewardsToken_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setTokenId( + baseId_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setYield( + ladle_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + startPool( + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + version(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + base(overrides?: CallOverrides): Promise; + + baseId(overrides?: CallOverrides): Promise; + + baseJoin(overrides?: CallOverrides): Promise; + + burn( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + burnForBase( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + cached(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + claim( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + endPool( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + fyToken(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ladle(overrides?: CallOverrides): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mint( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + nextPool(overrides?: CallOverrides): Promise; + + nextSeriesId(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + pool(overrides?: CallOverrides): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + resetTokenJoin( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + rewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + rewardsPerToken(overrides?: CallOverrides): Promise; + + rewardsPeriod(overrides?: CallOverrides): Promise; + + rewardsToken(overrides?: CallOverrides): Promise; + + seriesId(overrides?: CallOverrides): Promise; + + setNextPool( + pool_: PromiseOrValue, + seriesId_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRewards( + start: PromiseOrValue, + end: PromiseOrValue, + rate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRewardsToken( + rewardsToken_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setTokenId( + baseId_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setYield( + ladle_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + startPool( + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + version(overrides?: CallOverrides): Promise; + }; +} diff --git a/src/contracts/StrategyV2_1.ts b/src/contracts/StrategyV2_1.ts new file mode 100644 index 000000000..4d31078cf --- /dev/null +++ b/src/contracts/StrategyV2_1.ts @@ -0,0 +1,2019 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface StrategyV2_1Interface extends utils.Interface { + functions: { + "DOMAIN_SEPARATOR()": FunctionFragment; + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "PERMIT_TYPEHASH()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "base()": FunctionFragment; + "baseCached()": FunctionFragment; + "burn(address)": FunctionFragment; + "burnDivested(address)": FunctionFragment; + "burnPoolTokens(address,uint256)": FunctionFragment; + "buyFYToken(address,address)": FunctionFragment; + "claim(address)": FunctionFragment; + "decimals()": FunctionFragment; + "deploymentChainId()": FunctionFragment; + "divest()": FunctionFragment; + "eject()": FunctionFragment; + "fyToken()": FunctionFragment; + "fyTokenCached()": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "init(address)": FunctionFragment; + "invest(address)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "maturity()": FunctionFragment; + "mint(address)": FunctionFragment; + "mintDivested(address)": FunctionFragment; + "name()": FunctionFragment; + "nonces(address)": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "pool()": FunctionFragment; + "poolCached()": FunctionFragment; + "remit(address)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "restart()": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "rewards(address)": FunctionFragment; + "rewardsPerToken()": FunctionFragment; + "rewardsPeriod()": FunctionFragment; + "rewardsToken()": FunctionFragment; + "setRewards(uint32,uint32,uint96)": FunctionFragment; + "setRewardsToken(address)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "state()": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "version()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "DOMAIN_SEPARATOR" + | "LOCK" + | "LOCK8605463013" + | "PERMIT_TYPEHASH" + | "ROOT" + | "ROOT4146650865" + | "allowance" + | "approve" + | "balanceOf" + | "base" + | "baseCached" + | "burn" + | "burnDivested" + | "burnPoolTokens" + | "buyFYToken" + | "claim" + | "decimals" + | "deploymentChainId" + | "divest" + | "eject" + | "fyToken" + | "fyTokenCached" + | "getRoleAdmin" + | "grantRole" + | "grantRoles" + | "hasRole" + | "init" + | "invest" + | "lockRole" + | "maturity" + | "mint" + | "mintDivested" + | "name" + | "nonces" + | "permit" + | "pool" + | "poolCached" + | "remit" + | "renounceRole" + | "restart" + | "revokeRole" + | "revokeRoles" + | "rewards" + | "rewardsPerToken" + | "rewardsPeriod" + | "rewardsToken" + | "setRewards" + | "setRewardsToken" + | "setRoleAdmin" + | "state" + | "symbol" + | "totalSupply" + | "transfer" + | "transferFrom" + | "version" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "DOMAIN_SEPARATOR", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "PERMIT_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "allowance", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "balanceOf", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "base", values?: undefined): string; + encodeFunctionData( + functionFragment: "baseCached", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "burn", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "burnDivested", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "burnPoolTokens", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "buyFYToken", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "claim", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "deploymentChainId", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "divest", values?: undefined): string; + encodeFunctionData(functionFragment: "eject", values?: undefined): string; + encodeFunctionData(functionFragment: "fyToken", values?: undefined): string; + encodeFunctionData( + functionFragment: "fyTokenCached", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "init", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "invest", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "maturity", values?: undefined): string; + encodeFunctionData( + functionFragment: "mint", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "mintDivested", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "nonces", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "permit", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData(functionFragment: "pool", values?: undefined): string; + encodeFunctionData( + functionFragment: "poolCached", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "remit", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "restart", values?: undefined): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "rewards", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "rewardsPerToken", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "rewardsPeriod", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "rewardsToken", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "setRewards", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "setRewardsToken", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "state", values?: undefined): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + + decodeFunctionResult( + functionFragment: "DOMAIN_SEPARATOR", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "PERMIT_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "base", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "baseCached", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "burnDivested", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "burnPoolTokens", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "buyFYToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "deploymentChainId", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "divest", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "eject", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "fyToken", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "fyTokenCached", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "init", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "invest", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "maturity", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "mintDivested", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "poolCached", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "remit", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "restart", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "rewards", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "rewardsPerToken", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "rewardsPeriod", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "rewardsToken", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setRewards", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setRewardsToken", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "state", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "Claimed(address,address,uint256)": EventFragment; + "Divested(address,uint256,uint256)": EventFragment; + "Drained(address,uint256)": EventFragment; + "Ejected(address,uint256,uint256,uint256)": EventFragment; + "Invested(address,uint256,uint256)": EventFragment; + "RewardsPerTokenUpdated(uint256)": EventFragment; + "RewardsSet(uint32,uint32,uint256)": EventFragment; + "RewardsTokenSet(address)": EventFragment; + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + "SoldFYToken(uint256,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + "UserRewardsUpdated(address,uint256,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Claimed"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Divested"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Drained"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Ejected"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Invested"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RewardsPerTokenUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RewardsSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RewardsTokenSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SoldFYToken"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; + getEvent(nameOrSignatureOrTopic: "UserRewardsUpdated"): EventFragment; +} + +export interface ApprovalEventObject { + owner: string; + spender: string; + value: BigNumber; +} +export type ApprovalEvent = TypedEvent< + [string, string, BigNumber], + ApprovalEventObject +>; + +export type ApprovalEventFilter = TypedEventFilter; + +export interface ClaimedEventObject { + user: string; + receiver: string; + claimed: BigNumber; +} +export type ClaimedEvent = TypedEvent< + [string, string, BigNumber], + ClaimedEventObject +>; + +export type ClaimedEventFilter = TypedEventFilter; + +export interface DivestedEventObject { + pool: string; + lpTokenDivested: BigNumber; + baseObtained: BigNumber; +} +export type DivestedEvent = TypedEvent< + [string, BigNumber, BigNumber], + DivestedEventObject +>; + +export type DivestedEventFilter = TypedEventFilter; + +export interface DrainedEventObject { + pool: string; + lpTokenDivested: BigNumber; +} +export type DrainedEvent = TypedEvent<[string, BigNumber], DrainedEventObject>; + +export type DrainedEventFilter = TypedEventFilter; + +export interface EjectedEventObject { + pool: string; + lpTokenDivested: BigNumber; + baseObtained: BigNumber; + fyTokenObtained: BigNumber; +} +export type EjectedEvent = TypedEvent< + [string, BigNumber, BigNumber, BigNumber], + EjectedEventObject +>; + +export type EjectedEventFilter = TypedEventFilter; + +export interface InvestedEventObject { + pool: string; + baseInvested: BigNumber; + lpTokensObtained: BigNumber; +} +export type InvestedEvent = TypedEvent< + [string, BigNumber, BigNumber], + InvestedEventObject +>; + +export type InvestedEventFilter = TypedEventFilter; + +export interface RewardsPerTokenUpdatedEventObject { + accumulated: BigNumber; +} +export type RewardsPerTokenUpdatedEvent = TypedEvent< + [BigNumber], + RewardsPerTokenUpdatedEventObject +>; + +export type RewardsPerTokenUpdatedEventFilter = + TypedEventFilter; + +export interface RewardsSetEventObject { + start: number; + end: number; + rate: BigNumber; +} +export type RewardsSetEvent = TypedEvent< + [number, number, BigNumber], + RewardsSetEventObject +>; + +export type RewardsSetEventFilter = TypedEventFilter; + +export interface RewardsTokenSetEventObject { + token: string; +} +export type RewardsTokenSetEvent = TypedEvent< + [string], + RewardsTokenSetEventObject +>; + +export type RewardsTokenSetEventFilter = TypedEventFilter; + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface SoldFYTokenEventObject { + soldFYToken: BigNumber; + returnedBase: BigNumber; +} +export type SoldFYTokenEvent = TypedEvent< + [BigNumber, BigNumber], + SoldFYTokenEventObject +>; + +export type SoldFYTokenEventFilter = TypedEventFilter; + +export interface TransferEventObject { + from: string; + to: string; + value: BigNumber; +} +export type TransferEvent = TypedEvent< + [string, string, BigNumber], + TransferEventObject +>; + +export type TransferEventFilter = TypedEventFilter; + +export interface UserRewardsUpdatedEventObject { + user: string; + userRewards: BigNumber; + paidRewardPerToken: BigNumber; +} +export type UserRewardsUpdatedEvent = TypedEvent< + [string, BigNumber, BigNumber], + UserRewardsUpdatedEventObject +>; + +export type UserRewardsUpdatedEventFilter = + TypedEventFilter; + +export interface StrategyV2_1 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: StrategyV2_1Interface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + base(overrides?: CallOverrides): Promise<[string]>; + + baseCached(overrides?: CallOverrides): Promise<[BigNumber]>; + + burn( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + burnDivested( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + burnPoolTokens( + pool_: PromiseOrValue, + poolTokens: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + buyFYToken( + fyTokenTo: PromiseOrValue, + baseTo: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + claim( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + deploymentChainId(overrides?: CallOverrides): Promise<[BigNumber]>; + + divest( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + eject( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + fyToken(overrides?: CallOverrides): Promise<[string]>; + + fyTokenCached(overrides?: CallOverrides): Promise<[BigNumber]>; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + init( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + invest( + pool_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + maturity(overrides?: CallOverrides): Promise<[number]>; + + mint( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mintDivested( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise<[string]>; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + pool(overrides?: CallOverrides): Promise<[string]>; + + poolCached(overrides?: CallOverrides): Promise<[BigNumber]>; + + remit( + user: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + restart( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + rewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { accumulated: BigNumber; checkpoint: BigNumber } + >; + + rewardsPerToken( + overrides?: CallOverrides + ): Promise< + [BigNumber, number, BigNumber] & { + accumulated: BigNumber; + lastUpdated: number; + rate: BigNumber; + } + >; + + rewardsPeriod( + overrides?: CallOverrides + ): Promise<[number, number] & { start: number; end: number }>; + + rewardsToken(overrides?: CallOverrides): Promise<[string]>; + + setRewards( + start: PromiseOrValue, + end: PromiseOrValue, + rate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRewardsToken( + rewardsToken_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + state(overrides?: CallOverrides): Promise<[number]>; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + version(overrides?: CallOverrides): Promise<[string]>; + }; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + base(overrides?: CallOverrides): Promise; + + baseCached(overrides?: CallOverrides): Promise; + + burn( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + burnDivested( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + burnPoolTokens( + pool_: PromiseOrValue, + poolTokens: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + buyFYToken( + fyTokenTo: PromiseOrValue, + baseTo: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + claim( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + divest( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + eject( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + fyToken(overrides?: CallOverrides): Promise; + + fyTokenCached(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + init( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + invest( + pool_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + maturity(overrides?: CallOverrides): Promise; + + mint( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mintDivested( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + pool(overrides?: CallOverrides): Promise; + + poolCached(overrides?: CallOverrides): Promise; + + remit( + user: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + restart( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + rewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { accumulated: BigNumber; checkpoint: BigNumber } + >; + + rewardsPerToken( + overrides?: CallOverrides + ): Promise< + [BigNumber, number, BigNumber] & { + accumulated: BigNumber; + lastUpdated: number; + rate: BigNumber; + } + >; + + rewardsPeriod( + overrides?: CallOverrides + ): Promise<[number, number] & { start: number; end: number }>; + + rewardsToken(overrides?: CallOverrides): Promise; + + setRewards( + start: PromiseOrValue, + end: PromiseOrValue, + rate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRewardsToken( + rewardsToken_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + state(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + version(overrides?: CallOverrides): Promise; + + callStatic: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + base(overrides?: CallOverrides): Promise; + + baseCached(overrides?: CallOverrides): Promise; + + burn( + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + burnDivested( + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + burnPoolTokens( + pool_: PromiseOrValue, + poolTokens: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { + baseReceived: BigNumber; + fyTokenReceived: BigNumber; + } + >; + + buyFYToken( + fyTokenTo: PromiseOrValue, + baseTo: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { + soldFYToken: BigNumber; + returnedBase: BigNumber; + } + >; + + claim( + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + divest(overrides?: CallOverrides): Promise; + + eject( + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { + baseReceived: BigNumber; + fyTokenReceived: BigNumber; + } + >; + + fyToken(overrides?: CallOverrides): Promise; + + fyTokenCached(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + init( + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + baseIn: BigNumber; + fyTokenIn: BigNumber; + minted: BigNumber; + } + >; + + invest( + pool_: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + maturity(overrides?: CallOverrides): Promise; + + mint( + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + mintDivested( + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pool(overrides?: CallOverrides): Promise; + + poolCached(overrides?: CallOverrides): Promise; + + remit( + user: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + restart(overrides?: CallOverrides): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + rewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { accumulated: BigNumber; checkpoint: BigNumber } + >; + + rewardsPerToken( + overrides?: CallOverrides + ): Promise< + [BigNumber, number, BigNumber] & { + accumulated: BigNumber; + lastUpdated: number; + rate: BigNumber; + } + >; + + rewardsPeriod( + overrides?: CallOverrides + ): Promise<[number, number] & { start: number; end: number }>; + + rewardsToken(overrides?: CallOverrides): Promise; + + setRewards( + start: PromiseOrValue, + end: PromiseOrValue, + rate: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRewardsToken( + rewardsToken_: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + state(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + }; + + filters: { + "Approval(address,address,uint256)"( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + value?: null + ): ApprovalEventFilter; + Approval( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + value?: null + ): ApprovalEventFilter; + + "Claimed(address,address,uint256)"( + user?: null, + receiver?: null, + claimed?: null + ): ClaimedEventFilter; + Claimed(user?: null, receiver?: null, claimed?: null): ClaimedEventFilter; + + "Divested(address,uint256,uint256)"( + pool?: PromiseOrValue | null, + lpTokenDivested?: null, + baseObtained?: null + ): DivestedEventFilter; + Divested( + pool?: PromiseOrValue | null, + lpTokenDivested?: null, + baseObtained?: null + ): DivestedEventFilter; + + "Drained(address,uint256)"( + pool?: PromiseOrValue | null, + lpTokenDivested?: null + ): DrainedEventFilter; + Drained( + pool?: PromiseOrValue | null, + lpTokenDivested?: null + ): DrainedEventFilter; + + "Ejected(address,uint256,uint256,uint256)"( + pool?: PromiseOrValue | null, + lpTokenDivested?: null, + baseObtained?: null, + fyTokenObtained?: null + ): EjectedEventFilter; + Ejected( + pool?: PromiseOrValue | null, + lpTokenDivested?: null, + baseObtained?: null, + fyTokenObtained?: null + ): EjectedEventFilter; + + "Invested(address,uint256,uint256)"( + pool?: PromiseOrValue | null, + baseInvested?: null, + lpTokensObtained?: null + ): InvestedEventFilter; + Invested( + pool?: PromiseOrValue | null, + baseInvested?: null, + lpTokensObtained?: null + ): InvestedEventFilter; + + "RewardsPerTokenUpdated(uint256)"( + accumulated?: null + ): RewardsPerTokenUpdatedEventFilter; + RewardsPerTokenUpdated( + accumulated?: null + ): RewardsPerTokenUpdatedEventFilter; + + "RewardsSet(uint32,uint32,uint256)"( + start?: null, + end?: null, + rate?: null + ): RewardsSetEventFilter; + RewardsSet(start?: null, end?: null, rate?: null): RewardsSetEventFilter; + + "RewardsTokenSet(address)"(token?: null): RewardsTokenSetEventFilter; + RewardsTokenSet(token?: null): RewardsTokenSetEventFilter; + + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + + "SoldFYToken(uint256,uint256)"( + soldFYToken?: null, + returnedBase?: null + ): SoldFYTokenEventFilter; + SoldFYToken( + soldFYToken?: null, + returnedBase?: null + ): SoldFYTokenEventFilter; + + "Transfer(address,address,uint256)"( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null + ): TransferEventFilter; + Transfer( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null + ): TransferEventFilter; + + "UserRewardsUpdated(address,uint256,uint256)"( + user?: null, + userRewards?: null, + paidRewardPerToken?: null + ): UserRewardsUpdatedEventFilter; + UserRewardsUpdated( + user?: null, + userRewards?: null, + paidRewardPerToken?: null + ): UserRewardsUpdatedEventFilter; + }; + + estimateGas: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + base(overrides?: CallOverrides): Promise; + + baseCached(overrides?: CallOverrides): Promise; + + burn( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + burnDivested( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + burnPoolTokens( + pool_: PromiseOrValue, + poolTokens: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + buyFYToken( + fyTokenTo: PromiseOrValue, + baseTo: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + claim( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + divest( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + eject( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + fyToken(overrides?: CallOverrides): Promise; + + fyTokenCached(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + init( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + invest( + pool_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + maturity(overrides?: CallOverrides): Promise; + + mint( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mintDivested( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + pool(overrides?: CallOverrides): Promise; + + poolCached(overrides?: CallOverrides): Promise; + + remit( + user: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + restart( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + rewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + rewardsPerToken(overrides?: CallOverrides): Promise; + + rewardsPeriod(overrides?: CallOverrides): Promise; + + rewardsToken(overrides?: CallOverrides): Promise; + + setRewards( + start: PromiseOrValue, + end: PromiseOrValue, + rate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRewardsToken( + rewardsToken_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + state(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + version(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + base(overrides?: CallOverrides): Promise; + + baseCached(overrides?: CallOverrides): Promise; + + burn( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + burnDivested( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + burnPoolTokens( + pool_: PromiseOrValue, + poolTokens: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + buyFYToken( + fyTokenTo: PromiseOrValue, + baseTo: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + claim( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + divest( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + eject( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + fyToken(overrides?: CallOverrides): Promise; + + fyTokenCached(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + init( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + invest( + pool_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + maturity(overrides?: CallOverrides): Promise; + + mint( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mintDivested( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + pool(overrides?: CallOverrides): Promise; + + poolCached(overrides?: CallOverrides): Promise; + + remit( + user: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + restart( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + rewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + rewardsPerToken(overrides?: CallOverrides): Promise; + + rewardsPeriod(overrides?: CallOverrides): Promise; + + rewardsToken(overrides?: CallOverrides): Promise; + + setRewards( + start: PromiseOrValue, + end: PromiseOrValue, + rate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRewardsToken( + rewardsToken_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + state(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + version(overrides?: CallOverrides): Promise; + }; +} diff --git a/src/contracts/Transfer1155Module.ts b/src/contracts/Transfer1155Module.ts new file mode 100644 index 000000000..e5d658819 --- /dev/null +++ b/src/contracts/Transfer1155Module.ts @@ -0,0 +1,483 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface Transfer1155ModuleInterface extends utils.Interface { + functions: { + "borrowingFee()": FunctionFragment; + "cauldron()": FunctionFragment; + "integrations(address)": FunctionFragment; + "joins(bytes6)": FunctionFragment; + "modules(address)": FunctionFragment; + "pools(bytes6)": FunctionFragment; + "router()": FunctionFragment; + "tokens(address)": FunctionFragment; + "transfer1155(address,uint256,address,uint128,bytes)": FunctionFragment; + "weth()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "borrowingFee" + | "cauldron" + | "integrations" + | "joins" + | "modules" + | "pools" + | "router" + | "tokens" + | "transfer1155" + | "weth" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "borrowingFee", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "cauldron", values?: undefined): string; + encodeFunctionData( + functionFragment: "integrations", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "joins", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "modules", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "pools", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "router", values?: undefined): string; + encodeFunctionData( + functionFragment: "tokens", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "transfer1155", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData(functionFragment: "weth", values?: undefined): string; + + decodeFunctionResult( + functionFragment: "borrowingFee", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "cauldron", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "integrations", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "joins", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "modules", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pools", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "tokens", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transfer1155", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "weth", data: BytesLike): Result; + + events: { + "FeeSet(uint256)": EventFragment; + "IntegrationAdded(address,bool)": EventFragment; + "JoinAdded(bytes6,address)": EventFragment; + "ModuleAdded(address,bool)": EventFragment; + "PoolAdded(bytes6,address)": EventFragment; + "TokenAdded(address,bool)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "FeeSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "IntegrationAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "JoinAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ModuleAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PoolAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TokenAdded"): EventFragment; +} + +export interface FeeSetEventObject { + fee: BigNumber; +} +export type FeeSetEvent = TypedEvent<[BigNumber], FeeSetEventObject>; + +export type FeeSetEventFilter = TypedEventFilter; + +export interface IntegrationAddedEventObject { + integration: string; + set: boolean; +} +export type IntegrationAddedEvent = TypedEvent< + [string, boolean], + IntegrationAddedEventObject +>; + +export type IntegrationAddedEventFilter = + TypedEventFilter; + +export interface JoinAddedEventObject { + assetId: string; + join: string; +} +export type JoinAddedEvent = TypedEvent<[string, string], JoinAddedEventObject>; + +export type JoinAddedEventFilter = TypedEventFilter; + +export interface ModuleAddedEventObject { + module: string; + set: boolean; +} +export type ModuleAddedEvent = TypedEvent< + [string, boolean], + ModuleAddedEventObject +>; + +export type ModuleAddedEventFilter = TypedEventFilter; + +export interface PoolAddedEventObject { + seriesId: string; + pool: string; +} +export type PoolAddedEvent = TypedEvent<[string, string], PoolAddedEventObject>; + +export type PoolAddedEventFilter = TypedEventFilter; + +export interface TokenAddedEventObject { + token: string; + set: boolean; +} +export type TokenAddedEvent = TypedEvent< + [string, boolean], + TokenAddedEventObject +>; + +export type TokenAddedEventFilter = TypedEventFilter; + +export interface Transfer1155Module extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: Transfer1155ModuleInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + borrowingFee(overrides?: CallOverrides): Promise<[BigNumber]>; + + cauldron(overrides?: CallOverrides): Promise<[string]>; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + router(overrides?: CallOverrides): Promise<[string]>; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + transfer1155( + token: PromiseOrValue, + id: PromiseOrValue, + receiver: PromiseOrValue, + wad: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + weth(overrides?: CallOverrides): Promise<[string]>; + }; + + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transfer1155( + token: PromiseOrValue, + id: PromiseOrValue, + receiver: PromiseOrValue, + wad: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + weth(overrides?: CallOverrides): Promise; + + callStatic: { + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transfer1155( + token: PromiseOrValue, + id: PromiseOrValue, + receiver: PromiseOrValue, + wad: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + weth(overrides?: CallOverrides): Promise; + }; + + filters: { + "FeeSet(uint256)"(fee?: null): FeeSetEventFilter; + FeeSet(fee?: null): FeeSetEventFilter; + + "IntegrationAdded(address,bool)"( + integration?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): IntegrationAddedEventFilter; + IntegrationAdded( + integration?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): IntegrationAddedEventFilter; + + "JoinAdded(bytes6,address)"( + assetId?: PromiseOrValue | null, + join?: PromiseOrValue | null + ): JoinAddedEventFilter; + JoinAdded( + assetId?: PromiseOrValue | null, + join?: PromiseOrValue | null + ): JoinAddedEventFilter; + + "ModuleAdded(address,bool)"( + module?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): ModuleAddedEventFilter; + ModuleAdded( + module?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): ModuleAddedEventFilter; + + "PoolAdded(bytes6,address)"( + seriesId?: PromiseOrValue | null, + pool?: PromiseOrValue | null + ): PoolAddedEventFilter; + PoolAdded( + seriesId?: PromiseOrValue | null, + pool?: PromiseOrValue | null + ): PoolAddedEventFilter; + + "TokenAdded(address,bool)"( + token?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): TokenAddedEventFilter; + TokenAdded( + token?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): TokenAddedEventFilter; + }; + + estimateGas: { + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transfer1155( + token: PromiseOrValue, + id: PromiseOrValue, + receiver: PromiseOrValue, + wad: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + weth(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transfer1155( + token: PromiseOrValue, + id: PromiseOrValue, + receiver: PromiseOrValue, + wad: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + weth(overrides?: CallOverrides): Promise; + }; +} diff --git a/src/contracts/UniswapV3Oracle.ts b/src/contracts/UniswapV3Oracle.ts new file mode 100644 index 000000000..7a3cff99d --- /dev/null +++ b/src/contracts/UniswapV3Oracle.ts @@ -0,0 +1,888 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface UniswapV3OracleInterface extends utils.Interface { + functions: { + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "get(bytes32,bytes32,uint256)": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "peek(bytes32,bytes32,uint256)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "secondsAgo()": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "setSecondsAgo(uint32)": FunctionFragment; + "setSource(bytes6,bytes6,address)": FunctionFragment; + "sources(bytes6,bytes6)": FunctionFragment; + "sourcesData(address)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "LOCK" + | "LOCK8605463013" + | "ROOT" + | "ROOT4146650865" + | "get" + | "getRoleAdmin" + | "grantRole" + | "grantRoles" + | "hasRole" + | "lockRole" + | "peek" + | "renounceRole" + | "revokeRole" + | "revokeRoles" + | "secondsAgo" + | "setRoleAdmin" + | "setSecondsAgo" + | "setSource" + | "sources" + | "sourcesData" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "get", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "peek", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "secondsAgo", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setSecondsAgo", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setSource", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "sources", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "sourcesData", + values: [PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "get", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "peek", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "secondsAgo", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setSecondsAgo", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setSource", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "sources", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "sourcesData", + data: BytesLike + ): Result; + + events: { + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + "SecondsAgoSet(uint32)": EventFragment; + "SourceSet(bytes6,bytes6,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SecondsAgoSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SourceSet"): EventFragment; +} + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface SecondsAgoSetEventObject { + secondsAgo: number; +} +export type SecondsAgoSetEvent = TypedEvent<[number], SecondsAgoSetEventObject>; + +export type SecondsAgoSetEventFilter = TypedEventFilter; + +export interface SourceSetEventObject { + base: string; + quote: string; + source: string; +} +export type SourceSetEvent = TypedEvent< + [string, string, string], + SourceSetEventObject +>; + +export type SourceSetEventFilter = TypedEventFilter; + +export interface UniswapV3Oracle extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: UniswapV3OracleInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + get( + base: PromiseOrValue, + quote: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + base: PromiseOrValue, + quote: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { value: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + secondsAgo(overrides?: CallOverrides): Promise<[number]>; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSecondsAgo( + secondsAgo_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + base: PromiseOrValue, + quote: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string, boolean] & { source: string; inverse: boolean }>; + + sourcesData( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, string, string, number] & { + factory: string; + baseToken: string; + quoteToken: string; + fee: number; + } + >; + }; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + quote: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + base: PromiseOrValue, + quote: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { value: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + secondsAgo(overrides?: CallOverrides): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSecondsAgo( + secondsAgo_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + base: PromiseOrValue, + quote: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string, boolean] & { source: string; inverse: boolean }>; + + sourcesData( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, string, string, number] & { + factory: string; + baseToken: string; + quoteToken: string; + fee: number; + } + >; + + callStatic: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + quote: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { value: BigNumber; updateTime: BigNumber } + >; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + peek( + base: PromiseOrValue, + quote: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { value: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + secondsAgo(overrides?: CallOverrides): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setSecondsAgo( + secondsAgo_: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setSource( + base: PromiseOrValue, + quote: PromiseOrValue, + source: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string, boolean] & { source: string; inverse: boolean }>; + + sourcesData( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, string, string, number] & { + factory: string; + baseToken: string; + quoteToken: string; + fee: number; + } + >; + }; + + filters: { + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + + "SecondsAgoSet(uint32)"( + secondsAgo?: PromiseOrValue | null + ): SecondsAgoSetEventFilter; + SecondsAgoSet( + secondsAgo?: PromiseOrValue | null + ): SecondsAgoSetEventFilter; + + "SourceSet(bytes6,bytes6,address)"( + base?: PromiseOrValue | null, + quote?: PromiseOrValue | null, + source?: PromiseOrValue | null + ): SourceSetEventFilter; + SourceSet( + base?: PromiseOrValue | null, + quote?: PromiseOrValue | null, + source?: PromiseOrValue | null + ): SourceSetEventFilter; + }; + + estimateGas: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + quote: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + base: PromiseOrValue, + quote: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + secondsAgo(overrides?: CallOverrides): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSecondsAgo( + secondsAgo_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + base: PromiseOrValue, + quote: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sourcesData( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + quote: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + base: PromiseOrValue, + quote: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + secondsAgo(overrides?: CallOverrides): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSecondsAgo( + secondsAgo_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + base: PromiseOrValue, + quote: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sourcesData( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/src/contracts/Witch.ts b/src/contracts/Witch.ts new file mode 100644 index 000000000..3093c1afc --- /dev/null +++ b/src/contracts/Witch.ts @@ -0,0 +1,1026 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface WitchInterface extends utils.Interface { + functions: { + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "auction(bytes12)": FunctionFragment; + "auctions(bytes12)": FunctionFragment; + "buy(bytes12,uint128,uint128)": FunctionFragment; + "cauldron()": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "ilks(bytes6)": FunctionFragment; + "ladle()": FunctionFragment; + "limits(bytes6)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "payAll(bytes12,uint128)": FunctionFragment; + "point(bytes32,address)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "setIlk(bytes6,uint32,uint64,uint96,uint24,uint8)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "LOCK" + | "LOCK8605463013" + | "ROOT" + | "ROOT4146650865" + | "auction" + | "auctions" + | "buy" + | "cauldron" + | "getRoleAdmin" + | "grantRole" + | "grantRoles" + | "hasRole" + | "ilks" + | "ladle" + | "limits" + | "lockRole" + | "payAll" + | "point" + | "renounceRole" + | "revokeRole" + | "revokeRoles" + | "setIlk" + | "setRoleAdmin" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "auction", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "auctions", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "buy", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData(functionFragment: "cauldron", values?: undefined): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "ilks", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "ladle", values?: undefined): string; + encodeFunctionData( + functionFragment: "limits", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "payAll", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "point", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setIlk", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "auction", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "auctions", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "buy", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "cauldron", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "ilks", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "ladle", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "limits", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "payAll", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "point", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setIlk", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + + events: { + "Auctioned(bytes12,uint256)": EventFragment; + "Bought(bytes12,address,uint256,uint256)": EventFragment; + "IlkSet(bytes6,uint32,uint64,uint96,uint24,uint8)": EventFragment; + "Point(bytes32,address)": EventFragment; + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Auctioned"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Bought"): EventFragment; + getEvent(nameOrSignatureOrTopic: "IlkSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Point"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; +} + +export interface AuctionedEventObject { + vaultId: string; + start: BigNumber; +} +export type AuctionedEvent = TypedEvent< + [string, BigNumber], + AuctionedEventObject +>; + +export type AuctionedEventFilter = TypedEventFilter; + +export interface BoughtEventObject { + vaultId: string; + buyer: string; + ink: BigNumber; + art: BigNumber; +} +export type BoughtEvent = TypedEvent< + [string, string, BigNumber, BigNumber], + BoughtEventObject +>; + +export type BoughtEventFilter = TypedEventFilter; + +export interface IlkSetEventObject { + ilkId: string; + duration: number; + initialOffer: BigNumber; + line: BigNumber; + dust: number; + dec: number; +} +export type IlkSetEvent = TypedEvent< + [string, number, BigNumber, BigNumber, number, number], + IlkSetEventObject +>; + +export type IlkSetEventFilter = TypedEventFilter; + +export interface PointEventObject { + param: string; + value: string; +} +export type PointEvent = TypedEvent<[string, string], PointEventObject>; + +export type PointEventFilter = TypedEventFilter; + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface Witch extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: WitchInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + auction( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + auctions( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string, number] & { owner: string; start: number }>; + + buy( + vaultId: PromiseOrValue, + base: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + cauldron(overrides?: CallOverrides): Promise<[string]>; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + ilks( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [number, BigNumber] & { duration: number; initialOffer: BigNumber } + >; + + ladle(overrides?: CallOverrides): Promise<[string]>; + + limits( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, number, number, BigNumber] & { + line: BigNumber; + dust: number; + dec: number; + sum: BigNumber; + } + >; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + payAll( + vaultId: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + point( + param: PromiseOrValue, + value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setIlk( + ilkId: PromiseOrValue, + duration: PromiseOrValue, + initialOffer: PromiseOrValue, + line: PromiseOrValue, + dust: PromiseOrValue, + dec: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + auction( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + auctions( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string, number] & { owner: string; start: number }>; + + buy( + vaultId: PromiseOrValue, + base: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ilks( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [number, BigNumber] & { duration: number; initialOffer: BigNumber } + >; + + ladle(overrides?: CallOverrides): Promise; + + limits( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, number, number, BigNumber] & { + line: BigNumber; + dust: number; + dec: number; + sum: BigNumber; + } + >; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + payAll( + vaultId: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + point( + param: PromiseOrValue, + value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setIlk( + ilkId: PromiseOrValue, + duration: PromiseOrValue, + initialOffer: PromiseOrValue, + line: PromiseOrValue, + dust: PromiseOrValue, + dec: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + auction( + vaultId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + auctions( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string, number] & { owner: string; start: number }>; + + buy( + vaultId: PromiseOrValue, + base: PromiseOrValue, + min: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ilks( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [number, BigNumber] & { duration: number; initialOffer: BigNumber } + >; + + ladle(overrides?: CallOverrides): Promise; + + limits( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, number, number, BigNumber] & { + line: BigNumber; + dust: number; + dec: number; + sum: BigNumber; + } + >; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + payAll( + vaultId: PromiseOrValue, + min: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + point( + param: PromiseOrValue, + value: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setIlk( + ilkId: PromiseOrValue, + duration: PromiseOrValue, + initialOffer: PromiseOrValue, + line: PromiseOrValue, + dust: PromiseOrValue, + dec: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "Auctioned(bytes12,uint256)"( + vaultId?: PromiseOrValue | null, + start?: PromiseOrValue | null + ): AuctionedEventFilter; + Auctioned( + vaultId?: PromiseOrValue | null, + start?: PromiseOrValue | null + ): AuctionedEventFilter; + + "Bought(bytes12,address,uint256,uint256)"( + vaultId?: PromiseOrValue | null, + buyer?: PromiseOrValue | null, + ink?: null, + art?: null + ): BoughtEventFilter; + Bought( + vaultId?: PromiseOrValue | null, + buyer?: PromiseOrValue | null, + ink?: null, + art?: null + ): BoughtEventFilter; + + "IlkSet(bytes6,uint32,uint64,uint96,uint24,uint8)"( + ilkId?: PromiseOrValue | null, + duration?: null, + initialOffer?: null, + line?: null, + dust?: null, + dec?: null + ): IlkSetEventFilter; + IlkSet( + ilkId?: PromiseOrValue | null, + duration?: null, + initialOffer?: null, + line?: null, + dust?: null, + dec?: null + ): IlkSetEventFilter; + + "Point(bytes32,address)"( + param?: PromiseOrValue | null, + value?: null + ): PointEventFilter; + Point( + param?: PromiseOrValue | null, + value?: null + ): PointEventFilter; + + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + }; + + estimateGas: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + auction( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + auctions( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + buy( + vaultId: PromiseOrValue, + base: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ilks( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ladle(overrides?: CallOverrides): Promise; + + limits( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + payAll( + vaultId: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + point( + param: PromiseOrValue, + value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setIlk( + ilkId: PromiseOrValue, + duration: PromiseOrValue, + initialOffer: PromiseOrValue, + line: PromiseOrValue, + dust: PromiseOrValue, + dec: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + auction( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + auctions( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + buy( + vaultId: PromiseOrValue, + base: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ilks( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ladle(overrides?: CallOverrides): Promise; + + limits( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + payAll( + vaultId: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + point( + param: PromiseOrValue, + value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setIlk( + ilkId: PromiseOrValue, + duration: PromiseOrValue, + initialOffer: PromiseOrValue, + line: PromiseOrValue, + dust: PromiseOrValue, + dec: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/contracts/WitchV2.ts b/src/contracts/WitchV2.ts new file mode 100644 index 000000000..44bf9d35d --- /dev/null +++ b/src/contracts/WitchV2.ts @@ -0,0 +1,1580 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export declare namespace DataTypes { + export type AuctionStruct = { + owner: PromiseOrValue; + start: PromiseOrValue; + baseId: PromiseOrValue; + ink: PromiseOrValue; + art: PromiseOrValue; + auctioneer: PromiseOrValue; + ilkId: PromiseOrValue; + seriesId: PromiseOrValue; + }; + + export type AuctionStructOutput = [ + string, + number, + string, + BigNumber, + BigNumber, + string, + string, + string + ] & { + owner: string; + start: number; + baseId: string; + ink: BigNumber; + art: BigNumber; + auctioneer: string; + ilkId: string; + seriesId: string; + }; + + export type VaultStruct = { + owner: PromiseOrValue; + seriesId: PromiseOrValue; + ilkId: PromiseOrValue; + }; + + export type VaultStructOutput = [string, string, string] & { + owner: string; + seriesId: string; + ilkId: string; + }; + + export type SeriesStruct = { + fyToken: PromiseOrValue; + baseId: PromiseOrValue; + maturity: PromiseOrValue; + }; + + export type SeriesStructOutput = [string, string, number] & { + fyToken: string; + baseId: string; + maturity: number; + }; +} + +export interface WitchV2Interface extends utils.Interface { + functions: { + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "ONE_HUNDRED_PERCENT()": FunctionFragment; + "ONE_PERCENT()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "auction(bytes12,address)": FunctionFragment; + "auctioneerReward()": FunctionFragment; + "auctions(bytes12)": FunctionFragment; + "calcPayout(bytes12,address,uint256)": FunctionFragment; + "cancel(bytes12)": FunctionFragment; + "cauldron()": FunctionFragment; + "clear(bytes12)": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "ladle()": FunctionFragment; + "limits(bytes6,bytes6)": FunctionFragment; + "lines(bytes6,bytes6)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "payBase(bytes12,address,uint128,uint128)": FunctionFragment; + "payFYToken(bytes12,address,uint128,uint128)": FunctionFragment; + "point(bytes32,address)": FunctionFragment; + "protected(address)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "setAuctioneerReward(uint256)": FunctionFragment; + "setLineAndLimit(bytes6,bytes6,uint32,uint64,uint64,uint128)": FunctionFragment; + "setProtected(address,bool)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "LOCK" + | "LOCK8605463013" + | "ONE_HUNDRED_PERCENT" + | "ONE_PERCENT" + | "ROOT" + | "ROOT4146650865" + | "auction" + | "auctioneerReward" + | "auctions" + | "calcPayout" + | "cancel" + | "cauldron" + | "clear" + | "getRoleAdmin" + | "grantRole" + | "grantRoles" + | "hasRole" + | "ladle" + | "limits" + | "lines" + | "lockRole" + | "payBase" + | "payFYToken" + | "point" + | "protected" + | "renounceRole" + | "revokeRole" + | "revokeRoles" + | "setAuctioneerReward" + | "setLineAndLimit" + | "setProtected" + | "setRoleAdmin" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "ONE_HUNDRED_PERCENT", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "ONE_PERCENT", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "auction", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "auctioneerReward", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "auctions", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "calcPayout", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "cancel", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "cauldron", values?: undefined): string; + encodeFunctionData( + functionFragment: "clear", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "ladle", values?: undefined): string; + encodeFunctionData( + functionFragment: "limits", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lines", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "payBase", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "payFYToken", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "point", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "protected", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setAuctioneerReward", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setLineAndLimit", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "setProtected", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "ONE_HUNDRED_PERCENT", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "ONE_PERCENT", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "auction", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "auctioneerReward", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "auctions", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "calcPayout", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "cancel", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "cauldron", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "clear", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "ladle", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "limits", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lines", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "payBase", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "payFYToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "point", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "protected", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setAuctioneerReward", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setLineAndLimit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setProtected", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + + events: { + "Auctioned(bytes12,tuple,uint256,uint256)": EventFragment; + "AuctioneerRewardSet(uint256)": EventFragment; + "Bought(bytes12,address,uint256,uint256)": EventFragment; + "Cancelled(bytes12)": EventFragment; + "Cleared(bytes12)": EventFragment; + "Ended(bytes12)": EventFragment; + "LimitSet(bytes6,bytes6,uint128)": EventFragment; + "LineSet(bytes6,bytes6,uint32,uint64,uint64)": EventFragment; + "Point(bytes32,address,address)": EventFragment; + "ProtectedSet(address,bool)": EventFragment; + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Auctioned"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AuctioneerRewardSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Bought"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Cancelled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Cleared"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Ended"): EventFragment; + getEvent(nameOrSignatureOrTopic: "LimitSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "LineSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Point"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProtectedSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; +} + +export interface AuctionedEventObject { + vaultId: string; + auction: DataTypes.AuctionStructOutput; + duration: BigNumber; + initialCollateralProportion: BigNumber; +} +export type AuctionedEvent = TypedEvent< + [string, DataTypes.AuctionStructOutput, BigNumber, BigNumber], + AuctionedEventObject +>; + +export type AuctionedEventFilter = TypedEventFilter; + +export interface AuctioneerRewardSetEventObject { + auctioneerReward: BigNumber; +} +export type AuctioneerRewardSetEvent = TypedEvent< + [BigNumber], + AuctioneerRewardSetEventObject +>; + +export type AuctioneerRewardSetEventFilter = + TypedEventFilter; + +export interface BoughtEventObject { + vaultId: string; + buyer: string; + ink: BigNumber; + art: BigNumber; +} +export type BoughtEvent = TypedEvent< + [string, string, BigNumber, BigNumber], + BoughtEventObject +>; + +export type BoughtEventFilter = TypedEventFilter; + +export interface CancelledEventObject { + vaultId: string; +} +export type CancelledEvent = TypedEvent<[string], CancelledEventObject>; + +export type CancelledEventFilter = TypedEventFilter; + +export interface ClearedEventObject { + vaultId: string; +} +export type ClearedEvent = TypedEvent<[string], ClearedEventObject>; + +export type ClearedEventFilter = TypedEventFilter; + +export interface EndedEventObject { + vaultId: string; +} +export type EndedEvent = TypedEvent<[string], EndedEventObject>; + +export type EndedEventFilter = TypedEventFilter; + +export interface LimitSetEventObject { + ilkId: string; + baseId: string; + max: BigNumber; +} +export type LimitSetEvent = TypedEvent< + [string, string, BigNumber], + LimitSetEventObject +>; + +export type LimitSetEventFilter = TypedEventFilter; + +export interface LineSetEventObject { + ilkId: string; + baseId: string; + duration: number; + vaultProportion: BigNumber; + collateralProportion: BigNumber; +} +export type LineSetEvent = TypedEvent< + [string, string, number, BigNumber, BigNumber], + LineSetEventObject +>; + +export type LineSetEventFilter = TypedEventFilter; + +export interface PointEventObject { + param: string; + oldValue: string; + newValue: string; +} +export type PointEvent = TypedEvent<[string, string, string], PointEventObject>; + +export type PointEventFilter = TypedEventFilter; + +export interface ProtectedSetEventObject { + value: string; + protected: boolean; +} +export type ProtectedSetEvent = TypedEvent< + [string, boolean], + ProtectedSetEventObject +>; + +export type ProtectedSetEventFilter = TypedEventFilter; + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface WitchV2 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: WitchV2Interface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + ONE_HUNDRED_PERCENT(overrides?: CallOverrides): Promise<[BigNumber]>; + + ONE_PERCENT(overrides?: CallOverrides): Promise<[BigNumber]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + auction( + vaultId: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + auctioneerReward(overrides?: CallOverrides): Promise<[BigNumber]>; + + auctions( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, number, string, BigNumber, BigNumber, string, string, string] & { + owner: string; + start: number; + baseId: string; + ink: BigNumber; + art: BigNumber; + auctioneer: string; + ilkId: string; + seriesId: string; + } + >; + + calcPayout( + vaultId: PromiseOrValue, + to: PromiseOrValue, + maxArtIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + liquidatorCut: BigNumber; + auctioneerCut: BigNumber; + artIn: BigNumber; + } + >; + + cancel( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + cauldron(overrides?: CallOverrides): Promise<[string]>; + + clear( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + ladle(overrides?: CallOverrides): Promise<[string]>; + + limits( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber, BigNumber] & { max: BigNumber; sum: BigNumber }>; + + lines( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [number, BigNumber, BigNumber] & { + duration: number; + vaultProportion: BigNumber; + collateralProportion: BigNumber; + } + >; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + payBase( + vaultId: PromiseOrValue, + to: PromiseOrValue, + minInkOut: PromiseOrValue, + maxBaseIn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + payFYToken( + vaultId: PromiseOrValue, + to: PromiseOrValue, + minInkOut: PromiseOrValue, + maxArtIn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + point( + param: PromiseOrValue, + value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + protected( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setAuctioneerReward( + auctioneerReward_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setLineAndLimit( + ilkId: PromiseOrValue, + baseId: PromiseOrValue, + duration: PromiseOrValue, + vaultProportion: PromiseOrValue, + collateralProportion: PromiseOrValue, + max: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setProtected( + owner: PromiseOrValue, + _protected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ONE_HUNDRED_PERCENT(overrides?: CallOverrides): Promise; + + ONE_PERCENT(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + auction( + vaultId: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + auctioneerReward(overrides?: CallOverrides): Promise; + + auctions( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, number, string, BigNumber, BigNumber, string, string, string] & { + owner: string; + start: number; + baseId: string; + ink: BigNumber; + art: BigNumber; + auctioneer: string; + ilkId: string; + seriesId: string; + } + >; + + calcPayout( + vaultId: PromiseOrValue, + to: PromiseOrValue, + maxArtIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + liquidatorCut: BigNumber; + auctioneerCut: BigNumber; + artIn: BigNumber; + } + >; + + cancel( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + clear( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ladle(overrides?: CallOverrides): Promise; + + limits( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber, BigNumber] & { max: BigNumber; sum: BigNumber }>; + + lines( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [number, BigNumber, BigNumber] & { + duration: number; + vaultProportion: BigNumber; + collateralProportion: BigNumber; + } + >; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + payBase( + vaultId: PromiseOrValue, + to: PromiseOrValue, + minInkOut: PromiseOrValue, + maxBaseIn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + payFYToken( + vaultId: PromiseOrValue, + to: PromiseOrValue, + minInkOut: PromiseOrValue, + maxArtIn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + point( + param: PromiseOrValue, + value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + protected( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setAuctioneerReward( + auctioneerReward_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setLineAndLimit( + ilkId: PromiseOrValue, + baseId: PromiseOrValue, + duration: PromiseOrValue, + vaultProportion: PromiseOrValue, + collateralProportion: PromiseOrValue, + max: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setProtected( + owner: PromiseOrValue, + _protected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ONE_HUNDRED_PERCENT(overrides?: CallOverrides): Promise; + + ONE_PERCENT(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + auction( + vaultId: PromiseOrValue, + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [ + DataTypes.AuctionStructOutput, + DataTypes.VaultStructOutput, + DataTypes.SeriesStructOutput + ] & { + auction_: DataTypes.AuctionStructOutput; + vault: DataTypes.VaultStructOutput; + series: DataTypes.SeriesStructOutput; + } + >; + + auctioneerReward(overrides?: CallOverrides): Promise; + + auctions( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, number, string, BigNumber, BigNumber, string, string, string] & { + owner: string; + start: number; + baseId: string; + ink: BigNumber; + art: BigNumber; + auctioneer: string; + ilkId: string; + seriesId: string; + } + >; + + calcPayout( + vaultId: PromiseOrValue, + to: PromiseOrValue, + maxArtIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + liquidatorCut: BigNumber; + auctioneerCut: BigNumber; + artIn: BigNumber; + } + >; + + cancel( + vaultId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + clear( + vaultId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ladle(overrides?: CallOverrides): Promise; + + limits( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber, BigNumber] & { max: BigNumber; sum: BigNumber }>; + + lines( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [number, BigNumber, BigNumber] & { + duration: number; + vaultProportion: BigNumber; + collateralProportion: BigNumber; + } + >; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + payBase( + vaultId: PromiseOrValue, + to: PromiseOrValue, + minInkOut: PromiseOrValue, + maxBaseIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + liquidatorCut: BigNumber; + auctioneerCut: BigNumber; + baseIn: BigNumber; + } + >; + + payFYToken( + vaultId: PromiseOrValue, + to: PromiseOrValue, + minInkOut: PromiseOrValue, + maxArtIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + liquidatorCut: BigNumber; + auctioneerCut: BigNumber; + artIn: BigNumber; + } + >; + + point( + param: PromiseOrValue, + value: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + protected( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setAuctioneerReward( + auctioneerReward_: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setLineAndLimit( + ilkId: PromiseOrValue, + baseId: PromiseOrValue, + duration: PromiseOrValue, + vaultProportion: PromiseOrValue, + collateralProportion: PromiseOrValue, + max: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setProtected( + owner: PromiseOrValue, + _protected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "Auctioned(bytes12,tuple,uint256,uint256)"( + vaultId?: PromiseOrValue | null, + auction?: null, + duration?: null, + initialCollateralProportion?: null + ): AuctionedEventFilter; + Auctioned( + vaultId?: PromiseOrValue | null, + auction?: null, + duration?: null, + initialCollateralProportion?: null + ): AuctionedEventFilter; + + "AuctioneerRewardSet(uint256)"( + auctioneerReward?: null + ): AuctioneerRewardSetEventFilter; + AuctioneerRewardSet( + auctioneerReward?: null + ): AuctioneerRewardSetEventFilter; + + "Bought(bytes12,address,uint256,uint256)"( + vaultId?: PromiseOrValue | null, + buyer?: PromiseOrValue | null, + ink?: null, + art?: null + ): BoughtEventFilter; + Bought( + vaultId?: PromiseOrValue | null, + buyer?: PromiseOrValue | null, + ink?: null, + art?: null + ): BoughtEventFilter; + + "Cancelled(bytes12)"( + vaultId?: PromiseOrValue | null + ): CancelledEventFilter; + Cancelled(vaultId?: PromiseOrValue | null): CancelledEventFilter; + + "Cleared(bytes12)"( + vaultId?: PromiseOrValue | null + ): ClearedEventFilter; + Cleared(vaultId?: PromiseOrValue | null): ClearedEventFilter; + + "Ended(bytes12)"( + vaultId?: PromiseOrValue | null + ): EndedEventFilter; + Ended(vaultId?: PromiseOrValue | null): EndedEventFilter; + + "LimitSet(bytes6,bytes6,uint128)"( + ilkId?: PromiseOrValue | null, + baseId?: PromiseOrValue | null, + max?: null + ): LimitSetEventFilter; + LimitSet( + ilkId?: PromiseOrValue | null, + baseId?: PromiseOrValue | null, + max?: null + ): LimitSetEventFilter; + + "LineSet(bytes6,bytes6,uint32,uint64,uint64)"( + ilkId?: PromiseOrValue | null, + baseId?: PromiseOrValue | null, + duration?: null, + vaultProportion?: null, + collateralProportion?: null + ): LineSetEventFilter; + LineSet( + ilkId?: PromiseOrValue | null, + baseId?: PromiseOrValue | null, + duration?: null, + vaultProportion?: null, + collateralProportion?: null + ): LineSetEventFilter; + + "Point(bytes32,address,address)"( + param?: PromiseOrValue | null, + oldValue?: PromiseOrValue | null, + newValue?: PromiseOrValue | null + ): PointEventFilter; + Point( + param?: PromiseOrValue | null, + oldValue?: PromiseOrValue | null, + newValue?: PromiseOrValue | null + ): PointEventFilter; + + "ProtectedSet(address,bool)"( + value?: PromiseOrValue | null, + protected?: null + ): ProtectedSetEventFilter; + ProtectedSet( + value?: PromiseOrValue | null, + protected?: null + ): ProtectedSetEventFilter; + + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + }; + + estimateGas: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ONE_HUNDRED_PERCENT(overrides?: CallOverrides): Promise; + + ONE_PERCENT(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + auction( + vaultId: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + auctioneerReward(overrides?: CallOverrides): Promise; + + auctions( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + calcPayout( + vaultId: PromiseOrValue, + to: PromiseOrValue, + maxArtIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + cancel( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + clear( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ladle(overrides?: CallOverrides): Promise; + + limits( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lines( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + payBase( + vaultId: PromiseOrValue, + to: PromiseOrValue, + minInkOut: PromiseOrValue, + maxBaseIn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + payFYToken( + vaultId: PromiseOrValue, + to: PromiseOrValue, + minInkOut: PromiseOrValue, + maxArtIn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + point( + param: PromiseOrValue, + value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + protected( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setAuctioneerReward( + auctioneerReward_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setLineAndLimit( + ilkId: PromiseOrValue, + baseId: PromiseOrValue, + duration: PromiseOrValue, + vaultProportion: PromiseOrValue, + collateralProportion: PromiseOrValue, + max: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setProtected( + owner: PromiseOrValue, + _protected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ONE_HUNDRED_PERCENT( + overrides?: CallOverrides + ): Promise; + + ONE_PERCENT(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + auction( + vaultId: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + auctioneerReward(overrides?: CallOverrides): Promise; + + auctions( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + calcPayout( + vaultId: PromiseOrValue, + to: PromiseOrValue, + maxArtIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + cancel( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + clear( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ladle(overrides?: CallOverrides): Promise; + + limits( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lines( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + payBase( + vaultId: PromiseOrValue, + to: PromiseOrValue, + minInkOut: PromiseOrValue, + maxBaseIn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + payFYToken( + vaultId: PromiseOrValue, + to: PromiseOrValue, + minInkOut: PromiseOrValue, + maxArtIn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + point( + param: PromiseOrValue, + value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + protected( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setAuctioneerReward( + auctioneerReward_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setLineAndLimit( + ilkId: PromiseOrValue, + baseId: PromiseOrValue, + duration: PromiseOrValue, + vaultProportion: PromiseOrValue, + collateralProportion: PromiseOrValue, + max: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setProtected( + owner: PromiseOrValue, + _protected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/contracts/WrapEtherModule.ts b/src/contracts/WrapEtherModule.ts new file mode 100644 index 000000000..69d5e2d74 --- /dev/null +++ b/src/contracts/WrapEtherModule.ts @@ -0,0 +1,459 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface WrapEtherModuleInterface extends utils.Interface { + functions: { + "borrowingFee()": FunctionFragment; + "cauldron()": FunctionFragment; + "integrations(address)": FunctionFragment; + "joins(bytes6)": FunctionFragment; + "modules(address)": FunctionFragment; + "pools(bytes6)": FunctionFragment; + "router()": FunctionFragment; + "tokens(address)": FunctionFragment; + "weth()": FunctionFragment; + "wrap(address,uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "borrowingFee" + | "cauldron" + | "integrations" + | "joins" + | "modules" + | "pools" + | "router" + | "tokens" + | "weth" + | "wrap" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "borrowingFee", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "cauldron", values?: undefined): string; + encodeFunctionData( + functionFragment: "integrations", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "joins", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "modules", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "pools", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "router", values?: undefined): string; + encodeFunctionData( + functionFragment: "tokens", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "weth", values?: undefined): string; + encodeFunctionData( + functionFragment: "wrap", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult( + functionFragment: "borrowingFee", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "cauldron", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "integrations", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "joins", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "modules", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pools", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "tokens", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "weth", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "wrap", data: BytesLike): Result; + + events: { + "FeeSet(uint256)": EventFragment; + "IntegrationAdded(address,bool)": EventFragment; + "JoinAdded(bytes6,address)": EventFragment; + "ModuleAdded(address,bool)": EventFragment; + "PoolAdded(bytes6,address)": EventFragment; + "TokenAdded(address,bool)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "FeeSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "IntegrationAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "JoinAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ModuleAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PoolAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TokenAdded"): EventFragment; +} + +export interface FeeSetEventObject { + fee: BigNumber; +} +export type FeeSetEvent = TypedEvent<[BigNumber], FeeSetEventObject>; + +export type FeeSetEventFilter = TypedEventFilter; + +export interface IntegrationAddedEventObject { + integration: string; + set: boolean; +} +export type IntegrationAddedEvent = TypedEvent< + [string, boolean], + IntegrationAddedEventObject +>; + +export type IntegrationAddedEventFilter = + TypedEventFilter; + +export interface JoinAddedEventObject { + assetId: string; + join: string; +} +export type JoinAddedEvent = TypedEvent<[string, string], JoinAddedEventObject>; + +export type JoinAddedEventFilter = TypedEventFilter; + +export interface ModuleAddedEventObject { + module: string; + set: boolean; +} +export type ModuleAddedEvent = TypedEvent< + [string, boolean], + ModuleAddedEventObject +>; + +export type ModuleAddedEventFilter = TypedEventFilter; + +export interface PoolAddedEventObject { + seriesId: string; + pool: string; +} +export type PoolAddedEvent = TypedEvent<[string, string], PoolAddedEventObject>; + +export type PoolAddedEventFilter = TypedEventFilter; + +export interface TokenAddedEventObject { + token: string; + set: boolean; +} +export type TokenAddedEvent = TypedEvent< + [string, boolean], + TokenAddedEventObject +>; + +export type TokenAddedEventFilter = TypedEventFilter; + +export interface WrapEtherModule extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: WrapEtherModuleInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + borrowingFee(overrides?: CallOverrides): Promise<[BigNumber]>; + + cauldron(overrides?: CallOverrides): Promise<[string]>; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + router(overrides?: CallOverrides): Promise<[string]>; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + weth(overrides?: CallOverrides): Promise<[string]>; + + wrap( + receiver: PromiseOrValue, + wad: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + weth(overrides?: CallOverrides): Promise; + + wrap( + receiver: PromiseOrValue, + wad: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + weth(overrides?: CallOverrides): Promise; + + wrap( + receiver: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "FeeSet(uint256)"(fee?: null): FeeSetEventFilter; + FeeSet(fee?: null): FeeSetEventFilter; + + "IntegrationAdded(address,bool)"( + integration?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): IntegrationAddedEventFilter; + IntegrationAdded( + integration?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): IntegrationAddedEventFilter; + + "JoinAdded(bytes6,address)"( + assetId?: PromiseOrValue | null, + join?: PromiseOrValue | null + ): JoinAddedEventFilter; + JoinAdded( + assetId?: PromiseOrValue | null, + join?: PromiseOrValue | null + ): JoinAddedEventFilter; + + "ModuleAdded(address,bool)"( + module?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): ModuleAddedEventFilter; + ModuleAdded( + module?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): ModuleAddedEventFilter; + + "PoolAdded(bytes6,address)"( + seriesId?: PromiseOrValue | null, + pool?: PromiseOrValue | null + ): PoolAddedEventFilter; + PoolAdded( + seriesId?: PromiseOrValue | null, + pool?: PromiseOrValue | null + ): PoolAddedEventFilter; + + "TokenAdded(address,bool)"( + token?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): TokenAddedEventFilter; + TokenAdded( + token?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): TokenAddedEventFilter; + }; + + estimateGas: { + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + weth(overrides?: CallOverrides): Promise; + + wrap( + receiver: PromiseOrValue, + wad: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + weth(overrides?: CallOverrides): Promise; + + wrap( + receiver: PromiseOrValue, + wad: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/contracts/YearnVaultMultiOracle.ts b/src/contracts/YearnVaultMultiOracle.ts new file mode 100644 index 000000000..daf6515c9 --- /dev/null +++ b/src/contracts/YearnVaultMultiOracle.ts @@ -0,0 +1,785 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface YearnVaultMultiOracleInterface extends utils.Interface { + functions: { + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "get(bytes32,bytes32,uint256)": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "peek(bytes32,bytes32,uint256)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "setSource(bytes6,bytes6,address)": FunctionFragment; + "sources(bytes6,bytes6)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "LOCK" + | "LOCK8605463013" + | "ROOT" + | "ROOT4146650865" + | "get" + | "getRoleAdmin" + | "grantRole" + | "grantRoles" + | "hasRole" + | "lockRole" + | "peek" + | "renounceRole" + | "revokeRole" + | "revokeRoles" + | "setRoleAdmin" + | "setSource" + | "sources" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "get", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "peek", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setSource", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "sources", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "get", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "peek", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setSource", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "sources", data: BytesLike): Result; + + events: { + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + "SourceSet(bytes6,bytes6,address,uint8)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SourceSet"): EventFragment; +} + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface SourceSetEventObject { + baseId: string; + quoteId: string; + source: string; + decimals: number; +} +export type SourceSetEvent = TypedEvent< + [string, string, string, number], + SourceSetEventObject +>; + +export type SourceSetEventFilter = TypedEventFilter; + +export interface YearnVaultMultiOracle extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: YearnVaultMultiOracleInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + vaultTokenId: PromiseOrValue, + underlyingId: PromiseOrValue, + vaultToken: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, number, boolean] & { + source: string; + decimals: number; + inverse: boolean; + } + >; + }; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + vaultTokenId: PromiseOrValue, + underlyingId: PromiseOrValue, + vaultToken: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, number, boolean] & { + source: string; + decimals: number; + inverse: boolean; + } + >; + + callStatic: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setSource( + vaultTokenId: PromiseOrValue, + underlyingId: PromiseOrValue, + vaultToken: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, number, boolean] & { + source: string; + decimals: number; + inverse: boolean; + } + >; + }; + + filters: { + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + + "SourceSet(bytes6,bytes6,address,uint8)"( + baseId?: PromiseOrValue | null, + quoteId?: PromiseOrValue | null, + source?: PromiseOrValue | null, + decimals?: null + ): SourceSetEventFilter; + SourceSet( + baseId?: PromiseOrValue | null, + quoteId?: PromiseOrValue | null, + source?: PromiseOrValue | null, + decimals?: null + ): SourceSetEventFilter; + }; + + estimateGas: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + vaultTokenId: PromiseOrValue, + underlyingId: PromiseOrValue, + vaultToken: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + vaultTokenId: PromiseOrValue, + underlyingId: PromiseOrValue, + vaultToken: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/src/contracts/abis/Assert.sol b/src/contracts/abis/Assert.sol new file mode 100644 index 000000000..7133b1fe1 --- /dev/null +++ b/src/contracts/abis/Assert.sol @@ -0,0 +1 @@ +[{"inputs":[{"internalType":"address","name":"actualTarget","type":"address"},{"internalType":"bytes","name":"actualCalldata","type":"bytes"},{"internalType":"address","name":"expectedTarget","type":"address"},{"internalType":"bytes","name":"expectedCalldata","type":"bytes"}],"name":"assertEq","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"actual","type":"bytes"},{"internalType":"bytes","name":"expected","type":"bytes"}],"name":"assertEq","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"actual","type":"uint256"},{"internalType":"uint256","name":"expected","type":"uint256"}],"name":"assertEq","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"actualTarget","type":"address"},{"internalType":"bytes","name":"actualCalldata","type":"bytes"},{"internalType":"uint256","name":"expected","type":"uint256"}],"name":"assertEq","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"actual","type":"bool"},{"internalType":"bool","name":"expected","type":"bool"}],"name":"assertEq","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"actualTarget","type":"address"},{"internalType":"bytes","name":"actualCalldata","type":"bytes"},{"internalType":"address","name":"expectedTarget","type":"address"},{"internalType":"bytes","name":"expectedCalldata","type":"bytes"},{"internalType":"uint256","name":"abs","type":"uint256"}],"name":"assertEqAbs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"actualTarget","type":"address"},{"internalType":"bytes","name":"actualCalldata","type":"bytes"},{"internalType":"uint256","name":"expected","type":"uint256"},{"internalType":"uint256","name":"abs","type":"uint256"}],"name":"assertEqAbs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"actual","type":"uint256"},{"internalType":"uint256","name":"expected","type":"uint256"},{"internalType":"uint256","name":"abs","type":"uint256"}],"name":"assertEqAbs","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"actualTarget","type":"address"},{"internalType":"bytes","name":"actualCalldata","type":"bytes"},{"internalType":"uint256","name":"expected","type":"uint256"},{"internalType":"uint256","name":"rel","type":"uint256"}],"name":"assertEqRel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"actual","type":"uint256"},{"internalType":"uint256","name":"expected","type":"uint256"},{"internalType":"uint256","name":"rel","type":"uint256"}],"name":"assertEqRel","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"actualTarget","type":"address"},{"internalType":"bytes","name":"actualCalldata","type":"bytes"},{"internalType":"address","name":"expectedTarget","type":"address"},{"internalType":"bytes","name":"expectedCalldata","type":"bytes"},{"internalType":"uint256","name":"rel","type":"uint256"}],"name":"assertEqRel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"actualTarget","type":"address"},{"internalType":"bytes","name":"actualCalldata","type":"bytes"},{"internalType":"address","name":"expectedTarget","type":"address"},{"internalType":"bytes","name":"expectedCalldata","type":"bytes"}],"name":"assertGe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"actual","type":"uint256"},{"internalType":"uint256","name":"expected","type":"uint256"}],"name":"assertGe","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"actualTarget","type":"address"},{"internalType":"bytes","name":"actualCalldata","type":"bytes"},{"internalType":"uint256","name":"expected","type":"uint256"}],"name":"assertGe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"actualTarget","type":"address"},{"internalType":"bytes","name":"actualCalldata","type":"bytes"},{"internalType":"address","name":"expectedTarget","type":"address"},{"internalType":"bytes","name":"expectedCalldata","type":"bytes"}],"name":"assertGt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"actualTarget","type":"address"},{"internalType":"bytes","name":"actualCalldata","type":"bytes"},{"internalType":"uint256","name":"expected","type":"uint256"}],"name":"assertGt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"actual","type":"uint256"},{"internalType":"uint256","name":"expected","type":"uint256"}],"name":"assertGt","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"actualTarget","type":"address"},{"internalType":"bytes","name":"actualCalldata","type":"bytes"},{"internalType":"uint256","name":"expected","type":"uint256"}],"name":"assertLe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"actual","type":"uint256"},{"internalType":"uint256","name":"expected","type":"uint256"}],"name":"assertLe","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"actualTarget","type":"address"},{"internalType":"bytes","name":"actualCalldata","type":"bytes"},{"internalType":"address","name":"expectedTarget","type":"address"},{"internalType":"bytes","name":"expectedCalldata","type":"bytes"}],"name":"assertLe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"actualTarget","type":"address"},{"internalType":"bytes","name":"actualCalldata","type":"bytes"},{"internalType":"uint256","name":"expected","type":"uint256"}],"name":"assertLt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"actual","type":"uint256"},{"internalType":"uint256","name":"expected","type":"uint256"}],"name":"assertLt","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"actualTarget","type":"address"},{"internalType":"bytes","name":"actualCalldata","type":"bytes"},{"internalType":"address","name":"expectedTarget","type":"address"},{"internalType":"bytes","name":"expectedCalldata","type":"bytes"}],"name":"assertLt","outputs":[],"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file diff --git a/src/contracts/common.ts b/src/contracts/common.ts new file mode 100644 index 000000000..4c90b08bb --- /dev/null +++ b/src/contracts/common.ts @@ -0,0 +1,46 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { Listener } from "@ethersproject/providers"; +import type { Event, EventFilter } from "ethers"; + +export interface TypedEvent< + TArgsArray extends Array = any, + TArgsObject = any +> extends Event { + args: TArgsArray & TArgsObject; +} + +export interface TypedEventFilter<_TEvent extends TypedEvent> + extends EventFilter {} + +export interface TypedListener { + (...listenerArg: [...__TypechainArgsArray, TEvent]): void; +} + +type __TypechainArgsArray = T extends TypedEvent ? U : never; + +export interface OnEvent { + ( + eventFilter: TypedEventFilter, + listener: TypedListener + ): TRes; + (eventName: string, listener: Listener): TRes; +} + +export type MinEthersFactory = { + deploy(...a: ARGS[]): Promise; +}; + +export type GetContractTypeFromFactory = F extends MinEthersFactory< + infer C, + any +> + ? C + : never; + +export type GetARGsTypeFromFactory = F extends MinEthersFactory + ? Parameters + : never; + +export type PromiseOrValue = T | Promise; diff --git a/src/contracts/factories/AccumulatorOracle__factory.ts b/src/contracts/factories/AccumulatorOracle__factory.ts index d982d1355..121d448c6 100644 --- a/src/contracts/factories/AccumulatorOracle__factory.ts +++ b/src/contracts/factories/AccumulatorOracle__factory.ts @@ -3,7 +3,7 @@ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; +import type { Provider } from "@ethersproject/providers"; import type { AccumulatorOracle, AccumulatorOracleInterface, @@ -504,7 +504,7 @@ const _abi = [ stateMutability: "nonpayable", type: "function", }, -]; +] as const; export class AccumulatorOracle__factory { static readonly abi = _abi; diff --git a/src/contracts/factories/Cauldron__factory.ts b/src/contracts/factories/Cauldron__factory.ts index fbca298fd..d8d3a625b 100644 --- a/src/contracts/factories/Cauldron__factory.ts +++ b/src/contracts/factories/Cauldron__factory.ts @@ -3,7 +3,7 @@ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; +import type { Provider } from "@ethersproject/providers"; import type { Cauldron, CauldronInterface } from "../Cauldron"; const _abi = [ @@ -1469,7 +1469,7 @@ const _abi = [ stateMutability: "view", type: "function", }, -]; +] as const; export class Cauldron__factory { static readonly abi = _abi; diff --git a/src/contracts/factories/ChainlinkMultiOracle__factory.ts b/src/contracts/factories/ChainlinkMultiOracle__factory.ts index 20e24f7c8..1aede8125 100644 --- a/src/contracts/factories/ChainlinkMultiOracle__factory.ts +++ b/src/contracts/factories/ChainlinkMultiOracle__factory.ts @@ -3,7 +3,7 @@ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; +import type { Provider } from "@ethersproject/providers"; import type { ChainlinkMultiOracle, ChainlinkMultiOracleInterface, @@ -472,7 +472,7 @@ const _abi = [ stateMutability: "view", type: "function", }, -]; +] as const; export class ChainlinkMultiOracle__factory { static readonly abi = _abi; diff --git a/src/contracts/factories/ChainlinkUSDOracle__factory.ts b/src/contracts/factories/ChainlinkUSDOracle__factory.ts index 81233963f..e6f47cf13 100644 --- a/src/contracts/factories/ChainlinkUSDOracle__factory.ts +++ b/src/contracts/factories/ChainlinkUSDOracle__factory.ts @@ -3,7 +3,7 @@ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; +import type { Provider } from "@ethersproject/providers"; import type { ChainlinkUSDOracle, ChainlinkUSDOracleInterface, @@ -435,7 +435,7 @@ const _abi = [ stateMutability: "view", type: "function", }, -]; +] as const; export class ChainlinkUSDOracle__factory { static readonly abi = _abi; diff --git a/src/contracts/factories/CompositeMultiOracle__factory.ts b/src/contracts/factories/CompositeMultiOracle__factory.ts index cdd49754b..87943dc12 100644 --- a/src/contracts/factories/CompositeMultiOracle__factory.ts +++ b/src/contracts/factories/CompositeMultiOracle__factory.ts @@ -3,7 +3,7 @@ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; +import type { Provider } from "@ethersproject/providers"; import type { CompositeMultiOracle, CompositeMultiOracleInterface, @@ -512,7 +512,7 @@ const _abi = [ stateMutability: "view", type: "function", }, -]; +] as const; export class CompositeMultiOracle__factory { static readonly abi = _abi; diff --git a/src/contracts/factories/CompoundMultiOracle__factory.ts b/src/contracts/factories/CompoundMultiOracle__factory.ts index 58a99d2e4..dd3374ca3 100644 --- a/src/contracts/factories/CompoundMultiOracle__factory.ts +++ b/src/contracts/factories/CompoundMultiOracle__factory.ts @@ -3,7 +3,7 @@ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; +import type { Provider } from "@ethersproject/providers"; import type { CompoundMultiOracle, CompoundMultiOracleInterface, @@ -435,7 +435,7 @@ const _abi = [ stateMutability: "view", type: "function", }, -]; +] as const; export class CompoundMultiOracle__factory { static readonly abi = _abi; diff --git a/src/contracts/factories/ConvexJoin__factory.ts b/src/contracts/factories/ConvexJoin__factory.ts index c058ab0d3..97a9a5e36 100644 --- a/src/contracts/factories/ConvexJoin__factory.ts +++ b/src/contracts/factories/ConvexJoin__factory.ts @@ -3,7 +3,7 @@ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; +import type { Provider } from "@ethersproject/providers"; import type { ConvexJoin, ConvexJoinInterface } from "../ConvexJoin"; const _abi = [ @@ -790,7 +790,7 @@ const _abi = [ stateMutability: "view", type: "function", }, -]; +] as const; export class ConvexJoin__factory { static readonly abi = _abi; diff --git a/src/contracts/factories/ConvexLadleModule__factory.ts b/src/contracts/factories/ConvexLadleModule__factory.ts index 376ec0ea7..25ad8ce60 100644 --- a/src/contracts/factories/ConvexLadleModule__factory.ts +++ b/src/contracts/factories/ConvexLadleModule__factory.ts @@ -3,7 +3,7 @@ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; +import type { Provider } from "@ethersproject/providers"; import type { ConvexLadleModule, ConvexLadleModuleInterface, @@ -322,7 +322,7 @@ const _abi = [ stateMutability: "view", type: "function", }, -]; +] as const; export class ConvexLadleModule__factory { static readonly abi = _abi; diff --git a/src/contracts/factories/ERC1155__factory.ts b/src/contracts/factories/ERC1155__factory.ts index 4a9706e2b..3ce0996aa 100644 --- a/src/contracts/factories/ERC1155__factory.ts +++ b/src/contracts/factories/ERC1155__factory.ts @@ -3,7 +3,7 @@ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; +import type { Provider } from "@ethersproject/providers"; import type { ERC1155, ERC1155Interface } from "../ERC1155"; const _abi = [ @@ -319,7 +319,7 @@ const _abi = [ stateMutability: "view", type: "function", }, -]; +] as const; export class ERC1155__factory { static readonly abi = _abi; diff --git a/src/contracts/factories/ERC20Permit__factory.ts b/src/contracts/factories/ERC20Permit__factory.ts index 8d2846c96..e14ec0195 100644 --- a/src/contracts/factories/ERC20Permit__factory.ts +++ b/src/contracts/factories/ERC20Permit__factory.ts @@ -3,7 +3,7 @@ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; +import type { Provider } from "@ethersproject/providers"; import type { ERC20Permit, ERC20PermitInterface } from "../ERC20Permit"; const _abi = [ @@ -343,7 +343,7 @@ const _abi = [ stateMutability: "pure", type: "function", }, -]; +] as const; export class ERC20Permit__factory { static readonly abi = _abi; diff --git a/src/contracts/factories/ERC20__factory.ts b/src/contracts/factories/ERC20__factory.ts index 86e22becb..399403320 100644 --- a/src/contracts/factories/ERC20__factory.ts +++ b/src/contracts/factories/ERC20__factory.ts @@ -3,7 +3,7 @@ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; +import type { Provider } from "@ethersproject/providers"; import type { ERC20, ERC20Interface } from "../ERC20"; const _abi = [ @@ -250,7 +250,7 @@ const _abi = [ stateMutability: "nonpayable", type: "function", }, -]; +] as const; export class ERC20__factory { static readonly abi = _abi; diff --git a/src/contracts/factories/FYToken__factory.ts b/src/contracts/factories/FYToken__factory.ts index a9eefc8c3..01c7cbaf6 100644 --- a/src/contracts/factories/FYToken__factory.ts +++ b/src/contracts/factories/FYToken__factory.ts @@ -3,7 +3,7 @@ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; +import type { Provider } from "@ethersproject/providers"; import type { FYToken, FYTokenInterface } from "../FYToken"; const _abi = [ @@ -998,7 +998,7 @@ const _abi = [ stateMutability: "pure", type: "function", }, -]; +] as const; export class FYToken__factory { static readonly abi = _abi; diff --git a/src/contracts/factories/Join1155__factory.ts b/src/contracts/factories/Join1155__factory.ts index 59675ac43..bc0bdfd5e 100644 --- a/src/contracts/factories/Join1155__factory.ts +++ b/src/contracts/factories/Join1155__factory.ts @@ -3,7 +3,7 @@ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; +import type { Provider } from "@ethersproject/providers"; import type { Join1155, Join1155Interface } from "../Join1155"; const _abi = [ @@ -572,7 +572,7 @@ const _abi = [ stateMutability: "view", type: "function", }, -]; +] as const; export class Join1155__factory { static readonly abi = _abi; diff --git a/src/contracts/factories/Join__factory.ts b/src/contracts/factories/Join__factory.ts index e8ec051d1..e025491ad 100644 --- a/src/contracts/factories/Join__factory.ts +++ b/src/contracts/factories/Join__factory.ts @@ -3,7 +3,7 @@ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; +import type { Provider } from "@ethersproject/providers"; import type { Join, JoinInterface } from "../Join"; const _abi = [ @@ -511,7 +511,7 @@ const _abi = [ stateMutability: "view", type: "function", }, -]; +] as const; export class Join__factory { static readonly abi = _abi; diff --git a/src/contracts/factories/LadleStorage__factory.ts b/src/contracts/factories/LadleStorage__factory.ts index 6e4ff0e65..243b6fc2e 100644 --- a/src/contracts/factories/LadleStorage__factory.ts +++ b/src/contracts/factories/LadleStorage__factory.ts @@ -3,7 +3,7 @@ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; +import type { Provider } from "@ethersproject/providers"; import type { LadleStorage, LadleStorageInterface } from "../LadleStorage"; const _abi = [ @@ -278,7 +278,7 @@ const _abi = [ stateMutability: "view", type: "function", }, -]; +] as const; export class LadleStorage__factory { static readonly abi = _abi; diff --git a/src/contracts/factories/Ladle__factory.ts b/src/contracts/factories/Ladle__factory.ts index 360f413b1..cdf96b253 100644 --- a/src/contracts/factories/Ladle__factory.ts +++ b/src/contracts/factories/Ladle__factory.ts @@ -3,7 +3,7 @@ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; +import type { Provider } from "@ethersproject/providers"; import type { Ladle, LadleInterface } from "../Ladle"; const _abi = [ @@ -1394,7 +1394,7 @@ const _abi = [ stateMutability: "payable", type: "receive", }, -]; +] as const; export class Ladle__factory { static readonly abi = _abi; diff --git a/src/contracts/factories/NotionalMultiOracle__factory.ts b/src/contracts/factories/NotionalMultiOracle__factory.ts index 81491ed29..cee264673 100644 --- a/src/contracts/factories/NotionalMultiOracle__factory.ts +++ b/src/contracts/factories/NotionalMultiOracle__factory.ts @@ -3,7 +3,7 @@ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; +import type { Provider } from "@ethersproject/providers"; import type { NotionalMultiOracle, NotionalMultiOracleInterface, @@ -458,7 +458,7 @@ const _abi = [ stateMutability: "view", type: "function", }, -]; +] as const; export class NotionalMultiOracle__factory { static readonly abi = _abi; diff --git a/src/contracts/factories/Pool__factory.ts b/src/contracts/factories/Pool__factory.ts index 39cf3200d..ef7c70f5a 100644 --- a/src/contracts/factories/Pool__factory.ts +++ b/src/contracts/factories/Pool__factory.ts @@ -3,7 +3,7 @@ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; +import type { Provider } from "@ethersproject/providers"; import type { Pool, PoolInterface } from "../Pool"; const _abi = [ @@ -1826,7 +1826,7 @@ const _abi = [ stateMutability: "view", type: "function", }, -]; +] as const; export class Pool__factory { static readonly abi = _abi; diff --git a/src/contracts/factories/StrategyV2_1__factory.ts b/src/contracts/factories/StrategyV2_1__factory.ts new file mode 100644 index 000000000..d62fced55 --- /dev/null +++ b/src/contracts/factories/StrategyV2_1__factory.ts @@ -0,0 +1,1367 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { StrategyV2_1, StrategyV2_1Interface } from "../StrategyV2_1"; + +const _abi = [ + { + inputs: [ + { + internalType: "string", + name: "name_", + type: "string", + }, + { + internalType: "string", + name: "symbol_", + type: "string", + }, + { + internalType: "contract IFYToken", + name: "fyToken_", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "receiver", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "claimed", + type: "uint256", + }, + ], + name: "Claimed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "pool", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "lpTokenDivested", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "baseObtained", + type: "uint256", + }, + ], + name: "Divested", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "pool", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "lpTokenDivested", + type: "uint256", + }, + ], + name: "Drained", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "pool", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "lpTokenDivested", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "baseObtained", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "fyTokenObtained", + type: "uint256", + }, + ], + name: "Ejected", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "pool", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "baseInvested", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "lpTokensObtained", + type: "uint256", + }, + ], + name: "Invested", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "accumulated", + type: "uint256", + }, + ], + name: "RewardsPerTokenUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint32", + name: "start", + type: "uint32", + }, + { + indexed: false, + internalType: "uint32", + name: "end", + type: "uint32", + }, + { + indexed: false, + internalType: "uint256", + name: "rate", + type: "uint256", + }, + ], + name: "RewardsSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "contract IERC20", + name: "token", + type: "address", + }, + ], + name: "RewardsTokenSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes4", + name: "role", + type: "bytes4", + }, + { + indexed: true, + internalType: "bytes4", + name: "newAdminRole", + type: "bytes4", + }, + ], + name: "RoleAdminChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes4", + name: "role", + type: "bytes4", + }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleGranted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes4", + name: "role", + type: "bytes4", + }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleRevoked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "soldFYToken", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "returnedBase", + type: "uint256", + }, + ], + name: "SoldFYToken", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "userRewards", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "paidRewardPerToken", + type: "uint256", + }, + ], + name: "UserRewardsUpdated", + type: "event", + }, + { + inputs: [], + name: "DOMAIN_SEPARATOR", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "LOCK", + outputs: [ + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "LOCK8605463013", + outputs: [ + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "PERMIT_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "ROOT", + outputs: [ + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "ROOT4146650865", + outputs: [ + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "wad", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "guy", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "base", + outputs: [ + { + internalType: "contract IERC20", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "baseCached", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "burn", + outputs: [ + { + internalType: "uint256", + name: "poolTokensObtained", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "burnDivested", + outputs: [ + { + internalType: "uint256", + name: "baseObtained", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IPool", + name: "pool_", + type: "address", + }, + { + internalType: "uint256", + name: "poolTokens", + type: "uint256", + }, + ], + name: "burnPoolTokens", + outputs: [ + { + internalType: "uint256", + name: "baseReceived", + type: "uint256", + }, + { + internalType: "uint256", + name: "fyTokenReceived", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "fyTokenTo", + type: "address", + }, + { + internalType: "address", + name: "baseTo", + type: "address", + }, + ], + name: "buyFYToken", + outputs: [ + { + internalType: "uint256", + name: "soldFYToken", + type: "uint256", + }, + { + internalType: "uint256", + name: "returnedBase", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "claim", + outputs: [ + { + internalType: "uint256", + name: "claiming", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "deploymentChainId", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "divest", + outputs: [ + { + internalType: "uint256", + name: "baseObtained", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "eject", + outputs: [ + { + internalType: "uint256", + name: "baseReceived", + type: "uint256", + }, + { + internalType: "uint256", + name: "fyTokenReceived", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "fyToken", + outputs: [ + { + internalType: "contract IFYToken", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "fyTokenCached", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "role", + type: "bytes4", + }, + ], + name: "getRoleAdmin", + outputs: [ + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "role", + type: "bytes4", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "grantRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4[]", + name: "roles", + type: "bytes4[]", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "grantRoles", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "role", + type: "bytes4", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "hasRole", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "init", + outputs: [ + { + internalType: "uint256", + name: "baseIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "fyTokenIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "minted", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IPool", + name: "pool_", + type: "address", + }, + ], + name: "invest", + outputs: [ + { + internalType: "uint256", + name: "poolTokensObtained", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "role", + type: "bytes4", + }, + ], + name: "lockRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "maturity", + outputs: [ + { + internalType: "uint32", + name: "", + type: "uint32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "mint", + outputs: [ + { + internalType: "uint256", + name: "minted", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "mintDivested", + outputs: [ + { + internalType: "uint256", + name: "minted", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "nonces", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "permit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "pool", + outputs: [ + { + internalType: "contract IPool", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "poolCached", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "user", + type: "address", + }, + ], + name: "remit", + outputs: [ + { + internalType: "uint256", + name: "claiming", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "role", + type: "bytes4", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "renounceRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "restart", + outputs: [ + { + internalType: "uint256", + name: "baseIn", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "role", + type: "bytes4", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "revokeRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4[]", + name: "roles", + type: "bytes4[]", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "revokeRoles", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "rewards", + outputs: [ + { + internalType: "uint128", + name: "accumulated", + type: "uint128", + }, + { + internalType: "uint128", + name: "checkpoint", + type: "uint128", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "rewardsPerToken", + outputs: [ + { + internalType: "uint128", + name: "accumulated", + type: "uint128", + }, + { + internalType: "uint32", + name: "lastUpdated", + type: "uint32", + }, + { + internalType: "uint96", + name: "rate", + type: "uint96", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "rewardsPeriod", + outputs: [ + { + internalType: "uint32", + name: "start", + type: "uint32", + }, + { + internalType: "uint32", + name: "end", + type: "uint32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "rewardsToken", + outputs: [ + { + internalType: "contract IERC20", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint32", + name: "start", + type: "uint32", + }, + { + internalType: "uint32", + name: "end", + type: "uint32", + }, + { + internalType: "uint96", + name: "rate", + type: "uint96", + }, + ], + name: "setRewards", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IERC20", + name: "rewardsToken_", + type: "address", + }, + ], + name: "setRewardsToken", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "role", + type: "bytes4", + }, + { + internalType: "bytes4", + name: "adminRole", + type: "bytes4", + }, + ], + name: "setRoleAdmin", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "state", + outputs: [ + { + internalType: "enum Strategy.State", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "dst", + type: "address", + }, + { + internalType: "uint256", + name: "wad", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "src", + type: "address", + }, + { + internalType: "address", + name: "dst", + type: "address", + }, + { + internalType: "uint256", + name: "wad", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "pure", + type: "function", + }, +] as const; + +export class StrategyV2_1__factory { + static readonly abi = _abi; + static createInterface(): StrategyV2_1Interface { + return new utils.Interface(_abi) as StrategyV2_1Interface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): StrategyV2_1 { + return new Contract(address, _abi, signerOrProvider) as StrategyV2_1; + } +} diff --git a/src/contracts/factories/Strategy__factory.ts b/src/contracts/factories/Strategy__factory.ts index c5465f336..63166467e 100644 --- a/src/contracts/factories/Strategy__factory.ts +++ b/src/contracts/factories/Strategy__factory.ts @@ -3,7 +3,7 @@ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; +import type { Provider } from "@ethersproject/providers"; import type { Strategy, StrategyInterface } from "../Strategy"; const _abi = [ @@ -1258,7 +1258,7 @@ const _abi = [ stateMutability: "pure", type: "function", }, -]; +] as const; export class Strategy__factory { static readonly abi = _abi; diff --git a/src/contracts/factories/Transfer1155Module__factory.ts b/src/contracts/factories/Transfer1155Module__factory.ts index d44ce3ac3..9db2108f1 100644 --- a/src/contracts/factories/Transfer1155Module__factory.ts +++ b/src/contracts/factories/Transfer1155Module__factory.ts @@ -3,7 +3,7 @@ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; +import type { Provider } from "@ethersproject/providers"; import type { Transfer1155Module, Transfer1155ModuleInterface, @@ -314,7 +314,7 @@ const _abi = [ stateMutability: "view", type: "function", }, -]; +] as const; export class Transfer1155Module__factory { static readonly abi = _abi; diff --git a/src/contracts/factories/UniswapV3Oracle__factory.ts b/src/contracts/factories/UniswapV3Oracle__factory.ts index 98bd8f025..17f2c54d9 100644 --- a/src/contracts/factories/UniswapV3Oracle__factory.ts +++ b/src/contracts/factories/UniswapV3Oracle__factory.ts @@ -3,7 +3,7 @@ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; +import type { Provider } from "@ethersproject/providers"; import type { UniswapV3Oracle, UniswapV3OracleInterface, @@ -513,7 +513,7 @@ const _abi = [ stateMutability: "view", type: "function", }, -]; +] as const; export class UniswapV3Oracle__factory { static readonly abi = _abi; diff --git a/src/contracts/factories/WitchV2__factory.ts b/src/contracts/factories/WitchV2__factory.ts index 8238f0bdd..3c3757be1 100644 --- a/src/contracts/factories/WitchV2__factory.ts +++ b/src/contracts/factories/WitchV2__factory.ts @@ -3,7 +3,7 @@ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; +import type { Provider } from "@ethersproject/providers"; import type { WitchV2, WitchV2Interface } from "../WitchV2"; const _abi = [ @@ -1288,7 +1288,7 @@ const _abi = [ stateMutability: "nonpayable", type: "function", }, -]; +] as const; export class WitchV2__factory { static readonly abi = _abi; diff --git a/src/contracts/factories/Witch__factory.ts b/src/contracts/factories/Witch__factory.ts index b65dda170..d62c26e4c 100644 --- a/src/contracts/factories/Witch__factory.ts +++ b/src/contracts/factories/Witch__factory.ts @@ -3,7 +3,7 @@ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; +import type { Provider } from "@ethersproject/providers"; import type { Witch, WitchInterface } from "../Witch"; const _abi = [ @@ -650,7 +650,7 @@ const _abi = [ stateMutability: "nonpayable", type: "function", }, -]; +] as const; export class Witch__factory { static readonly abi = _abi; diff --git a/src/contracts/factories/WrapEtherModule__factory.ts b/src/contracts/factories/WrapEtherModule__factory.ts index 979701b6d..b6b416329 100644 --- a/src/contracts/factories/WrapEtherModule__factory.ts +++ b/src/contracts/factories/WrapEtherModule__factory.ts @@ -3,7 +3,7 @@ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; +import type { Provider } from "@ethersproject/providers"; import type { WrapEtherModule, WrapEtherModuleInterface, @@ -299,7 +299,7 @@ const _abi = [ stateMutability: "payable", type: "function", }, -]; +] as const; export class WrapEtherModule__factory { static readonly abi = _abi; diff --git a/src/contracts/factories/YearnVaultMultiOracle__factory.ts b/src/contracts/factories/YearnVaultMultiOracle__factory.ts index af60bae52..1bc6253a2 100644 --- a/src/contracts/factories/YearnVaultMultiOracle__factory.ts +++ b/src/contracts/factories/YearnVaultMultiOracle__factory.ts @@ -3,7 +3,7 @@ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; +import type { Provider } from "@ethersproject/providers"; import type { YearnVaultMultiOracle, YearnVaultMultiOracleInterface, @@ -451,7 +451,7 @@ const _abi = [ stateMutability: "view", type: "function", }, -]; +] as const; export class YearnVaultMultiOracle__factory { static readonly abi = _abi; diff --git a/src/contracts/factories/index.ts b/src/contracts/factories/index.ts new file mode 100644 index 000000000..ebf1c2883 --- /dev/null +++ b/src/contracts/factories/index.ts @@ -0,0 +1,29 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { AccumulatorOracle__factory } from "./AccumulatorOracle__factory"; +export { Cauldron__factory } from "./Cauldron__factory"; +export { ChainlinkMultiOracle__factory } from "./ChainlinkMultiOracle__factory"; +export { ChainlinkUSDOracle__factory } from "./ChainlinkUSDOracle__factory"; +export { CompositeMultiOracle__factory } from "./CompositeMultiOracle__factory"; +export { CompoundMultiOracle__factory } from "./CompoundMultiOracle__factory"; +export { ConvexJoin__factory } from "./ConvexJoin__factory"; +export { ConvexLadleModule__factory } from "./ConvexLadleModule__factory"; +export { ERC1155__factory } from "./ERC1155__factory"; +export { ERC20__factory } from "./ERC20__factory"; +export { ERC20Permit__factory } from "./ERC20Permit__factory"; +export { FYToken__factory } from "./FYToken__factory"; +export { Join__factory } from "./Join__factory"; +export { Join1155__factory } from "./Join1155__factory"; +export { Ladle__factory } from "./Ladle__factory"; +export { LadleStorage__factory } from "./LadleStorage__factory"; +export { NotionalMultiOracle__factory } from "./NotionalMultiOracle__factory"; +export { Pool__factory } from "./Pool__factory"; +export { Strategy__factory } from "./Strategy__factory"; +export { StrategyV2_1__factory } from "./StrategyV2_1__factory"; +export { Transfer1155Module__factory } from "./Transfer1155Module__factory"; +export { UniswapV3Oracle__factory } from "./UniswapV3Oracle__factory"; +export { Witch__factory } from "./Witch__factory"; +export { WitchV2__factory } from "./WitchV2__factory"; +export { WrapEtherModule__factory } from "./WrapEtherModule__factory"; +export { YearnVaultMultiOracle__factory } from "./YearnVaultMultiOracle__factory"; diff --git a/src/contracts/index.ts b/src/contracts/index.ts index 55e17b7aa..cbd6917b2 100644 --- a/src/contracts/index.ts +++ b/src/contracts/index.ts @@ -20,14 +20,14 @@ export type { LadleStorage } from "./LadleStorage"; export type { NotionalMultiOracle } from "./NotionalMultiOracle"; export type { Pool } from "./Pool"; export type { Strategy } from "./Strategy"; -export type { StrategyV21 } from "./StrategyV21"; +export type { StrategyV2_1 } from "./StrategyV2_1"; export type { Transfer1155Module } from "./Transfer1155Module"; export type { UniswapV3Oracle } from "./UniswapV3Oracle"; export type { Witch } from "./Witch"; export type { WitchV2 } from "./WitchV2"; export type { WrapEtherModule } from "./WrapEtherModule"; export type { YearnVaultMultiOracle } from "./YearnVaultMultiOracle"; - +export * as factories from "./factories"; export { AccumulatorOracle__factory } from "./factories/AccumulatorOracle__factory"; export { Cauldron__factory } from "./factories/Cauldron__factory"; export { ChainlinkMultiOracle__factory } from "./factories/ChainlinkMultiOracle__factory"; @@ -47,7 +47,7 @@ export { LadleStorage__factory } from "./factories/LadleStorage__factory"; export { NotionalMultiOracle__factory } from "./factories/NotionalMultiOracle__factory"; export { Pool__factory } from "./factories/Pool__factory"; export { Strategy__factory } from "./factories/Strategy__factory"; -export { StrategyV21__factory } from "./factories/StrategyV21__factory"; +export { StrategyV2_1__factory } from "./factories/StrategyV2_1__factory"; export { Transfer1155Module__factory } from "./factories/Transfer1155Module__factory"; export { UniswapV3Oracle__factory } from "./factories/UniswapV3Oracle__factory"; export { Witch__factory } from "./factories/Witch__factory"; From 07d58a47584c3a4f267fd5516db294b30c823c2b Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Thu, 1 Jun 2023 11:06:22 +0100 Subject: [PATCH 17/51] update assert.sol --- src/contracts/Assert.ts | 1204 +++++++++++++++++ .../abis/{Assert.sol => Assert.json} | 0 src/contracts/factories/Assert__factory.ts | 569 ++++++++ src/contracts/factories/index.ts | 1 + src/contracts/index.ts | 2 + 5 files changed, 1776 insertions(+) create mode 100644 src/contracts/Assert.ts rename src/contracts/abis/{Assert.sol => Assert.json} (100%) create mode 100644 src/contracts/factories/Assert__factory.ts diff --git a/src/contracts/Assert.ts b/src/contracts/Assert.ts new file mode 100644 index 000000000..b2b00dc7c --- /dev/null +++ b/src/contracts/Assert.ts @@ -0,0 +1,1204 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface AssertInterface extends utils.Interface { + functions: { + "assertEq(address,bytes,address,bytes)": FunctionFragment; + "assertEq(bytes,bytes)": FunctionFragment; + "assertEq(uint256,uint256)": FunctionFragment; + "assertEq(address,bytes,uint256)": FunctionFragment; + "assertEq(bool,bool)": FunctionFragment; + "assertEqAbs(address,bytes,address,bytes,uint256)": FunctionFragment; + "assertEqAbs(address,bytes,uint256,uint256)": FunctionFragment; + "assertEqAbs(uint256,uint256,uint256)": FunctionFragment; + "assertEqRel(address,bytes,uint256,uint256)": FunctionFragment; + "assertEqRel(uint256,uint256,uint256)": FunctionFragment; + "assertEqRel(address,bytes,address,bytes,uint256)": FunctionFragment; + "assertGe(address,bytes,address,bytes)": FunctionFragment; + "assertGe(uint256,uint256)": FunctionFragment; + "assertGe(address,bytes,uint256)": FunctionFragment; + "assertGt(address,bytes,address,bytes)": FunctionFragment; + "assertGt(address,bytes,uint256)": FunctionFragment; + "assertGt(uint256,uint256)": FunctionFragment; + "assertLe(address,bytes,uint256)": FunctionFragment; + "assertLe(uint256,uint256)": FunctionFragment; + "assertLe(address,bytes,address,bytes)": FunctionFragment; + "assertLt(address,bytes,uint256)": FunctionFragment; + "assertLt(uint256,uint256)": FunctionFragment; + "assertLt(address,bytes,address,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "assertEq(address,bytes,address,bytes)" + | "assertEq(bytes,bytes)" + | "assertEq(uint256,uint256)" + | "assertEq(address,bytes,uint256)" + | "assertEq(bool,bool)" + | "assertEqAbs(address,bytes,address,bytes,uint256)" + | "assertEqAbs(address,bytes,uint256,uint256)" + | "assertEqAbs(uint256,uint256,uint256)" + | "assertEqRel(address,bytes,uint256,uint256)" + | "assertEqRel(uint256,uint256,uint256)" + | "assertEqRel(address,bytes,address,bytes,uint256)" + | "assertGe(address,bytes,address,bytes)" + | "assertGe(uint256,uint256)" + | "assertGe(address,bytes,uint256)" + | "assertGt(address,bytes,address,bytes)" + | "assertGt(address,bytes,uint256)" + | "assertGt(uint256,uint256)" + | "assertLe(address,bytes,uint256)" + | "assertLe(uint256,uint256)" + | "assertLe(address,bytes,address,bytes)" + | "assertLt(address,bytes,uint256)" + | "assertLt(uint256,uint256)" + | "assertLt(address,bytes,address,bytes)" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "assertEq(address,bytes,address,bytes)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assertEq(bytes,bytes)", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "assertEq(uint256,uint256)", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "assertEq(address,bytes,uint256)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assertEq(bool,bool)", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "assertEqAbs(address,bytes,address,bytes,uint256)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assertEqAbs(address,bytes,uint256,uint256)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assertEqAbs(uint256,uint256,uint256)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assertEqRel(address,bytes,uint256,uint256)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assertEqRel(uint256,uint256,uint256)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assertEqRel(address,bytes,address,bytes,uint256)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assertGe(address,bytes,address,bytes)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assertGe(uint256,uint256)", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "assertGe(address,bytes,uint256)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assertGt(address,bytes,address,bytes)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assertGt(address,bytes,uint256)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assertGt(uint256,uint256)", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "assertLe(address,bytes,uint256)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assertLe(uint256,uint256)", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "assertLe(address,bytes,address,bytes)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assertLt(address,bytes,uint256)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assertLt(uint256,uint256)", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "assertLt(address,bytes,address,bytes)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult( + functionFragment: "assertEq(address,bytes,address,bytes)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertEq(bytes,bytes)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertEq(uint256,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertEq(address,bytes,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertEq(bool,bool)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertEqAbs(address,bytes,address,bytes,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertEqAbs(address,bytes,uint256,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertEqAbs(uint256,uint256,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertEqRel(address,bytes,uint256,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertEqRel(uint256,uint256,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertEqRel(address,bytes,address,bytes,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertGe(address,bytes,address,bytes)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertGe(uint256,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertGe(address,bytes,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertGt(address,bytes,address,bytes)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertGt(address,bytes,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertGt(uint256,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertLe(address,bytes,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertLe(uint256,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertLe(address,bytes,address,bytes)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertLt(address,bytes,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertLt(uint256,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertLt(address,bytes,address,bytes)", + data: BytesLike + ): Result; + + events: {}; +} + +export interface Assert extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: AssertInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + "assertEq(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEq(bytes,bytes)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[void]>; + + "assertEq(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[void]>; + + "assertEq(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEq(bool,bool)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[void]>; + + "assertEqAbs(address,bytes,address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + abs: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEqAbs(address,bytes,uint256,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + abs: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEqAbs(uint256,uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + abs: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[void]>; + + "assertEqRel(address,bytes,uint256,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + rel: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEqRel(uint256,uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + rel: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[void]>; + + "assertEqRel(address,bytes,address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + rel: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGe(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGe(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[void]>; + + "assertGe(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGt(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGt(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGt(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[void]>; + + "assertLe(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertLe(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[void]>; + + "assertLe(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertLt(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertLt(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[void]>; + + "assertLt(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + "assertEq(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEq(bytes,bytes)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEq(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEq(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEq(bool,bool)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEqAbs(address,bytes,address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + abs: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEqAbs(address,bytes,uint256,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + abs: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEqAbs(uint256,uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + abs: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEqRel(address,bytes,uint256,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + rel: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEqRel(uint256,uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + rel: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEqRel(address,bytes,address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + rel: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGe(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGe(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertGe(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGt(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGt(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGt(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertLe(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertLe(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertLe(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertLt(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertLt(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertLt(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + "assertEq(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEq(bytes,bytes)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEq(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEq(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEq(bool,bool)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEqAbs(address,bytes,address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + abs: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEqAbs(address,bytes,uint256,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + abs: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEqAbs(uint256,uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + abs: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEqRel(address,bytes,uint256,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + rel: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEqRel(uint256,uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + rel: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEqRel(address,bytes,address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + rel: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertGe(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertGe(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertGe(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertGt(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertGt(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertGt(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertLe(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertLe(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertLe(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertLt(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertLt(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertLt(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + "assertEq(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEq(bytes,bytes)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEq(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEq(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEq(bool,bool)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEqAbs(address,bytes,address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + abs: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEqAbs(address,bytes,uint256,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + abs: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEqAbs(uint256,uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + abs: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEqRel(address,bytes,uint256,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + rel: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEqRel(uint256,uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + rel: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEqRel(address,bytes,address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + rel: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGe(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGe(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertGe(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGt(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGt(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGt(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertLe(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertLe(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertLe(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertLt(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertLt(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertLt(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + "assertEq(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEq(bytes,bytes)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEq(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEq(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEq(bool,bool)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEqAbs(address,bytes,address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + abs: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEqAbs(address,bytes,uint256,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + abs: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEqAbs(uint256,uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + abs: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEqRel(address,bytes,uint256,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + rel: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEqRel(uint256,uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + rel: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEqRel(address,bytes,address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + rel: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGe(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGe(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertGe(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGt(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGt(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGt(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertLe(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertLe(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertLe(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertLt(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertLt(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertLt(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/contracts/abis/Assert.sol b/src/contracts/abis/Assert.json similarity index 100% rename from src/contracts/abis/Assert.sol rename to src/contracts/abis/Assert.json diff --git a/src/contracts/factories/Assert__factory.ts b/src/contracts/factories/Assert__factory.ts new file mode 100644 index 000000000..9270eb97c --- /dev/null +++ b/src/contracts/factories/Assert__factory.ts @@ -0,0 +1,569 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { Assert, AssertInterface } from "../Assert"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "actualTarget", + type: "address", + }, + { + internalType: "bytes", + name: "actualCalldata", + type: "bytes", + }, + { + internalType: "address", + name: "expectedTarget", + type: "address", + }, + { + internalType: "bytes", + name: "expectedCalldata", + type: "bytes", + }, + ], + name: "assertEq", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "actual", + type: "bytes", + }, + { + internalType: "bytes", + name: "expected", + type: "bytes", + }, + ], + name: "assertEq", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "actual", + type: "uint256", + }, + { + internalType: "uint256", + name: "expected", + type: "uint256", + }, + ], + name: "assertEq", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "actualTarget", + type: "address", + }, + { + internalType: "bytes", + name: "actualCalldata", + type: "bytes", + }, + { + internalType: "uint256", + name: "expected", + type: "uint256", + }, + ], + name: "assertEq", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bool", + name: "actual", + type: "bool", + }, + { + internalType: "bool", + name: "expected", + type: "bool", + }, + ], + name: "assertEq", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "actualTarget", + type: "address", + }, + { + internalType: "bytes", + name: "actualCalldata", + type: "bytes", + }, + { + internalType: "address", + name: "expectedTarget", + type: "address", + }, + { + internalType: "bytes", + name: "expectedCalldata", + type: "bytes", + }, + { + internalType: "uint256", + name: "abs", + type: "uint256", + }, + ], + name: "assertEqAbs", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "actualTarget", + type: "address", + }, + { + internalType: "bytes", + name: "actualCalldata", + type: "bytes", + }, + { + internalType: "uint256", + name: "expected", + type: "uint256", + }, + { + internalType: "uint256", + name: "abs", + type: "uint256", + }, + ], + name: "assertEqAbs", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "actual", + type: "uint256", + }, + { + internalType: "uint256", + name: "expected", + type: "uint256", + }, + { + internalType: "uint256", + name: "abs", + type: "uint256", + }, + ], + name: "assertEqAbs", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "actualTarget", + type: "address", + }, + { + internalType: "bytes", + name: "actualCalldata", + type: "bytes", + }, + { + internalType: "uint256", + name: "expected", + type: "uint256", + }, + { + internalType: "uint256", + name: "rel", + type: "uint256", + }, + ], + name: "assertEqRel", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "actual", + type: "uint256", + }, + { + internalType: "uint256", + name: "expected", + type: "uint256", + }, + { + internalType: "uint256", + name: "rel", + type: "uint256", + }, + ], + name: "assertEqRel", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "actualTarget", + type: "address", + }, + { + internalType: "bytes", + name: "actualCalldata", + type: "bytes", + }, + { + internalType: "address", + name: "expectedTarget", + type: "address", + }, + { + internalType: "bytes", + name: "expectedCalldata", + type: "bytes", + }, + { + internalType: "uint256", + name: "rel", + type: "uint256", + }, + ], + name: "assertEqRel", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "actualTarget", + type: "address", + }, + { + internalType: "bytes", + name: "actualCalldata", + type: "bytes", + }, + { + internalType: "address", + name: "expectedTarget", + type: "address", + }, + { + internalType: "bytes", + name: "expectedCalldata", + type: "bytes", + }, + ], + name: "assertGe", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "actual", + type: "uint256", + }, + { + internalType: "uint256", + name: "expected", + type: "uint256", + }, + ], + name: "assertGe", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "actualTarget", + type: "address", + }, + { + internalType: "bytes", + name: "actualCalldata", + type: "bytes", + }, + { + internalType: "uint256", + name: "expected", + type: "uint256", + }, + ], + name: "assertGe", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "actualTarget", + type: "address", + }, + { + internalType: "bytes", + name: "actualCalldata", + type: "bytes", + }, + { + internalType: "address", + name: "expectedTarget", + type: "address", + }, + { + internalType: "bytes", + name: "expectedCalldata", + type: "bytes", + }, + ], + name: "assertGt", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "actualTarget", + type: "address", + }, + { + internalType: "bytes", + name: "actualCalldata", + type: "bytes", + }, + { + internalType: "uint256", + name: "expected", + type: "uint256", + }, + ], + name: "assertGt", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "actual", + type: "uint256", + }, + { + internalType: "uint256", + name: "expected", + type: "uint256", + }, + ], + name: "assertGt", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "actualTarget", + type: "address", + }, + { + internalType: "bytes", + name: "actualCalldata", + type: "bytes", + }, + { + internalType: "uint256", + name: "expected", + type: "uint256", + }, + ], + name: "assertLe", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "actual", + type: "uint256", + }, + { + internalType: "uint256", + name: "expected", + type: "uint256", + }, + ], + name: "assertLe", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "actualTarget", + type: "address", + }, + { + internalType: "bytes", + name: "actualCalldata", + type: "bytes", + }, + { + internalType: "address", + name: "expectedTarget", + type: "address", + }, + { + internalType: "bytes", + name: "expectedCalldata", + type: "bytes", + }, + ], + name: "assertLe", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "actualTarget", + type: "address", + }, + { + internalType: "bytes", + name: "actualCalldata", + type: "bytes", + }, + { + internalType: "uint256", + name: "expected", + type: "uint256", + }, + ], + name: "assertLt", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "actual", + type: "uint256", + }, + { + internalType: "uint256", + name: "expected", + type: "uint256", + }, + ], + name: "assertLt", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "actualTarget", + type: "address", + }, + { + internalType: "bytes", + name: "actualCalldata", + type: "bytes", + }, + { + internalType: "address", + name: "expectedTarget", + type: "address", + }, + { + internalType: "bytes", + name: "expectedCalldata", + type: "bytes", + }, + ], + name: "assertLt", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class Assert__factory { + static readonly abi = _abi; + static createInterface(): AssertInterface { + return new utils.Interface(_abi) as AssertInterface; + } + static connect(address: string, signerOrProvider: Signer | Provider): Assert { + return new Contract(address, _abi, signerOrProvider) as Assert; + } +} diff --git a/src/contracts/factories/index.ts b/src/contracts/factories/index.ts index ebf1c2883..792d26594 100644 --- a/src/contracts/factories/index.ts +++ b/src/contracts/factories/index.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ export { AccumulatorOracle__factory } from "./AccumulatorOracle__factory"; +export { Assert__factory } from "./Assert__factory"; export { Cauldron__factory } from "./Cauldron__factory"; export { ChainlinkMultiOracle__factory } from "./ChainlinkMultiOracle__factory"; export { ChainlinkUSDOracle__factory } from "./ChainlinkUSDOracle__factory"; diff --git a/src/contracts/index.ts b/src/contracts/index.ts index cbd6917b2..368560340 100644 --- a/src/contracts/index.ts +++ b/src/contracts/index.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ export type { AccumulatorOracle } from "./AccumulatorOracle"; +export type { Assert } from "./Assert"; export type { Cauldron } from "./Cauldron"; export type { ChainlinkMultiOracle } from "./ChainlinkMultiOracle"; export type { ChainlinkUSDOracle } from "./ChainlinkUSDOracle"; @@ -29,6 +30,7 @@ export type { WrapEtherModule } from "./WrapEtherModule"; export type { YearnVaultMultiOracle } from "./YearnVaultMultiOracle"; export * as factories from "./factories"; export { AccumulatorOracle__factory } from "./factories/AccumulatorOracle__factory"; +export { Assert__factory } from "./factories/Assert__factory"; export { Cauldron__factory } from "./factories/Cauldron__factory"; export { ChainlinkMultiOracle__factory } from "./factories/ChainlinkMultiOracle__factory"; export { ChainlinkUSDOracle__factory } from "./factories/ChainlinkUSDOracle__factory"; From 916649ff4e84daff284f50c773e2d79162efd40a Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Thu, 1 Jun 2023 11:08:13 +0100 Subject: [PATCH 18/51] include use Assert --- src/hooks/actionHooks/useAssert.ts | 96 ++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 src/hooks/actionHooks/useAssert.ts diff --git a/src/hooks/actionHooks/useAssert.ts b/src/hooks/actionHooks/useAssert.ts new file mode 100644 index 000000000..c38ed52d0 --- /dev/null +++ b/src/hooks/actionHooks/useAssert.ts @@ -0,0 +1,96 @@ +import { BigNumber, BigNumberish, BytesLike, Contract } from 'ethers'; +import { erc20ABI, useAccount, useNetwork } from 'wagmi'; +import { ContractNames } from '../../config/contracts'; +import { Assert, ERC1155__factory } from '../../contracts'; +import { ICallData, LadleActions } from '../../types'; +import { ZERO_BN } from '../../utils/constants'; +import useContracts from '../useContracts'; + +export namespace AssertActions { + export enum Fn { + ASSERT_GT = 'assertGt(address,bytes,uint)', + ASSERT_LT = 'assertLt(address,bytes,uint,uint256)', + ASSERT_EQ_REL = 'assertEqRel(address,bytes,uint,uint256)', + ASSERT_EQ_ABS = 'assertEqAbs(address,bytes,uint,uint256)', + ASSERT_GE = 'assertGe(address,bytes,uint)', + ASSERT_LE = 'assertLe(address,bytes,uint)', + } + export namespace Args { + export type ASSERT_GT = [actualTarget: string, bytes: BytesLike, expected: BigNumberish]; + export type ASSERT_LT = [actualTarget: string, bytes: BytesLike, expected: BigNumberish]; + export type ASSERT_EQ_REL = [ + actualTarget: string, + bytes: BytesLike, + expected: BigNumberish, + relative: BigNumberish + ]; + export type ASSERT_EQ_ABS = [ + actualTarget: string, + bytes: BytesLike, + expected: BigNumberish, + absolute: BigNumberish + ]; + export type ASSERT_GE = [actualTarget: string, bytes: BytesLike, expected: BigNumberish]; + export type ASSERT_LE = [actualTarget: string, bytes: BytesLike, expected: BigNumberish]; + } +} + +export const useAssert = () => { + const contracts = useContracts(); + const { address: account } = useAccount(); + const { chain } = useNetwork(); + + const encodeBalanceCall = (targetAddress: string | undefined, tokenIdentifier: string | number | undefined = undefined) => { + + if (targetAddress) { + const abi = tokenIdentifier ? ERC1155__factory.abi : erc20ABI; + const args = tokenIdentifier ? [account, tokenIdentifier] : [account]; + const assetContract_ = new Contract(targetAddress, abi); + return assetContract_.interface.encodeFunctionData('balanceOf', args); + } + + /* if no address provided, assume the balance is the native balance and get the users ETH balance via a multical3 contract */ + const contract_ = new Contract(chain?.contracts?.multicall3?.address!, multiCallFragment); + return contract_.interface.encodeFunctionData('getEthBalance', [account]); // this calls the helper contract -> because we are looking for an ETH/Native balance; + }; + + const assert = ( + address: string | undefined, + encodedCallBytes: string, + assertFn: AssertActions.Fn, + expectedVal: BigNumber, + relOrAbsVal: BigNumber = ZERO_BN, + ignoreIf: boolean = false + ): ICallData[] => { + if (!contracts) return []; + + /* if address == undefined, then use the appropriate multicall contract for the connected chain as the defualt */ + const defaultAddress = chain?.contracts?.multicall3?.address! + const assertContract = contracts.get(ContractNames.ASSERT) as Assert; + + return [ + { + operation: LadleActions.Fn.ROUTE, + args: relOrAbsVal.gt(ZERO_BN) + ? [address || defaultAddress, encodedCallBytes, expectedVal, relOrAbsVal] + : [address || defaultAddress, encodedCallBytes, expectedVal], + fnName: assertFn, + targetContract: assertContract, + ignoreIf, + }, + ]; + }; + + /* if there is a destination 'to' then use the ladle module (wrapEtherModule) */ + return { assert, encodeBalanceCall }; +}; + +const multiCallFragment = [ + { + inputs: [{ internalType: 'address', name: 'addr', type: 'address' }], + name: 'getEthBalance', + outputs: [{ internalType: 'uint256', name: 'balance', type: 'uint256' }], + stateMutability: 'view', + type: 'function', + }, +]; From a058e7236117987c4167af50c12b13cc87a33900 Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Thu, 1 Jun 2023 11:13:37 +0100 Subject: [PATCH 19/51] add assert to remolve liquidity --- src/hooks/actionHooks/useRemoveLiquidity.ts | 35 ++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/src/hooks/actionHooks/useRemoveLiquidity.ts b/src/hooks/actionHooks/useRemoveLiquidity.ts index 0e3bb7dce..8178a19af 100644 --- a/src/hooks/actionHooks/useRemoveLiquidity.ts +++ b/src/hooks/actionHooks/useRemoveLiquidity.ts @@ -16,7 +16,7 @@ import { getTxCode } from '../../utils/appUtils'; import { useChain } from '../useChain'; import { TxContext } from '../../contexts/TxContext'; import { HistoryContext } from '../../contexts/HistoryContext'; -import { ONE_BN, ZERO_BN } from '../../utils/constants'; +import { ONE_BN, WAD_BN, ZERO_BN } from '../../utils/constants'; import { ETH_BASED_ASSETS, WETH } from '../../config/assets'; import { useAddRemoveEth } from './useAddRemoveEth'; import useTimeTillMaturity from '../useTimeTillMaturity'; @@ -28,6 +28,7 @@ import { StrategyType } from '../../config/strategies'; import useAccountPlus from '../useAccountPlus'; import { ContractNames } from '../../config/contracts'; import useAllowAction from '../useAllowAction'; +import { AssertActions, useAssert } from './useAssert'; /* +---------+ DEFUNCT PATH @@ -301,6 +302,38 @@ export const useRemoveLiquidity = () => { txCode ); + const { assert, encodeBalanceCall } = useAssert(); + + /* Add in an Assert call : Base received + fyToken received within 10% of strategy tokens held. */ + const assertCallData_base: ICallData[] = + isEthBase && nativeBalance + ? assert( + undefined, + encodeBalanceCall(undefined), + AssertActions.Fn.ASSERT_EQ_REL, + nativeBalance.value.add(series.getBase(_sharesReceived)), + WAD_BN.div('10') // 10% relative tolerance + ): + assert( + _base.address, + encodeBalanceCall(_base.address, _base.tokenIdentifier), + AssertActions.Fn.ASSERT_EQ_REL, + _base.balance!.add(series.getBase(_sharesReceived)), + WAD_BN.div('10') // 10% relative tolerance + ) + + /* Add in an Assert call : Base received + fyToken received within 10% of strategy tokens held. */ + const assertCallData_fyToken: ICallData[] = _fyTokenReceived.gt(ZERO_BN) + ? assert( + series.address, + encodeBalanceCall(series.address, undefined), + AssertActions.Fn.ASSERT_EQ_REL, + series.fyTokenBalance!.add(_fyTokenReceived), + WAD_BN.div('10') // 10% relative tolerance + ) + : []; + + // const unwrapping: ICallData[] = await unwrapAsset(_base, account) const calls: ICallData[] = [ ...permitCallData, From ae5a2fa6fd12935a875e07922b98e12768deea66 Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Thu, 1 Jun 2023 11:14:39 +0100 Subject: [PATCH 20/51] add native Balance to account plus --- src/hooks/actionHooks/useRemoveLiquidity.ts | 2 +- src/hooks/useAccountPlus.ts | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/hooks/actionHooks/useRemoveLiquidity.ts b/src/hooks/actionHooks/useRemoveLiquidity.ts index 8178a19af..6f925274d 100644 --- a/src/hooks/actionHooks/useRemoveLiquidity.ts +++ b/src/hooks/actionHooks/useRemoveLiquidity.ts @@ -56,7 +56,7 @@ is Mature? N +--------+ export const useRemoveLiquidity = () => { const provider = useProvider(); - const { address: account } = useAccountPlus(); + const { address: account, nativeBalance } = useAccountPlus(); const { txActions } = useContext(TxContext); const { resetProcess } = txActions; diff --git a/src/hooks/useAccountPlus.ts b/src/hooks/useAccountPlus.ts index 5296c8a0c..f4cf63518 100644 --- a/src/hooks/useAccountPlus.ts +++ b/src/hooks/useAccountPlus.ts @@ -1,5 +1,5 @@ import { useContext, useMemo } from 'react'; -import { useAccount } from 'wagmi'; +import { useAccount, useBalance } from 'wagmi'; import { SettingsContext } from '../contexts/SettingsContext'; /** @@ -7,13 +7,15 @@ import { SettingsContext } from '../contexts/SettingsContext'; * @returns mockUserAddress input when using mocked data, else simply the wagmi useAccount hook address */ const useAccountPlus = () => { + const { settingsState: { useMockedUser, mockUserAddress }, } = useContext(SettingsContext); const { address } = useAccount(); + const {data:nativeBalance} = useBalance({address}); return useMemo( - () => (useMockedUser ? { address: mockUserAddress } : { address }), + () => (useMockedUser ? { address: mockUserAddress, nativeBalance } : { address, nativeBalance }), [address, mockUserAddress, useMockedUser] ); }; From 0d8463d2e2ba660af67949fcac445be87b144509 Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Thu, 1 Jun 2023 11:16:44 +0100 Subject: [PATCH 21/51] add in final assert --- src/hooks/actionHooks/useRemoveLiquidity.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hooks/actionHooks/useRemoveLiquidity.ts b/src/hooks/actionHooks/useRemoveLiquidity.ts index 6f925274d..c541338fd 100644 --- a/src/hooks/actionHooks/useRemoveLiquidity.ts +++ b/src/hooks/actionHooks/useRemoveLiquidity.ts @@ -527,6 +527,9 @@ export const useRemoveLiquidity = () => { }, ...removeEthCallData, + + ...assertCallData_base, + // ...assertCallData_fyToken, temporarily remove fyToken check ]; await transact(calls, txCode); From b61312730ec0629b26df28a94f07774619a023b0 Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Thu, 1 Jun 2023 11:38:31 +0100 Subject: [PATCH 22/51] fix build --- src/types/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/index.ts b/src/types/index.ts index a53842361..c92675332 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -198,7 +198,7 @@ export interface IStrategyRoot extends ISignable { decimals: number; strategyContract: Strategy; startBlock: Block; - type: 'V1' | 'V2' | 'V2.1'; + type: 'V1' | 'V2' | 'V2_1'; associatedStrategy?: string; disabled?: boolean; } From ef01a1e2cedfaff440d71bdde45a05836ad5cb5d Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Thu, 1 Jun 2023 14:38:59 +0100 Subject: [PATCH 23/51] remove ts contracts --- src/contracts/AccumulatorOracle.ts | 866 --------- src/contracts/Assert.ts | 1204 ------------ src/contracts/Cauldron.ts | 2104 -------------------- src/contracts/ChainlinkMultiOracle.ts | 803 -------- src/contracts/ChainlinkUSDOracle.ts | 759 -------- src/contracts/CompositeMultiOracle.ts | 881 --------- src/contracts/CompoundMultiOracle.ts | 764 -------- src/contracts/ConvexJoin.ts | 1279 ------------ src/contracts/ConvexLadleModule.ts | 507 ----- src/contracts/ERC1155.ts | 529 ----- src/contracts/ERC20.ts | 384 ---- src/contracts/ERC20Permit.ts | 560 ------ src/contracts/FYToken.ts | 1553 --------------- src/contracts/Join.ts | 900 --------- src/contracts/Join1155.ts | 983 ---------- src/contracts/Ladle.ts | 2200 --------------------- src/contracts/LadleStorage.ts | 419 ---- src/contracts/NotionalMultiOracle.ts | 802 -------- src/contracts/Pool.ts | 2475 ------------------------ src/contracts/Strategy.ts | 1914 ------------------ src/contracts/StrategyV21.d.ts | 1895 ------------------ src/contracts/Transfer1155Module.ts | 483 ----- src/contracts/UniswapV3Oracle.ts | 888 --------- src/contracts/Witch.ts | 1026 ---------- src/contracts/WitchV2.ts | 1580 --------------- src/contracts/WrapEtherModule.ts | 459 ----- src/contracts/YearnVaultMultiOracle.ts | 785 -------- src/contracts/common.ts | 46 - src/types/index.ts | 2 +- 29 files changed, 1 insertion(+), 29049 deletions(-) delete mode 100644 src/contracts/AccumulatorOracle.ts delete mode 100644 src/contracts/Assert.ts delete mode 100644 src/contracts/Cauldron.ts delete mode 100644 src/contracts/ChainlinkMultiOracle.ts delete mode 100644 src/contracts/ChainlinkUSDOracle.ts delete mode 100644 src/contracts/CompositeMultiOracle.ts delete mode 100644 src/contracts/CompoundMultiOracle.ts delete mode 100644 src/contracts/ConvexJoin.ts delete mode 100644 src/contracts/ConvexLadleModule.ts delete mode 100644 src/contracts/ERC1155.ts delete mode 100644 src/contracts/ERC20.ts delete mode 100644 src/contracts/ERC20Permit.ts delete mode 100644 src/contracts/FYToken.ts delete mode 100644 src/contracts/Join.ts delete mode 100644 src/contracts/Join1155.ts delete mode 100644 src/contracts/Ladle.ts delete mode 100644 src/contracts/LadleStorage.ts delete mode 100644 src/contracts/NotionalMultiOracle.ts delete mode 100644 src/contracts/Pool.ts delete mode 100644 src/contracts/Strategy.ts delete mode 100644 src/contracts/StrategyV21.d.ts delete mode 100644 src/contracts/Transfer1155Module.ts delete mode 100644 src/contracts/UniswapV3Oracle.ts delete mode 100644 src/contracts/Witch.ts delete mode 100644 src/contracts/WitchV2.ts delete mode 100644 src/contracts/WrapEtherModule.ts delete mode 100644 src/contracts/YearnVaultMultiOracle.ts delete mode 100644 src/contracts/common.ts diff --git a/src/contracts/AccumulatorOracle.ts b/src/contracts/AccumulatorOracle.ts deleted file mode 100644 index 1a4e4d6a5..000000000 --- a/src/contracts/AccumulatorOracle.ts +++ /dev/null @@ -1,866 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "./common"; - -export interface AccumulatorOracleInterface extends utils.Interface { - functions: { - "LOCK()": FunctionFragment; - "LOCK8605463013()": FunctionFragment; - "ROOT()": FunctionFragment; - "ROOT4146650865()": FunctionFragment; - "get(bytes32,bytes32,uint256)": FunctionFragment; - "getRoleAdmin(bytes4)": FunctionFragment; - "grantRole(bytes4,address)": FunctionFragment; - "grantRoles(bytes4[],address)": FunctionFragment; - "hasRole(bytes4,address)": FunctionFragment; - "lockRole(bytes4)": FunctionFragment; - "peek(bytes32,bytes32,uint256)": FunctionFragment; - "renounceRole(bytes4,address)": FunctionFragment; - "revokeRole(bytes4,address)": FunctionFragment; - "revokeRoles(bytes4[],address)": FunctionFragment; - "setRoleAdmin(bytes4,bytes4)": FunctionFragment; - "setSource(bytes6,bytes6,uint256,uint256)": FunctionFragment; - "sources(bytes6,bytes6)": FunctionFragment; - "updatePerSecondRate(bytes6,bytes6,uint256)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "LOCK" - | "LOCK8605463013" - | "ROOT" - | "ROOT4146650865" - | "get" - | "getRoleAdmin" - | "grantRole" - | "grantRoles" - | "hasRole" - | "lockRole" - | "peek" - | "renounceRole" - | "revokeRole" - | "revokeRoles" - | "setRoleAdmin" - | "setSource" - | "sources" - | "updatePerSecondRate" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; - encodeFunctionData( - functionFragment: "LOCK8605463013", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; - encodeFunctionData( - functionFragment: "ROOT4146650865", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "get", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "getRoleAdmin", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "hasRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "lockRole", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "peek", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "renounceRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setRoleAdmin", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setSource", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "sources", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "updatePerSecondRate", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - - decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "LOCK8605463013", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "ROOT4146650865", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "get", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "peek", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "renounceRole", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "revokeRoles", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "setSource", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sources", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "updatePerSecondRate", - data: BytesLike - ): Result; - - events: { - "PerSecondRateUpdated(bytes6,bytes6,uint256)": EventFragment; - "RoleAdminChanged(bytes4,bytes4)": EventFragment; - "RoleGranted(bytes4,address,address)": EventFragment; - "RoleRevoked(bytes4,address,address)": EventFragment; - "SourceSet(bytes6,bytes6,uint256,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "PerSecondRateUpdated"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SourceSet"): EventFragment; -} - -export interface PerSecondRateUpdatedEventObject { - baseId: string; - kind: string; - perSecondRate: BigNumber; -} -export type PerSecondRateUpdatedEvent = TypedEvent< - [string, string, BigNumber], - PerSecondRateUpdatedEventObject ->; - -export type PerSecondRateUpdatedEventFilter = - TypedEventFilter; - -export interface RoleAdminChangedEventObject { - role: string; - newAdminRole: string; -} -export type RoleAdminChangedEvent = TypedEvent< - [string, string], - RoleAdminChangedEventObject ->; - -export type RoleAdminChangedEventFilter = - TypedEventFilter; - -export interface RoleGrantedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleGrantedEvent = TypedEvent< - [string, string, string], - RoleGrantedEventObject ->; - -export type RoleGrantedEventFilter = TypedEventFilter; - -export interface RoleRevokedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleRevokedEvent = TypedEvent< - [string, string, string], - RoleRevokedEventObject ->; - -export type RoleRevokedEventFilter = TypedEventFilter; - -export interface SourceSetEventObject { - baseId: string; - kind: string; - startRate: BigNumber; - perSecondRate: BigNumber; -} -export type SourceSetEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - SourceSetEventObject ->; - -export type SourceSetEventFilter = TypedEventFilter; - -export interface AccumulatorOracle extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: AccumulatorOracleInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - LOCK(overrides?: CallOverrides): Promise<[string]>; - - LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; - - ROOT(overrides?: CallOverrides): Promise<[string]>; - - ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; - - get( - base: PromiseOrValue, - kind: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - peek( - base: PromiseOrValue, - kind: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { accumulated: BigNumber; updateTime: BigNumber } - >; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - baseId: PromiseOrValue, - kindId: PromiseOrValue, - startRate: PromiseOrValue, - perSecondRate: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - perSecondRate: BigNumber; - accumulated: BigNumber; - lastUpdated: BigNumber; - } - >; - - updatePerSecondRate( - baseId: PromiseOrValue, - kindId: PromiseOrValue, - perSecondRate: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - base: PromiseOrValue, - kind: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - peek( - base: PromiseOrValue, - kind: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { accumulated: BigNumber; updateTime: BigNumber } - >; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - baseId: PromiseOrValue, - kindId: PromiseOrValue, - startRate: PromiseOrValue, - perSecondRate: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - perSecondRate: BigNumber; - accumulated: BigNumber; - lastUpdated: BigNumber; - } - >; - - updatePerSecondRate( - baseId: PromiseOrValue, - kindId: PromiseOrValue, - perSecondRate: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - base: PromiseOrValue, - kind: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { accumulated: BigNumber; updateTime: BigNumber } - >; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - peek( - base: PromiseOrValue, - kind: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { accumulated: BigNumber; updateTime: BigNumber } - >; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setSource( - baseId: PromiseOrValue, - kindId: PromiseOrValue, - startRate: PromiseOrValue, - perSecondRate: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - perSecondRate: BigNumber; - accumulated: BigNumber; - lastUpdated: BigNumber; - } - >; - - updatePerSecondRate( - baseId: PromiseOrValue, - kindId: PromiseOrValue, - perSecondRate: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "PerSecondRateUpdated(bytes6,bytes6,uint256)"( - baseId?: PromiseOrValue | null, - kind?: PromiseOrValue | null, - perSecondRate?: null - ): PerSecondRateUpdatedEventFilter; - PerSecondRateUpdated( - baseId?: PromiseOrValue | null, - kind?: PromiseOrValue | null, - perSecondRate?: null - ): PerSecondRateUpdatedEventFilter; - - "RoleAdminChanged(bytes4,bytes4)"( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - RoleAdminChanged( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - - "RoleGranted(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - RoleGranted( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - - "RoleRevoked(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - RoleRevoked( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - - "SourceSet(bytes6,bytes6,uint256,uint256)"( - baseId?: PromiseOrValue | null, - kind?: PromiseOrValue | null, - startRate?: null, - perSecondRate?: null - ): SourceSetEventFilter; - SourceSet( - baseId?: PromiseOrValue | null, - kind?: PromiseOrValue | null, - startRate?: null, - perSecondRate?: null - ): SourceSetEventFilter; - }; - - estimateGas: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - base: PromiseOrValue, - kind: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - peek( - base: PromiseOrValue, - kind: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - baseId: PromiseOrValue, - kindId: PromiseOrValue, - startRate: PromiseOrValue, - perSecondRate: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - updatePerSecondRate( - baseId: PromiseOrValue, - kindId: PromiseOrValue, - perSecondRate: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - base: PromiseOrValue, - kind: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - peek( - base: PromiseOrValue, - kind: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - baseId: PromiseOrValue, - kindId: PromiseOrValue, - startRate: PromiseOrValue, - perSecondRate: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - updatePerSecondRate( - baseId: PromiseOrValue, - kindId: PromiseOrValue, - perSecondRate: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; -} diff --git a/src/contracts/Assert.ts b/src/contracts/Assert.ts deleted file mode 100644 index b2b00dc7c..000000000 --- a/src/contracts/Assert.ts +++ /dev/null @@ -1,1204 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "./common"; - -export interface AssertInterface extends utils.Interface { - functions: { - "assertEq(address,bytes,address,bytes)": FunctionFragment; - "assertEq(bytes,bytes)": FunctionFragment; - "assertEq(uint256,uint256)": FunctionFragment; - "assertEq(address,bytes,uint256)": FunctionFragment; - "assertEq(bool,bool)": FunctionFragment; - "assertEqAbs(address,bytes,address,bytes,uint256)": FunctionFragment; - "assertEqAbs(address,bytes,uint256,uint256)": FunctionFragment; - "assertEqAbs(uint256,uint256,uint256)": FunctionFragment; - "assertEqRel(address,bytes,uint256,uint256)": FunctionFragment; - "assertEqRel(uint256,uint256,uint256)": FunctionFragment; - "assertEqRel(address,bytes,address,bytes,uint256)": FunctionFragment; - "assertGe(address,bytes,address,bytes)": FunctionFragment; - "assertGe(uint256,uint256)": FunctionFragment; - "assertGe(address,bytes,uint256)": FunctionFragment; - "assertGt(address,bytes,address,bytes)": FunctionFragment; - "assertGt(address,bytes,uint256)": FunctionFragment; - "assertGt(uint256,uint256)": FunctionFragment; - "assertLe(address,bytes,uint256)": FunctionFragment; - "assertLe(uint256,uint256)": FunctionFragment; - "assertLe(address,bytes,address,bytes)": FunctionFragment; - "assertLt(address,bytes,uint256)": FunctionFragment; - "assertLt(uint256,uint256)": FunctionFragment; - "assertLt(address,bytes,address,bytes)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "assertEq(address,bytes,address,bytes)" - | "assertEq(bytes,bytes)" - | "assertEq(uint256,uint256)" - | "assertEq(address,bytes,uint256)" - | "assertEq(bool,bool)" - | "assertEqAbs(address,bytes,address,bytes,uint256)" - | "assertEqAbs(address,bytes,uint256,uint256)" - | "assertEqAbs(uint256,uint256,uint256)" - | "assertEqRel(address,bytes,uint256,uint256)" - | "assertEqRel(uint256,uint256,uint256)" - | "assertEqRel(address,bytes,address,bytes,uint256)" - | "assertGe(address,bytes,address,bytes)" - | "assertGe(uint256,uint256)" - | "assertGe(address,bytes,uint256)" - | "assertGt(address,bytes,address,bytes)" - | "assertGt(address,bytes,uint256)" - | "assertGt(uint256,uint256)" - | "assertLe(address,bytes,uint256)" - | "assertLe(uint256,uint256)" - | "assertLe(address,bytes,address,bytes)" - | "assertLt(address,bytes,uint256)" - | "assertLt(uint256,uint256)" - | "assertLt(address,bytes,address,bytes)" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "assertEq(address,bytes,address,bytes)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "assertEq(bytes,bytes)", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "assertEq(uint256,uint256)", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "assertEq(address,bytes,uint256)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "assertEq(bool,bool)", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "assertEqAbs(address,bytes,address,bytes,uint256)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "assertEqAbs(address,bytes,uint256,uint256)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "assertEqAbs(uint256,uint256,uint256)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "assertEqRel(address,bytes,uint256,uint256)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "assertEqRel(uint256,uint256,uint256)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "assertEqRel(address,bytes,address,bytes,uint256)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "assertGe(address,bytes,address,bytes)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "assertGe(uint256,uint256)", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "assertGe(address,bytes,uint256)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "assertGt(address,bytes,address,bytes)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "assertGt(address,bytes,uint256)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "assertGt(uint256,uint256)", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "assertLe(address,bytes,uint256)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "assertLe(uint256,uint256)", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "assertLe(address,bytes,address,bytes)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "assertLt(address,bytes,uint256)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "assertLt(uint256,uint256)", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "assertLt(address,bytes,address,bytes)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - - decodeFunctionResult( - functionFragment: "assertEq(address,bytes,address,bytes)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "assertEq(bytes,bytes)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "assertEq(uint256,uint256)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "assertEq(address,bytes,uint256)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "assertEq(bool,bool)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "assertEqAbs(address,bytes,address,bytes,uint256)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "assertEqAbs(address,bytes,uint256,uint256)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "assertEqAbs(uint256,uint256,uint256)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "assertEqRel(address,bytes,uint256,uint256)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "assertEqRel(uint256,uint256,uint256)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "assertEqRel(address,bytes,address,bytes,uint256)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "assertGe(address,bytes,address,bytes)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "assertGe(uint256,uint256)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "assertGe(address,bytes,uint256)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "assertGt(address,bytes,address,bytes)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "assertGt(address,bytes,uint256)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "assertGt(uint256,uint256)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "assertLe(address,bytes,uint256)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "assertLe(uint256,uint256)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "assertLe(address,bytes,address,bytes)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "assertLt(address,bytes,uint256)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "assertLt(uint256,uint256)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "assertLt(address,bytes,address,bytes)", - data: BytesLike - ): Result; - - events: {}; -} - -export interface Assert extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: AssertInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - "assertEq(address,bytes,address,bytes)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertEq(bytes,bytes)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[void]>; - - "assertEq(uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[void]>; - - "assertEq(address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertEq(bool,bool)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[void]>; - - "assertEqAbs(address,bytes,address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - abs: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertEqAbs(address,bytes,uint256,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - abs: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertEqAbs(uint256,uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - abs: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[void]>; - - "assertEqRel(address,bytes,uint256,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - rel: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertEqRel(uint256,uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - rel: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[void]>; - - "assertEqRel(address,bytes,address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - rel: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertGe(address,bytes,address,bytes)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertGe(uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[void]>; - - "assertGe(address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertGt(address,bytes,address,bytes)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertGt(address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertGt(uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[void]>; - - "assertLe(address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertLe(uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[void]>; - - "assertLe(address,bytes,address,bytes)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertLt(address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertLt(uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[void]>; - - "assertLt(address,bytes,address,bytes)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - "assertEq(address,bytes,address,bytes)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertEq(bytes,bytes)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertEq(uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertEq(address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertEq(bool,bool)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertEqAbs(address,bytes,address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - abs: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertEqAbs(address,bytes,uint256,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - abs: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertEqAbs(uint256,uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - abs: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertEqRel(address,bytes,uint256,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - rel: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertEqRel(uint256,uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - rel: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertEqRel(address,bytes,address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - rel: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertGe(address,bytes,address,bytes)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertGe(uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertGe(address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertGt(address,bytes,address,bytes)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertGt(address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertGt(uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertLe(address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertLe(uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertLe(address,bytes,address,bytes)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertLt(address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertLt(uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertLt(address,bytes,address,bytes)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - "assertEq(address,bytes,address,bytes)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertEq(bytes,bytes)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertEq(uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertEq(address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertEq(bool,bool)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertEqAbs(address,bytes,address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - abs: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertEqAbs(address,bytes,uint256,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - abs: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertEqAbs(uint256,uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - abs: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertEqRel(address,bytes,uint256,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - rel: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertEqRel(uint256,uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - rel: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertEqRel(address,bytes,address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - rel: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertGe(address,bytes,address,bytes)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertGe(uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertGe(address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertGt(address,bytes,address,bytes)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertGt(address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertGt(uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertLe(address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertLe(uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertLe(address,bytes,address,bytes)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertLt(address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertLt(uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertLt(address,bytes,address,bytes)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - "assertEq(address,bytes,address,bytes)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertEq(bytes,bytes)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertEq(uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertEq(address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertEq(bool,bool)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertEqAbs(address,bytes,address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - abs: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertEqAbs(address,bytes,uint256,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - abs: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertEqAbs(uint256,uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - abs: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertEqRel(address,bytes,uint256,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - rel: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertEqRel(uint256,uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - rel: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertEqRel(address,bytes,address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - rel: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertGe(address,bytes,address,bytes)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertGe(uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertGe(address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertGt(address,bytes,address,bytes)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertGt(address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertGt(uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertLe(address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertLe(uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertLe(address,bytes,address,bytes)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertLt(address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertLt(uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertLt(address,bytes,address,bytes)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - "assertEq(address,bytes,address,bytes)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertEq(bytes,bytes)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertEq(uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertEq(address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertEq(bool,bool)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertEqAbs(address,bytes,address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - abs: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertEqAbs(address,bytes,uint256,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - abs: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertEqAbs(uint256,uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - abs: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertEqRel(address,bytes,uint256,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - rel: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertEqRel(uint256,uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - rel: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertEqRel(address,bytes,address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - rel: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertGe(address,bytes,address,bytes)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertGe(uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertGe(address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertGt(address,bytes,address,bytes)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertGt(address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertGt(uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertLe(address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertLe(uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertLe(address,bytes,address,bytes)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertLt(address,bytes,uint256)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expected: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "assertLt(uint256,uint256)"( - actual: PromiseOrValue, - expected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "assertLt(address,bytes,address,bytes)"( - actualTarget: PromiseOrValue, - actualCalldata: PromiseOrValue, - expectedTarget: PromiseOrValue, - expectedCalldata: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; -} diff --git a/src/contracts/Cauldron.ts b/src/contracts/Cauldron.ts deleted file mode 100644 index dd5103e53..000000000 --- a/src/contracts/Cauldron.ts +++ /dev/null @@ -1,2104 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "./common"; - -export declare namespace DataTypes { - export type VaultStruct = { - owner: PromiseOrValue; - seriesId: PromiseOrValue; - ilkId: PromiseOrValue; - }; - - export type VaultStructOutput = [string, string, string] & { - owner: string; - seriesId: string; - ilkId: string; - }; - - export type BalancesStruct = { - art: PromiseOrValue; - ink: PromiseOrValue; - }; - - export type BalancesStructOutput = [BigNumber, BigNumber] & { - art: BigNumber; - ink: BigNumber; - }; -} - -export interface CauldronInterface extends utils.Interface { - functions: { - "LOCK()": FunctionFragment; - "LOCK8605463013()": FunctionFragment; - "ROOT()": FunctionFragment; - "ROOT4146650865()": FunctionFragment; - "accrual(bytes6)": FunctionFragment; - "addAsset(bytes6,address)": FunctionFragment; - "addIlks(bytes6,bytes6[])": FunctionFragment; - "addSeries(bytes6,bytes6,address)": FunctionFragment; - "assets(bytes6)": FunctionFragment; - "balances(bytes12)": FunctionFragment; - "build(address,bytes12,bytes6,bytes6)": FunctionFragment; - "debt(bytes6,bytes6)": FunctionFragment; - "debtFromBase(bytes6,uint128)": FunctionFragment; - "debtToBase(bytes6,uint128)": FunctionFragment; - "destroy(bytes12)": FunctionFragment; - "getRoleAdmin(bytes4)": FunctionFragment; - "give(bytes12,address)": FunctionFragment; - "grantRole(bytes4,address)": FunctionFragment; - "grantRoles(bytes4[],address)": FunctionFragment; - "hasRole(bytes4,address)": FunctionFragment; - "ilks(bytes6,bytes6)": FunctionFragment; - "lendingOracles(bytes6)": FunctionFragment; - "level(bytes12)": FunctionFragment; - "lockRole(bytes4)": FunctionFragment; - "mature(bytes6)": FunctionFragment; - "pour(bytes12,int128,int128)": FunctionFragment; - "ratesAtMaturity(bytes6)": FunctionFragment; - "renounceRole(bytes4,address)": FunctionFragment; - "revokeRole(bytes4,address)": FunctionFragment; - "revokeRoles(bytes4[],address)": FunctionFragment; - "roll(bytes12,bytes6,int128)": FunctionFragment; - "series(bytes6)": FunctionFragment; - "setDebtLimits(bytes6,bytes6,uint96,uint24,uint8)": FunctionFragment; - "setLendingOracle(bytes6,address)": FunctionFragment; - "setRoleAdmin(bytes4,bytes4)": FunctionFragment; - "setSpotOracle(bytes6,bytes6,address,uint32)": FunctionFragment; - "slurp(bytes12,uint128,uint128)": FunctionFragment; - "spotOracles(bytes6,bytes6)": FunctionFragment; - "stir(bytes12,bytes12,uint128,uint128)": FunctionFragment; - "tweak(bytes12,bytes6,bytes6)": FunctionFragment; - "vaults(bytes12)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "LOCK" - | "LOCK8605463013" - | "ROOT" - | "ROOT4146650865" - | "accrual" - | "addAsset" - | "addIlks" - | "addSeries" - | "assets" - | "balances" - | "build" - | "debt" - | "debtFromBase" - | "debtToBase" - | "destroy" - | "getRoleAdmin" - | "give" - | "grantRole" - | "grantRoles" - | "hasRole" - | "ilks" - | "lendingOracles" - | "level" - | "lockRole" - | "mature" - | "pour" - | "ratesAtMaturity" - | "renounceRole" - | "revokeRole" - | "revokeRoles" - | "roll" - | "series" - | "setDebtLimits" - | "setLendingOracle" - | "setRoleAdmin" - | "setSpotOracle" - | "slurp" - | "spotOracles" - | "stir" - | "tweak" - | "vaults" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; - encodeFunctionData( - functionFragment: "LOCK8605463013", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; - encodeFunctionData( - functionFragment: "ROOT4146650865", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "accrual", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "addAsset", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "addIlks", - values: [PromiseOrValue, PromiseOrValue[]] - ): string; - encodeFunctionData( - functionFragment: "addSeries", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "assets", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "balances", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "build", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "debt", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "debtFromBase", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "debtToBase", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "destroy", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "getRoleAdmin", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "give", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "hasRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "ilks", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "lendingOracles", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "level", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "lockRole", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "mature", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "pour", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "ratesAtMaturity", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "renounceRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "roll", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "series", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setDebtLimits", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "setLendingOracle", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setRoleAdmin", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setSpotOracle", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "slurp", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "spotOracles", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "stir", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "tweak", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "vaults", - values: [PromiseOrValue] - ): string; - - decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "LOCK8605463013", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "ROOT4146650865", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "accrual", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "addAsset", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "addIlks", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "addSeries", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "assets", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balances", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "build", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "debt", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "debtFromBase", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "debtToBase", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "destroy", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "give", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "ilks", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "lendingOracles", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "level", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "mature", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "pour", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "ratesAtMaturity", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "renounceRole", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "revokeRoles", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "roll", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "series", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "setDebtLimits", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setLendingOracle", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setSpotOracle", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "slurp", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "spotOracles", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "stir", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tweak", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "vaults", data: BytesLike): Result; - - events: { - "AssetAdded(bytes6,address)": EventFragment; - "DebtLimitsSet(bytes6,bytes6,uint96,uint24,uint8)": EventFragment; - "IlkAdded(bytes6,bytes6)": EventFragment; - "RateOracleAdded(bytes6,address)": EventFragment; - "RoleAdminChanged(bytes4,bytes4)": EventFragment; - "RoleGranted(bytes4,address,address)": EventFragment; - "RoleRevoked(bytes4,address,address)": EventFragment; - "SeriesAdded(bytes6,bytes6,address)": EventFragment; - "SeriesMatured(bytes6,uint256)": EventFragment; - "SpotOracleAdded(bytes6,bytes6,address,uint32)": EventFragment; - "VaultBuilt(bytes12,address,bytes6,bytes6)": EventFragment; - "VaultDestroyed(bytes12)": EventFragment; - "VaultGiven(bytes12,address)": EventFragment; - "VaultPoured(bytes12,bytes6,bytes6,int128,int128)": EventFragment; - "VaultRolled(bytes12,bytes6,uint128)": EventFragment; - "VaultStirred(bytes12,bytes12,uint128,uint128)": EventFragment; - "VaultTweaked(bytes12,bytes6,bytes6)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "AssetAdded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "DebtLimitsSet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "IlkAdded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RateOracleAdded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SeriesAdded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SeriesMatured"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SpotOracleAdded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "VaultBuilt"): EventFragment; - getEvent(nameOrSignatureOrTopic: "VaultDestroyed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "VaultGiven"): EventFragment; - getEvent(nameOrSignatureOrTopic: "VaultPoured"): EventFragment; - getEvent(nameOrSignatureOrTopic: "VaultRolled"): EventFragment; - getEvent(nameOrSignatureOrTopic: "VaultStirred"): EventFragment; - getEvent(nameOrSignatureOrTopic: "VaultTweaked"): EventFragment; -} - -export interface AssetAddedEventObject { - assetId: string; - asset: string; -} -export type AssetAddedEvent = TypedEvent< - [string, string], - AssetAddedEventObject ->; - -export type AssetAddedEventFilter = TypedEventFilter; - -export interface DebtLimitsSetEventObject { - baseId: string; - ilkId: string; - max: BigNumber; - min: number; - dec: number; -} -export type DebtLimitsSetEvent = TypedEvent< - [string, string, BigNumber, number, number], - DebtLimitsSetEventObject ->; - -export type DebtLimitsSetEventFilter = TypedEventFilter; - -export interface IlkAddedEventObject { - seriesId: string; - ilkId: string; -} -export type IlkAddedEvent = TypedEvent<[string, string], IlkAddedEventObject>; - -export type IlkAddedEventFilter = TypedEventFilter; - -export interface RateOracleAddedEventObject { - baseId: string; - oracle: string; -} -export type RateOracleAddedEvent = TypedEvent< - [string, string], - RateOracleAddedEventObject ->; - -export type RateOracleAddedEventFilter = TypedEventFilter; - -export interface RoleAdminChangedEventObject { - role: string; - newAdminRole: string; -} -export type RoleAdminChangedEvent = TypedEvent< - [string, string], - RoleAdminChangedEventObject ->; - -export type RoleAdminChangedEventFilter = - TypedEventFilter; - -export interface RoleGrantedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleGrantedEvent = TypedEvent< - [string, string, string], - RoleGrantedEventObject ->; - -export type RoleGrantedEventFilter = TypedEventFilter; - -export interface RoleRevokedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleRevokedEvent = TypedEvent< - [string, string, string], - RoleRevokedEventObject ->; - -export type RoleRevokedEventFilter = TypedEventFilter; - -export interface SeriesAddedEventObject { - seriesId: string; - baseId: string; - fyToken: string; -} -export type SeriesAddedEvent = TypedEvent< - [string, string, string], - SeriesAddedEventObject ->; - -export type SeriesAddedEventFilter = TypedEventFilter; - -export interface SeriesMaturedEventObject { - seriesId: string; - rateAtMaturity: BigNumber; -} -export type SeriesMaturedEvent = TypedEvent< - [string, BigNumber], - SeriesMaturedEventObject ->; - -export type SeriesMaturedEventFilter = TypedEventFilter; - -export interface SpotOracleAddedEventObject { - baseId: string; - ilkId: string; - oracle: string; - ratio: number; -} -export type SpotOracleAddedEvent = TypedEvent< - [string, string, string, number], - SpotOracleAddedEventObject ->; - -export type SpotOracleAddedEventFilter = TypedEventFilter; - -export interface VaultBuiltEventObject { - vaultId: string; - owner: string; - seriesId: string; - ilkId: string; -} -export type VaultBuiltEvent = TypedEvent< - [string, string, string, string], - VaultBuiltEventObject ->; - -export type VaultBuiltEventFilter = TypedEventFilter; - -export interface VaultDestroyedEventObject { - vaultId: string; -} -export type VaultDestroyedEvent = TypedEvent< - [string], - VaultDestroyedEventObject ->; - -export type VaultDestroyedEventFilter = TypedEventFilter; - -export interface VaultGivenEventObject { - vaultId: string; - receiver: string; -} -export type VaultGivenEvent = TypedEvent< - [string, string], - VaultGivenEventObject ->; - -export type VaultGivenEventFilter = TypedEventFilter; - -export interface VaultPouredEventObject { - vaultId: string; - seriesId: string; - ilkId: string; - ink: BigNumber; - art: BigNumber; -} -export type VaultPouredEvent = TypedEvent< - [string, string, string, BigNumber, BigNumber], - VaultPouredEventObject ->; - -export type VaultPouredEventFilter = TypedEventFilter; - -export interface VaultRolledEventObject { - vaultId: string; - seriesId: string; - art: BigNumber; -} -export type VaultRolledEvent = TypedEvent< - [string, string, BigNumber], - VaultRolledEventObject ->; - -export type VaultRolledEventFilter = TypedEventFilter; - -export interface VaultStirredEventObject { - from: string; - to: string; - ink: BigNumber; - art: BigNumber; -} -export type VaultStirredEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - VaultStirredEventObject ->; - -export type VaultStirredEventFilter = TypedEventFilter; - -export interface VaultTweakedEventObject { - vaultId: string; - seriesId: string; - ilkId: string; -} -export type VaultTweakedEvent = TypedEvent< - [string, string, string], - VaultTweakedEventObject ->; - -export type VaultTweakedEventFilter = TypedEventFilter; - -export interface Cauldron extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: CauldronInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - LOCK(overrides?: CallOverrides): Promise<[string]>; - - LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; - - ROOT(overrides?: CallOverrides): Promise<[string]>; - - ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; - - accrual( - seriesId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addAsset( - assetId: PromiseOrValue, - asset: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addIlks( - seriesId: PromiseOrValue, - ilkIds: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addSeries( - seriesId: PromiseOrValue, - baseId: PromiseOrValue, - fyToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - assets( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - balances( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber, BigNumber] & { art: BigNumber; ink: BigNumber }>; - - build( - owner: PromiseOrValue, - vaultId: PromiseOrValue, - seriesId: PromiseOrValue, - ilkId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - debt( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, number, number, BigNumber] & { - max: BigNumber; - min: number; - dec: number; - sum: BigNumber; - } - >; - - debtFromBase( - seriesId: PromiseOrValue, - base: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - debtToBase( - seriesId: PromiseOrValue, - art: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - destroy( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - give( - vaultId: PromiseOrValue, - receiver: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - ilks( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - lendingOracles( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - level( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - mature( - seriesId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - pour( - vaultId: PromiseOrValue, - ink: PromiseOrValue, - art: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - ratesAtMaturity( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - roll( - vaultId: PromiseOrValue, - newSeriesId: PromiseOrValue, - art: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - series( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [string, string, number] & { - fyToken: string; - baseId: string; - maturity: number; - } - >; - - setDebtLimits( - baseId: PromiseOrValue, - ilkId: PromiseOrValue, - max: PromiseOrValue, - min: PromiseOrValue, - dec: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLendingOracle( - baseId: PromiseOrValue, - oracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSpotOracle( - baseId: PromiseOrValue, - ilkId: PromiseOrValue, - oracle: PromiseOrValue, - ratio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - slurp( - vaultId: PromiseOrValue, - ink: PromiseOrValue, - art: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - spotOracles( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, number] & { oracle: string; ratio: number }>; - - stir( - from: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - art: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - tweak( - vaultId: PromiseOrValue, - seriesId: PromiseOrValue, - ilkId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - vaults( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [string, string, string] & { - owner: string; - seriesId: string; - ilkId: string; - } - >; - }; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - accrual( - seriesId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addAsset( - assetId: PromiseOrValue, - asset: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addIlks( - seriesId: PromiseOrValue, - ilkIds: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addSeries( - seriesId: PromiseOrValue, - baseId: PromiseOrValue, - fyToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - assets( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balances( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber, BigNumber] & { art: BigNumber; ink: BigNumber }>; - - build( - owner: PromiseOrValue, - vaultId: PromiseOrValue, - seriesId: PromiseOrValue, - ilkId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - debt( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, number, number, BigNumber] & { - max: BigNumber; - min: number; - dec: number; - sum: BigNumber; - } - >; - - debtFromBase( - seriesId: PromiseOrValue, - base: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - debtToBase( - seriesId: PromiseOrValue, - art: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - destroy( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - give( - vaultId: PromiseOrValue, - receiver: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ilks( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lendingOracles( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - level( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - mature( - seriesId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - pour( - vaultId: PromiseOrValue, - ink: PromiseOrValue, - art: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - ratesAtMaturity( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - roll( - vaultId: PromiseOrValue, - newSeriesId: PromiseOrValue, - art: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - series( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [string, string, number] & { - fyToken: string; - baseId: string; - maturity: number; - } - >; - - setDebtLimits( - baseId: PromiseOrValue, - ilkId: PromiseOrValue, - max: PromiseOrValue, - min: PromiseOrValue, - dec: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLendingOracle( - baseId: PromiseOrValue, - oracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSpotOracle( - baseId: PromiseOrValue, - ilkId: PromiseOrValue, - oracle: PromiseOrValue, - ratio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - slurp( - vaultId: PromiseOrValue, - ink: PromiseOrValue, - art: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - spotOracles( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, number] & { oracle: string; ratio: number }>; - - stir( - from: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - art: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - tweak( - vaultId: PromiseOrValue, - seriesId: PromiseOrValue, - ilkId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - vaults( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [string, string, string] & { - owner: string; - seriesId: string; - ilkId: string; - } - >; - - callStatic: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - accrual( - seriesId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - addAsset( - assetId: PromiseOrValue, - asset: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - addIlks( - seriesId: PromiseOrValue, - ilkIds: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - addSeries( - seriesId: PromiseOrValue, - baseId: PromiseOrValue, - fyToken: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - assets( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balances( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber, BigNumber] & { art: BigNumber; ink: BigNumber }>; - - build( - owner: PromiseOrValue, - vaultId: PromiseOrValue, - seriesId: PromiseOrValue, - ilkId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - debt( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, number, number, BigNumber] & { - max: BigNumber; - min: number; - dec: number; - sum: BigNumber; - } - >; - - debtFromBase( - seriesId: PromiseOrValue, - base: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - debtToBase( - seriesId: PromiseOrValue, - art: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - destroy( - vaultId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - give( - vaultId: PromiseOrValue, - receiver: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ilks( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lendingOracles( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - level( - vaultId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - mature( - seriesId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pour( - vaultId: PromiseOrValue, - ink: PromiseOrValue, - art: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ratesAtMaturity( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - roll( - vaultId: PromiseOrValue, - newSeriesId: PromiseOrValue, - art: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[DataTypes.VaultStructOutput, DataTypes.BalancesStructOutput]>; - - series( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [string, string, number] & { - fyToken: string; - baseId: string; - maturity: number; - } - >; - - setDebtLimits( - baseId: PromiseOrValue, - ilkId: PromiseOrValue, - max: PromiseOrValue, - min: PromiseOrValue, - dec: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setLendingOracle( - baseId: PromiseOrValue, - oracle: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setSpotOracle( - baseId: PromiseOrValue, - ilkId: PromiseOrValue, - oracle: PromiseOrValue, - ratio: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - slurp( - vaultId: PromiseOrValue, - ink: PromiseOrValue, - art: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - spotOracles( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, number] & { oracle: string; ratio: number }>; - - stir( - from: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - art: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [DataTypes.BalancesStructOutput, DataTypes.BalancesStructOutput] - >; - - tweak( - vaultId: PromiseOrValue, - seriesId: PromiseOrValue, - ilkId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - vaults( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [string, string, string] & { - owner: string; - seriesId: string; - ilkId: string; - } - >; - }; - - filters: { - "AssetAdded(bytes6,address)"( - assetId?: PromiseOrValue | null, - asset?: PromiseOrValue | null - ): AssetAddedEventFilter; - AssetAdded( - assetId?: PromiseOrValue | null, - asset?: PromiseOrValue | null - ): AssetAddedEventFilter; - - "DebtLimitsSet(bytes6,bytes6,uint96,uint24,uint8)"( - baseId?: PromiseOrValue | null, - ilkId?: PromiseOrValue | null, - max?: null, - min?: null, - dec?: null - ): DebtLimitsSetEventFilter; - DebtLimitsSet( - baseId?: PromiseOrValue | null, - ilkId?: PromiseOrValue | null, - max?: null, - min?: null, - dec?: null - ): DebtLimitsSetEventFilter; - - "IlkAdded(bytes6,bytes6)"( - seriesId?: PromiseOrValue | null, - ilkId?: PromiseOrValue | null - ): IlkAddedEventFilter; - IlkAdded( - seriesId?: PromiseOrValue | null, - ilkId?: PromiseOrValue | null - ): IlkAddedEventFilter; - - "RateOracleAdded(bytes6,address)"( - baseId?: PromiseOrValue | null, - oracle?: PromiseOrValue | null - ): RateOracleAddedEventFilter; - RateOracleAdded( - baseId?: PromiseOrValue | null, - oracle?: PromiseOrValue | null - ): RateOracleAddedEventFilter; - - "RoleAdminChanged(bytes4,bytes4)"( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - RoleAdminChanged( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - - "RoleGranted(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - RoleGranted( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - - "RoleRevoked(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - RoleRevoked( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - - "SeriesAdded(bytes6,bytes6,address)"( - seriesId?: PromiseOrValue | null, - baseId?: PromiseOrValue | null, - fyToken?: PromiseOrValue | null - ): SeriesAddedEventFilter; - SeriesAdded( - seriesId?: PromiseOrValue | null, - baseId?: PromiseOrValue | null, - fyToken?: PromiseOrValue | null - ): SeriesAddedEventFilter; - - "SeriesMatured(bytes6,uint256)"( - seriesId?: PromiseOrValue | null, - rateAtMaturity?: null - ): SeriesMaturedEventFilter; - SeriesMatured( - seriesId?: PromiseOrValue | null, - rateAtMaturity?: null - ): SeriesMaturedEventFilter; - - "SpotOracleAdded(bytes6,bytes6,address,uint32)"( - baseId?: PromiseOrValue | null, - ilkId?: PromiseOrValue | null, - oracle?: PromiseOrValue | null, - ratio?: null - ): SpotOracleAddedEventFilter; - SpotOracleAdded( - baseId?: PromiseOrValue | null, - ilkId?: PromiseOrValue | null, - oracle?: PromiseOrValue | null, - ratio?: null - ): SpotOracleAddedEventFilter; - - "VaultBuilt(bytes12,address,bytes6,bytes6)"( - vaultId?: PromiseOrValue | null, - owner?: PromiseOrValue | null, - seriesId?: PromiseOrValue | null, - ilkId?: null - ): VaultBuiltEventFilter; - VaultBuilt( - vaultId?: PromiseOrValue | null, - owner?: PromiseOrValue | null, - seriesId?: PromiseOrValue | null, - ilkId?: null - ): VaultBuiltEventFilter; - - "VaultDestroyed(bytes12)"( - vaultId?: PromiseOrValue | null - ): VaultDestroyedEventFilter; - VaultDestroyed( - vaultId?: PromiseOrValue | null - ): VaultDestroyedEventFilter; - - "VaultGiven(bytes12,address)"( - vaultId?: PromiseOrValue | null, - receiver?: PromiseOrValue | null - ): VaultGivenEventFilter; - VaultGiven( - vaultId?: PromiseOrValue | null, - receiver?: PromiseOrValue | null - ): VaultGivenEventFilter; - - "VaultPoured(bytes12,bytes6,bytes6,int128,int128)"( - vaultId?: PromiseOrValue | null, - seriesId?: PromiseOrValue | null, - ilkId?: PromiseOrValue | null, - ink?: null, - art?: null - ): VaultPouredEventFilter; - VaultPoured( - vaultId?: PromiseOrValue | null, - seriesId?: PromiseOrValue | null, - ilkId?: PromiseOrValue | null, - ink?: null, - art?: null - ): VaultPouredEventFilter; - - "VaultRolled(bytes12,bytes6,uint128)"( - vaultId?: PromiseOrValue | null, - seriesId?: PromiseOrValue | null, - art?: null - ): VaultRolledEventFilter; - VaultRolled( - vaultId?: PromiseOrValue | null, - seriesId?: PromiseOrValue | null, - art?: null - ): VaultRolledEventFilter; - - "VaultStirred(bytes12,bytes12,uint128,uint128)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - ink?: null, - art?: null - ): VaultStirredEventFilter; - VaultStirred( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - ink?: null, - art?: null - ): VaultStirredEventFilter; - - "VaultTweaked(bytes12,bytes6,bytes6)"( - vaultId?: PromiseOrValue | null, - seriesId?: PromiseOrValue | null, - ilkId?: PromiseOrValue | null - ): VaultTweakedEventFilter; - VaultTweaked( - vaultId?: PromiseOrValue | null, - seriesId?: PromiseOrValue | null, - ilkId?: PromiseOrValue | null - ): VaultTweakedEventFilter; - }; - - estimateGas: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - accrual( - seriesId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addAsset( - assetId: PromiseOrValue, - asset: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addIlks( - seriesId: PromiseOrValue, - ilkIds: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addSeries( - seriesId: PromiseOrValue, - baseId: PromiseOrValue, - fyToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - assets( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balances( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - build( - owner: PromiseOrValue, - vaultId: PromiseOrValue, - seriesId: PromiseOrValue, - ilkId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - debt( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - debtFromBase( - seriesId: PromiseOrValue, - base: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - debtToBase( - seriesId: PromiseOrValue, - art: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - destroy( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - give( - vaultId: PromiseOrValue, - receiver: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ilks( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lendingOracles( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - level( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - mature( - seriesId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - pour( - vaultId: PromiseOrValue, - ink: PromiseOrValue, - art: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - ratesAtMaturity( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - roll( - vaultId: PromiseOrValue, - newSeriesId: PromiseOrValue, - art: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - series( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setDebtLimits( - baseId: PromiseOrValue, - ilkId: PromiseOrValue, - max: PromiseOrValue, - min: PromiseOrValue, - dec: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLendingOracle( - baseId: PromiseOrValue, - oracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSpotOracle( - baseId: PromiseOrValue, - ilkId: PromiseOrValue, - oracle: PromiseOrValue, - ratio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - slurp( - vaultId: PromiseOrValue, - ink: PromiseOrValue, - art: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - spotOracles( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - stir( - from: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - art: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - tweak( - vaultId: PromiseOrValue, - seriesId: PromiseOrValue, - ilkId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - vaults( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - populateTransaction: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - accrual( - seriesId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addAsset( - assetId: PromiseOrValue, - asset: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addIlks( - seriesId: PromiseOrValue, - ilkIds: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addSeries( - seriesId: PromiseOrValue, - baseId: PromiseOrValue, - fyToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - assets( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balances( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - build( - owner: PromiseOrValue, - vaultId: PromiseOrValue, - seriesId: PromiseOrValue, - ilkId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - debt( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - debtFromBase( - seriesId: PromiseOrValue, - base: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - debtToBase( - seriesId: PromiseOrValue, - art: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - destroy( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - give( - vaultId: PromiseOrValue, - receiver: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ilks( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lendingOracles( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - level( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - mature( - seriesId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - pour( - vaultId: PromiseOrValue, - ink: PromiseOrValue, - art: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - ratesAtMaturity( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - roll( - vaultId: PromiseOrValue, - newSeriesId: PromiseOrValue, - art: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - series( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setDebtLimits( - baseId: PromiseOrValue, - ilkId: PromiseOrValue, - max: PromiseOrValue, - min: PromiseOrValue, - dec: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLendingOracle( - baseId: PromiseOrValue, - oracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSpotOracle( - baseId: PromiseOrValue, - ilkId: PromiseOrValue, - oracle: PromiseOrValue, - ratio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - slurp( - vaultId: PromiseOrValue, - ink: PromiseOrValue, - art: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - spotOracles( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - stir( - from: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - art: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - tweak( - vaultId: PromiseOrValue, - seriesId: PromiseOrValue, - ilkId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - vaults( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; -} diff --git a/src/contracts/ChainlinkMultiOracle.ts b/src/contracts/ChainlinkMultiOracle.ts deleted file mode 100644 index 4ab5c9363..000000000 --- a/src/contracts/ChainlinkMultiOracle.ts +++ /dev/null @@ -1,803 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "./common"; - -export interface ChainlinkMultiOracleInterface extends utils.Interface { - functions: { - "LOCK()": FunctionFragment; - "LOCK8605463013()": FunctionFragment; - "ROOT()": FunctionFragment; - "ROOT4146650865()": FunctionFragment; - "get(bytes32,bytes32,uint256)": FunctionFragment; - "getRoleAdmin(bytes4)": FunctionFragment; - "grantRole(bytes4,address)": FunctionFragment; - "grantRoles(bytes4[],address)": FunctionFragment; - "hasRole(bytes4,address)": FunctionFragment; - "lockRole(bytes4)": FunctionFragment; - "peek(bytes32,bytes32,uint256)": FunctionFragment; - "renounceRole(bytes4,address)": FunctionFragment; - "revokeRole(bytes4,address)": FunctionFragment; - "revokeRoles(bytes4[],address)": FunctionFragment; - "setRoleAdmin(bytes4,bytes4)": FunctionFragment; - "setSource(bytes6,address,bytes6,address,address)": FunctionFragment; - "sources(bytes6,bytes6)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "LOCK" - | "LOCK8605463013" - | "ROOT" - | "ROOT4146650865" - | "get" - | "getRoleAdmin" - | "grantRole" - | "grantRoles" - | "hasRole" - | "lockRole" - | "peek" - | "renounceRole" - | "revokeRole" - | "revokeRoles" - | "setRoleAdmin" - | "setSource" - | "sources" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; - encodeFunctionData( - functionFragment: "LOCK8605463013", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; - encodeFunctionData( - functionFragment: "ROOT4146650865", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "get", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "getRoleAdmin", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "hasRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "lockRole", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "peek", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "renounceRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setRoleAdmin", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setSource", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "sources", - values: [PromiseOrValue, PromiseOrValue] - ): string; - - decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "LOCK8605463013", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "ROOT4146650865", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "get", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "peek", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "renounceRole", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "revokeRoles", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "setSource", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sources", data: BytesLike): Result; - - events: { - "RoleAdminChanged(bytes4,bytes4)": EventFragment; - "RoleGranted(bytes4,address,address)": EventFragment; - "RoleRevoked(bytes4,address,address)": EventFragment; - "SourceSet(bytes6,address,bytes6,address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SourceSet"): EventFragment; -} - -export interface RoleAdminChangedEventObject { - role: string; - newAdminRole: string; -} -export type RoleAdminChangedEvent = TypedEvent< - [string, string], - RoleAdminChangedEventObject ->; - -export type RoleAdminChangedEventFilter = - TypedEventFilter; - -export interface RoleGrantedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleGrantedEvent = TypedEvent< - [string, string, string], - RoleGrantedEventObject ->; - -export type RoleGrantedEventFilter = TypedEventFilter; - -export interface RoleRevokedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleRevokedEvent = TypedEvent< - [string, string, string], - RoleRevokedEventObject ->; - -export type RoleRevokedEventFilter = TypedEventFilter; - -export interface SourceSetEventObject { - baseId: string; - base: string; - quoteId: string; - quote: string; - source: string; -} -export type SourceSetEvent = TypedEvent< - [string, string, string, string, string], - SourceSetEventObject ->; - -export type SourceSetEventFilter = TypedEventFilter; - -export interface ChainlinkMultiOracle extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ChainlinkMultiOracleInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - LOCK(overrides?: CallOverrides): Promise<[string]>; - - LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; - - ROOT(overrides?: CallOverrides): Promise<[string]>; - - ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; - - get( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - peek( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } - >; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - baseId: PromiseOrValue, - base: PromiseOrValue, - quoteId: PromiseOrValue, - quote: PromiseOrValue, - source: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [string, number, number, boolean] & { - source: string; - baseDecimals: number; - quoteDecimals: number; - inverse: boolean; - } - >; - }; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - peek( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } - >; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - baseId: PromiseOrValue, - base: PromiseOrValue, - quoteId: PromiseOrValue, - quote: PromiseOrValue, - source: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [string, number, number, boolean] & { - source: string; - baseDecimals: number; - quoteDecimals: number; - inverse: boolean; - } - >; - - callStatic: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } - >; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - peek( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } - >; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setSource( - baseId: PromiseOrValue, - base: PromiseOrValue, - quoteId: PromiseOrValue, - quote: PromiseOrValue, - source: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [string, number, number, boolean] & { - source: string; - baseDecimals: number; - quoteDecimals: number; - inverse: boolean; - } - >; - }; - - filters: { - "RoleAdminChanged(bytes4,bytes4)"( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - RoleAdminChanged( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - - "RoleGranted(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - RoleGranted( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - - "RoleRevoked(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - RoleRevoked( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - - "SourceSet(bytes6,address,bytes6,address,address)"( - baseId?: PromiseOrValue | null, - base?: null, - quoteId?: PromiseOrValue | null, - quote?: null, - source?: PromiseOrValue | null - ): SourceSetEventFilter; - SourceSet( - baseId?: PromiseOrValue | null, - base?: null, - quoteId?: PromiseOrValue | null, - quote?: null, - source?: PromiseOrValue | null - ): SourceSetEventFilter; - }; - - estimateGas: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - peek( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - baseId: PromiseOrValue, - base: PromiseOrValue, - quoteId: PromiseOrValue, - quote: PromiseOrValue, - source: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - populateTransaction: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - peek( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - baseId: PromiseOrValue, - base: PromiseOrValue, - quoteId: PromiseOrValue, - quote: PromiseOrValue, - source: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; -} diff --git a/src/contracts/ChainlinkUSDOracle.ts b/src/contracts/ChainlinkUSDOracle.ts deleted file mode 100644 index d177b34ff..000000000 --- a/src/contracts/ChainlinkUSDOracle.ts +++ /dev/null @@ -1,759 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "./common"; - -export interface ChainlinkUSDOracleInterface extends utils.Interface { - functions: { - "LOCK()": FunctionFragment; - "LOCK8605463013()": FunctionFragment; - "ROOT()": FunctionFragment; - "ROOT4146650865()": FunctionFragment; - "get(bytes32,bytes32,uint256)": FunctionFragment; - "getRoleAdmin(bytes4)": FunctionFragment; - "grantRole(bytes4,address)": FunctionFragment; - "grantRoles(bytes4[],address)": FunctionFragment; - "hasRole(bytes4,address)": FunctionFragment; - "lockRole(bytes4)": FunctionFragment; - "peek(bytes32,bytes32,uint256)": FunctionFragment; - "renounceRole(bytes4,address)": FunctionFragment; - "revokeRole(bytes4,address)": FunctionFragment; - "revokeRoles(bytes4[],address)": FunctionFragment; - "setRoleAdmin(bytes4,bytes4)": FunctionFragment; - "setSource(bytes6,address,address)": FunctionFragment; - "sources(bytes6)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "LOCK" - | "LOCK8605463013" - | "ROOT" - | "ROOT4146650865" - | "get" - | "getRoleAdmin" - | "grantRole" - | "grantRoles" - | "hasRole" - | "lockRole" - | "peek" - | "renounceRole" - | "revokeRole" - | "revokeRoles" - | "setRoleAdmin" - | "setSource" - | "sources" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; - encodeFunctionData( - functionFragment: "LOCK8605463013", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; - encodeFunctionData( - functionFragment: "ROOT4146650865", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "get", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "getRoleAdmin", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "hasRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "lockRole", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "peek", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "renounceRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setRoleAdmin", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setSource", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "sources", - values: [PromiseOrValue] - ): string; - - decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "LOCK8605463013", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "ROOT4146650865", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "get", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "peek", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "renounceRole", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "revokeRoles", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "setSource", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sources", data: BytesLike): Result; - - events: { - "RoleAdminChanged(bytes4,bytes4)": EventFragment; - "RoleGranted(bytes4,address,address)": EventFragment; - "RoleRevoked(bytes4,address,address)": EventFragment; - "SourceSet(bytes6,address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SourceSet"): EventFragment; -} - -export interface RoleAdminChangedEventObject { - role: string; - newAdminRole: string; -} -export type RoleAdminChangedEvent = TypedEvent< - [string, string], - RoleAdminChangedEventObject ->; - -export type RoleAdminChangedEventFilter = - TypedEventFilter; - -export interface RoleGrantedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleGrantedEvent = TypedEvent< - [string, string, string], - RoleGrantedEventObject ->; - -export type RoleGrantedEventFilter = TypedEventFilter; - -export interface RoleRevokedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleRevokedEvent = TypedEvent< - [string, string, string], - RoleRevokedEventObject ->; - -export type RoleRevokedEventFilter = TypedEventFilter; - -export interface SourceSetEventObject { - baseId: string; - base: string; - source: string; -} -export type SourceSetEvent = TypedEvent< - [string, string, string], - SourceSetEventObject ->; - -export type SourceSetEventFilter = TypedEventFilter; - -export interface ChainlinkUSDOracle extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ChainlinkUSDOracleInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - LOCK(overrides?: CallOverrides): Promise<[string]>; - - LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; - - ROOT(overrides?: CallOverrides): Promise<[string]>; - - ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; - - get( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - peek( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } - >; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - baseId: PromiseOrValue, - base: PromiseOrValue, - source: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, number] & { source: string; baseDecimals: number }>; - }; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - peek( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } - >; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - baseId: PromiseOrValue, - base: PromiseOrValue, - source: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, number] & { source: string; baseDecimals: number }>; - - callStatic: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } - >; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - peek( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } - >; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setSource( - baseId: PromiseOrValue, - base: PromiseOrValue, - source: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sources( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, number] & { source: string; baseDecimals: number }>; - }; - - filters: { - "RoleAdminChanged(bytes4,bytes4)"( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - RoleAdminChanged( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - - "RoleGranted(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - RoleGranted( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - - "RoleRevoked(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - RoleRevoked( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - - "SourceSet(bytes6,address,address)"( - baseId?: PromiseOrValue | null, - base?: null, - source?: PromiseOrValue | null - ): SourceSetEventFilter; - SourceSet( - baseId?: PromiseOrValue | null, - base?: null, - source?: PromiseOrValue | null - ): SourceSetEventFilter; - }; - - estimateGas: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - peek( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - baseId: PromiseOrValue, - base: PromiseOrValue, - source: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - populateTransaction: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - peek( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - baseId: PromiseOrValue, - base: PromiseOrValue, - source: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; -} diff --git a/src/contracts/CompositeMultiOracle.ts b/src/contracts/CompositeMultiOracle.ts deleted file mode 100644 index 9647d1983..000000000 --- a/src/contracts/CompositeMultiOracle.ts +++ /dev/null @@ -1,881 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "./common"; - -export interface CompositeMultiOracleInterface extends utils.Interface { - functions: { - "LOCK()": FunctionFragment; - "LOCK8605463013()": FunctionFragment; - "ROOT()": FunctionFragment; - "ROOT4146650865()": FunctionFragment; - "get(bytes32,bytes32,uint256)": FunctionFragment; - "getRoleAdmin(bytes4)": FunctionFragment; - "grantRole(bytes4,address)": FunctionFragment; - "grantRoles(bytes4[],address)": FunctionFragment; - "hasRole(bytes4,address)": FunctionFragment; - "lockRole(bytes4)": FunctionFragment; - "paths(bytes6,bytes6,uint256)": FunctionFragment; - "peek(bytes32,bytes32,uint256)": FunctionFragment; - "renounceRole(bytes4,address)": FunctionFragment; - "revokeRole(bytes4,address)": FunctionFragment; - "revokeRoles(bytes4[],address)": FunctionFragment; - "setPath(bytes6,bytes6,bytes6[])": FunctionFragment; - "setRoleAdmin(bytes4,bytes4)": FunctionFragment; - "setSource(bytes6,bytes6,address)": FunctionFragment; - "sources(bytes6,bytes6)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "LOCK" - | "LOCK8605463013" - | "ROOT" - | "ROOT4146650865" - | "get" - | "getRoleAdmin" - | "grantRole" - | "grantRoles" - | "hasRole" - | "lockRole" - | "paths" - | "peek" - | "renounceRole" - | "revokeRole" - | "revokeRoles" - | "setPath" - | "setRoleAdmin" - | "setSource" - | "sources" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; - encodeFunctionData( - functionFragment: "LOCK8605463013", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; - encodeFunctionData( - functionFragment: "ROOT4146650865", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "get", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "getRoleAdmin", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "hasRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "lockRole", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "paths", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "peek", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "renounceRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setPath", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue[] - ] - ): string; - encodeFunctionData( - functionFragment: "setRoleAdmin", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setSource", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "sources", - values: [PromiseOrValue, PromiseOrValue] - ): string; - - decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "LOCK8605463013", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "ROOT4146650865", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "get", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "paths", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "peek", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "renounceRole", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "revokeRoles", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "setPath", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "setRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "setSource", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sources", data: BytesLike): Result; - - events: { - "PathSet(bytes6,bytes6,bytes6[])": EventFragment; - "RoleAdminChanged(bytes4,bytes4)": EventFragment; - "RoleGranted(bytes4,address,address)": EventFragment; - "RoleRevoked(bytes4,address,address)": EventFragment; - "SourceSet(bytes6,bytes6,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "PathSet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SourceSet"): EventFragment; -} - -export interface PathSetEventObject { - baseId: string; - quoteId: string; - path: string[]; -} -export type PathSetEvent = TypedEvent< - [string, string, string[]], - PathSetEventObject ->; - -export type PathSetEventFilter = TypedEventFilter; - -export interface RoleAdminChangedEventObject { - role: string; - newAdminRole: string; -} -export type RoleAdminChangedEvent = TypedEvent< - [string, string], - RoleAdminChangedEventObject ->; - -export type RoleAdminChangedEventFilter = - TypedEventFilter; - -export interface RoleGrantedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleGrantedEvent = TypedEvent< - [string, string, string], - RoleGrantedEventObject ->; - -export type RoleGrantedEventFilter = TypedEventFilter; - -export interface RoleRevokedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleRevokedEvent = TypedEvent< - [string, string, string], - RoleRevokedEventObject ->; - -export type RoleRevokedEventFilter = TypedEventFilter; - -export interface SourceSetEventObject { - baseId: string; - quoteId: string; - source: string; -} -export type SourceSetEvent = TypedEvent< - [string, string, string], - SourceSetEventObject ->; - -export type SourceSetEventFilter = TypedEventFilter; - -export interface CompositeMultiOracle extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: CompositeMultiOracleInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - LOCK(overrides?: CallOverrides): Promise<[string]>; - - LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; - - ROOT(overrides?: CallOverrides): Promise<[string]>; - - ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; - - get( - base: PromiseOrValue, - quote: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - paths( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - peek( - base: PromiseOrValue, - quote: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } - >; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setPath( - base: PromiseOrValue, - quote: PromiseOrValue, - path: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - source: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - }; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - base: PromiseOrValue, - quote: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - paths( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - peek( - base: PromiseOrValue, - quote: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } - >; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setPath( - base: PromiseOrValue, - quote: PromiseOrValue, - path: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - source: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - callStatic: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - base: PromiseOrValue, - quote: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } - >; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - paths( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - peek( - base: PromiseOrValue, - quote: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } - >; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setPath( - base: PromiseOrValue, - quote: PromiseOrValue, - path: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setSource( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - source: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "PathSet(bytes6,bytes6,bytes6[])"( - baseId?: PromiseOrValue | null, - quoteId?: PromiseOrValue | null, - path?: PromiseOrValue[] | null - ): PathSetEventFilter; - PathSet( - baseId?: PromiseOrValue | null, - quoteId?: PromiseOrValue | null, - path?: PromiseOrValue[] | null - ): PathSetEventFilter; - - "RoleAdminChanged(bytes4,bytes4)"( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - RoleAdminChanged( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - - "RoleGranted(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - RoleGranted( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - - "RoleRevoked(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - RoleRevoked( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - - "SourceSet(bytes6,bytes6,address)"( - baseId?: PromiseOrValue | null, - quoteId?: PromiseOrValue | null, - source?: PromiseOrValue | null - ): SourceSetEventFilter; - SourceSet( - baseId?: PromiseOrValue | null, - quoteId?: PromiseOrValue | null, - source?: PromiseOrValue | null - ): SourceSetEventFilter; - }; - - estimateGas: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - base: PromiseOrValue, - quote: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - paths( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - peek( - base: PromiseOrValue, - quote: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setPath( - base: PromiseOrValue, - quote: PromiseOrValue, - path: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - source: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - populateTransaction: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - base: PromiseOrValue, - quote: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - paths( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - peek( - base: PromiseOrValue, - quote: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setPath( - base: PromiseOrValue, - quote: PromiseOrValue, - path: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - source: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; -} diff --git a/src/contracts/CompoundMultiOracle.ts b/src/contracts/CompoundMultiOracle.ts deleted file mode 100644 index 2b4604469..000000000 --- a/src/contracts/CompoundMultiOracle.ts +++ /dev/null @@ -1,764 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "./common"; - -export interface CompoundMultiOracleInterface extends utils.Interface { - functions: { - "LOCK()": FunctionFragment; - "LOCK8605463013()": FunctionFragment; - "ROOT()": FunctionFragment; - "ROOT4146650865()": FunctionFragment; - "get(bytes32,bytes32,uint256)": FunctionFragment; - "getRoleAdmin(bytes4)": FunctionFragment; - "grantRole(bytes4,address)": FunctionFragment; - "grantRoles(bytes4[],address)": FunctionFragment; - "hasRole(bytes4,address)": FunctionFragment; - "lockRole(bytes4)": FunctionFragment; - "peek(bytes32,bytes32,uint256)": FunctionFragment; - "renounceRole(bytes4,address)": FunctionFragment; - "revokeRole(bytes4,address)": FunctionFragment; - "revokeRoles(bytes4[],address)": FunctionFragment; - "setRoleAdmin(bytes4,bytes4)": FunctionFragment; - "setSource(bytes6,bytes6,address)": FunctionFragment; - "sources(bytes6,bytes6)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "LOCK" - | "LOCK8605463013" - | "ROOT" - | "ROOT4146650865" - | "get" - | "getRoleAdmin" - | "grantRole" - | "grantRoles" - | "hasRole" - | "lockRole" - | "peek" - | "renounceRole" - | "revokeRole" - | "revokeRoles" - | "setRoleAdmin" - | "setSource" - | "sources" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; - encodeFunctionData( - functionFragment: "LOCK8605463013", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; - encodeFunctionData( - functionFragment: "ROOT4146650865", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "get", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "getRoleAdmin", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "hasRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "lockRole", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "peek", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "renounceRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setRoleAdmin", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setSource", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "sources", - values: [PromiseOrValue, PromiseOrValue] - ): string; - - decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "LOCK8605463013", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "ROOT4146650865", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "get", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "peek", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "renounceRole", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "revokeRoles", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "setSource", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sources", data: BytesLike): Result; - - events: { - "RoleAdminChanged(bytes4,bytes4)": EventFragment; - "RoleGranted(bytes4,address,address)": EventFragment; - "RoleRevoked(bytes4,address,address)": EventFragment; - "SourceSet(bytes6,bytes6,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SourceSet"): EventFragment; -} - -export interface RoleAdminChangedEventObject { - role: string; - newAdminRole: string; -} -export type RoleAdminChangedEvent = TypedEvent< - [string, string], - RoleAdminChangedEventObject ->; - -export type RoleAdminChangedEventFilter = - TypedEventFilter; - -export interface RoleGrantedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleGrantedEvent = TypedEvent< - [string, string, string], - RoleGrantedEventObject ->; - -export type RoleGrantedEventFilter = TypedEventFilter; - -export interface RoleRevokedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleRevokedEvent = TypedEvent< - [string, string, string], - RoleRevokedEventObject ->; - -export type RoleRevokedEventFilter = TypedEventFilter; - -export interface SourceSetEventObject { - baseId: string; - kind: string; - source: string; -} -export type SourceSetEvent = TypedEvent< - [string, string, string], - SourceSetEventObject ->; - -export type SourceSetEventFilter = TypedEventFilter; - -export interface CompoundMultiOracle extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: CompoundMultiOracleInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - LOCK(overrides?: CallOverrides): Promise<[string]>; - - LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; - - ROOT(overrides?: CallOverrides): Promise<[string]>; - - ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; - - get( - base: PromiseOrValue, - kind: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - peek( - base: PromiseOrValue, - kind: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { accumulator: BigNumber; updateTime: BigNumber } - >; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - base: PromiseOrValue, - kind: PromiseOrValue, - source: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - }; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - base: PromiseOrValue, - kind: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - peek( - base: PromiseOrValue, - kind: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { accumulator: BigNumber; updateTime: BigNumber } - >; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - base: PromiseOrValue, - kind: PromiseOrValue, - source: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - callStatic: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - base: PromiseOrValue, - kind: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { accumulator: BigNumber; updateTime: BigNumber } - >; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - peek( - base: PromiseOrValue, - kind: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { accumulator: BigNumber; updateTime: BigNumber } - >; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setSource( - base: PromiseOrValue, - kind: PromiseOrValue, - source: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "RoleAdminChanged(bytes4,bytes4)"( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - RoleAdminChanged( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - - "RoleGranted(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - RoleGranted( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - - "RoleRevoked(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - RoleRevoked( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - - "SourceSet(bytes6,bytes6,address)"( - baseId?: PromiseOrValue | null, - kind?: PromiseOrValue | null, - source?: PromiseOrValue | null - ): SourceSetEventFilter; - SourceSet( - baseId?: PromiseOrValue | null, - kind?: PromiseOrValue | null, - source?: PromiseOrValue | null - ): SourceSetEventFilter; - }; - - estimateGas: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - base: PromiseOrValue, - kind: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - peek( - base: PromiseOrValue, - kind: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - base: PromiseOrValue, - kind: PromiseOrValue, - source: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - populateTransaction: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - base: PromiseOrValue, - kind: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - peek( - base: PromiseOrValue, - kind: PromiseOrValue, - arg2: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - base: PromiseOrValue, - kind: PromiseOrValue, - source: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; -} diff --git a/src/contracts/ConvexJoin.ts b/src/contracts/ConvexJoin.ts deleted file mode 100644 index cf7bb4a82..000000000 --- a/src/contracts/ConvexJoin.ts +++ /dev/null @@ -1,1279 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "./common"; - -export declare namespace ConvexJoin { - export type EarnedDataStruct = { - token: PromiseOrValue; - amount: PromiseOrValue; - }; - - export type EarnedDataStructOutput = [string, BigNumber] & { - token: string; - amount: BigNumber; - }; -} - -export interface ConvexJoinInterface extends utils.Interface { - functions: { - "LOCK()": FunctionFragment; - "LOCK8605463013()": FunctionFragment; - "ROOT()": FunctionFragment; - "ROOT4146650865()": FunctionFragment; - "addRewards()": FunctionFragment; - "addVault(bytes12)": FunctionFragment; - "asset()": FunctionFragment; - "cauldron()": FunctionFragment; - "checkpoint(address)": FunctionFragment; - "convexPool()": FunctionFragment; - "convexPoolId()": FunctionFragment; - "convexToken()": FunctionFragment; - "crv()": FunctionFragment; - "cvx()": FunctionFragment; - "earned(address)": FunctionFragment; - "exit(address,uint128)": FunctionFragment; - "getReward(address)": FunctionFragment; - "getRoleAdmin(bytes4)": FunctionFragment; - "grantRole(bytes4,address)": FunctionFragment; - "grantRoles(bytes4[],address)": FunctionFragment; - "hasRole(bytes4,address)": FunctionFragment; - "join(address,uint128)": FunctionFragment; - "lockRole(bytes4)": FunctionFragment; - "managed_assets()": FunctionFragment; - "registeredRewards(address)": FunctionFragment; - "removeVault(bytes12,address)": FunctionFragment; - "renounceRole(bytes4,address)": FunctionFragment; - "retrieve(address,address)": FunctionFragment; - "revokeRole(bytes4,address)": FunctionFragment; - "revokeRoles(bytes4[],address)": FunctionFragment; - "rewards(uint256)": FunctionFragment; - "setApprovals()": FunctionFragment; - "setRoleAdmin(bytes4,bytes4)": FunctionFragment; - "storedBalance()": FunctionFragment; - "vaults(address,uint256)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "LOCK" - | "LOCK8605463013" - | "ROOT" - | "ROOT4146650865" - | "addRewards" - | "addVault" - | "asset" - | "cauldron" - | "checkpoint" - | "convexPool" - | "convexPoolId" - | "convexToken" - | "crv" - | "cvx" - | "earned" - | "exit" - | "getReward" - | "getRoleAdmin" - | "grantRole" - | "grantRoles" - | "hasRole" - | "join" - | "lockRole" - | "managed_assets" - | "registeredRewards" - | "removeVault" - | "renounceRole" - | "retrieve" - | "revokeRole" - | "revokeRoles" - | "rewards" - | "setApprovals" - | "setRoleAdmin" - | "storedBalance" - | "vaults" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; - encodeFunctionData( - functionFragment: "LOCK8605463013", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; - encodeFunctionData( - functionFragment: "ROOT4146650865", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "addRewards", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "addVault", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "asset", values?: undefined): string; - encodeFunctionData(functionFragment: "cauldron", values?: undefined): string; - encodeFunctionData( - functionFragment: "checkpoint", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "convexPool", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "convexPoolId", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "convexToken", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "crv", values?: undefined): string; - encodeFunctionData(functionFragment: "cvx", values?: undefined): string; - encodeFunctionData( - functionFragment: "earned", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "exit", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "getReward", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "getRoleAdmin", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "hasRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "join", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "lockRole", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "managed_assets", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "registeredRewards", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "removeVault", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "renounceRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "retrieve", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "rewards", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setApprovals", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "setRoleAdmin", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "storedBalance", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "vaults", - values: [PromiseOrValue, PromiseOrValue] - ): string; - - decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "LOCK8605463013", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "ROOT4146650865", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "addRewards", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "addVault", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "asset", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cauldron", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "checkpoint", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "convexPool", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "convexPoolId", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "convexToken", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "crv", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cvx", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "earned", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "exit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getReward", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "join", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "managed_assets", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "registeredRewards", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "removeVault", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "renounceRole", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "retrieve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "revokeRoles", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "rewards", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "setApprovals", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "storedBalance", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "vaults", data: BytesLike): Result; - - events: { - "Deposited(address,address,uint256,bool)": EventFragment; - "RoleAdminChanged(bytes4,bytes4)": EventFragment; - "RoleGranted(bytes4,address,address)": EventFragment; - "RoleRevoked(bytes4,address,address)": EventFragment; - "VaultAdded(address,bytes12)": EventFragment; - "VaultRemoved(address,bytes12)": EventFragment; - "Withdrawn(address,uint256,bool)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Deposited"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; - getEvent(nameOrSignatureOrTopic: "VaultAdded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "VaultRemoved"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Withdrawn"): EventFragment; -} - -export interface DepositedEventObject { - _user: string; - _account: string; - _amount: BigNumber; - _wrapped: boolean; -} -export type DepositedEvent = TypedEvent< - [string, string, BigNumber, boolean], - DepositedEventObject ->; - -export type DepositedEventFilter = TypedEventFilter; - -export interface RoleAdminChangedEventObject { - role: string; - newAdminRole: string; -} -export type RoleAdminChangedEvent = TypedEvent< - [string, string], - RoleAdminChangedEventObject ->; - -export type RoleAdminChangedEventFilter = - TypedEventFilter; - -export interface RoleGrantedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleGrantedEvent = TypedEvent< - [string, string, string], - RoleGrantedEventObject ->; - -export type RoleGrantedEventFilter = TypedEventFilter; - -export interface RoleRevokedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleRevokedEvent = TypedEvent< - [string, string, string], - RoleRevokedEventObject ->; - -export type RoleRevokedEventFilter = TypedEventFilter; - -export interface VaultAddedEventObject { - account: string; - vaultId: string; -} -export type VaultAddedEvent = TypedEvent< - [string, string], - VaultAddedEventObject ->; - -export type VaultAddedEventFilter = TypedEventFilter; - -export interface VaultRemovedEventObject { - account: string; - vaultId: string; -} -export type VaultRemovedEvent = TypedEvent< - [string, string], - VaultRemovedEventObject ->; - -export type VaultRemovedEventFilter = TypedEventFilter; - -export interface WithdrawnEventObject { - _user: string; - _amount: BigNumber; - _unwrapped: boolean; -} -export type WithdrawnEvent = TypedEvent< - [string, BigNumber, boolean], - WithdrawnEventObject ->; - -export type WithdrawnEventFilter = TypedEventFilter; - -export interface ConvexJoin extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ConvexJoinInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - LOCK(overrides?: CallOverrides): Promise<[string]>; - - LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; - - ROOT(overrides?: CallOverrides): Promise<[string]>; - - ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; - - addRewards( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addVault( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - asset(overrides?: CallOverrides): Promise<[string]>; - - cauldron(overrides?: CallOverrides): Promise<[string]>; - - checkpoint( - _account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - convexPool(overrides?: CallOverrides): Promise<[string]>; - - convexPoolId(overrides?: CallOverrides): Promise<[BigNumber]>; - - convexToken(overrides?: CallOverrides): Promise<[string]>; - - crv(overrides?: CallOverrides): Promise<[string]>; - - cvx(overrides?: CallOverrides): Promise<[string]>; - - earned( - _account: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [ConvexJoin.EarnedDataStructOutput[]] & { - claimable: ConvexJoin.EarnedDataStructOutput[]; - } - >; - - exit( - user: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getReward( - _account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - join( - user: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - managed_assets(overrides?: CallOverrides): Promise<[BigNumber]>; - - registeredRewards( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - removeVault( - vaultId: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - retrieve( - token: PromiseOrValue, - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - rewards( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [string, string, BigNumber, BigNumber] & { - reward_token: string; - reward_pool: string; - reward_integral: BigNumber; - reward_remaining: BigNumber; - } - >; - - setApprovals( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - storedBalance(overrides?: CallOverrides): Promise<[BigNumber]>; - - vaults( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - }; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - addRewards( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addVault( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - asset(overrides?: CallOverrides): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - checkpoint( - _account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - convexPool(overrides?: CallOverrides): Promise; - - convexPoolId(overrides?: CallOverrides): Promise; - - convexToken(overrides?: CallOverrides): Promise; - - crv(overrides?: CallOverrides): Promise; - - cvx(overrides?: CallOverrides): Promise; - - earned( - _account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - exit( - user: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getReward( - _account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - join( - user: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - managed_assets(overrides?: CallOverrides): Promise; - - registeredRewards( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - removeVault( - vaultId: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - retrieve( - token: PromiseOrValue, - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - rewards( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [string, string, BigNumber, BigNumber] & { - reward_token: string; - reward_pool: string; - reward_integral: BigNumber; - reward_remaining: BigNumber; - } - >; - - setApprovals( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - storedBalance(overrides?: CallOverrides): Promise; - - vaults( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - callStatic: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - addRewards(overrides?: CallOverrides): Promise; - - addVault( - vaultId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - asset(overrides?: CallOverrides): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - checkpoint( - _account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - convexPool(overrides?: CallOverrides): Promise; - - convexPoolId(overrides?: CallOverrides): Promise; - - convexToken(overrides?: CallOverrides): Promise; - - crv(overrides?: CallOverrides): Promise; - - cvx(overrides?: CallOverrides): Promise; - - earned( - _account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - exit( - user: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getReward( - _account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - join( - user: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - managed_assets(overrides?: CallOverrides): Promise; - - registeredRewards( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - removeVault( - vaultId: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - retrieve( - token: PromiseOrValue, - to: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - rewards( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [string, string, BigNumber, BigNumber] & { - reward_token: string; - reward_pool: string; - reward_integral: BigNumber; - reward_remaining: BigNumber; - } - >; - - setApprovals(overrides?: CallOverrides): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - storedBalance(overrides?: CallOverrides): Promise; - - vaults( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Deposited(address,address,uint256,bool)"( - _user?: PromiseOrValue | null, - _account?: PromiseOrValue | null, - _amount?: null, - _wrapped?: null - ): DepositedEventFilter; - Deposited( - _user?: PromiseOrValue | null, - _account?: PromiseOrValue | null, - _amount?: null, - _wrapped?: null - ): DepositedEventFilter; - - "RoleAdminChanged(bytes4,bytes4)"( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - RoleAdminChanged( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - - "RoleGranted(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - RoleGranted( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - - "RoleRevoked(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - RoleRevoked( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - - "VaultAdded(address,bytes12)"( - account?: PromiseOrValue | null, - vaultId?: PromiseOrValue | null - ): VaultAddedEventFilter; - VaultAdded( - account?: PromiseOrValue | null, - vaultId?: PromiseOrValue | null - ): VaultAddedEventFilter; - - "VaultRemoved(address,bytes12)"( - account?: PromiseOrValue | null, - vaultId?: PromiseOrValue | null - ): VaultRemovedEventFilter; - VaultRemoved( - account?: PromiseOrValue | null, - vaultId?: PromiseOrValue | null - ): VaultRemovedEventFilter; - - "Withdrawn(address,uint256,bool)"( - _user?: PromiseOrValue | null, - _amount?: null, - _unwrapped?: null - ): WithdrawnEventFilter; - Withdrawn( - _user?: PromiseOrValue | null, - _amount?: null, - _unwrapped?: null - ): WithdrawnEventFilter; - }; - - estimateGas: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - addRewards( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addVault( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - asset(overrides?: CallOverrides): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - checkpoint( - _account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - convexPool(overrides?: CallOverrides): Promise; - - convexPoolId(overrides?: CallOverrides): Promise; - - convexToken(overrides?: CallOverrides): Promise; - - crv(overrides?: CallOverrides): Promise; - - cvx(overrides?: CallOverrides): Promise; - - earned( - _account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - exit( - user: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getReward( - _account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - join( - user: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - managed_assets(overrides?: CallOverrides): Promise; - - registeredRewards( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - removeVault( - vaultId: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - retrieve( - token: PromiseOrValue, - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - rewards( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setApprovals( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - storedBalance(overrides?: CallOverrides): Promise; - - vaults( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - populateTransaction: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - addRewards( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addVault( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - asset(overrides?: CallOverrides): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - checkpoint( - _account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - convexPool(overrides?: CallOverrides): Promise; - - convexPoolId(overrides?: CallOverrides): Promise; - - convexToken(overrides?: CallOverrides): Promise; - - crv(overrides?: CallOverrides): Promise; - - cvx(overrides?: CallOverrides): Promise; - - earned( - _account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - exit( - user: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getReward( - _account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - join( - user: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - managed_assets(overrides?: CallOverrides): Promise; - - registeredRewards( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - removeVault( - vaultId: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - retrieve( - token: PromiseOrValue, - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - rewards( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setApprovals( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - storedBalance(overrides?: CallOverrides): Promise; - - vaults( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; -} diff --git a/src/contracts/ConvexLadleModule.ts b/src/contracts/ConvexLadleModule.ts deleted file mode 100644 index a046d678c..000000000 --- a/src/contracts/ConvexLadleModule.ts +++ /dev/null @@ -1,507 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "./common"; - -export interface ConvexLadleModuleInterface extends utils.Interface { - functions: { - "addVault(address,bytes12)": FunctionFragment; - "borrowingFee()": FunctionFragment; - "cauldron()": FunctionFragment; - "integrations(address)": FunctionFragment; - "joins(bytes6)": FunctionFragment; - "modules(address)": FunctionFragment; - "pools(bytes6)": FunctionFragment; - "removeVault(address,bytes12,address)": FunctionFragment; - "router()": FunctionFragment; - "tokens(address)": FunctionFragment; - "weth()": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "addVault" - | "borrowingFee" - | "cauldron" - | "integrations" - | "joins" - | "modules" - | "pools" - | "removeVault" - | "router" - | "tokens" - | "weth" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "addVault", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "borrowingFee", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "cauldron", values?: undefined): string; - encodeFunctionData( - functionFragment: "integrations", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "joins", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "modules", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "pools", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "removeVault", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData(functionFragment: "router", values?: undefined): string; - encodeFunctionData( - functionFragment: "tokens", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "weth", values?: undefined): string; - - decodeFunctionResult(functionFragment: "addVault", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "borrowingFee", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "cauldron", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "integrations", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "joins", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "modules", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "pools", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "removeVault", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tokens", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "weth", data: BytesLike): Result; - - events: { - "FeeSet(uint256)": EventFragment; - "IntegrationAdded(address,bool)": EventFragment; - "JoinAdded(bytes6,address)": EventFragment; - "ModuleAdded(address,bool)": EventFragment; - "PoolAdded(bytes6,address)": EventFragment; - "TokenAdded(address,bool)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "FeeSet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "IntegrationAdded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "JoinAdded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ModuleAdded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "PoolAdded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TokenAdded"): EventFragment; -} - -export interface FeeSetEventObject { - fee: BigNumber; -} -export type FeeSetEvent = TypedEvent<[BigNumber], FeeSetEventObject>; - -export type FeeSetEventFilter = TypedEventFilter; - -export interface IntegrationAddedEventObject { - integration: string; - set: boolean; -} -export type IntegrationAddedEvent = TypedEvent< - [string, boolean], - IntegrationAddedEventObject ->; - -export type IntegrationAddedEventFilter = - TypedEventFilter; - -export interface JoinAddedEventObject { - assetId: string; - join: string; -} -export type JoinAddedEvent = TypedEvent<[string, string], JoinAddedEventObject>; - -export type JoinAddedEventFilter = TypedEventFilter; - -export interface ModuleAddedEventObject { - module: string; - set: boolean; -} -export type ModuleAddedEvent = TypedEvent< - [string, boolean], - ModuleAddedEventObject ->; - -export type ModuleAddedEventFilter = TypedEventFilter; - -export interface PoolAddedEventObject { - seriesId: string; - pool: string; -} -export type PoolAddedEvent = TypedEvent<[string, string], PoolAddedEventObject>; - -export type PoolAddedEventFilter = TypedEventFilter; - -export interface TokenAddedEventObject { - token: string; - set: boolean; -} -export type TokenAddedEvent = TypedEvent< - [string, boolean], - TokenAddedEventObject ->; - -export type TokenAddedEventFilter = TypedEventFilter; - -export interface ConvexLadleModule extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ConvexLadleModuleInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - addVault( - convexJoin: PromiseOrValue, - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrowingFee(overrides?: CallOverrides): Promise<[BigNumber]>; - - cauldron(overrides?: CallOverrides): Promise<[string]>; - - integrations( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - joins( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - modules( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - removeVault( - convexJoin: PromiseOrValue, - vaultId: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - router(overrides?: CallOverrides): Promise<[string]>; - - tokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - weth(overrides?: CallOverrides): Promise<[string]>; - }; - - addVault( - convexJoin: PromiseOrValue, - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrowingFee(overrides?: CallOverrides): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - integrations( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - joins( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - modules( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - removeVault( - convexJoin: PromiseOrValue, - vaultId: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - router(overrides?: CallOverrides): Promise; - - tokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - weth(overrides?: CallOverrides): Promise; - - callStatic: { - addVault( - convexJoin: PromiseOrValue, - vaultId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - borrowingFee(overrides?: CallOverrides): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - integrations( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - joins( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - modules( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - removeVault( - convexJoin: PromiseOrValue, - vaultId: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - router(overrides?: CallOverrides): Promise; - - tokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - weth(overrides?: CallOverrides): Promise; - }; - - filters: { - "FeeSet(uint256)"(fee?: null): FeeSetEventFilter; - FeeSet(fee?: null): FeeSetEventFilter; - - "IntegrationAdded(address,bool)"( - integration?: PromiseOrValue | null, - set?: PromiseOrValue | null - ): IntegrationAddedEventFilter; - IntegrationAdded( - integration?: PromiseOrValue | null, - set?: PromiseOrValue | null - ): IntegrationAddedEventFilter; - - "JoinAdded(bytes6,address)"( - assetId?: PromiseOrValue | null, - join?: PromiseOrValue | null - ): JoinAddedEventFilter; - JoinAdded( - assetId?: PromiseOrValue | null, - join?: PromiseOrValue | null - ): JoinAddedEventFilter; - - "ModuleAdded(address,bool)"( - module?: PromiseOrValue | null, - set?: PromiseOrValue | null - ): ModuleAddedEventFilter; - ModuleAdded( - module?: PromiseOrValue | null, - set?: PromiseOrValue | null - ): ModuleAddedEventFilter; - - "PoolAdded(bytes6,address)"( - seriesId?: PromiseOrValue | null, - pool?: PromiseOrValue | null - ): PoolAddedEventFilter; - PoolAdded( - seriesId?: PromiseOrValue | null, - pool?: PromiseOrValue | null - ): PoolAddedEventFilter; - - "TokenAdded(address,bool)"( - token?: PromiseOrValue | null, - set?: PromiseOrValue | null - ): TokenAddedEventFilter; - TokenAdded( - token?: PromiseOrValue | null, - set?: PromiseOrValue | null - ): TokenAddedEventFilter; - }; - - estimateGas: { - addVault( - convexJoin: PromiseOrValue, - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrowingFee(overrides?: CallOverrides): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - integrations( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - joins( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - modules( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - removeVault( - convexJoin: PromiseOrValue, - vaultId: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - router(overrides?: CallOverrides): Promise; - - tokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - weth(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - addVault( - convexJoin: PromiseOrValue, - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrowingFee(overrides?: CallOverrides): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - integrations( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - joins( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - modules( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - removeVault( - convexJoin: PromiseOrValue, - vaultId: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - router(overrides?: CallOverrides): Promise; - - tokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - weth(overrides?: CallOverrides): Promise; - }; -} diff --git a/src/contracts/ERC1155.ts b/src/contracts/ERC1155.ts deleted file mode 100644 index c74194545..000000000 --- a/src/contracts/ERC1155.ts +++ /dev/null @@ -1,529 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "./common"; - -export interface ERC1155Interface extends utils.Interface { - functions: { - "balanceOf(address,uint256)": FunctionFragment; - "balanceOfBatch(address[],uint256[])": FunctionFragment; - "isApprovedForAll(address,address)": FunctionFragment; - "safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)": FunctionFragment; - "safeTransferFrom(address,address,uint256,uint256,bytes)": FunctionFragment; - "setApprovalForAll(address,bool)": FunctionFragment; - "supportsInterface(bytes4)": FunctionFragment; - "uri(uint256)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "balanceOf" - | "balanceOfBatch" - | "isApprovedForAll" - | "safeBatchTransferFrom" - | "safeTransferFrom" - | "setApprovalForAll" - | "supportsInterface" - | "uri" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "balanceOf", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "balanceOfBatch", - values: [PromiseOrValue[], PromiseOrValue[]] - ): string; - encodeFunctionData( - functionFragment: "isApprovedForAll", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "safeBatchTransferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue[], - PromiseOrValue[], - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "safeTransferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "setApprovalForAll", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "supportsInterface", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "uri", - values: [PromiseOrValue] - ): string; - - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "balanceOfBatch", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "isApprovedForAll", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "safeBatchTransferFrom", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "safeTransferFrom", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setApprovalForAll", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "supportsInterface", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "uri", data: BytesLike): Result; - - events: { - "ApprovalForAll(address,address,bool)": EventFragment; - "TransferBatch(address,address,address,uint256[],uint256[])": EventFragment; - "TransferSingle(address,address,address,uint256,uint256)": EventFragment; - "URI(string,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "ApprovalForAll"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferBatch"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferSingle"): EventFragment; - getEvent(nameOrSignatureOrTopic: "URI"): EventFragment; -} - -export interface ApprovalForAllEventObject { - owner: string; - operator: string; - approved: boolean; -} -export type ApprovalForAllEvent = TypedEvent< - [string, string, boolean], - ApprovalForAllEventObject ->; - -export type ApprovalForAllEventFilter = TypedEventFilter; - -export interface TransferBatchEventObject { - operator: string; - from: string; - to: string; - ids: BigNumber[]; - amounts: BigNumber[]; -} -export type TransferBatchEvent = TypedEvent< - [string, string, string, BigNumber[], BigNumber[]], - TransferBatchEventObject ->; - -export type TransferBatchEventFilter = TypedEventFilter; - -export interface TransferSingleEventObject { - operator: string; - from: string; - to: string; - id: BigNumber; - amount: BigNumber; -} -export type TransferSingleEvent = TypedEvent< - [string, string, string, BigNumber, BigNumber], - TransferSingleEventObject ->; - -export type TransferSingleEventFilter = TypedEventFilter; - -export interface URIEventObject { - value: string; - id: BigNumber; -} -export type URIEvent = TypedEvent<[string, BigNumber], URIEventObject>; - -export type URIEventFilter = TypedEventFilter; - -export interface ERC1155 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ERC1155Interface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - balanceOf( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - balanceOfBatch( - owners: PromiseOrValue[], - ids: PromiseOrValue[], - overrides?: CallOverrides - ): Promise<[BigNumber[]] & { balances: BigNumber[] }>; - - isApprovedForAll( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - safeBatchTransferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - ids: PromiseOrValue[], - amounts: PromiseOrValue[], - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - safeTransferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - id: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - uri( - id: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - }; - - balanceOf( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOfBatch( - owners: PromiseOrValue[], - ids: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - safeBatchTransferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - ids: PromiseOrValue[], - amounts: PromiseOrValue[], - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - safeTransferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - id: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - uri( - id: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - callStatic: { - balanceOf( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOfBatch( - owners: PromiseOrValue[], - ids: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - safeBatchTransferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - ids: PromiseOrValue[], - amounts: PromiseOrValue[], - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - safeTransferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - id: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - approved: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - uri( - id: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "ApprovalForAll(address,address,bool)"( - owner?: PromiseOrValue | null, - operator?: PromiseOrValue | null, - approved?: null - ): ApprovalForAllEventFilter; - ApprovalForAll( - owner?: PromiseOrValue | null, - operator?: PromiseOrValue | null, - approved?: null - ): ApprovalForAllEventFilter; - - "TransferBatch(address,address,address,uint256[],uint256[])"( - operator?: PromiseOrValue | null, - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - ids?: null, - amounts?: null - ): TransferBatchEventFilter; - TransferBatch( - operator?: PromiseOrValue | null, - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - ids?: null, - amounts?: null - ): TransferBatchEventFilter; - - "TransferSingle(address,address,address,uint256,uint256)"( - operator?: PromiseOrValue | null, - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - id?: null, - amount?: null - ): TransferSingleEventFilter; - TransferSingle( - operator?: PromiseOrValue | null, - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - id?: null, - amount?: null - ): TransferSingleEventFilter; - - "URI(string,uint256)"( - value?: null, - id?: PromiseOrValue | null - ): URIEventFilter; - URI(value?: null, id?: PromiseOrValue | null): URIEventFilter; - }; - - estimateGas: { - balanceOf( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOfBatch( - owners: PromiseOrValue[], - ids: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - safeBatchTransferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - ids: PromiseOrValue[], - amounts: PromiseOrValue[], - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - safeTransferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - id: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - uri( - id: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - populateTransaction: { - balanceOf( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOfBatch( - owners: PromiseOrValue[], - ids: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - safeBatchTransferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - ids: PromiseOrValue[], - amounts: PromiseOrValue[], - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - safeTransferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - id: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - uri( - id: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; -} diff --git a/src/contracts/ERC20.ts b/src/contracts/ERC20.ts deleted file mode 100644 index 33e576e15..000000000 --- a/src/contracts/ERC20.ts +++ /dev/null @@ -1,384 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "./common"; - -export interface ERC20Interface extends utils.Interface { - functions: { - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "decimals()": FunctionFragment; - "name()": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "allowance" - | "approve" - | "balanceOf" - | "decimals" - | "name" - | "symbol" - | "totalSupply" - | "transfer" - | "transferFrom" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "balanceOf", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData( - functionFragment: "totalSupply", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "totalSupply", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "transferFrom", - data: BytesLike - ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; -} - -export interface ApprovalEventObject { - owner: string; - spender: string; - value: BigNumber; -} -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; - -export type ApprovalEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - value: BigNumber; -} -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; - -export interface ERC20 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ERC20Interface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - guy: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - name(overrides?: CallOverrides): Promise<[string]>; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - src: PromiseOrValue, - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - guy: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - src: PromiseOrValue, - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - wad: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - guy: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - src: PromiseOrValue, - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - value?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - value?: null - ): ApprovalEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - value?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - value?: null - ): TransferEventFilter; - }; - - estimateGas: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - guy: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - src: PromiseOrValue, - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - guy: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - src: PromiseOrValue, - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; -} diff --git a/src/contracts/ERC20Permit.ts b/src/contracts/ERC20Permit.ts deleted file mode 100644 index 1a1560af1..000000000 --- a/src/contracts/ERC20Permit.ts +++ /dev/null @@ -1,560 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "./common"; - -export interface ERC20PermitInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "decimals()": FunctionFragment; - "deploymentChainId()": FunctionFragment; - "name()": FunctionFragment; - "nonces(address)": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "version()": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "DOMAIN_SEPARATOR" - | "PERMIT_TYPEHASH" - | "allowance" - | "approve" - | "balanceOf" - | "decimals" - | "deploymentChainId" - | "name" - | "nonces" - | "permit" - | "symbol" - | "totalSupply" - | "transfer" - | "transferFrom" - | "version" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "DOMAIN_SEPARATOR", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "PERMIT_TYPEHASH", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "balanceOf", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; - encodeFunctionData( - functionFragment: "deploymentChainId", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData( - functionFragment: "nonces", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "permit", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData( - functionFragment: "totalSupply", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData(functionFragment: "version", values?: undefined): string; - - decodeFunctionResult( - functionFragment: "DOMAIN_SEPARATOR", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "PERMIT_TYPEHASH", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "deploymentChainId", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "totalSupply", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "transferFrom", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; -} - -export interface ApprovalEventObject { - owner: string; - spender: string; - value: BigNumber; -} -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; - -export type ApprovalEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - value: BigNumber; -} -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; - -export interface ERC20Permit extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ERC20PermitInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - guy: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - deploymentChainId(overrides?: CallOverrides): Promise<[BigNumber]>; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - amount: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - src: PromiseOrValue, - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise<[string]>; - }; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - guy: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - deploymentChainId(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - amount: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - src: PromiseOrValue, - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - wad: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - guy: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - deploymentChainId(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - amount: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - src: PromiseOrValue, - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - value?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - value?: null - ): ApprovalEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - value?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - value?: null - ): TransferEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - guy: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - deploymentChainId(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - amount: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - src: PromiseOrValue, - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - guy: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - deploymentChainId(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - amount: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - src: PromiseOrValue, - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; - }; -} diff --git a/src/contracts/FYToken.ts b/src/contracts/FYToken.ts deleted file mode 100644 index 398fe1560..000000000 --- a/src/contracts/FYToken.ts +++ /dev/null @@ -1,1553 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "./common"; - -export interface FYTokenInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "LOCK()": FunctionFragment; - "LOCK8605463013()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "ROOT()": FunctionFragment; - "ROOT4146650865()": FunctionFragment; - "accrual()": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "burn(address,uint256)": FunctionFragment; - "chiAtMaturity()": FunctionFragment; - "decimals()": FunctionFragment; - "deploymentChainId()": FunctionFragment; - "flashFee(address,uint256)": FunctionFragment; - "flashLoan(address,address,uint256,bytes)": FunctionFragment; - "getRoleAdmin(bytes4)": FunctionFragment; - "grantRole(bytes4,address)": FunctionFragment; - "grantRoles(bytes4[],address)": FunctionFragment; - "hasRole(bytes4,address)": FunctionFragment; - "join()": FunctionFragment; - "lockRole(bytes4)": FunctionFragment; - "mature()": FunctionFragment; - "maturity()": FunctionFragment; - "maxFlashLoan(address)": FunctionFragment; - "mint(address,uint256)": FunctionFragment; - "mintWithUnderlying(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "nonces(address)": FunctionFragment; - "oracle()": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "point(bytes32,address)": FunctionFragment; - "redeem(address,uint256)": FunctionFragment; - "renounceRole(bytes4,address)": FunctionFragment; - "revokeRole(bytes4,address)": FunctionFragment; - "revokeRoles(bytes4[],address)": FunctionFragment; - "setRoleAdmin(bytes4,bytes4)": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "underlying()": FunctionFragment; - "underlyingId()": FunctionFragment; - "version()": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "DOMAIN_SEPARATOR" - | "LOCK" - | "LOCK8605463013" - | "PERMIT_TYPEHASH" - | "ROOT" - | "ROOT4146650865" - | "accrual" - | "allowance" - | "approve" - | "balanceOf" - | "burn" - | "chiAtMaturity" - | "decimals" - | "deploymentChainId" - | "flashFee" - | "flashLoan" - | "getRoleAdmin" - | "grantRole" - | "grantRoles" - | "hasRole" - | "join" - | "lockRole" - | "mature" - | "maturity" - | "maxFlashLoan" - | "mint" - | "mintWithUnderlying" - | "name" - | "nonces" - | "oracle" - | "permit" - | "point" - | "redeem" - | "renounceRole" - | "revokeRole" - | "revokeRoles" - | "setRoleAdmin" - | "symbol" - | "totalSupply" - | "transfer" - | "transferFrom" - | "underlying" - | "underlyingId" - | "version" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "DOMAIN_SEPARATOR", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; - encodeFunctionData( - functionFragment: "LOCK8605463013", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "PERMIT_TYPEHASH", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; - encodeFunctionData( - functionFragment: "ROOT4146650865", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "accrual", values?: undefined): string; - encodeFunctionData( - functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "balanceOf", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "burn", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "chiAtMaturity", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; - encodeFunctionData( - functionFragment: "deploymentChainId", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "flashFee", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "flashLoan", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "getRoleAdmin", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "hasRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "join", values?: undefined): string; - encodeFunctionData( - functionFragment: "lockRole", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "mature", values?: undefined): string; - encodeFunctionData(functionFragment: "maturity", values?: undefined): string; - encodeFunctionData( - functionFragment: "maxFlashLoan", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "mint", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "mintWithUnderlying", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData( - functionFragment: "nonces", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "oracle", values?: undefined): string; - encodeFunctionData( - functionFragment: "permit", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "point", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "redeem", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "renounceRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setRoleAdmin", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData( - functionFragment: "totalSupply", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "underlying", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "underlyingId", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "version", values?: undefined): string; - - decodeFunctionResult( - functionFragment: "DOMAIN_SEPARATOR", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "LOCK8605463013", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "PERMIT_TYPEHASH", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "ROOT4146650865", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "accrual", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "chiAtMaturity", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "deploymentChainId", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "flashFee", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "flashLoan", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "join", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "mature", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "maturity", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "maxFlashLoan", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "mintWithUnderlying", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "oracle", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "point", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "redeem", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "renounceRole", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "revokeRoles", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "totalSupply", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "transferFrom", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "underlying", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "underlyingId", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Point(bytes32,address)": EventFragment; - "Redeemed(address,address,uint256,uint256)": EventFragment; - "RoleAdminChanged(bytes4,bytes4)": EventFragment; - "RoleGranted(bytes4,address,address)": EventFragment; - "RoleRevoked(bytes4,address,address)": EventFragment; - "SeriesMatured(uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Point"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Redeemed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SeriesMatured"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; -} - -export interface ApprovalEventObject { - owner: string; - spender: string; - value: BigNumber; -} -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; - -export type ApprovalEventFilter = TypedEventFilter; - -export interface PointEventObject { - param: string; - value: string; -} -export type PointEvent = TypedEvent<[string, string], PointEventObject>; - -export type PointEventFilter = TypedEventFilter; - -export interface RedeemedEventObject { - from: string; - to: string; - amount: BigNumber; - redeemed: BigNumber; -} -export type RedeemedEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - RedeemedEventObject ->; - -export type RedeemedEventFilter = TypedEventFilter; - -export interface RoleAdminChangedEventObject { - role: string; - newAdminRole: string; -} -export type RoleAdminChangedEvent = TypedEvent< - [string, string], - RoleAdminChangedEventObject ->; - -export type RoleAdminChangedEventFilter = - TypedEventFilter; - -export interface RoleGrantedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleGrantedEvent = TypedEvent< - [string, string, string], - RoleGrantedEventObject ->; - -export type RoleGrantedEventFilter = TypedEventFilter; - -export interface RoleRevokedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleRevokedEvent = TypedEvent< - [string, string, string], - RoleRevokedEventObject ->; - -export type RoleRevokedEventFilter = TypedEventFilter; - -export interface SeriesMaturedEventObject { - chiAtMaturity: BigNumber; -} -export type SeriesMaturedEvent = TypedEvent< - [BigNumber], - SeriesMaturedEventObject ->; - -export type SeriesMaturedEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - value: BigNumber; -} -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; - -export interface FYToken extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: FYTokenInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - LOCK(overrides?: CallOverrides): Promise<[string]>; - - LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - ROOT(overrides?: CallOverrides): Promise<[string]>; - - ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; - - accrual( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - guy: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - burn( - from: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - chiAtMaturity(overrides?: CallOverrides): Promise<[BigNumber]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - deploymentChainId(overrides?: CallOverrides): Promise<[BigNumber]>; - - flashFee( - token: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - flashLoan( - receiver: PromiseOrValue, - token: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - join(overrides?: CallOverrides): Promise<[string]>; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - mature( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maturity(overrides?: CallOverrides): Promise<[BigNumber]>; - - maxFlashLoan( - token: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - mint( - to: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - mintWithUnderlying( - to: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - oracle(overrides?: CallOverrides): Promise<[string]>; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - amount: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - point( - param: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - to: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - src: PromiseOrValue, - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise<[string]>; - - underlyingId(overrides?: CallOverrides): Promise<[string]>; - - version(overrides?: CallOverrides): Promise<[string]>; - }; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - accrual( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - guy: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - burn( - from: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - chiAtMaturity(overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - deploymentChainId(overrides?: CallOverrides): Promise; - - flashFee( - token: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - flashLoan( - receiver: PromiseOrValue, - token: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - join(overrides?: CallOverrides): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - mature( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maturity(overrides?: CallOverrides): Promise; - - maxFlashLoan( - token: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - mint( - to: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - mintWithUnderlying( - to: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - oracle(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - amount: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - point( - param: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - to: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - src: PromiseOrValue, - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingId(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - accrual(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - wad: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - guy: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - burn( - from: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - chiAtMaturity(overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - deploymentChainId(overrides?: CallOverrides): Promise; - - flashFee( - token: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - flashLoan( - receiver: PromiseOrValue, - token: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - join(overrides?: CallOverrides): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - mature(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - maxFlashLoan( - token: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - mint( - to: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - mintWithUnderlying( - to: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - oracle(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - amount: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - point( - param: PromiseOrValue, - value: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - redeem( - to: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - src: PromiseOrValue, - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingId(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - value?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - value?: null - ): ApprovalEventFilter; - - "Point(bytes32,address)"( - param?: PromiseOrValue | null, - value?: null - ): PointEventFilter; - Point( - param?: PromiseOrValue | null, - value?: null - ): PointEventFilter; - - "Redeemed(address,address,uint256,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null, - redeemed?: null - ): RedeemedEventFilter; - Redeemed( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null, - redeemed?: null - ): RedeemedEventFilter; - - "RoleAdminChanged(bytes4,bytes4)"( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - RoleAdminChanged( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - - "RoleGranted(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - RoleGranted( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - - "RoleRevoked(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - RoleRevoked( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - - "SeriesMatured(uint256)"(chiAtMaturity?: null): SeriesMaturedEventFilter; - SeriesMatured(chiAtMaturity?: null): SeriesMaturedEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - value?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - value?: null - ): TransferEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - accrual( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - guy: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - burn( - from: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - chiAtMaturity(overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - deploymentChainId(overrides?: CallOverrides): Promise; - - flashFee( - token: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - flashLoan( - receiver: PromiseOrValue, - token: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - join(overrides?: CallOverrides): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - mature( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maturity(overrides?: CallOverrides): Promise; - - maxFlashLoan( - token: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - mint( - to: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - mintWithUnderlying( - to: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - oracle(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - amount: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - point( - param: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - to: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - src: PromiseOrValue, - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingId(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - accrual( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - guy: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - burn( - from: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - chiAtMaturity(overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - deploymentChainId(overrides?: CallOverrides): Promise; - - flashFee( - token: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - flashLoan( - receiver: PromiseOrValue, - token: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - join(overrides?: CallOverrides): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - mature( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maturity(overrides?: CallOverrides): Promise; - - maxFlashLoan( - token: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - mint( - to: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - mintWithUnderlying( - to: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - oracle(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - amount: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - point( - param: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - to: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - src: PromiseOrValue, - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingId(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - }; -} diff --git a/src/contracts/Join.ts b/src/contracts/Join.ts deleted file mode 100644 index ffa7bc3eb..000000000 --- a/src/contracts/Join.ts +++ /dev/null @@ -1,900 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "./common"; - -export interface JoinInterface extends utils.Interface { - functions: { - "LOCK()": FunctionFragment; - "LOCK8605463013()": FunctionFragment; - "ROOT()": FunctionFragment; - "ROOT4146650865()": FunctionFragment; - "asset()": FunctionFragment; - "exit(address,uint128)": FunctionFragment; - "flashFee(address,uint256)": FunctionFragment; - "flashFeeFactor()": FunctionFragment; - "flashLoan(address,address,uint256,bytes)": FunctionFragment; - "getRoleAdmin(bytes4)": FunctionFragment; - "grantRole(bytes4,address)": FunctionFragment; - "grantRoles(bytes4[],address)": FunctionFragment; - "hasRole(bytes4,address)": FunctionFragment; - "join(address,uint128)": FunctionFragment; - "lockRole(bytes4)": FunctionFragment; - "maxFlashLoan(address)": FunctionFragment; - "renounceRole(bytes4,address)": FunctionFragment; - "retrieve(address,address)": FunctionFragment; - "revokeRole(bytes4,address)": FunctionFragment; - "revokeRoles(bytes4[],address)": FunctionFragment; - "setFlashFeeFactor(uint256)": FunctionFragment; - "setRoleAdmin(bytes4,bytes4)": FunctionFragment; - "storedBalance()": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "LOCK" - | "LOCK8605463013" - | "ROOT" - | "ROOT4146650865" - | "asset" - | "exit" - | "flashFee" - | "flashFeeFactor" - | "flashLoan" - | "getRoleAdmin" - | "grantRole" - | "grantRoles" - | "hasRole" - | "join" - | "lockRole" - | "maxFlashLoan" - | "renounceRole" - | "retrieve" - | "revokeRole" - | "revokeRoles" - | "setFlashFeeFactor" - | "setRoleAdmin" - | "storedBalance" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; - encodeFunctionData( - functionFragment: "LOCK8605463013", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; - encodeFunctionData( - functionFragment: "ROOT4146650865", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "asset", values?: undefined): string; - encodeFunctionData( - functionFragment: "exit", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "flashFee", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "flashFeeFactor", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "flashLoan", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "getRoleAdmin", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "hasRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "join", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "lockRole", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "maxFlashLoan", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "renounceRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "retrieve", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setFlashFeeFactor", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setRoleAdmin", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "storedBalance", - values?: undefined - ): string; - - decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "LOCK8605463013", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "ROOT4146650865", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "asset", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "exit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "flashFee", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "flashFeeFactor", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "flashLoan", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "join", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "maxFlashLoan", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "renounceRole", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "retrieve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "revokeRoles", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setFlashFeeFactor", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "storedBalance", - data: BytesLike - ): Result; - - events: { - "FlashFeeFactorSet(uint256)": EventFragment; - "RoleAdminChanged(bytes4,bytes4)": EventFragment; - "RoleGranted(bytes4,address,address)": EventFragment; - "RoleRevoked(bytes4,address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "FlashFeeFactorSet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; -} - -export interface FlashFeeFactorSetEventObject { - fee: BigNumber; -} -export type FlashFeeFactorSetEvent = TypedEvent< - [BigNumber], - FlashFeeFactorSetEventObject ->; - -export type FlashFeeFactorSetEventFilter = - TypedEventFilter; - -export interface RoleAdminChangedEventObject { - role: string; - newAdminRole: string; -} -export type RoleAdminChangedEvent = TypedEvent< - [string, string], - RoleAdminChangedEventObject ->; - -export type RoleAdminChangedEventFilter = - TypedEventFilter; - -export interface RoleGrantedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleGrantedEvent = TypedEvent< - [string, string, string], - RoleGrantedEventObject ->; - -export type RoleGrantedEventFilter = TypedEventFilter; - -export interface RoleRevokedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleRevokedEvent = TypedEvent< - [string, string, string], - RoleRevokedEventObject ->; - -export type RoleRevokedEventFilter = TypedEventFilter; - -export interface Join extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: JoinInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - LOCK(overrides?: CallOverrides): Promise<[string]>; - - LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; - - ROOT(overrides?: CallOverrides): Promise<[string]>; - - ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; - - asset(overrides?: CallOverrides): Promise<[string]>; - - exit( - user: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - flashFee( - token: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - flashFeeFactor(overrides?: CallOverrides): Promise<[BigNumber]>; - - flashLoan( - receiver: PromiseOrValue, - token: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - join( - user: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxFlashLoan( - token: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - retrieve( - token: PromiseOrValue, - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFlashFeeFactor( - flashFeeFactor_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - storedBalance(overrides?: CallOverrides): Promise<[BigNumber]>; - }; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - asset(overrides?: CallOverrides): Promise; - - exit( - user: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - flashFee( - token: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - flashFeeFactor(overrides?: CallOverrides): Promise; - - flashLoan( - receiver: PromiseOrValue, - token: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - join( - user: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxFlashLoan( - token: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - retrieve( - token: PromiseOrValue, - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFlashFeeFactor( - flashFeeFactor_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - storedBalance(overrides?: CallOverrides): Promise; - - callStatic: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - asset(overrides?: CallOverrides): Promise; - - exit( - user: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - flashFee( - token: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - flashFeeFactor(overrides?: CallOverrides): Promise; - - flashLoan( - receiver: PromiseOrValue, - token: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - join( - user: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - maxFlashLoan( - token: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - retrieve( - token: PromiseOrValue, - to: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setFlashFeeFactor( - flashFeeFactor_: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - storedBalance(overrides?: CallOverrides): Promise; - }; - - filters: { - "FlashFeeFactorSet(uint256)"( - fee?: PromiseOrValue | null - ): FlashFeeFactorSetEventFilter; - FlashFeeFactorSet( - fee?: PromiseOrValue | null - ): FlashFeeFactorSetEventFilter; - - "RoleAdminChanged(bytes4,bytes4)"( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - RoleAdminChanged( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - - "RoleGranted(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - RoleGranted( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - - "RoleRevoked(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - RoleRevoked( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - }; - - estimateGas: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - asset(overrides?: CallOverrides): Promise; - - exit( - user: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - flashFee( - token: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - flashFeeFactor(overrides?: CallOverrides): Promise; - - flashLoan( - receiver: PromiseOrValue, - token: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - join( - user: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxFlashLoan( - token: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - retrieve( - token: PromiseOrValue, - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFlashFeeFactor( - flashFeeFactor_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - storedBalance(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - asset(overrides?: CallOverrides): Promise; - - exit( - user: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - flashFee( - token: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - flashFeeFactor(overrides?: CallOverrides): Promise; - - flashLoan( - receiver: PromiseOrValue, - token: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - join( - user: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxFlashLoan( - token: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - retrieve( - token: PromiseOrValue, - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFlashFeeFactor( - flashFeeFactor_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - storedBalance(overrides?: CallOverrides): Promise; - }; -} diff --git a/src/contracts/Join1155.ts b/src/contracts/Join1155.ts deleted file mode 100644 index 8392759ee..000000000 --- a/src/contracts/Join1155.ts +++ /dev/null @@ -1,983 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "./common"; - -export interface Join1155Interface extends utils.Interface { - functions: { - "FLASH_LOANS_DISABLED()": FunctionFragment; - "LOCK()": FunctionFragment; - "LOCK8605463013()": FunctionFragment; - "ROOT()": FunctionFragment; - "ROOT4146650865()": FunctionFragment; - "asset()": FunctionFragment; - "exit(address,uint128)": FunctionFragment; - "flashFeeFactor()": FunctionFragment; - "getRoleAdmin(bytes4)": FunctionFragment; - "grantRole(bytes4,address)": FunctionFragment; - "grantRoles(bytes4[],address)": FunctionFragment; - "hasRole(bytes4,address)": FunctionFragment; - "id()": FunctionFragment; - "join(address,uint128)": FunctionFragment; - "lockRole(bytes4)": FunctionFragment; - "onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)": FunctionFragment; - "onERC1155Received(address,address,uint256,uint256,bytes)": FunctionFragment; - "renounceRole(bytes4,address)": FunctionFragment; - "retrieve(address,address)": FunctionFragment; - "retrieveERC1155(address,uint256,address)": FunctionFragment; - "revokeRole(bytes4,address)": FunctionFragment; - "revokeRoles(bytes4[],address)": FunctionFragment; - "setRoleAdmin(bytes4,bytes4)": FunctionFragment; - "storedBalance()": FunctionFragment; - "supportsInterface(bytes4)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "FLASH_LOANS_DISABLED" - | "LOCK" - | "LOCK8605463013" - | "ROOT" - | "ROOT4146650865" - | "asset" - | "exit" - | "flashFeeFactor" - | "getRoleAdmin" - | "grantRole" - | "grantRoles" - | "hasRole" - | "id" - | "join" - | "lockRole" - | "onERC1155BatchReceived" - | "onERC1155Received" - | "renounceRole" - | "retrieve" - | "retrieveERC1155" - | "revokeRole" - | "revokeRoles" - | "setRoleAdmin" - | "storedBalance" - | "supportsInterface" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "FLASH_LOANS_DISABLED", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; - encodeFunctionData( - functionFragment: "LOCK8605463013", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; - encodeFunctionData( - functionFragment: "ROOT4146650865", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "asset", values?: undefined): string; - encodeFunctionData( - functionFragment: "exit", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "flashFeeFactor", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getRoleAdmin", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "hasRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "id", values?: undefined): string; - encodeFunctionData( - functionFragment: "join", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "lockRole", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "onERC1155BatchReceived", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue[], - PromiseOrValue[], - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "onERC1155Received", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "renounceRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "retrieve", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "retrieveERC1155", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "revokeRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setRoleAdmin", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "storedBalance", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "supportsInterface", - values: [PromiseOrValue] - ): string; - - decodeFunctionResult( - functionFragment: "FLASH_LOANS_DISABLED", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "LOCK8605463013", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "ROOT4146650865", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "asset", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "exit", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "flashFeeFactor", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "id", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "join", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "onERC1155BatchReceived", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "onERC1155Received", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "renounceRole", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "retrieve", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "retrieveERC1155", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "revokeRoles", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "storedBalance", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "supportsInterface", - data: BytesLike - ): Result; - - events: { - "FlashFeeFactorSet(uint256)": EventFragment; - "RoleAdminChanged(bytes4,bytes4)": EventFragment; - "RoleGranted(bytes4,address,address)": EventFragment; - "RoleRevoked(bytes4,address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "FlashFeeFactorSet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; -} - -export interface FlashFeeFactorSetEventObject { - fee: BigNumber; -} -export type FlashFeeFactorSetEvent = TypedEvent< - [BigNumber], - FlashFeeFactorSetEventObject ->; - -export type FlashFeeFactorSetEventFilter = - TypedEventFilter; - -export interface RoleAdminChangedEventObject { - role: string; - newAdminRole: string; -} -export type RoleAdminChangedEvent = TypedEvent< - [string, string], - RoleAdminChangedEventObject ->; - -export type RoleAdminChangedEventFilter = - TypedEventFilter; - -export interface RoleGrantedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleGrantedEvent = TypedEvent< - [string, string, string], - RoleGrantedEventObject ->; - -export type RoleGrantedEventFilter = TypedEventFilter; - -export interface RoleRevokedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleRevokedEvent = TypedEvent< - [string, string, string], - RoleRevokedEventObject ->; - -export type RoleRevokedEventFilter = TypedEventFilter; - -export interface Join1155 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: Join1155Interface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - FLASH_LOANS_DISABLED(overrides?: CallOverrides): Promise<[BigNumber]>; - - LOCK(overrides?: CallOverrides): Promise<[string]>; - - LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; - - ROOT(overrides?: CallOverrides): Promise<[string]>; - - ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; - - asset(overrides?: CallOverrides): Promise<[string]>; - - exit( - user: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - flashFeeFactor(overrides?: CallOverrides): Promise<[BigNumber]>; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - id(overrides?: CallOverrides): Promise<[BigNumber]>; - - join( - user: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - onERC1155BatchReceived( - _operator: PromiseOrValue, - _from: PromiseOrValue, - _ids: PromiseOrValue[], - _values: PromiseOrValue[], - _data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - onERC1155Received( - _operator: PromiseOrValue, - _from: PromiseOrValue, - _id: PromiseOrValue, - _value: PromiseOrValue, - _data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - retrieve( - token: PromiseOrValue, - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - retrieveERC1155( - token: PromiseOrValue, - id_: PromiseOrValue, - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - storedBalance(overrides?: CallOverrides): Promise<[BigNumber]>; - - supportsInterface( - interfaceID: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - }; - - FLASH_LOANS_DISABLED(overrides?: CallOverrides): Promise; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - asset(overrides?: CallOverrides): Promise; - - exit( - user: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - flashFeeFactor(overrides?: CallOverrides): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - id(overrides?: CallOverrides): Promise; - - join( - user: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - onERC1155BatchReceived( - _operator: PromiseOrValue, - _from: PromiseOrValue, - _ids: PromiseOrValue[], - _values: PromiseOrValue[], - _data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - onERC1155Received( - _operator: PromiseOrValue, - _from: PromiseOrValue, - _id: PromiseOrValue, - _value: PromiseOrValue, - _data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - retrieve( - token: PromiseOrValue, - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - retrieveERC1155( - token: PromiseOrValue, - id_: PromiseOrValue, - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - storedBalance(overrides?: CallOverrides): Promise; - - supportsInterface( - interfaceID: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - callStatic: { - FLASH_LOANS_DISABLED(overrides?: CallOverrides): Promise; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - asset(overrides?: CallOverrides): Promise; - - exit( - user: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - flashFeeFactor(overrides?: CallOverrides): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - id(overrides?: CallOverrides): Promise; - - join( - user: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - onERC1155BatchReceived( - _operator: PromiseOrValue, - _from: PromiseOrValue, - _ids: PromiseOrValue[], - _values: PromiseOrValue[], - _data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - onERC1155Received( - _operator: PromiseOrValue, - _from: PromiseOrValue, - _id: PromiseOrValue, - _value: PromiseOrValue, - _data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - retrieve( - token: PromiseOrValue, - to: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - retrieveERC1155( - token: PromiseOrValue, - id_: PromiseOrValue, - to: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - storedBalance(overrides?: CallOverrides): Promise; - - supportsInterface( - interfaceID: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "FlashFeeFactorSet(uint256)"( - fee?: PromiseOrValue | null - ): FlashFeeFactorSetEventFilter; - FlashFeeFactorSet( - fee?: PromiseOrValue | null - ): FlashFeeFactorSetEventFilter; - - "RoleAdminChanged(bytes4,bytes4)"( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - RoleAdminChanged( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - - "RoleGranted(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - RoleGranted( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - - "RoleRevoked(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - RoleRevoked( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - }; - - estimateGas: { - FLASH_LOANS_DISABLED(overrides?: CallOverrides): Promise; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - asset(overrides?: CallOverrides): Promise; - - exit( - user: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - flashFeeFactor(overrides?: CallOverrides): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - id(overrides?: CallOverrides): Promise; - - join( - user: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - onERC1155BatchReceived( - _operator: PromiseOrValue, - _from: PromiseOrValue, - _ids: PromiseOrValue[], - _values: PromiseOrValue[], - _data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - onERC1155Received( - _operator: PromiseOrValue, - _from: PromiseOrValue, - _id: PromiseOrValue, - _value: PromiseOrValue, - _data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - retrieve( - token: PromiseOrValue, - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - retrieveERC1155( - token: PromiseOrValue, - id_: PromiseOrValue, - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - storedBalance(overrides?: CallOverrides): Promise; - - supportsInterface( - interfaceID: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - populateTransaction: { - FLASH_LOANS_DISABLED( - overrides?: CallOverrides - ): Promise; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - asset(overrides?: CallOverrides): Promise; - - exit( - user: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - flashFeeFactor(overrides?: CallOverrides): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - id(overrides?: CallOverrides): Promise; - - join( - user: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - onERC1155BatchReceived( - _operator: PromiseOrValue, - _from: PromiseOrValue, - _ids: PromiseOrValue[], - _values: PromiseOrValue[], - _data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - onERC1155Received( - _operator: PromiseOrValue, - _from: PromiseOrValue, - _id: PromiseOrValue, - _value: PromiseOrValue, - _data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - retrieve( - token: PromiseOrValue, - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - retrieveERC1155( - token: PromiseOrValue, - id_: PromiseOrValue, - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - storedBalance(overrides?: CallOverrides): Promise; - - supportsInterface( - interfaceID: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; -} diff --git a/src/contracts/Ladle.ts b/src/contracts/Ladle.ts deleted file mode 100644 index 8671fc4ba..000000000 --- a/src/contracts/Ladle.ts +++ /dev/null @@ -1,2200 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PayableOverrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "./common"; - -export declare namespace DataTypes { - export type VaultStruct = { - owner: PromiseOrValue; - seriesId: PromiseOrValue; - ilkId: PromiseOrValue; - }; - - export type VaultStructOutput = [string, string, string] & { - owner: string; - seriesId: string; - ilkId: string; - }; -} - -export interface LadleInterface extends utils.Interface { - functions: { - "LOCK()": FunctionFragment; - "LOCK8605463013()": FunctionFragment; - "ROOT()": FunctionFragment; - "ROOT4146650865()": FunctionFragment; - "addIntegration(address,bool)": FunctionFragment; - "addJoin(bytes6,address)": FunctionFragment; - "addModule(address,bool)": FunctionFragment; - "addPool(bytes6,address)": FunctionFragment; - "addToken(address,bool)": FunctionFragment; - "batch(bytes[])": FunctionFragment; - "borrowingFee()": FunctionFragment; - "build(bytes6,bytes6,uint8)": FunctionFragment; - "cauldron()": FunctionFragment; - "close(bytes12,address,int128,int128)": FunctionFragment; - "closeFromLadle(bytes12,address)": FunctionFragment; - "destroy(bytes12)": FunctionFragment; - "exitEther(address)": FunctionFragment; - "forwardDaiPermit(address,address,uint256,uint256,bool,uint8,bytes32,bytes32)": FunctionFragment; - "forwardPermit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "getRoleAdmin(bytes4)": FunctionFragment; - "give(bytes12,address)": FunctionFragment; - "grantRole(bytes4,address)": FunctionFragment; - "grantRoles(bytes4[],address)": FunctionFragment; - "hasRole(bytes4,address)": FunctionFragment; - "integrations(address)": FunctionFragment; - "joinEther(bytes6)": FunctionFragment; - "joins(bytes6)": FunctionFragment; - "lockRole(bytes4)": FunctionFragment; - "moduleCall(address,bytes)": FunctionFragment; - "modules(address)": FunctionFragment; - "pools(bytes6)": FunctionFragment; - "pour(bytes12,address,int128,int128)": FunctionFragment; - "redeem(bytes6,address,uint256)": FunctionFragment; - "renounceRole(bytes4,address)": FunctionFragment; - "repay(bytes12,address,int128,uint128)": FunctionFragment; - "repayFromLadle(bytes12,address)": FunctionFragment; - "repayVault(bytes12,address,int128,uint128)": FunctionFragment; - "retrieve(address,address)": FunctionFragment; - "revokeRole(bytes4,address)": FunctionFragment; - "revokeRoles(bytes4[],address)": FunctionFragment; - "roll(bytes12,bytes6,uint8,uint128)": FunctionFragment; - "route(address,bytes)": FunctionFragment; - "router()": FunctionFragment; - "serve(bytes12,address,uint128,uint128,uint128)": FunctionFragment; - "setFee(uint256)": FunctionFragment; - "setRoleAdmin(bytes4,bytes4)": FunctionFragment; - "stir(bytes12,bytes12,uint128,uint128)": FunctionFragment; - "tokens(address)": FunctionFragment; - "transfer(address,address,uint128)": FunctionFragment; - "tweak(bytes12,bytes6,bytes6)": FunctionFragment; - "weth()": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "LOCK" - | "LOCK8605463013" - | "ROOT" - | "ROOT4146650865" - | "addIntegration" - | "addJoin" - | "addModule" - | "addPool" - | "addToken" - | "batch" - | "borrowingFee" - | "build" - | "cauldron" - | "close" - | "closeFromLadle" - | "destroy" - | "exitEther" - | "forwardDaiPermit" - | "forwardPermit" - | "getRoleAdmin" - | "give" - | "grantRole" - | "grantRoles" - | "hasRole" - | "integrations" - | "joinEther" - | "joins" - | "lockRole" - | "moduleCall" - | "modules" - | "pools" - | "pour" - | "redeem" - | "renounceRole" - | "repay" - | "repayFromLadle" - | "repayVault" - | "retrieve" - | "revokeRole" - | "revokeRoles" - | "roll" - | "route" - | "router" - | "serve" - | "setFee" - | "setRoleAdmin" - | "stir" - | "tokens" - | "transfer" - | "tweak" - | "weth" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; - encodeFunctionData( - functionFragment: "LOCK8605463013", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; - encodeFunctionData( - functionFragment: "ROOT4146650865", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "addIntegration", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "addJoin", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "addModule", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "addPool", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "addToken", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "batch", - values: [PromiseOrValue[]] - ): string; - encodeFunctionData( - functionFragment: "borrowingFee", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "build", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData(functionFragment: "cauldron", values?: undefined): string; - encodeFunctionData( - functionFragment: "close", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "closeFromLadle", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "destroy", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "exitEther", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "forwardDaiPermit", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "forwardPermit", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "getRoleAdmin", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "give", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "hasRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "integrations", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "joinEther", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "joins", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "lockRole", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "moduleCall", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "modules", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "pools", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "pour", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "redeem", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "renounceRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "repay", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "repayFromLadle", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "repayVault", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "retrieve", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "roll", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "route", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "router", values?: undefined): string; - encodeFunctionData( - functionFragment: "serve", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "setFee", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setRoleAdmin", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "stir", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "tokens", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "transfer", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "tweak", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData(functionFragment: "weth", values?: undefined): string; - - decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "LOCK8605463013", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "ROOT4146650865", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "addIntegration", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "addJoin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "addModule", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "addPool", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "addToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "batch", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "borrowingFee", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "build", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cauldron", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "close", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "closeFromLadle", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "destroy", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "exitEther", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "forwardDaiPermit", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "forwardPermit", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "give", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "integrations", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "joinEther", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "joins", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "moduleCall", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "modules", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "pools", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "pour", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "redeem", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "renounceRole", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "repay", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "repayFromLadle", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "repayVault", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "retrieve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "revokeRoles", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "roll", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "route", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "serve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setFee", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "setRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "stir", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tokens", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tweak", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "weth", data: BytesLike): Result; - - events: { - "FeeSet(uint256)": EventFragment; - "IntegrationAdded(address,bool)": EventFragment; - "JoinAdded(bytes6,address)": EventFragment; - "ModuleAdded(address,bool)": EventFragment; - "PoolAdded(bytes6,address)": EventFragment; - "RoleAdminChanged(bytes4,bytes4)": EventFragment; - "RoleGranted(bytes4,address,address)": EventFragment; - "RoleRevoked(bytes4,address,address)": EventFragment; - "TokenAdded(address,bool)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "FeeSet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "IntegrationAdded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "JoinAdded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ModuleAdded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "PoolAdded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TokenAdded"): EventFragment; -} - -export interface FeeSetEventObject { - fee: BigNumber; -} -export type FeeSetEvent = TypedEvent<[BigNumber], FeeSetEventObject>; - -export type FeeSetEventFilter = TypedEventFilter; - -export interface IntegrationAddedEventObject { - integration: string; - set: boolean; -} -export type IntegrationAddedEvent = TypedEvent< - [string, boolean], - IntegrationAddedEventObject ->; - -export type IntegrationAddedEventFilter = - TypedEventFilter; - -export interface JoinAddedEventObject { - assetId: string; - join: string; -} -export type JoinAddedEvent = TypedEvent<[string, string], JoinAddedEventObject>; - -export type JoinAddedEventFilter = TypedEventFilter; - -export interface ModuleAddedEventObject { - module: string; - set: boolean; -} -export type ModuleAddedEvent = TypedEvent< - [string, boolean], - ModuleAddedEventObject ->; - -export type ModuleAddedEventFilter = TypedEventFilter; - -export interface PoolAddedEventObject { - seriesId: string; - pool: string; -} -export type PoolAddedEvent = TypedEvent<[string, string], PoolAddedEventObject>; - -export type PoolAddedEventFilter = TypedEventFilter; - -export interface RoleAdminChangedEventObject { - role: string; - newAdminRole: string; -} -export type RoleAdminChangedEvent = TypedEvent< - [string, string], - RoleAdminChangedEventObject ->; - -export type RoleAdminChangedEventFilter = - TypedEventFilter; - -export interface RoleGrantedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleGrantedEvent = TypedEvent< - [string, string, string], - RoleGrantedEventObject ->; - -export type RoleGrantedEventFilter = TypedEventFilter; - -export interface RoleRevokedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleRevokedEvent = TypedEvent< - [string, string, string], - RoleRevokedEventObject ->; - -export type RoleRevokedEventFilter = TypedEventFilter; - -export interface TokenAddedEventObject { - token: string; - set: boolean; -} -export type TokenAddedEvent = TypedEvent< - [string, boolean], - TokenAddedEventObject ->; - -export type TokenAddedEventFilter = TypedEventFilter; - -export interface Ladle extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: LadleInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - LOCK(overrides?: CallOverrides): Promise<[string]>; - - LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; - - ROOT(overrides?: CallOverrides): Promise<[string]>; - - ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; - - addIntegration( - integration: PromiseOrValue, - set: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addJoin( - assetId: PromiseOrValue, - join: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addModule( - module: PromiseOrValue, - set: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addPool( - seriesId: PromiseOrValue, - pool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addToken( - token: PromiseOrValue, - set: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - batch( - calls: PromiseOrValue[], - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - borrowingFee(overrides?: CallOverrides): Promise<[BigNumber]>; - - build( - seriesId: PromiseOrValue, - ilkId: PromiseOrValue, - salt: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - cauldron(overrides?: CallOverrides): Promise<[string]>; - - close( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - art: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - closeFromLadle( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - destroy( - vaultId_: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - exitEther( - to: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - forwardDaiPermit( - token: PromiseOrValue, - spender: PromiseOrValue, - nonce: PromiseOrValue, - deadline: PromiseOrValue, - allowed: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - forwardPermit( - token: PromiseOrValue, - spender: PromiseOrValue, - amount: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - give( - vaultId_: PromiseOrValue, - receiver: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - integrations( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - joinEther( - etherId: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - joins( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - moduleCall( - module: PromiseOrValue, - data: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - modules( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - pour( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - art: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - seriesId: PromiseOrValue, - to: PromiseOrValue, - wad: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - repay( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - min: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - repayFromLadle( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - repayVault( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - max: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - retrieve( - token: PromiseOrValue, - to: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - roll( - vaultId_: PromiseOrValue, - newSeriesId: PromiseOrValue, - loan: PromiseOrValue, - max: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - route( - integration: PromiseOrValue, - data: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - router(overrides?: CallOverrides): Promise<[string]>; - - serve( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - base: PromiseOrValue, - max: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - setFee( - fee: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - stir( - from: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - art: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - tokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - transfer( - token: PromiseOrValue, - receiver: PromiseOrValue, - wad: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - tweak( - vaultId_: PromiseOrValue, - seriesId: PromiseOrValue, - ilkId: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - weth(overrides?: CallOverrides): Promise<[string]>; - }; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - addIntegration( - integration: PromiseOrValue, - set: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addJoin( - assetId: PromiseOrValue, - join: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addModule( - module: PromiseOrValue, - set: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addPool( - seriesId: PromiseOrValue, - pool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addToken( - token: PromiseOrValue, - set: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - batch( - calls: PromiseOrValue[], - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - borrowingFee(overrides?: CallOverrides): Promise; - - build( - seriesId: PromiseOrValue, - ilkId: PromiseOrValue, - salt: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - close( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - art: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - closeFromLadle( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - destroy( - vaultId_: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - exitEther( - to: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - forwardDaiPermit( - token: PromiseOrValue, - spender: PromiseOrValue, - nonce: PromiseOrValue, - deadline: PromiseOrValue, - allowed: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - forwardPermit( - token: PromiseOrValue, - spender: PromiseOrValue, - amount: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - give( - vaultId_: PromiseOrValue, - receiver: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - integrations( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - joinEther( - etherId: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - joins( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - moduleCall( - module: PromiseOrValue, - data: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - modules( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pour( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - art: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - seriesId: PromiseOrValue, - to: PromiseOrValue, - wad: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - repay( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - min: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - repayFromLadle( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - repayVault( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - max: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - retrieve( - token: PromiseOrValue, - to: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - roll( - vaultId_: PromiseOrValue, - newSeriesId: PromiseOrValue, - loan: PromiseOrValue, - max: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - route( - integration: PromiseOrValue, - data: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - router(overrides?: CallOverrides): Promise; - - serve( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - base: PromiseOrValue, - max: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - setFee( - fee: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - stir( - from: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - art: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - tokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transfer( - token: PromiseOrValue, - receiver: PromiseOrValue, - wad: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - tweak( - vaultId_: PromiseOrValue, - seriesId: PromiseOrValue, - ilkId: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - weth(overrides?: CallOverrides): Promise; - - callStatic: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - addIntegration( - integration: PromiseOrValue, - set: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - addJoin( - assetId: PromiseOrValue, - join: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - addModule( - module: PromiseOrValue, - set: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - addPool( - seriesId: PromiseOrValue, - pool: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - addToken( - token: PromiseOrValue, - set: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - batch( - calls: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - borrowingFee(overrides?: CallOverrides): Promise; - - build( - seriesId: PromiseOrValue, - ilkId: PromiseOrValue, - salt: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, DataTypes.VaultStructOutput]>; - - cauldron(overrides?: CallOverrides): Promise; - - close( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - art: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - closeFromLadle( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - destroy( - vaultId_: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - exitEther( - to: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - forwardDaiPermit( - token: PromiseOrValue, - spender: PromiseOrValue, - nonce: PromiseOrValue, - deadline: PromiseOrValue, - allowed: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - forwardPermit( - token: PromiseOrValue, - spender: PromiseOrValue, - amount: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - give( - vaultId_: PromiseOrValue, - receiver: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - integrations( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - joinEther( - etherId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - joins( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - moduleCall( - module: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - modules( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pour( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - art: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - redeem( - seriesId: PromiseOrValue, - to: PromiseOrValue, - wad: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - repay( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - min: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - repayFromLadle( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - repayVault( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - max: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - retrieve( - token: PromiseOrValue, - to: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - roll( - vaultId_: PromiseOrValue, - newSeriesId: PromiseOrValue, - loan: PromiseOrValue, - max: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [DataTypes.VaultStructOutput, BigNumber] & { - vault: DataTypes.VaultStructOutput; - newDebt: BigNumber; - } - >; - - route( - integration: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - router(overrides?: CallOverrides): Promise; - - serve( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - base: PromiseOrValue, - max: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setFee( - fee: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - stir( - from: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - art: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transfer( - token: PromiseOrValue, - receiver: PromiseOrValue, - wad: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tweak( - vaultId_: PromiseOrValue, - seriesId: PromiseOrValue, - ilkId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - weth(overrides?: CallOverrides): Promise; - }; - - filters: { - "FeeSet(uint256)"(fee?: null): FeeSetEventFilter; - FeeSet(fee?: null): FeeSetEventFilter; - - "IntegrationAdded(address,bool)"( - integration?: PromiseOrValue | null, - set?: PromiseOrValue | null - ): IntegrationAddedEventFilter; - IntegrationAdded( - integration?: PromiseOrValue | null, - set?: PromiseOrValue | null - ): IntegrationAddedEventFilter; - - "JoinAdded(bytes6,address)"( - assetId?: PromiseOrValue | null, - join?: PromiseOrValue | null - ): JoinAddedEventFilter; - JoinAdded( - assetId?: PromiseOrValue | null, - join?: PromiseOrValue | null - ): JoinAddedEventFilter; - - "ModuleAdded(address,bool)"( - module?: PromiseOrValue | null, - set?: PromiseOrValue | null - ): ModuleAddedEventFilter; - ModuleAdded( - module?: PromiseOrValue | null, - set?: PromiseOrValue | null - ): ModuleAddedEventFilter; - - "PoolAdded(bytes6,address)"( - seriesId?: PromiseOrValue | null, - pool?: PromiseOrValue | null - ): PoolAddedEventFilter; - PoolAdded( - seriesId?: PromiseOrValue | null, - pool?: PromiseOrValue | null - ): PoolAddedEventFilter; - - "RoleAdminChanged(bytes4,bytes4)"( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - RoleAdminChanged( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - - "RoleGranted(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - RoleGranted( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - - "RoleRevoked(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - RoleRevoked( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - - "TokenAdded(address,bool)"( - token?: PromiseOrValue | null, - set?: PromiseOrValue | null - ): TokenAddedEventFilter; - TokenAdded( - token?: PromiseOrValue | null, - set?: PromiseOrValue | null - ): TokenAddedEventFilter; - }; - - estimateGas: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - addIntegration( - integration: PromiseOrValue, - set: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addJoin( - assetId: PromiseOrValue, - join: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addModule( - module: PromiseOrValue, - set: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addPool( - seriesId: PromiseOrValue, - pool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addToken( - token: PromiseOrValue, - set: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - batch( - calls: PromiseOrValue[], - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - borrowingFee(overrides?: CallOverrides): Promise; - - build( - seriesId: PromiseOrValue, - ilkId: PromiseOrValue, - salt: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - close( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - art: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - closeFromLadle( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - destroy( - vaultId_: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - exitEther( - to: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - forwardDaiPermit( - token: PromiseOrValue, - spender: PromiseOrValue, - nonce: PromiseOrValue, - deadline: PromiseOrValue, - allowed: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - forwardPermit( - token: PromiseOrValue, - spender: PromiseOrValue, - amount: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - give( - vaultId_: PromiseOrValue, - receiver: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - integrations( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - joinEther( - etherId: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - joins( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - moduleCall( - module: PromiseOrValue, - data: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - modules( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pour( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - art: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - seriesId: PromiseOrValue, - to: PromiseOrValue, - wad: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - repay( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - min: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - repayFromLadle( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - repayVault( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - max: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - retrieve( - token: PromiseOrValue, - to: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - roll( - vaultId_: PromiseOrValue, - newSeriesId: PromiseOrValue, - loan: PromiseOrValue, - max: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - route( - integration: PromiseOrValue, - data: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - router(overrides?: CallOverrides): Promise; - - serve( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - base: PromiseOrValue, - max: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - setFee( - fee: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - stir( - from: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - art: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - tokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transfer( - token: PromiseOrValue, - receiver: PromiseOrValue, - wad: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - tweak( - vaultId_: PromiseOrValue, - seriesId: PromiseOrValue, - ilkId: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - weth(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - addIntegration( - integration: PromiseOrValue, - set: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addJoin( - assetId: PromiseOrValue, - join: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addModule( - module: PromiseOrValue, - set: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addPool( - seriesId: PromiseOrValue, - pool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - addToken( - token: PromiseOrValue, - set: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - batch( - calls: PromiseOrValue[], - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - borrowingFee(overrides?: CallOverrides): Promise; - - build( - seriesId: PromiseOrValue, - ilkId: PromiseOrValue, - salt: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - close( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - art: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - closeFromLadle( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - destroy( - vaultId_: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - exitEther( - to: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - forwardDaiPermit( - token: PromiseOrValue, - spender: PromiseOrValue, - nonce: PromiseOrValue, - deadline: PromiseOrValue, - allowed: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - forwardPermit( - token: PromiseOrValue, - spender: PromiseOrValue, - amount: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - give( - vaultId_: PromiseOrValue, - receiver: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - integrations( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - joinEther( - etherId: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - joins( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - moduleCall( - module: PromiseOrValue, - data: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - modules( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pour( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - art: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - seriesId: PromiseOrValue, - to: PromiseOrValue, - wad: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - repay( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - min: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - repayFromLadle( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - repayVault( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - max: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - retrieve( - token: PromiseOrValue, - to: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - roll( - vaultId_: PromiseOrValue, - newSeriesId: PromiseOrValue, - loan: PromiseOrValue, - max: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - route( - integration: PromiseOrValue, - data: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - router(overrides?: CallOverrides): Promise; - - serve( - vaultId_: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - base: PromiseOrValue, - max: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - setFee( - fee: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - stir( - from: PromiseOrValue, - to: PromiseOrValue, - ink: PromiseOrValue, - art: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - tokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transfer( - token: PromiseOrValue, - receiver: PromiseOrValue, - wad: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - tweak( - vaultId_: PromiseOrValue, - seriesId: PromiseOrValue, - ilkId: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - weth(overrides?: CallOverrides): Promise; - }; -} diff --git a/src/contracts/LadleStorage.ts b/src/contracts/LadleStorage.ts deleted file mode 100644 index 413c9f27b..000000000 --- a/src/contracts/LadleStorage.ts +++ /dev/null @@ -1,419 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BytesLike, - CallOverrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "./common"; - -export interface LadleStorageInterface extends utils.Interface { - functions: { - "borrowingFee()": FunctionFragment; - "cauldron()": FunctionFragment; - "integrations(address)": FunctionFragment; - "joins(bytes6)": FunctionFragment; - "modules(address)": FunctionFragment; - "pools(bytes6)": FunctionFragment; - "router()": FunctionFragment; - "tokens(address)": FunctionFragment; - "weth()": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "borrowingFee" - | "cauldron" - | "integrations" - | "joins" - | "modules" - | "pools" - | "router" - | "tokens" - | "weth" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "borrowingFee", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "cauldron", values?: undefined): string; - encodeFunctionData( - functionFragment: "integrations", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "joins", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "modules", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "pools", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "router", values?: undefined): string; - encodeFunctionData( - functionFragment: "tokens", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "weth", values?: undefined): string; - - decodeFunctionResult( - functionFragment: "borrowingFee", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "cauldron", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "integrations", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "joins", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "modules", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "pools", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tokens", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "weth", data: BytesLike): Result; - - events: { - "FeeSet(uint256)": EventFragment; - "IntegrationAdded(address,bool)": EventFragment; - "JoinAdded(bytes6,address)": EventFragment; - "ModuleAdded(address,bool)": EventFragment; - "PoolAdded(bytes6,address)": EventFragment; - "TokenAdded(address,bool)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "FeeSet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "IntegrationAdded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "JoinAdded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ModuleAdded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "PoolAdded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TokenAdded"): EventFragment; -} - -export interface FeeSetEventObject { - fee: BigNumber; -} -export type FeeSetEvent = TypedEvent<[BigNumber], FeeSetEventObject>; - -export type FeeSetEventFilter = TypedEventFilter; - -export interface IntegrationAddedEventObject { - integration: string; - set: boolean; -} -export type IntegrationAddedEvent = TypedEvent< - [string, boolean], - IntegrationAddedEventObject ->; - -export type IntegrationAddedEventFilter = - TypedEventFilter; - -export interface JoinAddedEventObject { - assetId: string; - join: string; -} -export type JoinAddedEvent = TypedEvent<[string, string], JoinAddedEventObject>; - -export type JoinAddedEventFilter = TypedEventFilter; - -export interface ModuleAddedEventObject { - module: string; - set: boolean; -} -export type ModuleAddedEvent = TypedEvent< - [string, boolean], - ModuleAddedEventObject ->; - -export type ModuleAddedEventFilter = TypedEventFilter; - -export interface PoolAddedEventObject { - seriesId: string; - pool: string; -} -export type PoolAddedEvent = TypedEvent<[string, string], PoolAddedEventObject>; - -export type PoolAddedEventFilter = TypedEventFilter; - -export interface TokenAddedEventObject { - token: string; - set: boolean; -} -export type TokenAddedEvent = TypedEvent< - [string, boolean], - TokenAddedEventObject ->; - -export type TokenAddedEventFilter = TypedEventFilter; - -export interface LadleStorage extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: LadleStorageInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - borrowingFee(overrides?: CallOverrides): Promise<[BigNumber]>; - - cauldron(overrides?: CallOverrides): Promise<[string]>; - - integrations( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - joins( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - modules( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - router(overrides?: CallOverrides): Promise<[string]>; - - tokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - weth(overrides?: CallOverrides): Promise<[string]>; - }; - - borrowingFee(overrides?: CallOverrides): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - integrations( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - joins( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - modules( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - router(overrides?: CallOverrides): Promise; - - tokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - weth(overrides?: CallOverrides): Promise; - - callStatic: { - borrowingFee(overrides?: CallOverrides): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - integrations( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - joins( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - modules( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - router(overrides?: CallOverrides): Promise; - - tokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - weth(overrides?: CallOverrides): Promise; - }; - - filters: { - "FeeSet(uint256)"(fee?: null): FeeSetEventFilter; - FeeSet(fee?: null): FeeSetEventFilter; - - "IntegrationAdded(address,bool)"( - integration?: PromiseOrValue | null, - set?: PromiseOrValue | null - ): IntegrationAddedEventFilter; - IntegrationAdded( - integration?: PromiseOrValue | null, - set?: PromiseOrValue | null - ): IntegrationAddedEventFilter; - - "JoinAdded(bytes6,address)"( - assetId?: PromiseOrValue | null, - join?: PromiseOrValue | null - ): JoinAddedEventFilter; - JoinAdded( - assetId?: PromiseOrValue | null, - join?: PromiseOrValue | null - ): JoinAddedEventFilter; - - "ModuleAdded(address,bool)"( - module?: PromiseOrValue | null, - set?: PromiseOrValue | null - ): ModuleAddedEventFilter; - ModuleAdded( - module?: PromiseOrValue | null, - set?: PromiseOrValue | null - ): ModuleAddedEventFilter; - - "PoolAdded(bytes6,address)"( - seriesId?: PromiseOrValue | null, - pool?: PromiseOrValue | null - ): PoolAddedEventFilter; - PoolAdded( - seriesId?: PromiseOrValue | null, - pool?: PromiseOrValue | null - ): PoolAddedEventFilter; - - "TokenAdded(address,bool)"( - token?: PromiseOrValue | null, - set?: PromiseOrValue | null - ): TokenAddedEventFilter; - TokenAdded( - token?: PromiseOrValue | null, - set?: PromiseOrValue | null - ): TokenAddedEventFilter; - }; - - estimateGas: { - borrowingFee(overrides?: CallOverrides): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - integrations( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - joins( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - modules( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - router(overrides?: CallOverrides): Promise; - - tokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - weth(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - borrowingFee(overrides?: CallOverrides): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - integrations( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - joins( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - modules( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - router(overrides?: CallOverrides): Promise; - - tokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - weth(overrides?: CallOverrides): Promise; - }; -} diff --git a/src/contracts/NotionalMultiOracle.ts b/src/contracts/NotionalMultiOracle.ts deleted file mode 100644 index f139e7745..000000000 --- a/src/contracts/NotionalMultiOracle.ts +++ /dev/null @@ -1,802 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "./common"; - -export interface NotionalMultiOracleInterface extends utils.Interface { - functions: { - "FCASH_DECIMALS()": FunctionFragment; - "LOCK()": FunctionFragment; - "LOCK8605463013()": FunctionFragment; - "ROOT()": FunctionFragment; - "ROOT4146650865()": FunctionFragment; - "get(bytes32,bytes32,uint256)": FunctionFragment; - "getRoleAdmin(bytes4)": FunctionFragment; - "grantRole(bytes4,address)": FunctionFragment; - "grantRoles(bytes4[],address)": FunctionFragment; - "hasRole(bytes4,address)": FunctionFragment; - "lockRole(bytes4)": FunctionFragment; - "peek(bytes32,bytes32,uint256)": FunctionFragment; - "renounceRole(bytes4,address)": FunctionFragment; - "revokeRole(bytes4,address)": FunctionFragment; - "revokeRoles(bytes4[],address)": FunctionFragment; - "setRoleAdmin(bytes4,bytes4)": FunctionFragment; - "setSource(bytes6,bytes6,address)": FunctionFragment; - "sources(bytes6,bytes6)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "FCASH_DECIMALS" - | "LOCK" - | "LOCK8605463013" - | "ROOT" - | "ROOT4146650865" - | "get" - | "getRoleAdmin" - | "grantRole" - | "grantRoles" - | "hasRole" - | "lockRole" - | "peek" - | "renounceRole" - | "revokeRole" - | "revokeRoles" - | "setRoleAdmin" - | "setSource" - | "sources" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "FCASH_DECIMALS", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; - encodeFunctionData( - functionFragment: "LOCK8605463013", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; - encodeFunctionData( - functionFragment: "ROOT4146650865", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "get", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "getRoleAdmin", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "hasRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "lockRole", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "peek", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "renounceRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setRoleAdmin", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setSource", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "sources", - values: [PromiseOrValue, PromiseOrValue] - ): string; - - decodeFunctionResult( - functionFragment: "FCASH_DECIMALS", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "LOCK8605463013", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "ROOT4146650865", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "get", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "peek", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "renounceRole", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "revokeRoles", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "setSource", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sources", data: BytesLike): Result; - - events: { - "RoleAdminChanged(bytes4,bytes4)": EventFragment; - "RoleGranted(bytes4,address,address)": EventFragment; - "RoleRevoked(bytes4,address,address)": EventFragment; - "SourceSet(bytes6,bytes6,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SourceSet"): EventFragment; -} - -export interface RoleAdminChangedEventObject { - role: string; - newAdminRole: string; -} -export type RoleAdminChangedEvent = TypedEvent< - [string, string], - RoleAdminChangedEventObject ->; - -export type RoleAdminChangedEventFilter = - TypedEventFilter; - -export interface RoleGrantedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleGrantedEvent = TypedEvent< - [string, string, string], - RoleGrantedEventObject ->; - -export type RoleGrantedEventFilter = TypedEventFilter; - -export interface RoleRevokedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleRevokedEvent = TypedEvent< - [string, string, string], - RoleRevokedEventObject ->; - -export type RoleRevokedEventFilter = TypedEventFilter; - -export interface SourceSetEventObject { - notionalId: string; - underlyingId: string; - underlying: string; -} -export type SourceSetEvent = TypedEvent< - [string, string, string], - SourceSetEventObject ->; - -export type SourceSetEventFilter = TypedEventFilter; - -export interface NotionalMultiOracle extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: NotionalMultiOracleInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - FCASH_DECIMALS(overrides?: CallOverrides): Promise<[number]>; - - LOCK(overrides?: CallOverrides): Promise<[string]>; - - LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; - - ROOT(overrides?: CallOverrides): Promise<[string]>; - - ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; - - get( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - peek( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } - >; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - notionalId: PromiseOrValue, - underlyingId: PromiseOrValue, - underlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [number, number, boolean] & { - baseDecimals: number; - quoteDecimals: number; - set: boolean; - } - >; - }; - - FCASH_DECIMALS(overrides?: CallOverrides): Promise; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - peek( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } - >; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - notionalId: PromiseOrValue, - underlyingId: PromiseOrValue, - underlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [number, number, boolean] & { - baseDecimals: number; - quoteDecimals: number; - set: boolean; - } - >; - - callStatic: { - FCASH_DECIMALS(overrides?: CallOverrides): Promise; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } - >; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - peek( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } - >; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setSource( - notionalId: PromiseOrValue, - underlyingId: PromiseOrValue, - underlying: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [number, number, boolean] & { - baseDecimals: number; - quoteDecimals: number; - set: boolean; - } - >; - }; - - filters: { - "RoleAdminChanged(bytes4,bytes4)"( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - RoleAdminChanged( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - - "RoleGranted(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - RoleGranted( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - - "RoleRevoked(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - RoleRevoked( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - - "SourceSet(bytes6,bytes6,address)"( - notionalId?: PromiseOrValue | null, - underlyingId?: PromiseOrValue | null, - underlying?: null - ): SourceSetEventFilter; - SourceSet( - notionalId?: PromiseOrValue | null, - underlyingId?: PromiseOrValue | null, - underlying?: null - ): SourceSetEventFilter; - }; - - estimateGas: { - FCASH_DECIMALS(overrides?: CallOverrides): Promise; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - peek( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - notionalId: PromiseOrValue, - underlyingId: PromiseOrValue, - underlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - populateTransaction: { - FCASH_DECIMALS(overrides?: CallOverrides): Promise; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - peek( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - notionalId: PromiseOrValue, - underlyingId: PromiseOrValue, - underlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; -} diff --git a/src/contracts/Pool.ts b/src/contracts/Pool.ts deleted file mode 100644 index 13e751de4..000000000 --- a/src/contracts/Pool.ts +++ /dev/null @@ -1,2475 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "./common"; - -export interface PoolInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "LOCK()": FunctionFragment; - "LOCK8605463013()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "ROOT()": FunctionFragment; - "ROOT4146650865()": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "base()": FunctionFragment; - "baseDecimals()": FunctionFragment; - "baseToken()": FunctionFragment; - "burn(address,address,uint256,uint256)": FunctionFragment; - "burnForBase(address,uint256,uint256)": FunctionFragment; - "buyBase(address,uint128,uint128)": FunctionFragment; - "buyBasePreview(uint128)": FunctionFragment; - "buyFYToken(address,uint128,uint128)": FunctionFragment; - "buyFYTokenPreview(uint128)": FunctionFragment; - "cumulativeRatioLast()": FunctionFragment; - "currentCumulativeRatio()": FunctionFragment; - "decimals()": FunctionFragment; - "deploymentChainId()": FunctionFragment; - "fyToken()": FunctionFragment; - "g1()": FunctionFragment; - "g1Fee()": FunctionFragment; - "g2()": FunctionFragment; - "getBaseBalance()": FunctionFragment; - "getC()": FunctionFragment; - "getCache()": FunctionFragment; - "getCurrentSharePrice()": FunctionFragment; - "getFYTokenBalance()": FunctionFragment; - "getRoleAdmin(bytes4)": FunctionFragment; - "getSharesBalance()": FunctionFragment; - "grantRole(bytes4,address)": FunctionFragment; - "grantRoles(bytes4[],address)": FunctionFragment; - "hasRole(bytes4,address)": FunctionFragment; - "init(address)": FunctionFragment; - "invariant()": FunctionFragment; - "lockRole(bytes4)": FunctionFragment; - "maturity()": FunctionFragment; - "maxBaseIn()": FunctionFragment; - "maxBaseOut()": FunctionFragment; - "maxFYTokenIn()": FunctionFragment; - "maxFYTokenOut()": FunctionFragment; - "mint(address,address,uint256,uint256)": FunctionFragment; - "mintWithBase(address,address,uint256,uint256,uint256)": FunctionFragment; - "mu()": FunctionFragment; - "name()": FunctionFragment; - "nonces(address)": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "renounceRole(bytes4,address)": FunctionFragment; - "retrieveBase(address)": FunctionFragment; - "retrieveFYToken(address)": FunctionFragment; - "retrieveShares(address)": FunctionFragment; - "revokeRole(bytes4,address)": FunctionFragment; - "revokeRoles(bytes4[],address)": FunctionFragment; - "scaleFactor()": FunctionFragment; - "sellBase(address,uint128)": FunctionFragment; - "sellBasePreview(uint128)": FunctionFragment; - "sellFYToken(address,uint128)": FunctionFragment; - "sellFYTokenPreview(uint128)": FunctionFragment; - "setFees(uint16)": FunctionFragment; - "setRoleAdmin(bytes4,bytes4)": FunctionFragment; - "sharesToken()": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "ts()": FunctionFragment; - "unwrap(address)": FunctionFragment; - "unwrapPreview(uint256)": FunctionFragment; - "version()": FunctionFragment; - "wrap(address)": FunctionFragment; - "wrapPreview(uint256)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "DOMAIN_SEPARATOR" - | "LOCK" - | "LOCK8605463013" - | "PERMIT_TYPEHASH" - | "ROOT" - | "ROOT4146650865" - | "allowance" - | "approve" - | "balanceOf" - | "base" - | "baseDecimals" - | "baseToken" - | "burn" - | "burnForBase" - | "buyBase" - | "buyBasePreview" - | "buyFYToken" - | "buyFYTokenPreview" - | "cumulativeRatioLast" - | "currentCumulativeRatio" - | "decimals" - | "deploymentChainId" - | "fyToken" - | "g1" - | "g1Fee" - | "g2" - | "getBaseBalance" - | "getC" - | "getCache" - | "getCurrentSharePrice" - | "getFYTokenBalance" - | "getRoleAdmin" - | "getSharesBalance" - | "grantRole" - | "grantRoles" - | "hasRole" - | "init" - | "invariant" - | "lockRole" - | "maturity" - | "maxBaseIn" - | "maxBaseOut" - | "maxFYTokenIn" - | "maxFYTokenOut" - | "mint" - | "mintWithBase" - | "mu" - | "name" - | "nonces" - | "permit" - | "renounceRole" - | "retrieveBase" - | "retrieveFYToken" - | "retrieveShares" - | "revokeRole" - | "revokeRoles" - | "scaleFactor" - | "sellBase" - | "sellBasePreview" - | "sellFYToken" - | "sellFYTokenPreview" - | "setFees" - | "setRoleAdmin" - | "sharesToken" - | "symbol" - | "totalSupply" - | "transfer" - | "transferFrom" - | "ts" - | "unwrap" - | "unwrapPreview" - | "version" - | "wrap" - | "wrapPreview" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "DOMAIN_SEPARATOR", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; - encodeFunctionData( - functionFragment: "LOCK8605463013", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "PERMIT_TYPEHASH", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; - encodeFunctionData( - functionFragment: "ROOT4146650865", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "balanceOf", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "base", values?: undefined): string; - encodeFunctionData( - functionFragment: "baseDecimals", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "baseToken", values?: undefined): string; - encodeFunctionData( - functionFragment: "burn", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "burnForBase", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "buyBase", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "buyBasePreview", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "buyFYToken", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "buyFYTokenPreview", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "cumulativeRatioLast", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "currentCumulativeRatio", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; - encodeFunctionData( - functionFragment: "deploymentChainId", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "fyToken", values?: undefined): string; - encodeFunctionData(functionFragment: "g1", values?: undefined): string; - encodeFunctionData(functionFragment: "g1Fee", values?: undefined): string; - encodeFunctionData(functionFragment: "g2", values?: undefined): string; - encodeFunctionData( - functionFragment: "getBaseBalance", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "getC", values?: undefined): string; - encodeFunctionData(functionFragment: "getCache", values?: undefined): string; - encodeFunctionData( - functionFragment: "getCurrentSharePrice", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getFYTokenBalance", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getRoleAdmin", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "getSharesBalance", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "grantRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "hasRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "init", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "invariant", values?: undefined): string; - encodeFunctionData( - functionFragment: "lockRole", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "maturity", values?: undefined): string; - encodeFunctionData(functionFragment: "maxBaseIn", values?: undefined): string; - encodeFunctionData( - functionFragment: "maxBaseOut", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "maxFYTokenIn", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "maxFYTokenOut", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "mint", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "mintWithBase", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData(functionFragment: "mu", values?: undefined): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData( - functionFragment: "nonces", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "permit", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "renounceRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "retrieveBase", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "retrieveFYToken", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "retrieveShares", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "scaleFactor", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "sellBase", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "sellBasePreview", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "sellFYToken", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "sellFYTokenPreview", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setFees", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setRoleAdmin", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "sharesToken", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData( - functionFragment: "totalSupply", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData(functionFragment: "ts", values?: undefined): string; - encodeFunctionData( - functionFragment: "unwrap", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "unwrapPreview", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "version", values?: undefined): string; - encodeFunctionData( - functionFragment: "wrap", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "wrapPreview", - values: [PromiseOrValue] - ): string; - - decodeFunctionResult( - functionFragment: "DOMAIN_SEPARATOR", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "LOCK8605463013", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "PERMIT_TYPEHASH", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "ROOT4146650865", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "base", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "baseDecimals", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "baseToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "burnForBase", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "buyBase", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "buyBasePreview", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "buyFYToken", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "buyFYTokenPreview", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "cumulativeRatioLast", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "currentCumulativeRatio", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "deploymentChainId", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "fyToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "g1", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "g1Fee", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "g2", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getBaseBalance", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "getC", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getCache", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getCurrentSharePrice", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getFYTokenBalance", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getSharesBalance", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "init", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "invariant", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "maturity", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "maxBaseIn", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "maxBaseOut", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "maxFYTokenIn", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "maxFYTokenOut", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "mintWithBase", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "mu", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "renounceRole", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "retrieveBase", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "retrieveFYToken", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "retrieveShares", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "revokeRoles", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "scaleFactor", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "sellBase", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "sellBasePreview", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "sellFYToken", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "sellFYTokenPreview", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "setFees", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "setRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "sharesToken", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "totalSupply", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "transferFrom", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "ts", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "unwrap", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "unwrapPreview", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "wrap", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "wrapPreview", - data: BytesLike - ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "FeesSet(uint16)": EventFragment; - "Liquidity(uint32,address,address,address,int256,int256,int256)": EventFragment; - "RoleAdminChanged(bytes4,bytes4)": EventFragment; - "RoleGranted(bytes4,address,address)": EventFragment; - "RoleRevoked(bytes4,address,address)": EventFragment; - "Sync(uint112,uint112,uint256)": EventFragment; - "Trade(uint32,address,address,int256,int256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - "gg()": EventFragment; - "gm()": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "FeesSet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Liquidity"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Sync"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Trade"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; - getEvent(nameOrSignatureOrTopic: "gg"): EventFragment; - getEvent(nameOrSignatureOrTopic: "gm"): EventFragment; -} - -export interface ApprovalEventObject { - owner: string; - spender: string; - value: BigNumber; -} -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; - -export type ApprovalEventFilter = TypedEventFilter; - -export interface FeesSetEventObject { - g1Fee: number; -} -export type FeesSetEvent = TypedEvent<[number], FeesSetEventObject>; - -export type FeesSetEventFilter = TypedEventFilter; - -export interface LiquidityEventObject { - maturity: number; - from: string; - to: string; - fyTokenTo: string; - base: BigNumber; - fyTokens: BigNumber; - poolTokens: BigNumber; -} -export type LiquidityEvent = TypedEvent< - [number, string, string, string, BigNumber, BigNumber, BigNumber], - LiquidityEventObject ->; - -export type LiquidityEventFilter = TypedEventFilter; - -export interface RoleAdminChangedEventObject { - role: string; - newAdminRole: string; -} -export type RoleAdminChangedEvent = TypedEvent< - [string, string], - RoleAdminChangedEventObject ->; - -export type RoleAdminChangedEventFilter = - TypedEventFilter; - -export interface RoleGrantedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleGrantedEvent = TypedEvent< - [string, string, string], - RoleGrantedEventObject ->; - -export type RoleGrantedEventFilter = TypedEventFilter; - -export interface RoleRevokedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleRevokedEvent = TypedEvent< - [string, string, string], - RoleRevokedEventObject ->; - -export type RoleRevokedEventFilter = TypedEventFilter; - -export interface SyncEventObject { - baseCached: BigNumber; - fyTokenCached: BigNumber; - cumulativeBalancesRatio: BigNumber; -} -export type SyncEvent = TypedEvent< - [BigNumber, BigNumber, BigNumber], - SyncEventObject ->; - -export type SyncEventFilter = TypedEventFilter; - -export interface TradeEventObject { - maturity: number; - from: string; - to: string; - base: BigNumber; - fyTokens: BigNumber; -} -export type TradeEvent = TypedEvent< - [number, string, string, BigNumber, BigNumber], - TradeEventObject ->; - -export type TradeEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - value: BigNumber; -} -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; - -export interface ggEventObject {} -export type ggEvent = TypedEvent<[], ggEventObject>; - -export type ggEventFilter = TypedEventFilter; - -export interface gmEventObject {} -export type gmEvent = TypedEvent<[], gmEventObject>; - -export type gmEventFilter = TypedEventFilter; - -export interface Pool extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: PoolInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - LOCK(overrides?: CallOverrides): Promise<[string]>; - - LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - ROOT(overrides?: CallOverrides): Promise<[string]>; - - ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - guy: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - base(overrides?: CallOverrides): Promise<[string]>; - - baseDecimals(overrides?: CallOverrides): Promise<[BigNumber]>; - - baseToken(overrides?: CallOverrides): Promise<[string]>; - - burn( - baseTo: PromiseOrValue, - fyTokenTo: PromiseOrValue, - minRatio: PromiseOrValue, - maxRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - burnForBase( - to: PromiseOrValue, - minRatio: PromiseOrValue, - maxRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyBase( - to: PromiseOrValue, - baseOut: PromiseOrValue, - max: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyBasePreview( - baseOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { fyTokenIn: BigNumber }>; - - buyFYToken( - to: PromiseOrValue, - fyTokenOut: PromiseOrValue, - max: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyFYTokenPreview( - fyTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { baseIn: BigNumber }>; - - cumulativeRatioLast(overrides?: CallOverrides): Promise<[BigNumber]>; - - currentCumulativeRatio( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - currentCumulativeRatio_: BigNumber; - blockTimestampCurrent: BigNumber; - } - >; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - deploymentChainId(overrides?: CallOverrides): Promise<[BigNumber]>; - - fyToken(overrides?: CallOverrides): Promise<[string]>; - - g1(overrides?: CallOverrides): Promise<[BigNumber]>; - - g1Fee(overrides?: CallOverrides): Promise<[number]>; - - g2(overrides?: CallOverrides): Promise<[BigNumber]>; - - getBaseBalance(overrides?: CallOverrides): Promise<[BigNumber]>; - - getC(overrides?: CallOverrides): Promise<[BigNumber]>; - - getCache( - overrides?: CallOverrides - ): Promise<[BigNumber, BigNumber, number, number]>; - - getCurrentSharePrice(overrides?: CallOverrides): Promise<[BigNumber]>; - - getFYTokenBalance(overrides?: CallOverrides): Promise<[BigNumber]>; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - getSharesBalance(overrides?: CallOverrides): Promise<[BigNumber]>; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - init( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - invariant( - overrides?: CallOverrides - ): Promise<[BigNumber] & { result: BigNumber }>; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maturity(overrides?: CallOverrides): Promise<[number]>; - - maxBaseIn( - overrides?: CallOverrides - ): Promise<[BigNumber] & { baseIn: BigNumber }>; - - maxBaseOut( - overrides?: CallOverrides - ): Promise<[BigNumber] & { baseOut: BigNumber }>; - - maxFYTokenIn( - overrides?: CallOverrides - ): Promise<[BigNumber] & { fyTokenIn: BigNumber }>; - - maxFYTokenOut( - overrides?: CallOverrides - ): Promise<[BigNumber] & { fyTokenOut: BigNumber }>; - - mint( - to: PromiseOrValue, - remainder: PromiseOrValue, - minRatio: PromiseOrValue, - maxRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - mintWithBase( - to: PromiseOrValue, - remainder: PromiseOrValue, - fyTokenToBuy: PromiseOrValue, - minRatio: PromiseOrValue, - maxRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - mu(overrides?: CallOverrides): Promise<[BigNumber]>; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - amount: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - retrieveBase( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - retrieveFYToken( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - retrieveShares( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - scaleFactor(overrides?: CallOverrides): Promise<[BigNumber]>; - - sellBase( - to: PromiseOrValue, - min: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellBasePreview( - baseIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { fyTokenOut: BigNumber }>; - - sellFYToken( - to: PromiseOrValue, - min: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellFYTokenPreview( - fyTokenIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { baseOut: BigNumber }>; - - setFees( - g1Fee_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sharesToken(overrides?: CallOverrides): Promise<[string]>; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - src: PromiseOrValue, - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - ts(overrides?: CallOverrides): Promise<[BigNumber]>; - - unwrap( - receiver: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - unwrapPreview( - shares: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { assets: BigNumber }>; - - version(overrides?: CallOverrides): Promise<[string]>; - - wrap( - receiver: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - wrapPreview( - assets: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { shares: BigNumber }>; - }; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - guy: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - base(overrides?: CallOverrides): Promise; - - baseDecimals(overrides?: CallOverrides): Promise; - - baseToken(overrides?: CallOverrides): Promise; - - burn( - baseTo: PromiseOrValue, - fyTokenTo: PromiseOrValue, - minRatio: PromiseOrValue, - maxRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - burnForBase( - to: PromiseOrValue, - minRatio: PromiseOrValue, - maxRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyBase( - to: PromiseOrValue, - baseOut: PromiseOrValue, - max: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyBasePreview( - baseOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - buyFYToken( - to: PromiseOrValue, - fyTokenOut: PromiseOrValue, - max: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyFYTokenPreview( - fyTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - cumulativeRatioLast(overrides?: CallOverrides): Promise; - - currentCumulativeRatio( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - currentCumulativeRatio_: BigNumber; - blockTimestampCurrent: BigNumber; - } - >; - - decimals(overrides?: CallOverrides): Promise; - - deploymentChainId(overrides?: CallOverrides): Promise; - - fyToken(overrides?: CallOverrides): Promise; - - g1(overrides?: CallOverrides): Promise; - - g1Fee(overrides?: CallOverrides): Promise; - - g2(overrides?: CallOverrides): Promise; - - getBaseBalance(overrides?: CallOverrides): Promise; - - getC(overrides?: CallOverrides): Promise; - - getCache( - overrides?: CallOverrides - ): Promise<[BigNumber, BigNumber, number, number]>; - - getCurrentSharePrice(overrides?: CallOverrides): Promise; - - getFYTokenBalance(overrides?: CallOverrides): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getSharesBalance(overrides?: CallOverrides): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - init( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - invariant(overrides?: CallOverrides): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maturity(overrides?: CallOverrides): Promise; - - maxBaseIn(overrides?: CallOverrides): Promise; - - maxBaseOut(overrides?: CallOverrides): Promise; - - maxFYTokenIn(overrides?: CallOverrides): Promise; - - maxFYTokenOut(overrides?: CallOverrides): Promise; - - mint( - to: PromiseOrValue, - remainder: PromiseOrValue, - minRatio: PromiseOrValue, - maxRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - mintWithBase( - to: PromiseOrValue, - remainder: PromiseOrValue, - fyTokenToBuy: PromiseOrValue, - minRatio: PromiseOrValue, - maxRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - mu(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - amount: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - retrieveBase( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - retrieveFYToken( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - retrieveShares( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - scaleFactor(overrides?: CallOverrides): Promise; - - sellBase( - to: PromiseOrValue, - min: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellBasePreview( - baseIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sellFYToken( - to: PromiseOrValue, - min: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellFYTokenPreview( - fyTokenIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setFees( - g1Fee_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sharesToken(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - src: PromiseOrValue, - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - ts(overrides?: CallOverrides): Promise; - - unwrap( - receiver: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - unwrapPreview( - shares: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - version(overrides?: CallOverrides): Promise; - - wrap( - receiver: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - wrapPreview( - assets: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - wad: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - guy: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - base(overrides?: CallOverrides): Promise; - - baseDecimals(overrides?: CallOverrides): Promise; - - baseToken(overrides?: CallOverrides): Promise; - - burn( - baseTo: PromiseOrValue, - fyTokenTo: PromiseOrValue, - minRatio: PromiseOrValue, - maxRatio: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - lpTokensBurned: BigNumber; - baseOut: BigNumber; - fyTokenOut: BigNumber; - } - >; - - burnForBase( - to: PromiseOrValue, - minRatio: PromiseOrValue, - maxRatio: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { lpTokensBurned: BigNumber; baseOut: BigNumber } - >; - - buyBase( - to: PromiseOrValue, - baseOut: PromiseOrValue, - max: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - buyBasePreview( - baseOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - buyFYToken( - to: PromiseOrValue, - fyTokenOut: PromiseOrValue, - max: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - buyFYTokenPreview( - fyTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - cumulativeRatioLast(overrides?: CallOverrides): Promise; - - currentCumulativeRatio( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - currentCumulativeRatio_: BigNumber; - blockTimestampCurrent: BigNumber; - } - >; - - decimals(overrides?: CallOverrides): Promise; - - deploymentChainId(overrides?: CallOverrides): Promise; - - fyToken(overrides?: CallOverrides): Promise; - - g1(overrides?: CallOverrides): Promise; - - g1Fee(overrides?: CallOverrides): Promise; - - g2(overrides?: CallOverrides): Promise; - - getBaseBalance(overrides?: CallOverrides): Promise; - - getC(overrides?: CallOverrides): Promise; - - getCache( - overrides?: CallOverrides - ): Promise<[BigNumber, BigNumber, number, number]>; - - getCurrentSharePrice(overrides?: CallOverrides): Promise; - - getFYTokenBalance(overrides?: CallOverrides): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getSharesBalance(overrides?: CallOverrides): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - init( - to: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - baseIn: BigNumber; - fyTokenIn: BigNumber; - lpTokensMinted: BigNumber; - } - >; - - invariant(overrides?: CallOverrides): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - maturity(overrides?: CallOverrides): Promise; - - maxBaseIn(overrides?: CallOverrides): Promise; - - maxBaseOut(overrides?: CallOverrides): Promise; - - maxFYTokenIn(overrides?: CallOverrides): Promise; - - maxFYTokenOut(overrides?: CallOverrides): Promise; - - mint( - to: PromiseOrValue, - remainder: PromiseOrValue, - minRatio: PromiseOrValue, - maxRatio: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - baseIn: BigNumber; - fyTokenIn: BigNumber; - lpTokensMinted: BigNumber; - } - >; - - mintWithBase( - to: PromiseOrValue, - remainder: PromiseOrValue, - fyTokenToBuy: PromiseOrValue, - minRatio: PromiseOrValue, - maxRatio: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - baseIn: BigNumber; - fyTokenIn: BigNumber; - lpTokensMinted: BigNumber; - } - >; - - mu(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - amount: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - retrieveBase( - to: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - retrieveFYToken( - to: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - retrieveShares( - to: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - scaleFactor(overrides?: CallOverrides): Promise; - - sellBase( - to: PromiseOrValue, - min: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sellBasePreview( - baseIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sellFYToken( - to: PromiseOrValue, - min: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sellFYTokenPreview( - fyTokenIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setFees( - g1Fee_: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sharesToken(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - src: PromiseOrValue, - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ts(overrides?: CallOverrides): Promise; - - unwrap( - receiver: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - unwrapPreview( - shares: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - version(overrides?: CallOverrides): Promise; - - wrap( - receiver: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - wrapPreview( - assets: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - value?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - value?: null - ): ApprovalEventFilter; - - "FeesSet(uint16)"(g1Fee?: null): FeesSetEventFilter; - FeesSet(g1Fee?: null): FeesSetEventFilter; - - "Liquidity(uint32,address,address,address,int256,int256,int256)"( - maturity?: null, - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - fyTokenTo?: PromiseOrValue | null, - base?: null, - fyTokens?: null, - poolTokens?: null - ): LiquidityEventFilter; - Liquidity( - maturity?: null, - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - fyTokenTo?: PromiseOrValue | null, - base?: null, - fyTokens?: null, - poolTokens?: null - ): LiquidityEventFilter; - - "RoleAdminChanged(bytes4,bytes4)"( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - RoleAdminChanged( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - - "RoleGranted(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - RoleGranted( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - - "RoleRevoked(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - RoleRevoked( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - - "Sync(uint112,uint112,uint256)"( - baseCached?: null, - fyTokenCached?: null, - cumulativeBalancesRatio?: null - ): SyncEventFilter; - Sync( - baseCached?: null, - fyTokenCached?: null, - cumulativeBalancesRatio?: null - ): SyncEventFilter; - - "Trade(uint32,address,address,int256,int256)"( - maturity?: null, - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - base?: null, - fyTokens?: null - ): TradeEventFilter; - Trade( - maturity?: null, - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - base?: null, - fyTokens?: null - ): TradeEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - value?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - value?: null - ): TransferEventFilter; - - "gg()"(): ggEventFilter; - gg(): ggEventFilter; - - "gm()"(): gmEventFilter; - gm(): gmEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - guy: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - base(overrides?: CallOverrides): Promise; - - baseDecimals(overrides?: CallOverrides): Promise; - - baseToken(overrides?: CallOverrides): Promise; - - burn( - baseTo: PromiseOrValue, - fyTokenTo: PromiseOrValue, - minRatio: PromiseOrValue, - maxRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - burnForBase( - to: PromiseOrValue, - minRatio: PromiseOrValue, - maxRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyBase( - to: PromiseOrValue, - baseOut: PromiseOrValue, - max: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyBasePreview( - baseOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - buyFYToken( - to: PromiseOrValue, - fyTokenOut: PromiseOrValue, - max: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyFYTokenPreview( - fyTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - cumulativeRatioLast(overrides?: CallOverrides): Promise; - - currentCumulativeRatio(overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - deploymentChainId(overrides?: CallOverrides): Promise; - - fyToken(overrides?: CallOverrides): Promise; - - g1(overrides?: CallOverrides): Promise; - - g1Fee(overrides?: CallOverrides): Promise; - - g2(overrides?: CallOverrides): Promise; - - getBaseBalance(overrides?: CallOverrides): Promise; - - getC(overrides?: CallOverrides): Promise; - - getCache(overrides?: CallOverrides): Promise; - - getCurrentSharePrice(overrides?: CallOverrides): Promise; - - getFYTokenBalance(overrides?: CallOverrides): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getSharesBalance(overrides?: CallOverrides): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - init( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - invariant(overrides?: CallOverrides): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maturity(overrides?: CallOverrides): Promise; - - maxBaseIn(overrides?: CallOverrides): Promise; - - maxBaseOut(overrides?: CallOverrides): Promise; - - maxFYTokenIn(overrides?: CallOverrides): Promise; - - maxFYTokenOut(overrides?: CallOverrides): Promise; - - mint( - to: PromiseOrValue, - remainder: PromiseOrValue, - minRatio: PromiseOrValue, - maxRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - mintWithBase( - to: PromiseOrValue, - remainder: PromiseOrValue, - fyTokenToBuy: PromiseOrValue, - minRatio: PromiseOrValue, - maxRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - mu(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - amount: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - retrieveBase( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - retrieveFYToken( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - retrieveShares( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - scaleFactor(overrides?: CallOverrides): Promise; - - sellBase( - to: PromiseOrValue, - min: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellBasePreview( - baseIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sellFYToken( - to: PromiseOrValue, - min: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellFYTokenPreview( - fyTokenIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setFees( - g1Fee_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sharesToken(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - src: PromiseOrValue, - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - ts(overrides?: CallOverrides): Promise; - - unwrap( - receiver: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - unwrapPreview( - shares: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - version(overrides?: CallOverrides): Promise; - - wrap( - receiver: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - wrapPreview( - assets: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - guy: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - base(overrides?: CallOverrides): Promise; - - baseDecimals(overrides?: CallOverrides): Promise; - - baseToken(overrides?: CallOverrides): Promise; - - burn( - baseTo: PromiseOrValue, - fyTokenTo: PromiseOrValue, - minRatio: PromiseOrValue, - maxRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - burnForBase( - to: PromiseOrValue, - minRatio: PromiseOrValue, - maxRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyBase( - to: PromiseOrValue, - baseOut: PromiseOrValue, - max: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyBasePreview( - baseOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - buyFYToken( - to: PromiseOrValue, - fyTokenOut: PromiseOrValue, - max: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyFYTokenPreview( - fyTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - cumulativeRatioLast( - overrides?: CallOverrides - ): Promise; - - currentCumulativeRatio( - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - deploymentChainId(overrides?: CallOverrides): Promise; - - fyToken(overrides?: CallOverrides): Promise; - - g1(overrides?: CallOverrides): Promise; - - g1Fee(overrides?: CallOverrides): Promise; - - g2(overrides?: CallOverrides): Promise; - - getBaseBalance(overrides?: CallOverrides): Promise; - - getC(overrides?: CallOverrides): Promise; - - getCache(overrides?: CallOverrides): Promise; - - getCurrentSharePrice( - overrides?: CallOverrides - ): Promise; - - getFYTokenBalance(overrides?: CallOverrides): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getSharesBalance(overrides?: CallOverrides): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - init( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - invariant(overrides?: CallOverrides): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maturity(overrides?: CallOverrides): Promise; - - maxBaseIn(overrides?: CallOverrides): Promise; - - maxBaseOut(overrides?: CallOverrides): Promise; - - maxFYTokenIn(overrides?: CallOverrides): Promise; - - maxFYTokenOut(overrides?: CallOverrides): Promise; - - mint( - to: PromiseOrValue, - remainder: PromiseOrValue, - minRatio: PromiseOrValue, - maxRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - mintWithBase( - to: PromiseOrValue, - remainder: PromiseOrValue, - fyTokenToBuy: PromiseOrValue, - minRatio: PromiseOrValue, - maxRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - mu(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - amount: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - retrieveBase( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - retrieveFYToken( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - retrieveShares( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - scaleFactor(overrides?: CallOverrides): Promise; - - sellBase( - to: PromiseOrValue, - min: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellBasePreview( - baseIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sellFYToken( - to: PromiseOrValue, - min: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellFYTokenPreview( - fyTokenIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setFees( - g1Fee_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sharesToken(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - src: PromiseOrValue, - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - ts(overrides?: CallOverrides): Promise; - - unwrap( - receiver: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - unwrapPreview( - shares: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - version(overrides?: CallOverrides): Promise; - - wrap( - receiver: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - wrapPreview( - assets: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; -} diff --git a/src/contracts/Strategy.ts b/src/contracts/Strategy.ts deleted file mode 100644 index 22f4c1457..000000000 --- a/src/contracts/Strategy.ts +++ /dev/null @@ -1,1914 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "./common"; - -export interface StrategyInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "LOCK()": FunctionFragment; - "LOCK8605463013()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "ROOT()": FunctionFragment; - "ROOT4146650865()": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "base()": FunctionFragment; - "baseId()": FunctionFragment; - "baseJoin()": FunctionFragment; - "burn(address)": FunctionFragment; - "burnForBase(address)": FunctionFragment; - "cached()": FunctionFragment; - "cauldron()": FunctionFragment; - "claim(address)": FunctionFragment; - "decimals()": FunctionFragment; - "deploymentChainId()": FunctionFragment; - "endPool()": FunctionFragment; - "fyToken()": FunctionFragment; - "getRoleAdmin(bytes4)": FunctionFragment; - "grantRole(bytes4,address)": FunctionFragment; - "grantRoles(bytes4[],address)": FunctionFragment; - "hasRole(bytes4,address)": FunctionFragment; - "ladle()": FunctionFragment; - "lockRole(bytes4)": FunctionFragment; - "mint(address)": FunctionFragment; - "name()": FunctionFragment; - "nextPool()": FunctionFragment; - "nextSeriesId()": FunctionFragment; - "nonces(address)": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "pool()": FunctionFragment; - "renounceRole(bytes4,address)": FunctionFragment; - "resetTokenJoin()": FunctionFragment; - "revokeRole(bytes4,address)": FunctionFragment; - "revokeRoles(bytes4[],address)": FunctionFragment; - "rewards(address)": FunctionFragment; - "rewardsPerToken()": FunctionFragment; - "rewardsPeriod()": FunctionFragment; - "rewardsToken()": FunctionFragment; - "seriesId()": FunctionFragment; - "setNextPool(address,bytes6)": FunctionFragment; - "setRewards(uint32,uint32,uint96)": FunctionFragment; - "setRewardsToken(address)": FunctionFragment; - "setRoleAdmin(bytes4,bytes4)": FunctionFragment; - "setTokenId(bytes6)": FunctionFragment; - "setYield(address)": FunctionFragment; - "startPool(uint256,uint256)": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "version()": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "DOMAIN_SEPARATOR" - | "LOCK" - | "LOCK8605463013" - | "PERMIT_TYPEHASH" - | "ROOT" - | "ROOT4146650865" - | "allowance" - | "approve" - | "balanceOf" - | "base" - | "baseId" - | "baseJoin" - | "burn" - | "burnForBase" - | "cached" - | "cauldron" - | "claim" - | "decimals" - | "deploymentChainId" - | "endPool" - | "fyToken" - | "getRoleAdmin" - | "grantRole" - | "grantRoles" - | "hasRole" - | "ladle" - | "lockRole" - | "mint" - | "name" - | "nextPool" - | "nextSeriesId" - | "nonces" - | "permit" - | "pool" - | "renounceRole" - | "resetTokenJoin" - | "revokeRole" - | "revokeRoles" - | "rewards" - | "rewardsPerToken" - | "rewardsPeriod" - | "rewardsToken" - | "seriesId" - | "setNextPool" - | "setRewards" - | "setRewardsToken" - | "setRoleAdmin" - | "setTokenId" - | "setYield" - | "startPool" - | "symbol" - | "totalSupply" - | "transfer" - | "transferFrom" - | "version" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "DOMAIN_SEPARATOR", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; - encodeFunctionData( - functionFragment: "LOCK8605463013", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "PERMIT_TYPEHASH", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; - encodeFunctionData( - functionFragment: "ROOT4146650865", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "balanceOf", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "base", values?: undefined): string; - encodeFunctionData(functionFragment: "baseId", values?: undefined): string; - encodeFunctionData(functionFragment: "baseJoin", values?: undefined): string; - encodeFunctionData( - functionFragment: "burn", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "burnForBase", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "cached", values?: undefined): string; - encodeFunctionData(functionFragment: "cauldron", values?: undefined): string; - encodeFunctionData( - functionFragment: "claim", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; - encodeFunctionData( - functionFragment: "deploymentChainId", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "endPool", values?: undefined): string; - encodeFunctionData(functionFragment: "fyToken", values?: undefined): string; - encodeFunctionData( - functionFragment: "getRoleAdmin", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "hasRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "ladle", values?: undefined): string; - encodeFunctionData( - functionFragment: "lockRole", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "mint", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData(functionFragment: "nextPool", values?: undefined): string; - encodeFunctionData( - functionFragment: "nextSeriesId", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "nonces", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "permit", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData(functionFragment: "pool", values?: undefined): string; - encodeFunctionData( - functionFragment: "renounceRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "resetTokenJoin", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "revokeRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "rewards", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "rewardsPerToken", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "rewardsPeriod", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "rewardsToken", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "seriesId", values?: undefined): string; - encodeFunctionData( - functionFragment: "setNextPool", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setRewards", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "setRewardsToken", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setRoleAdmin", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setTokenId", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setYield", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "startPool", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData( - functionFragment: "totalSupply", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData(functionFragment: "version", values?: undefined): string; - - decodeFunctionResult( - functionFragment: "DOMAIN_SEPARATOR", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "LOCK8605463013", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "PERMIT_TYPEHASH", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "ROOT4146650865", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "base", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "baseId", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "baseJoin", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "burnForBase", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "cached", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cauldron", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "deploymentChainId", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "endPool", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "fyToken", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "ladle", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "nextPool", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "nextSeriesId", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "pool", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "renounceRole", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "resetTokenJoin", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "revokeRoles", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "rewards", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "rewardsPerToken", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "rewardsPeriod", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "rewardsToken", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "seriesId", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "setNextPool", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "setRewards", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "setRewardsToken", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "setTokenId", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setYield", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "startPool", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "totalSupply", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "transferFrom", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Claimed(address,uint256)": EventFragment; - "NextPoolSet(address,bytes6)": EventFragment; - "PoolEnded(address)": EventFragment; - "PoolStarted(address)": EventFragment; - "RewardsPerTokenUpdated(uint256)": EventFragment; - "RewardsSet(uint32,uint32,uint256)": EventFragment; - "RewardsTokenSet(address)": EventFragment; - "RoleAdminChanged(bytes4,bytes4)": EventFragment; - "RoleGranted(bytes4,address,address)": EventFragment; - "RoleRevoked(bytes4,address,address)": EventFragment; - "TokenIdSet(bytes6)": EventFragment; - "TokenJoinReset(address)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - "UserRewardsUpdated(address,uint256,uint256)": EventFragment; - "YieldSet(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Claimed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "NextPoolSet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "PoolEnded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "PoolStarted"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RewardsPerTokenUpdated"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RewardsSet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RewardsTokenSet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TokenIdSet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TokenJoinReset"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; - getEvent(nameOrSignatureOrTopic: "UserRewardsUpdated"): EventFragment; - getEvent(nameOrSignatureOrTopic: "YieldSet"): EventFragment; -} - -export interface ApprovalEventObject { - owner: string; - spender: string; - value: BigNumber; -} -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; - -export type ApprovalEventFilter = TypedEventFilter; - -export interface ClaimedEventObject { - receiver: string; - claimed: BigNumber; -} -export type ClaimedEvent = TypedEvent<[string, BigNumber], ClaimedEventObject>; - -export type ClaimedEventFilter = TypedEventFilter; - -export interface NextPoolSetEventObject { - pool: string; - seriesId: string; -} -export type NextPoolSetEvent = TypedEvent< - [string, string], - NextPoolSetEventObject ->; - -export type NextPoolSetEventFilter = TypedEventFilter; - -export interface PoolEndedEventObject { - pool: string; -} -export type PoolEndedEvent = TypedEvent<[string], PoolEndedEventObject>; - -export type PoolEndedEventFilter = TypedEventFilter; - -export interface PoolStartedEventObject { - pool: string; -} -export type PoolStartedEvent = TypedEvent<[string], PoolStartedEventObject>; - -export type PoolStartedEventFilter = TypedEventFilter; - -export interface RewardsPerTokenUpdatedEventObject { - accumulated: BigNumber; -} -export type RewardsPerTokenUpdatedEvent = TypedEvent< - [BigNumber], - RewardsPerTokenUpdatedEventObject ->; - -export type RewardsPerTokenUpdatedEventFilter = - TypedEventFilter; - -export interface RewardsSetEventObject { - start: number; - end: number; - rate: BigNumber; -} -export type RewardsSetEvent = TypedEvent< - [number, number, BigNumber], - RewardsSetEventObject ->; - -export type RewardsSetEventFilter = TypedEventFilter; - -export interface RewardsTokenSetEventObject { - token: string; -} -export type RewardsTokenSetEvent = TypedEvent< - [string], - RewardsTokenSetEventObject ->; - -export type RewardsTokenSetEventFilter = TypedEventFilter; - -export interface RoleAdminChangedEventObject { - role: string; - newAdminRole: string; -} -export type RoleAdminChangedEvent = TypedEvent< - [string, string], - RoleAdminChangedEventObject ->; - -export type RoleAdminChangedEventFilter = - TypedEventFilter; - -export interface RoleGrantedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleGrantedEvent = TypedEvent< - [string, string, string], - RoleGrantedEventObject ->; - -export type RoleGrantedEventFilter = TypedEventFilter; - -export interface RoleRevokedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleRevokedEvent = TypedEvent< - [string, string, string], - RoleRevokedEventObject ->; - -export type RoleRevokedEventFilter = TypedEventFilter; - -export interface TokenIdSetEventObject { - id: string; -} -export type TokenIdSetEvent = TypedEvent<[string], TokenIdSetEventObject>; - -export type TokenIdSetEventFilter = TypedEventFilter; - -export interface TokenJoinResetEventObject { - join: string; -} -export type TokenJoinResetEvent = TypedEvent< - [string], - TokenJoinResetEventObject ->; - -export type TokenJoinResetEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - value: BigNumber; -} -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; - -export interface UserRewardsUpdatedEventObject { - user: string; - userRewards: BigNumber; - paidRewardPerToken: BigNumber; -} -export type UserRewardsUpdatedEvent = TypedEvent< - [string, BigNumber, BigNumber], - UserRewardsUpdatedEventObject ->; - -export type UserRewardsUpdatedEventFilter = - TypedEventFilter; - -export interface YieldSetEventObject { - ladle: string; - cauldron: string; -} -export type YieldSetEvent = TypedEvent<[string, string], YieldSetEventObject>; - -export type YieldSetEventFilter = TypedEventFilter; - -export interface Strategy extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: StrategyInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - LOCK(overrides?: CallOverrides): Promise<[string]>; - - LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - ROOT(overrides?: CallOverrides): Promise<[string]>; - - ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - guy: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - base(overrides?: CallOverrides): Promise<[string]>; - - baseId(overrides?: CallOverrides): Promise<[string]>; - - baseJoin(overrides?: CallOverrides): Promise<[string]>; - - burn( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - burnForBase( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - cached(overrides?: CallOverrides): Promise<[BigNumber]>; - - cauldron(overrides?: CallOverrides): Promise<[string]>; - - claim( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - deploymentChainId(overrides?: CallOverrides): Promise<[BigNumber]>; - - endPool( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fyToken(overrides?: CallOverrides): Promise<[string]>; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - ladle(overrides?: CallOverrides): Promise<[string]>; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - mint( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - nextPool(overrides?: CallOverrides): Promise<[string]>; - - nextSeriesId(overrides?: CallOverrides): Promise<[string]>; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - amount: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - pool(overrides?: CallOverrides): Promise<[string]>; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - resetTokenJoin( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - rewards( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { accumulated: BigNumber; checkpoint: BigNumber } - >; - - rewardsPerToken( - overrides?: CallOverrides - ): Promise< - [BigNumber, number, BigNumber] & { - accumulated: BigNumber; - lastUpdated: number; - rate: BigNumber; - } - >; - - rewardsPeriod( - overrides?: CallOverrides - ): Promise<[number, number] & { start: number; end: number }>; - - rewardsToken(overrides?: CallOverrides): Promise<[string]>; - - seriesId(overrides?: CallOverrides): Promise<[string]>; - - setNextPool( - pool_: PromiseOrValue, - seriesId_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRewards( - start: PromiseOrValue, - end: PromiseOrValue, - rate: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRewardsToken( - rewardsToken_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setTokenId( - baseId_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setYield( - ladle_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - startPool( - minRatio: PromiseOrValue, - maxRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - src: PromiseOrValue, - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise<[string]>; - }; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - guy: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - base(overrides?: CallOverrides): Promise; - - baseId(overrides?: CallOverrides): Promise; - - baseJoin(overrides?: CallOverrides): Promise; - - burn( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - burnForBase( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - cached(overrides?: CallOverrides): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - claim( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - deploymentChainId(overrides?: CallOverrides): Promise; - - endPool( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fyToken(overrides?: CallOverrides): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ladle(overrides?: CallOverrides): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - mint( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nextPool(overrides?: CallOverrides): Promise; - - nextSeriesId(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - amount: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - pool(overrides?: CallOverrides): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - resetTokenJoin( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - rewards( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { accumulated: BigNumber; checkpoint: BigNumber } - >; - - rewardsPerToken( - overrides?: CallOverrides - ): Promise< - [BigNumber, number, BigNumber] & { - accumulated: BigNumber; - lastUpdated: number; - rate: BigNumber; - } - >; - - rewardsPeriod( - overrides?: CallOverrides - ): Promise<[number, number] & { start: number; end: number }>; - - rewardsToken(overrides?: CallOverrides): Promise; - - seriesId(overrides?: CallOverrides): Promise; - - setNextPool( - pool_: PromiseOrValue, - seriesId_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRewards( - start: PromiseOrValue, - end: PromiseOrValue, - rate: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRewardsToken( - rewardsToken_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setTokenId( - baseId_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setYield( - ladle_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - startPool( - minRatio: PromiseOrValue, - maxRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - src: PromiseOrValue, - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - wad: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - guy: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - base(overrides?: CallOverrides): Promise; - - baseId(overrides?: CallOverrides): Promise; - - baseJoin(overrides?: CallOverrides): Promise; - - burn( - to: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - burnForBase( - to: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - cached(overrides?: CallOverrides): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - claim( - to: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - deploymentChainId(overrides?: CallOverrides): Promise; - - endPool(overrides?: CallOverrides): Promise; - - fyToken(overrides?: CallOverrides): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ladle(overrides?: CallOverrides): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - mint( - to: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nextPool(overrides?: CallOverrides): Promise; - - nextSeriesId(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - amount: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pool(overrides?: CallOverrides): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - resetTokenJoin(overrides?: CallOverrides): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - rewards( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { accumulated: BigNumber; checkpoint: BigNumber } - >; - - rewardsPerToken( - overrides?: CallOverrides - ): Promise< - [BigNumber, number, BigNumber] & { - accumulated: BigNumber; - lastUpdated: number; - rate: BigNumber; - } - >; - - rewardsPeriod( - overrides?: CallOverrides - ): Promise<[number, number] & { start: number; end: number }>; - - rewardsToken(overrides?: CallOverrides): Promise; - - seriesId(overrides?: CallOverrides): Promise; - - setNextPool( - pool_: PromiseOrValue, - seriesId_: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setRewards( - start: PromiseOrValue, - end: PromiseOrValue, - rate: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setRewardsToken( - rewardsToken_: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setTokenId( - baseId_: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setYield( - ladle_: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - startPool( - minRatio: PromiseOrValue, - maxRatio: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - src: PromiseOrValue, - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - value?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - value?: null - ): ApprovalEventFilter; - - "Claimed(address,uint256)"( - receiver?: null, - claimed?: null - ): ClaimedEventFilter; - Claimed(receiver?: null, claimed?: null): ClaimedEventFilter; - - "NextPoolSet(address,bytes6)"( - pool?: PromiseOrValue | null, - seriesId?: PromiseOrValue | null - ): NextPoolSetEventFilter; - NextPoolSet( - pool?: PromiseOrValue | null, - seriesId?: PromiseOrValue | null - ): NextPoolSetEventFilter; - - "PoolEnded(address)"(pool?: null): PoolEndedEventFilter; - PoolEnded(pool?: null): PoolEndedEventFilter; - - "PoolStarted(address)"(pool?: null): PoolStartedEventFilter; - PoolStarted(pool?: null): PoolStartedEventFilter; - - "RewardsPerTokenUpdated(uint256)"( - accumulated?: null - ): RewardsPerTokenUpdatedEventFilter; - RewardsPerTokenUpdated( - accumulated?: null - ): RewardsPerTokenUpdatedEventFilter; - - "RewardsSet(uint32,uint32,uint256)"( - start?: null, - end?: null, - rate?: null - ): RewardsSetEventFilter; - RewardsSet(start?: null, end?: null, rate?: null): RewardsSetEventFilter; - - "RewardsTokenSet(address)"(token?: null): RewardsTokenSetEventFilter; - RewardsTokenSet(token?: null): RewardsTokenSetEventFilter; - - "RoleAdminChanged(bytes4,bytes4)"( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - RoleAdminChanged( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - - "RoleGranted(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - RoleGranted( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - - "RoleRevoked(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - RoleRevoked( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - - "TokenIdSet(bytes6)"(id?: null): TokenIdSetEventFilter; - TokenIdSet(id?: null): TokenIdSetEventFilter; - - "TokenJoinReset(address)"(join?: null): TokenJoinResetEventFilter; - TokenJoinReset(join?: null): TokenJoinResetEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - value?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - value?: null - ): TransferEventFilter; - - "UserRewardsUpdated(address,uint256,uint256)"( - user?: null, - userRewards?: null, - paidRewardPerToken?: null - ): UserRewardsUpdatedEventFilter; - UserRewardsUpdated( - user?: null, - userRewards?: null, - paidRewardPerToken?: null - ): UserRewardsUpdatedEventFilter; - - "YieldSet(address,address)"( - ladle?: null, - cauldron?: null - ): YieldSetEventFilter; - YieldSet(ladle?: null, cauldron?: null): YieldSetEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - guy: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - base(overrides?: CallOverrides): Promise; - - baseId(overrides?: CallOverrides): Promise; - - baseJoin(overrides?: CallOverrides): Promise; - - burn( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - burnForBase( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - cached(overrides?: CallOverrides): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - claim( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - deploymentChainId(overrides?: CallOverrides): Promise; - - endPool( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fyToken(overrides?: CallOverrides): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ladle(overrides?: CallOverrides): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - mint( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nextPool(overrides?: CallOverrides): Promise; - - nextSeriesId(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - amount: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - pool(overrides?: CallOverrides): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - resetTokenJoin( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - rewards( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - rewardsPerToken(overrides?: CallOverrides): Promise; - - rewardsPeriod(overrides?: CallOverrides): Promise; - - rewardsToken(overrides?: CallOverrides): Promise; - - seriesId(overrides?: CallOverrides): Promise; - - setNextPool( - pool_: PromiseOrValue, - seriesId_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRewards( - start: PromiseOrValue, - end: PromiseOrValue, - rate: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRewardsToken( - rewardsToken_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setTokenId( - baseId_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setYield( - ladle_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - startPool( - minRatio: PromiseOrValue, - maxRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - src: PromiseOrValue, - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - guy: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - base(overrides?: CallOverrides): Promise; - - baseId(overrides?: CallOverrides): Promise; - - baseJoin(overrides?: CallOverrides): Promise; - - burn( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - burnForBase( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - cached(overrides?: CallOverrides): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - claim( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - deploymentChainId(overrides?: CallOverrides): Promise; - - endPool( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fyToken(overrides?: CallOverrides): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ladle(overrides?: CallOverrides): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - mint( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nextPool(overrides?: CallOverrides): Promise; - - nextSeriesId(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - amount: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - pool(overrides?: CallOverrides): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - resetTokenJoin( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - rewards( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - rewardsPerToken(overrides?: CallOverrides): Promise; - - rewardsPeriod(overrides?: CallOverrides): Promise; - - rewardsToken(overrides?: CallOverrides): Promise; - - seriesId(overrides?: CallOverrides): Promise; - - setNextPool( - pool_: PromiseOrValue, - seriesId_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRewards( - start: PromiseOrValue, - end: PromiseOrValue, - rate: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRewardsToken( - rewardsToken_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setTokenId( - baseId_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setYield( - ladle_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - startPool( - minRatio: PromiseOrValue, - maxRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - src: PromiseOrValue, - dst: PromiseOrValue, - wad: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; - }; -} diff --git a/src/contracts/StrategyV21.d.ts b/src/contracts/StrategyV21.d.ts deleted file mode 100644 index ff38a8c89..000000000 --- a/src/contracts/StrategyV21.d.ts +++ /dev/null @@ -1,1895 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { - ethers, - EventFilter, - Signer, - BigNumber, - BigNumberish, - PopulatedTransaction, - BaseContract, - ContractTransaction, - Overrides, - CallOverrides, -} from "ethers"; -import { BytesLike } from "@ethersproject/bytes"; -import { Listener, Provider } from "@ethersproject/providers"; -import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; -import type { TypedEventFilter, TypedEvent, TypedListener } from "./common"; - -interface StrategyV21Interface extends ethers.utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "LOCK()": FunctionFragment; - "LOCK8605463013()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "ROOT()": FunctionFragment; - "ROOT4146650865()": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "base()": FunctionFragment; - "baseCached()": FunctionFragment; - "burn(address)": FunctionFragment; - "burnDivested(address)": FunctionFragment; - "burnPoolTokens(address,uint256)": FunctionFragment; - "buyFYToken(address,address)": FunctionFragment; - "claim(address)": FunctionFragment; - "decimals()": FunctionFragment; - "deploymentChainId()": FunctionFragment; - "divest()": FunctionFragment; - "eject()": FunctionFragment; - "fyToken()": FunctionFragment; - "fyTokenCached()": FunctionFragment; - "getRoleAdmin(bytes4)": FunctionFragment; - "grantRole(bytes4,address)": FunctionFragment; - "grantRoles(bytes4[],address)": FunctionFragment; - "hasRole(bytes4,address)": FunctionFragment; - "init(address)": FunctionFragment; - "invest(address)": FunctionFragment; - "lockRole(bytes4)": FunctionFragment; - "maturity()": FunctionFragment; - "mint(address)": FunctionFragment; - "mintDivested(address)": FunctionFragment; - "name()": FunctionFragment; - "nonces(address)": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "pool()": FunctionFragment; - "poolCached()": FunctionFragment; - "remit(address)": FunctionFragment; - "renounceRole(bytes4,address)": FunctionFragment; - "restart()": FunctionFragment; - "revokeRole(bytes4,address)": FunctionFragment; - "revokeRoles(bytes4[],address)": FunctionFragment; - "rewards(address)": FunctionFragment; - "rewardsPerToken()": FunctionFragment; - "rewardsPeriod()": FunctionFragment; - "rewardsToken()": FunctionFragment; - "setRewards(uint32,uint32,uint96)": FunctionFragment; - "setRewardsToken(address)": FunctionFragment; - "setRoleAdmin(bytes4,bytes4)": FunctionFragment; - "state()": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "version()": FunctionFragment; - }; - - encodeFunctionData( - functionFragment: "DOMAIN_SEPARATOR", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; - encodeFunctionData( - functionFragment: "LOCK8605463013", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "PERMIT_TYPEHASH", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; - encodeFunctionData( - functionFragment: "ROOT4146650865", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "allowance", - values: [string, string] - ): string; - encodeFunctionData( - functionFragment: "approve", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; - encodeFunctionData(functionFragment: "base", values?: undefined): string; - encodeFunctionData( - functionFragment: "baseCached", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "burn", values: [string]): string; - encodeFunctionData( - functionFragment: "burnDivested", - values: [string] - ): string; - encodeFunctionData( - functionFragment: "burnPoolTokens", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "buyFYToken", - values: [string, string] - ): string; - encodeFunctionData(functionFragment: "claim", values: [string]): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; - encodeFunctionData( - functionFragment: "deploymentChainId", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "divest", values?: undefined): string; - encodeFunctionData(functionFragment: "eject", values?: undefined): string; - encodeFunctionData(functionFragment: "fyToken", values?: undefined): string; - encodeFunctionData( - functionFragment: "fyTokenCached", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getRoleAdmin", - values: [BytesLike] - ): string; - encodeFunctionData( - functionFragment: "grantRole", - values: [BytesLike, string] - ): string; - encodeFunctionData( - functionFragment: "grantRoles", - values: [BytesLike[], string] - ): string; - encodeFunctionData( - functionFragment: "hasRole", - values: [BytesLike, string] - ): string; - encodeFunctionData(functionFragment: "init", values: [string]): string; - encodeFunctionData(functionFragment: "invest", values: [string]): string; - encodeFunctionData(functionFragment: "lockRole", values: [BytesLike]): string; - encodeFunctionData(functionFragment: "maturity", values?: undefined): string; - encodeFunctionData(functionFragment: "mint", values: [string]): string; - encodeFunctionData( - functionFragment: "mintDivested", - values: [string] - ): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData(functionFragment: "nonces", values: [string]): string; - encodeFunctionData( - functionFragment: "permit", - values: [ - string, - string, - BigNumberish, - BigNumberish, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - encodeFunctionData(functionFragment: "pool", values?: undefined): string; - encodeFunctionData( - functionFragment: "poolCached", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "remit", values: [string]): string; - encodeFunctionData( - functionFragment: "renounceRole", - values: [BytesLike, string] - ): string; - encodeFunctionData(functionFragment: "restart", values?: undefined): string; - encodeFunctionData( - functionFragment: "revokeRole", - values: [BytesLike, string] - ): string; - encodeFunctionData( - functionFragment: "revokeRoles", - values: [BytesLike[], string] - ): string; - encodeFunctionData(functionFragment: "rewards", values: [string]): string; - encodeFunctionData( - functionFragment: "rewardsPerToken", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "rewardsPeriod", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "rewardsToken", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "setRewards", - values: [BigNumberish, BigNumberish, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "setRewardsToken", - values: [string] - ): string; - encodeFunctionData( - functionFragment: "setRoleAdmin", - values: [BytesLike, BytesLike] - ): string; - encodeFunctionData(functionFragment: "state", values?: undefined): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData( - functionFragment: "totalSupply", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "transfer", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "transferFrom", - values: [string, string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "version", values?: undefined): string; - - decodeFunctionResult( - functionFragment: "DOMAIN_SEPARATOR", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "LOCK8605463013", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "PERMIT_TYPEHASH", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "ROOT4146650865", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "base", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "baseCached", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "burnDivested", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "burnPoolTokens", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "buyFYToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "deploymentChainId", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "divest", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "eject", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "fyToken", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "fyTokenCached", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "init", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "invest", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "maturity", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "mintDivested", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "pool", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "poolCached", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "remit", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "renounceRole", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "restart", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "revokeRoles", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "rewards", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "rewardsPerToken", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "rewardsPeriod", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "rewardsToken", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "setRewards", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "setRewardsToken", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "state", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "totalSupply", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "transferFrom", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Claimed(address,address,uint256)": EventFragment; - "Divested(address,uint256,uint256)": EventFragment; - "Drained(address,uint256)": EventFragment; - "Ejected(address,uint256,uint256,uint256)": EventFragment; - "Invested(address,uint256,uint256)": EventFragment; - "RewardsPerTokenUpdated(uint256)": EventFragment; - "RewardsSet(uint32,uint32,uint256)": EventFragment; - "RewardsTokenSet(address)": EventFragment; - "RoleAdminChanged(bytes4,bytes4)": EventFragment; - "RoleGranted(bytes4,address,address)": EventFragment; - "RoleRevoked(bytes4,address,address)": EventFragment; - "SoldFYToken(uint256,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - "UserRewardsUpdated(address,uint256,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Claimed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Divested"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Drained"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Ejected"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Invested"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RewardsPerTokenUpdated"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RewardsSet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RewardsTokenSet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SoldFYToken"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; - getEvent(nameOrSignatureOrTopic: "UserRewardsUpdated"): EventFragment; -} - -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber] & { - owner: string; - spender: string; - value: BigNumber; - } ->; - -export type ClaimedEvent = TypedEvent< - [string, string, BigNumber] & { - user: string; - receiver: string; - claimed: BigNumber; - } ->; - -export type DivestedEvent = TypedEvent< - [string, BigNumber, BigNumber] & { - pool: string; - lpTokenDivested: BigNumber; - baseObtained: BigNumber; - } ->; - -export type DrainedEvent = TypedEvent< - [string, BigNumber] & { pool: string; lpTokenDivested: BigNumber } ->; - -export type EjectedEvent = TypedEvent< - [string, BigNumber, BigNumber, BigNumber] & { - pool: string; - lpTokenDivested: BigNumber; - baseObtained: BigNumber; - fyTokenObtained: BigNumber; - } ->; - -export type InvestedEvent = TypedEvent< - [string, BigNumber, BigNumber] & { - pool: string; - baseInvested: BigNumber; - lpTokensObtained: BigNumber; - } ->; - -export type RewardsPerTokenUpdatedEvent = TypedEvent< - [BigNumber] & { accumulated: BigNumber } ->; - -export type RewardsSetEvent = TypedEvent< - [number, number, BigNumber] & { start: number; end: number; rate: BigNumber } ->; - -export type RewardsTokenSetEvent = TypedEvent<[string] & { token: string }>; - -export type RoleAdminChangedEvent = TypedEvent< - [string, string] & { role: string; newAdminRole: string } ->; - -export type RoleGrantedEvent = TypedEvent< - [string, string, string] & { role: string; account: string; sender: string } ->; - -export type RoleRevokedEvent = TypedEvent< - [string, string, string] & { role: string; account: string; sender: string } ->; - -export type SoldFYTokenEvent = TypedEvent< - [BigNumber, BigNumber] & { soldFYToken: BigNumber; returnedBase: BigNumber } ->; - -export type TransferEvent = TypedEvent< - [string, string, BigNumber] & { from: string; to: string; value: BigNumber } ->; - -export type UserRewardsUpdatedEvent = TypedEvent< - [string, BigNumber, BigNumber] & { - user: string; - userRewards: BigNumber; - paidRewardPerToken: BigNumber; - } ->; - -export class StrategyV21 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - listeners, EventArgsObject>( - eventFilter?: TypedEventFilter - ): Array>; - off, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - on, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - once, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeListener, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeAllListeners, EventArgsObject>( - eventFilter: TypedEventFilter - ): this; - - listeners(eventName?: string): Array; - off(eventName: string, listener: Listener): this; - on(eventName: string, listener: Listener): this; - once(eventName: string, listener: Listener): this; - removeListener(eventName: string, listener: Listener): this; - removeAllListeners(eventName?: string): this; - - queryFilter, EventArgsObject>( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - interface: StrategyV21Interface; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - LOCK(overrides?: CallOverrides): Promise<[string]>; - - LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - ROOT(overrides?: CallOverrides): Promise<[string]>; - - ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: string, - wad: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(guy: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - base(overrides?: CallOverrides): Promise<[string]>; - - baseCached(overrides?: CallOverrides): Promise<[BigNumber]>; - - burn( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - burnDivested( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - burnPoolTokens( - pool_: string, - poolTokens: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - buyFYToken( - fyTokenTo: string, - baseTo: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - claim( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - deploymentChainId(overrides?: CallOverrides): Promise<[BigNumber]>; - - divest( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - eject( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - fyToken(overrides?: CallOverrides): Promise<[string]>; - - fyTokenCached(overrides?: CallOverrides): Promise<[BigNumber]>; - - getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise<[string]>; - - grantRole( - role: BytesLike, - account: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - grantRoles( - roles: BytesLike[], - account: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - hasRole( - role: BytesLike, - account: string, - overrides?: CallOverrides - ): Promise<[boolean]>; - - init( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - invest( - pool_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - lockRole( - role: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - maturity(overrides?: CallOverrides): Promise<[number]>; - - mint( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - mintDivested( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonces(arg0: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - permit( - owner: string, - spender: string, - amount: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - pool(overrides?: CallOverrides): Promise<[string]>; - - poolCached(overrides?: CallOverrides): Promise<[BigNumber]>; - - remit( - user: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - renounceRole( - role: BytesLike, - account: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - restart( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - revokeRole( - role: BytesLike, - account: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - revokeRoles( - roles: BytesLike[], - account: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - rewards( - arg0: string, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { accumulated: BigNumber; checkpoint: BigNumber } - >; - - rewardsPerToken( - overrides?: CallOverrides - ): Promise< - [BigNumber, number, BigNumber] & { - accumulated: BigNumber; - lastUpdated: number; - rate: BigNumber; - } - >; - - rewardsPeriod( - overrides?: CallOverrides - ): Promise<[number, number] & { start: number; end: number }>; - - rewardsToken(overrides?: CallOverrides): Promise<[string]>; - - setRewards( - start: BigNumberish, - end: BigNumberish, - rate: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setRewardsToken( - rewardsToken_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setRoleAdmin( - role: BytesLike, - adminRole: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - state(overrides?: CallOverrides): Promise<[number]>; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - dst: string, - wad: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - src: string, - dst: string, - wad: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - version(overrides?: CallOverrides): Promise<[string]>; - }; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - wad: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(guy: string, overrides?: CallOverrides): Promise; - - base(overrides?: CallOverrides): Promise; - - baseCached(overrides?: CallOverrides): Promise; - - burn( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - burnDivested( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - burnPoolTokens( - pool_: string, - poolTokens: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - buyFYToken( - fyTokenTo: string, - baseTo: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - claim( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - deploymentChainId(overrides?: CallOverrides): Promise; - - divest( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - eject( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - fyToken(overrides?: CallOverrides): Promise; - - fyTokenCached(overrides?: CallOverrides): Promise; - - getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise; - - grantRole( - role: BytesLike, - account: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - grantRoles( - roles: BytesLike[], - account: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - hasRole( - role: BytesLike, - account: string, - overrides?: CallOverrides - ): Promise; - - init( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - invest( - pool_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - lockRole( - role: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - mintDivested( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces(arg0: string, overrides?: CallOverrides): Promise; - - permit( - owner: string, - spender: string, - amount: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - pool(overrides?: CallOverrides): Promise; - - poolCached(overrides?: CallOverrides): Promise; - - remit( - user: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - renounceRole( - role: BytesLike, - account: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - restart( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - revokeRole( - role: BytesLike, - account: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - revokeRoles( - roles: BytesLike[], - account: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - rewards( - arg0: string, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { accumulated: BigNumber; checkpoint: BigNumber } - >; - - rewardsPerToken( - overrides?: CallOverrides - ): Promise< - [BigNumber, number, BigNumber] & { - accumulated: BigNumber; - lastUpdated: number; - rate: BigNumber; - } - >; - - rewardsPeriod( - overrides?: CallOverrides - ): Promise<[number, number] & { start: number; end: number }>; - - rewardsToken(overrides?: CallOverrides): Promise; - - setRewards( - start: BigNumberish, - end: BigNumberish, - rate: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setRewardsToken( - rewardsToken_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setRoleAdmin( - role: BytesLike, - adminRole: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - state(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - dst: string, - wad: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - src: string, - dst: string, - wad: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - version(overrides?: CallOverrides): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - wad: BigNumberish, - overrides?: CallOverrides - ): Promise; - - balanceOf(guy: string, overrides?: CallOverrides): Promise; - - base(overrides?: CallOverrides): Promise; - - baseCached(overrides?: CallOverrides): Promise; - - burn(to: string, overrides?: CallOverrides): Promise; - - burnDivested(to: string, overrides?: CallOverrides): Promise; - - burnPoolTokens( - pool_: string, - poolTokens: BigNumberish, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - baseReceived: BigNumber; - fyTokenReceived: BigNumber; - } - >; - - buyFYToken( - fyTokenTo: string, - baseTo: string, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - soldFYToken: BigNumber; - returnedBase: BigNumber; - } - >; - - claim(to: string, overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - deploymentChainId(overrides?: CallOverrides): Promise; - - divest(overrides?: CallOverrides): Promise; - - eject( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - baseReceived: BigNumber; - fyTokenReceived: BigNumber; - } - >; - - fyToken(overrides?: CallOverrides): Promise; - - fyTokenCached(overrides?: CallOverrides): Promise; - - getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise; - - grantRole( - role: BytesLike, - account: string, - overrides?: CallOverrides - ): Promise; - - grantRoles( - roles: BytesLike[], - account: string, - overrides?: CallOverrides - ): Promise; - - hasRole( - role: BytesLike, - account: string, - overrides?: CallOverrides - ): Promise; - - init( - to: string, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - baseIn: BigNumber; - fyTokenIn: BigNumber; - minted: BigNumber; - } - >; - - invest(pool_: string, overrides?: CallOverrides): Promise; - - lockRole(role: BytesLike, overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint(to: string, overrides?: CallOverrides): Promise; - - mintDivested(to: string, overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces(arg0: string, overrides?: CallOverrides): Promise; - - permit( - owner: string, - spender: string, - amount: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: CallOverrides - ): Promise; - - pool(overrides?: CallOverrides): Promise; - - poolCached(overrides?: CallOverrides): Promise; - - remit(user: string, overrides?: CallOverrides): Promise; - - renounceRole( - role: BytesLike, - account: string, - overrides?: CallOverrides - ): Promise; - - restart(overrides?: CallOverrides): Promise; - - revokeRole( - role: BytesLike, - account: string, - overrides?: CallOverrides - ): Promise; - - revokeRoles( - roles: BytesLike[], - account: string, - overrides?: CallOverrides - ): Promise; - - rewards( - arg0: string, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { accumulated: BigNumber; checkpoint: BigNumber } - >; - - rewardsPerToken( - overrides?: CallOverrides - ): Promise< - [BigNumber, number, BigNumber] & { - accumulated: BigNumber; - lastUpdated: number; - rate: BigNumber; - } - >; - - rewardsPeriod( - overrides?: CallOverrides - ): Promise<[number, number] & { start: number; end: number }>; - - rewardsToken(overrides?: CallOverrides): Promise; - - setRewards( - start: BigNumberish, - end: BigNumberish, - rate: BigNumberish, - overrides?: CallOverrides - ): Promise; - - setRewardsToken( - rewardsToken_: string, - overrides?: CallOverrides - ): Promise; - - setRoleAdmin( - role: BytesLike, - adminRole: BytesLike, - overrides?: CallOverrides - ): Promise; - - state(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - dst: string, - wad: BigNumberish, - overrides?: CallOverrides - ): Promise; - - transferFrom( - src: string, - dst: string, - wad: BigNumberish, - overrides?: CallOverrides - ): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - filters: { - "Approval(address,address,uint256)"( - owner?: string | null, - spender?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { owner: string; spender: string; value: BigNumber } - >; - - Approval( - owner?: string | null, - spender?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { owner: string; spender: string; value: BigNumber } - >; - - "Claimed(address,address,uint256)"( - user?: null, - receiver?: null, - claimed?: null - ): TypedEventFilter< - [string, string, BigNumber], - { user: string; receiver: string; claimed: BigNumber } - >; - - Claimed( - user?: null, - receiver?: null, - claimed?: null - ): TypedEventFilter< - [string, string, BigNumber], - { user: string; receiver: string; claimed: BigNumber } - >; - - "Divested(address,uint256,uint256)"( - pool?: string | null, - lpTokenDivested?: null, - baseObtained?: null - ): TypedEventFilter< - [string, BigNumber, BigNumber], - { pool: string; lpTokenDivested: BigNumber; baseObtained: BigNumber } - >; - - Divested( - pool?: string | null, - lpTokenDivested?: null, - baseObtained?: null - ): TypedEventFilter< - [string, BigNumber, BigNumber], - { pool: string; lpTokenDivested: BigNumber; baseObtained: BigNumber } - >; - - "Drained(address,uint256)"( - pool?: string | null, - lpTokenDivested?: null - ): TypedEventFilter< - [string, BigNumber], - { pool: string; lpTokenDivested: BigNumber } - >; - - Drained( - pool?: string | null, - lpTokenDivested?: null - ): TypedEventFilter< - [string, BigNumber], - { pool: string; lpTokenDivested: BigNumber } - >; - - "Ejected(address,uint256,uint256,uint256)"( - pool?: string | null, - lpTokenDivested?: null, - baseObtained?: null, - fyTokenObtained?: null - ): TypedEventFilter< - [string, BigNumber, BigNumber, BigNumber], - { - pool: string; - lpTokenDivested: BigNumber; - baseObtained: BigNumber; - fyTokenObtained: BigNumber; - } - >; - - Ejected( - pool?: string | null, - lpTokenDivested?: null, - baseObtained?: null, - fyTokenObtained?: null - ): TypedEventFilter< - [string, BigNumber, BigNumber, BigNumber], - { - pool: string; - lpTokenDivested: BigNumber; - baseObtained: BigNumber; - fyTokenObtained: BigNumber; - } - >; - - "Invested(address,uint256,uint256)"( - pool?: string | null, - baseInvested?: null, - lpTokensObtained?: null - ): TypedEventFilter< - [string, BigNumber, BigNumber], - { pool: string; baseInvested: BigNumber; lpTokensObtained: BigNumber } - >; - - Invested( - pool?: string | null, - baseInvested?: null, - lpTokensObtained?: null - ): TypedEventFilter< - [string, BigNumber, BigNumber], - { pool: string; baseInvested: BigNumber; lpTokensObtained: BigNumber } - >; - - "RewardsPerTokenUpdated(uint256)"( - accumulated?: null - ): TypedEventFilter<[BigNumber], { accumulated: BigNumber }>; - - RewardsPerTokenUpdated( - accumulated?: null - ): TypedEventFilter<[BigNumber], { accumulated: BigNumber }>; - - "RewardsSet(uint32,uint32,uint256)"( - start?: null, - end?: null, - rate?: null - ): TypedEventFilter< - [number, number, BigNumber], - { start: number; end: number; rate: BigNumber } - >; - - RewardsSet( - start?: null, - end?: null, - rate?: null - ): TypedEventFilter< - [number, number, BigNumber], - { start: number; end: number; rate: BigNumber } - >; - - "RewardsTokenSet(address)"( - token?: null - ): TypedEventFilter<[string], { token: string }>; - - RewardsTokenSet( - token?: null - ): TypedEventFilter<[string], { token: string }>; - - "RoleAdminChanged(bytes4,bytes4)"( - role?: BytesLike | null, - newAdminRole?: BytesLike | null - ): TypedEventFilter< - [string, string], - { role: string; newAdminRole: string } - >; - - RoleAdminChanged( - role?: BytesLike | null, - newAdminRole?: BytesLike | null - ): TypedEventFilter< - [string, string], - { role: string; newAdminRole: string } - >; - - "RoleGranted(bytes4,address,address)"( - role?: BytesLike | null, - account?: string | null, - sender?: string | null - ): TypedEventFilter< - [string, string, string], - { role: string; account: string; sender: string } - >; - - RoleGranted( - role?: BytesLike | null, - account?: string | null, - sender?: string | null - ): TypedEventFilter< - [string, string, string], - { role: string; account: string; sender: string } - >; - - "RoleRevoked(bytes4,address,address)"( - role?: BytesLike | null, - account?: string | null, - sender?: string | null - ): TypedEventFilter< - [string, string, string], - { role: string; account: string; sender: string } - >; - - RoleRevoked( - role?: BytesLike | null, - account?: string | null, - sender?: string | null - ): TypedEventFilter< - [string, string, string], - { role: string; account: string; sender: string } - >; - - "SoldFYToken(uint256,uint256)"( - soldFYToken?: null, - returnedBase?: null - ): TypedEventFilter< - [BigNumber, BigNumber], - { soldFYToken: BigNumber; returnedBase: BigNumber } - >; - - SoldFYToken( - soldFYToken?: null, - returnedBase?: null - ): TypedEventFilter< - [BigNumber, BigNumber], - { soldFYToken: BigNumber; returnedBase: BigNumber } - >; - - "Transfer(address,address,uint256)"( - from?: string | null, - to?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { from: string; to: string; value: BigNumber } - >; - - Transfer( - from?: string | null, - to?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { from: string; to: string; value: BigNumber } - >; - - "UserRewardsUpdated(address,uint256,uint256)"( - user?: null, - userRewards?: null, - paidRewardPerToken?: null - ): TypedEventFilter< - [string, BigNumber, BigNumber], - { user: string; userRewards: BigNumber; paidRewardPerToken: BigNumber } - >; - - UserRewardsUpdated( - user?: null, - userRewards?: null, - paidRewardPerToken?: null - ): TypedEventFilter< - [string, BigNumber, BigNumber], - { user: string; userRewards: BigNumber; paidRewardPerToken: BigNumber } - >; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - wad: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(guy: string, overrides?: CallOverrides): Promise; - - base(overrides?: CallOverrides): Promise; - - baseCached(overrides?: CallOverrides): Promise; - - burn( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - burnDivested( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - burnPoolTokens( - pool_: string, - poolTokens: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - buyFYToken( - fyTokenTo: string, - baseTo: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - claim( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - deploymentChainId(overrides?: CallOverrides): Promise; - - divest( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - eject( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - fyToken(overrides?: CallOverrides): Promise; - - fyTokenCached(overrides?: CallOverrides): Promise; - - getRoleAdmin( - role: BytesLike, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: BytesLike, - account: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - grantRoles( - roles: BytesLike[], - account: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - hasRole( - role: BytesLike, - account: string, - overrides?: CallOverrides - ): Promise; - - init( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - invest( - pool_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - lockRole( - role: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - mintDivested( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces(arg0: string, overrides?: CallOverrides): Promise; - - permit( - owner: string, - spender: string, - amount: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - pool(overrides?: CallOverrides): Promise; - - poolCached(overrides?: CallOverrides): Promise; - - remit( - user: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - renounceRole( - role: BytesLike, - account: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - restart( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - revokeRole( - role: BytesLike, - account: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - revokeRoles( - roles: BytesLike[], - account: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - rewards(arg0: string, overrides?: CallOverrides): Promise; - - rewardsPerToken(overrides?: CallOverrides): Promise; - - rewardsPeriod(overrides?: CallOverrides): Promise; - - rewardsToken(overrides?: CallOverrides): Promise; - - setRewards( - start: BigNumberish, - end: BigNumberish, - rate: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setRewardsToken( - rewardsToken_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setRoleAdmin( - role: BytesLike, - adminRole: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - state(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - dst: string, - wad: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - src: string, - dst: string, - wad: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - wad: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf( - guy: string, - overrides?: CallOverrides - ): Promise; - - base(overrides?: CallOverrides): Promise; - - baseCached(overrides?: CallOverrides): Promise; - - burn( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - burnDivested( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - burnPoolTokens( - pool_: string, - poolTokens: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - buyFYToken( - fyTokenTo: string, - baseTo: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - claim( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - deploymentChainId(overrides?: CallOverrides): Promise; - - divest( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - eject( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - fyToken(overrides?: CallOverrides): Promise; - - fyTokenCached(overrides?: CallOverrides): Promise; - - getRoleAdmin( - role: BytesLike, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: BytesLike, - account: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - grantRoles( - roles: BytesLike[], - account: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - hasRole( - role: BytesLike, - account: string, - overrides?: CallOverrides - ): Promise; - - init( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - invest( - pool_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - lockRole( - role: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - mintDivested( - to: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: string, - overrides?: CallOverrides - ): Promise; - - permit( - owner: string, - spender: string, - amount: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - pool(overrides?: CallOverrides): Promise; - - poolCached(overrides?: CallOverrides): Promise; - - remit( - user: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - renounceRole( - role: BytesLike, - account: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - restart( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - revokeRole( - role: BytesLike, - account: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - revokeRoles( - roles: BytesLike[], - account: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - rewards( - arg0: string, - overrides?: CallOverrides - ): Promise; - - rewardsPerToken(overrides?: CallOverrides): Promise; - - rewardsPeriod(overrides?: CallOverrides): Promise; - - rewardsToken(overrides?: CallOverrides): Promise; - - setRewards( - start: BigNumberish, - end: BigNumberish, - rate: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setRewardsToken( - rewardsToken_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setRoleAdmin( - role: BytesLike, - adminRole: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - state(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - dst: string, - wad: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - src: string, - dst: string, - wad: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - version(overrides?: CallOverrides): Promise; - }; -} diff --git a/src/contracts/Transfer1155Module.ts b/src/contracts/Transfer1155Module.ts deleted file mode 100644 index e5d658819..000000000 --- a/src/contracts/Transfer1155Module.ts +++ /dev/null @@ -1,483 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - PayableOverrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "./common"; - -export interface Transfer1155ModuleInterface extends utils.Interface { - functions: { - "borrowingFee()": FunctionFragment; - "cauldron()": FunctionFragment; - "integrations(address)": FunctionFragment; - "joins(bytes6)": FunctionFragment; - "modules(address)": FunctionFragment; - "pools(bytes6)": FunctionFragment; - "router()": FunctionFragment; - "tokens(address)": FunctionFragment; - "transfer1155(address,uint256,address,uint128,bytes)": FunctionFragment; - "weth()": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "borrowingFee" - | "cauldron" - | "integrations" - | "joins" - | "modules" - | "pools" - | "router" - | "tokens" - | "transfer1155" - | "weth" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "borrowingFee", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "cauldron", values?: undefined): string; - encodeFunctionData( - functionFragment: "integrations", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "joins", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "modules", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "pools", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "router", values?: undefined): string; - encodeFunctionData( - functionFragment: "tokens", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "transfer1155", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData(functionFragment: "weth", values?: undefined): string; - - decodeFunctionResult( - functionFragment: "borrowingFee", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "cauldron", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "integrations", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "joins", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "modules", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "pools", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tokens", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "transfer1155", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "weth", data: BytesLike): Result; - - events: { - "FeeSet(uint256)": EventFragment; - "IntegrationAdded(address,bool)": EventFragment; - "JoinAdded(bytes6,address)": EventFragment; - "ModuleAdded(address,bool)": EventFragment; - "PoolAdded(bytes6,address)": EventFragment; - "TokenAdded(address,bool)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "FeeSet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "IntegrationAdded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "JoinAdded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ModuleAdded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "PoolAdded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TokenAdded"): EventFragment; -} - -export interface FeeSetEventObject { - fee: BigNumber; -} -export type FeeSetEvent = TypedEvent<[BigNumber], FeeSetEventObject>; - -export type FeeSetEventFilter = TypedEventFilter; - -export interface IntegrationAddedEventObject { - integration: string; - set: boolean; -} -export type IntegrationAddedEvent = TypedEvent< - [string, boolean], - IntegrationAddedEventObject ->; - -export type IntegrationAddedEventFilter = - TypedEventFilter; - -export interface JoinAddedEventObject { - assetId: string; - join: string; -} -export type JoinAddedEvent = TypedEvent<[string, string], JoinAddedEventObject>; - -export type JoinAddedEventFilter = TypedEventFilter; - -export interface ModuleAddedEventObject { - module: string; - set: boolean; -} -export type ModuleAddedEvent = TypedEvent< - [string, boolean], - ModuleAddedEventObject ->; - -export type ModuleAddedEventFilter = TypedEventFilter; - -export interface PoolAddedEventObject { - seriesId: string; - pool: string; -} -export type PoolAddedEvent = TypedEvent<[string, string], PoolAddedEventObject>; - -export type PoolAddedEventFilter = TypedEventFilter; - -export interface TokenAddedEventObject { - token: string; - set: boolean; -} -export type TokenAddedEvent = TypedEvent< - [string, boolean], - TokenAddedEventObject ->; - -export type TokenAddedEventFilter = TypedEventFilter; - -export interface Transfer1155Module extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: Transfer1155ModuleInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - borrowingFee(overrides?: CallOverrides): Promise<[BigNumber]>; - - cauldron(overrides?: CallOverrides): Promise<[string]>; - - integrations( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - joins( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - modules( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - router(overrides?: CallOverrides): Promise<[string]>; - - tokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - transfer1155( - token: PromiseOrValue, - id: PromiseOrValue, - receiver: PromiseOrValue, - wad: PromiseOrValue, - data: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - weth(overrides?: CallOverrides): Promise<[string]>; - }; - - borrowingFee(overrides?: CallOverrides): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - integrations( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - joins( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - modules( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - router(overrides?: CallOverrides): Promise; - - tokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transfer1155( - token: PromiseOrValue, - id: PromiseOrValue, - receiver: PromiseOrValue, - wad: PromiseOrValue, - data: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - weth(overrides?: CallOverrides): Promise; - - callStatic: { - borrowingFee(overrides?: CallOverrides): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - integrations( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - joins( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - modules( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - router(overrides?: CallOverrides): Promise; - - tokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transfer1155( - token: PromiseOrValue, - id: PromiseOrValue, - receiver: PromiseOrValue, - wad: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - weth(overrides?: CallOverrides): Promise; - }; - - filters: { - "FeeSet(uint256)"(fee?: null): FeeSetEventFilter; - FeeSet(fee?: null): FeeSetEventFilter; - - "IntegrationAdded(address,bool)"( - integration?: PromiseOrValue | null, - set?: PromiseOrValue | null - ): IntegrationAddedEventFilter; - IntegrationAdded( - integration?: PromiseOrValue | null, - set?: PromiseOrValue | null - ): IntegrationAddedEventFilter; - - "JoinAdded(bytes6,address)"( - assetId?: PromiseOrValue | null, - join?: PromiseOrValue | null - ): JoinAddedEventFilter; - JoinAdded( - assetId?: PromiseOrValue | null, - join?: PromiseOrValue | null - ): JoinAddedEventFilter; - - "ModuleAdded(address,bool)"( - module?: PromiseOrValue | null, - set?: PromiseOrValue | null - ): ModuleAddedEventFilter; - ModuleAdded( - module?: PromiseOrValue | null, - set?: PromiseOrValue | null - ): ModuleAddedEventFilter; - - "PoolAdded(bytes6,address)"( - seriesId?: PromiseOrValue | null, - pool?: PromiseOrValue | null - ): PoolAddedEventFilter; - PoolAdded( - seriesId?: PromiseOrValue | null, - pool?: PromiseOrValue | null - ): PoolAddedEventFilter; - - "TokenAdded(address,bool)"( - token?: PromiseOrValue | null, - set?: PromiseOrValue | null - ): TokenAddedEventFilter; - TokenAdded( - token?: PromiseOrValue | null, - set?: PromiseOrValue | null - ): TokenAddedEventFilter; - }; - - estimateGas: { - borrowingFee(overrides?: CallOverrides): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - integrations( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - joins( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - modules( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - router(overrides?: CallOverrides): Promise; - - tokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transfer1155( - token: PromiseOrValue, - id: PromiseOrValue, - receiver: PromiseOrValue, - wad: PromiseOrValue, - data: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - weth(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - borrowingFee(overrides?: CallOverrides): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - integrations( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - joins( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - modules( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - router(overrides?: CallOverrides): Promise; - - tokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transfer1155( - token: PromiseOrValue, - id: PromiseOrValue, - receiver: PromiseOrValue, - wad: PromiseOrValue, - data: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - weth(overrides?: CallOverrides): Promise; - }; -} diff --git a/src/contracts/UniswapV3Oracle.ts b/src/contracts/UniswapV3Oracle.ts deleted file mode 100644 index 7a3cff99d..000000000 --- a/src/contracts/UniswapV3Oracle.ts +++ /dev/null @@ -1,888 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "./common"; - -export interface UniswapV3OracleInterface extends utils.Interface { - functions: { - "LOCK()": FunctionFragment; - "LOCK8605463013()": FunctionFragment; - "ROOT()": FunctionFragment; - "ROOT4146650865()": FunctionFragment; - "get(bytes32,bytes32,uint256)": FunctionFragment; - "getRoleAdmin(bytes4)": FunctionFragment; - "grantRole(bytes4,address)": FunctionFragment; - "grantRoles(bytes4[],address)": FunctionFragment; - "hasRole(bytes4,address)": FunctionFragment; - "lockRole(bytes4)": FunctionFragment; - "peek(bytes32,bytes32,uint256)": FunctionFragment; - "renounceRole(bytes4,address)": FunctionFragment; - "revokeRole(bytes4,address)": FunctionFragment; - "revokeRoles(bytes4[],address)": FunctionFragment; - "secondsAgo()": FunctionFragment; - "setRoleAdmin(bytes4,bytes4)": FunctionFragment; - "setSecondsAgo(uint32)": FunctionFragment; - "setSource(bytes6,bytes6,address)": FunctionFragment; - "sources(bytes6,bytes6)": FunctionFragment; - "sourcesData(address)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "LOCK" - | "LOCK8605463013" - | "ROOT" - | "ROOT4146650865" - | "get" - | "getRoleAdmin" - | "grantRole" - | "grantRoles" - | "hasRole" - | "lockRole" - | "peek" - | "renounceRole" - | "revokeRole" - | "revokeRoles" - | "secondsAgo" - | "setRoleAdmin" - | "setSecondsAgo" - | "setSource" - | "sources" - | "sourcesData" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; - encodeFunctionData( - functionFragment: "LOCK8605463013", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; - encodeFunctionData( - functionFragment: "ROOT4146650865", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "get", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "getRoleAdmin", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "hasRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "lockRole", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "peek", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "renounceRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "secondsAgo", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "setRoleAdmin", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setSecondsAgo", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setSource", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "sources", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "sourcesData", - values: [PromiseOrValue] - ): string; - - decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "LOCK8605463013", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "ROOT4146650865", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "get", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "peek", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "renounceRole", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "revokeRoles", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "secondsAgo", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "setRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setSecondsAgo", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "setSource", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sources", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "sourcesData", - data: BytesLike - ): Result; - - events: { - "RoleAdminChanged(bytes4,bytes4)": EventFragment; - "RoleGranted(bytes4,address,address)": EventFragment; - "RoleRevoked(bytes4,address,address)": EventFragment; - "SecondsAgoSet(uint32)": EventFragment; - "SourceSet(bytes6,bytes6,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SecondsAgoSet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SourceSet"): EventFragment; -} - -export interface RoleAdminChangedEventObject { - role: string; - newAdminRole: string; -} -export type RoleAdminChangedEvent = TypedEvent< - [string, string], - RoleAdminChangedEventObject ->; - -export type RoleAdminChangedEventFilter = - TypedEventFilter; - -export interface RoleGrantedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleGrantedEvent = TypedEvent< - [string, string, string], - RoleGrantedEventObject ->; - -export type RoleGrantedEventFilter = TypedEventFilter; - -export interface RoleRevokedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleRevokedEvent = TypedEvent< - [string, string, string], - RoleRevokedEventObject ->; - -export type RoleRevokedEventFilter = TypedEventFilter; - -export interface SecondsAgoSetEventObject { - secondsAgo: number; -} -export type SecondsAgoSetEvent = TypedEvent<[number], SecondsAgoSetEventObject>; - -export type SecondsAgoSetEventFilter = TypedEventFilter; - -export interface SourceSetEventObject { - base: string; - quote: string; - source: string; -} -export type SourceSetEvent = TypedEvent< - [string, string, string], - SourceSetEventObject ->; - -export type SourceSetEventFilter = TypedEventFilter; - -export interface UniswapV3Oracle extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: UniswapV3OracleInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - LOCK(overrides?: CallOverrides): Promise<[string]>; - - LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; - - ROOT(overrides?: CallOverrides): Promise<[string]>; - - ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; - - get( - base: PromiseOrValue, - quote: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - peek( - base: PromiseOrValue, - quote: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { value: BigNumber; updateTime: BigNumber } - >; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - secondsAgo(overrides?: CallOverrides): Promise<[number]>; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSecondsAgo( - secondsAgo_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - base: PromiseOrValue, - quote: PromiseOrValue, - source: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, boolean] & { source: string; inverse: boolean }>; - - sourcesData( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [string, string, string, number] & { - factory: string; - baseToken: string; - quoteToken: string; - fee: number; - } - >; - }; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - base: PromiseOrValue, - quote: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - peek( - base: PromiseOrValue, - quote: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { value: BigNumber; updateTime: BigNumber } - >; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - secondsAgo(overrides?: CallOverrides): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSecondsAgo( - secondsAgo_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - base: PromiseOrValue, - quote: PromiseOrValue, - source: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, boolean] & { source: string; inverse: boolean }>; - - sourcesData( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [string, string, string, number] & { - factory: string; - baseToken: string; - quoteToken: string; - fee: number; - } - >; - - callStatic: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - base: PromiseOrValue, - quote: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { value: BigNumber; updateTime: BigNumber } - >; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - peek( - base: PromiseOrValue, - quote: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { value: BigNumber; updateTime: BigNumber } - >; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - secondsAgo(overrides?: CallOverrides): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setSecondsAgo( - secondsAgo_: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setSource( - base: PromiseOrValue, - quote: PromiseOrValue, - source: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, boolean] & { source: string; inverse: boolean }>; - - sourcesData( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [string, string, string, number] & { - factory: string; - baseToken: string; - quoteToken: string; - fee: number; - } - >; - }; - - filters: { - "RoleAdminChanged(bytes4,bytes4)"( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - RoleAdminChanged( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - - "RoleGranted(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - RoleGranted( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - - "RoleRevoked(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - RoleRevoked( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - - "SecondsAgoSet(uint32)"( - secondsAgo?: PromiseOrValue | null - ): SecondsAgoSetEventFilter; - SecondsAgoSet( - secondsAgo?: PromiseOrValue | null - ): SecondsAgoSetEventFilter; - - "SourceSet(bytes6,bytes6,address)"( - base?: PromiseOrValue | null, - quote?: PromiseOrValue | null, - source?: PromiseOrValue | null - ): SourceSetEventFilter; - SourceSet( - base?: PromiseOrValue | null, - quote?: PromiseOrValue | null, - source?: PromiseOrValue | null - ): SourceSetEventFilter; - }; - - estimateGas: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - base: PromiseOrValue, - quote: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - peek( - base: PromiseOrValue, - quote: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - secondsAgo(overrides?: CallOverrides): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSecondsAgo( - secondsAgo_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - base: PromiseOrValue, - quote: PromiseOrValue, - source: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sourcesData( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - populateTransaction: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - base: PromiseOrValue, - quote: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - peek( - base: PromiseOrValue, - quote: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - secondsAgo(overrides?: CallOverrides): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSecondsAgo( - secondsAgo_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - base: PromiseOrValue, - quote: PromiseOrValue, - source: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sourcesData( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; -} diff --git a/src/contracts/Witch.ts b/src/contracts/Witch.ts deleted file mode 100644 index 3093c1afc..000000000 --- a/src/contracts/Witch.ts +++ /dev/null @@ -1,1026 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "./common"; - -export interface WitchInterface extends utils.Interface { - functions: { - "LOCK()": FunctionFragment; - "LOCK8605463013()": FunctionFragment; - "ROOT()": FunctionFragment; - "ROOT4146650865()": FunctionFragment; - "auction(bytes12)": FunctionFragment; - "auctions(bytes12)": FunctionFragment; - "buy(bytes12,uint128,uint128)": FunctionFragment; - "cauldron()": FunctionFragment; - "getRoleAdmin(bytes4)": FunctionFragment; - "grantRole(bytes4,address)": FunctionFragment; - "grantRoles(bytes4[],address)": FunctionFragment; - "hasRole(bytes4,address)": FunctionFragment; - "ilks(bytes6)": FunctionFragment; - "ladle()": FunctionFragment; - "limits(bytes6)": FunctionFragment; - "lockRole(bytes4)": FunctionFragment; - "payAll(bytes12,uint128)": FunctionFragment; - "point(bytes32,address)": FunctionFragment; - "renounceRole(bytes4,address)": FunctionFragment; - "revokeRole(bytes4,address)": FunctionFragment; - "revokeRoles(bytes4[],address)": FunctionFragment; - "setIlk(bytes6,uint32,uint64,uint96,uint24,uint8)": FunctionFragment; - "setRoleAdmin(bytes4,bytes4)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "LOCK" - | "LOCK8605463013" - | "ROOT" - | "ROOT4146650865" - | "auction" - | "auctions" - | "buy" - | "cauldron" - | "getRoleAdmin" - | "grantRole" - | "grantRoles" - | "hasRole" - | "ilks" - | "ladle" - | "limits" - | "lockRole" - | "payAll" - | "point" - | "renounceRole" - | "revokeRole" - | "revokeRoles" - | "setIlk" - | "setRoleAdmin" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; - encodeFunctionData( - functionFragment: "LOCK8605463013", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; - encodeFunctionData( - functionFragment: "ROOT4146650865", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "auction", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "auctions", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "buy", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData(functionFragment: "cauldron", values?: undefined): string; - encodeFunctionData( - functionFragment: "getRoleAdmin", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "hasRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "ilks", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "ladle", values?: undefined): string; - encodeFunctionData( - functionFragment: "limits", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "lockRole", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "payAll", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "point", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "renounceRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setIlk", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "setRoleAdmin", - values: [PromiseOrValue, PromiseOrValue] - ): string; - - decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "LOCK8605463013", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "ROOT4146650865", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "auction", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "auctions", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "buy", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cauldron", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "ilks", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "ladle", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "limits", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "payAll", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "point", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "renounceRole", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "revokeRoles", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "setIlk", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "setRoleAdmin", - data: BytesLike - ): Result; - - events: { - "Auctioned(bytes12,uint256)": EventFragment; - "Bought(bytes12,address,uint256,uint256)": EventFragment; - "IlkSet(bytes6,uint32,uint64,uint96,uint24,uint8)": EventFragment; - "Point(bytes32,address)": EventFragment; - "RoleAdminChanged(bytes4,bytes4)": EventFragment; - "RoleGranted(bytes4,address,address)": EventFragment; - "RoleRevoked(bytes4,address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Auctioned"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Bought"): EventFragment; - getEvent(nameOrSignatureOrTopic: "IlkSet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Point"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; -} - -export interface AuctionedEventObject { - vaultId: string; - start: BigNumber; -} -export type AuctionedEvent = TypedEvent< - [string, BigNumber], - AuctionedEventObject ->; - -export type AuctionedEventFilter = TypedEventFilter; - -export interface BoughtEventObject { - vaultId: string; - buyer: string; - ink: BigNumber; - art: BigNumber; -} -export type BoughtEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - BoughtEventObject ->; - -export type BoughtEventFilter = TypedEventFilter; - -export interface IlkSetEventObject { - ilkId: string; - duration: number; - initialOffer: BigNumber; - line: BigNumber; - dust: number; - dec: number; -} -export type IlkSetEvent = TypedEvent< - [string, number, BigNumber, BigNumber, number, number], - IlkSetEventObject ->; - -export type IlkSetEventFilter = TypedEventFilter; - -export interface PointEventObject { - param: string; - value: string; -} -export type PointEvent = TypedEvent<[string, string], PointEventObject>; - -export type PointEventFilter = TypedEventFilter; - -export interface RoleAdminChangedEventObject { - role: string; - newAdminRole: string; -} -export type RoleAdminChangedEvent = TypedEvent< - [string, string], - RoleAdminChangedEventObject ->; - -export type RoleAdminChangedEventFilter = - TypedEventFilter; - -export interface RoleGrantedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleGrantedEvent = TypedEvent< - [string, string, string], - RoleGrantedEventObject ->; - -export type RoleGrantedEventFilter = TypedEventFilter; - -export interface RoleRevokedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleRevokedEvent = TypedEvent< - [string, string, string], - RoleRevokedEventObject ->; - -export type RoleRevokedEventFilter = TypedEventFilter; - -export interface Witch extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: WitchInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - LOCK(overrides?: CallOverrides): Promise<[string]>; - - LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; - - ROOT(overrides?: CallOverrides): Promise<[string]>; - - ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; - - auction( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - auctions( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, number] & { owner: string; start: number }>; - - buy( - vaultId: PromiseOrValue, - base: PromiseOrValue, - min: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - cauldron(overrides?: CallOverrides): Promise<[string]>; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - ilks( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [number, BigNumber] & { duration: number; initialOffer: BigNumber } - >; - - ladle(overrides?: CallOverrides): Promise<[string]>; - - limits( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, number, number, BigNumber] & { - line: BigNumber; - dust: number; - dec: number; - sum: BigNumber; - } - >; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - payAll( - vaultId: PromiseOrValue, - min: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - point( - param: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setIlk( - ilkId: PromiseOrValue, - duration: PromiseOrValue, - initialOffer: PromiseOrValue, - line: PromiseOrValue, - dust: PromiseOrValue, - dec: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - auction( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - auctions( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, number] & { owner: string; start: number }>; - - buy( - vaultId: PromiseOrValue, - base: PromiseOrValue, - min: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ilks( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [number, BigNumber] & { duration: number; initialOffer: BigNumber } - >; - - ladle(overrides?: CallOverrides): Promise; - - limits( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, number, number, BigNumber] & { - line: BigNumber; - dust: number; - dec: number; - sum: BigNumber; - } - >; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - payAll( - vaultId: PromiseOrValue, - min: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - point( - param: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setIlk( - ilkId: PromiseOrValue, - duration: PromiseOrValue, - initialOffer: PromiseOrValue, - line: PromiseOrValue, - dust: PromiseOrValue, - dec: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - auction( - vaultId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - auctions( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, number] & { owner: string; start: number }>; - - buy( - vaultId: PromiseOrValue, - base: PromiseOrValue, - min: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ilks( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [number, BigNumber] & { duration: number; initialOffer: BigNumber } - >; - - ladle(overrides?: CallOverrides): Promise; - - limits( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, number, number, BigNumber] & { - line: BigNumber; - dust: number; - dec: number; - sum: BigNumber; - } - >; - - lockRole( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - payAll( - vaultId: PromiseOrValue, - min: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - point( - param: PromiseOrValue, - value: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setIlk( - ilkId: PromiseOrValue, - duration: PromiseOrValue, - initialOffer: PromiseOrValue, - line: PromiseOrValue, - dust: PromiseOrValue, - dec: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Auctioned(bytes12,uint256)"( - vaultId?: PromiseOrValue | null, - start?: PromiseOrValue | null - ): AuctionedEventFilter; - Auctioned( - vaultId?: PromiseOrValue | null, - start?: PromiseOrValue | null - ): AuctionedEventFilter; - - "Bought(bytes12,address,uint256,uint256)"( - vaultId?: PromiseOrValue | null, - buyer?: PromiseOrValue | null, - ink?: null, - art?: null - ): BoughtEventFilter; - Bought( - vaultId?: PromiseOrValue | null, - buyer?: PromiseOrValue | null, - ink?: null, - art?: null - ): BoughtEventFilter; - - "IlkSet(bytes6,uint32,uint64,uint96,uint24,uint8)"( - ilkId?: PromiseOrValue | null, - duration?: null, - initialOffer?: null, - line?: null, - dust?: null, - dec?: null - ): IlkSetEventFilter; - IlkSet( - ilkId?: PromiseOrValue | null, - duration?: null, - initialOffer?: null, - line?: null, - dust?: null, - dec?: null - ): IlkSetEventFilter; - - "Point(bytes32,address)"( - param?: PromiseOrValue | null, - value?: null - ): PointEventFilter; - Point( - param?: PromiseOrValue | null, - value?: null - ): PointEventFilter; - - "RoleAdminChanged(bytes4,bytes4)"( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - RoleAdminChanged( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - - "RoleGranted(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - RoleGranted( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - - "RoleRevoked(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - RoleRevoked( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - }; - - estimateGas: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - auction( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - auctions( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - buy( - vaultId: PromiseOrValue, - base: PromiseOrValue, - min: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ilks( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ladle(overrides?: CallOverrides): Promise; - - limits( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - payAll( - vaultId: PromiseOrValue, - min: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - point( - param: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setIlk( - ilkId: PromiseOrValue, - duration: PromiseOrValue, - initialOffer: PromiseOrValue, - line: PromiseOrValue, - dust: PromiseOrValue, - dec: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - auction( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - auctions( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - buy( - vaultId: PromiseOrValue, - base: PromiseOrValue, - min: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ilks( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ladle(overrides?: CallOverrides): Promise; - - limits( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - payAll( - vaultId: PromiseOrValue, - min: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - point( - param: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setIlk( - ilkId: PromiseOrValue, - duration: PromiseOrValue, - initialOffer: PromiseOrValue, - line: PromiseOrValue, - dust: PromiseOrValue, - dec: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; -} diff --git a/src/contracts/WitchV2.ts b/src/contracts/WitchV2.ts deleted file mode 100644 index 44bf9d35d..000000000 --- a/src/contracts/WitchV2.ts +++ /dev/null @@ -1,1580 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "./common"; - -export declare namespace DataTypes { - export type AuctionStruct = { - owner: PromiseOrValue; - start: PromiseOrValue; - baseId: PromiseOrValue; - ink: PromiseOrValue; - art: PromiseOrValue; - auctioneer: PromiseOrValue; - ilkId: PromiseOrValue; - seriesId: PromiseOrValue; - }; - - export type AuctionStructOutput = [ - string, - number, - string, - BigNumber, - BigNumber, - string, - string, - string - ] & { - owner: string; - start: number; - baseId: string; - ink: BigNumber; - art: BigNumber; - auctioneer: string; - ilkId: string; - seriesId: string; - }; - - export type VaultStruct = { - owner: PromiseOrValue; - seriesId: PromiseOrValue; - ilkId: PromiseOrValue; - }; - - export type VaultStructOutput = [string, string, string] & { - owner: string; - seriesId: string; - ilkId: string; - }; - - export type SeriesStruct = { - fyToken: PromiseOrValue; - baseId: PromiseOrValue; - maturity: PromiseOrValue; - }; - - export type SeriesStructOutput = [string, string, number] & { - fyToken: string; - baseId: string; - maturity: number; - }; -} - -export interface WitchV2Interface extends utils.Interface { - functions: { - "LOCK()": FunctionFragment; - "LOCK8605463013()": FunctionFragment; - "ONE_HUNDRED_PERCENT()": FunctionFragment; - "ONE_PERCENT()": FunctionFragment; - "ROOT()": FunctionFragment; - "ROOT4146650865()": FunctionFragment; - "auction(bytes12,address)": FunctionFragment; - "auctioneerReward()": FunctionFragment; - "auctions(bytes12)": FunctionFragment; - "calcPayout(bytes12,address,uint256)": FunctionFragment; - "cancel(bytes12)": FunctionFragment; - "cauldron()": FunctionFragment; - "clear(bytes12)": FunctionFragment; - "getRoleAdmin(bytes4)": FunctionFragment; - "grantRole(bytes4,address)": FunctionFragment; - "grantRoles(bytes4[],address)": FunctionFragment; - "hasRole(bytes4,address)": FunctionFragment; - "ladle()": FunctionFragment; - "limits(bytes6,bytes6)": FunctionFragment; - "lines(bytes6,bytes6)": FunctionFragment; - "lockRole(bytes4)": FunctionFragment; - "payBase(bytes12,address,uint128,uint128)": FunctionFragment; - "payFYToken(bytes12,address,uint128,uint128)": FunctionFragment; - "point(bytes32,address)": FunctionFragment; - "protected(address)": FunctionFragment; - "renounceRole(bytes4,address)": FunctionFragment; - "revokeRole(bytes4,address)": FunctionFragment; - "revokeRoles(bytes4[],address)": FunctionFragment; - "setAuctioneerReward(uint256)": FunctionFragment; - "setLineAndLimit(bytes6,bytes6,uint32,uint64,uint64,uint128)": FunctionFragment; - "setProtected(address,bool)": FunctionFragment; - "setRoleAdmin(bytes4,bytes4)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "LOCK" - | "LOCK8605463013" - | "ONE_HUNDRED_PERCENT" - | "ONE_PERCENT" - | "ROOT" - | "ROOT4146650865" - | "auction" - | "auctioneerReward" - | "auctions" - | "calcPayout" - | "cancel" - | "cauldron" - | "clear" - | "getRoleAdmin" - | "grantRole" - | "grantRoles" - | "hasRole" - | "ladle" - | "limits" - | "lines" - | "lockRole" - | "payBase" - | "payFYToken" - | "point" - | "protected" - | "renounceRole" - | "revokeRole" - | "revokeRoles" - | "setAuctioneerReward" - | "setLineAndLimit" - | "setProtected" - | "setRoleAdmin" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; - encodeFunctionData( - functionFragment: "LOCK8605463013", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "ONE_HUNDRED_PERCENT", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "ONE_PERCENT", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; - encodeFunctionData( - functionFragment: "ROOT4146650865", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "auction", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "auctioneerReward", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "auctions", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "calcPayout", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "cancel", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "cauldron", values?: undefined): string; - encodeFunctionData( - functionFragment: "clear", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "getRoleAdmin", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "hasRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "ladle", values?: undefined): string; - encodeFunctionData( - functionFragment: "limits", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "lines", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "lockRole", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "payBase", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "payFYToken", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "point", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "protected", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "renounceRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setAuctioneerReward", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setLineAndLimit", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "setProtected", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setRoleAdmin", - values: [PromiseOrValue, PromiseOrValue] - ): string; - - decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "LOCK8605463013", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "ONE_HUNDRED_PERCENT", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "ONE_PERCENT", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "ROOT4146650865", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "auction", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "auctioneerReward", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "auctions", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "calcPayout", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cancel", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cauldron", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "clear", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "ladle", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "limits", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lines", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "payBase", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "payFYToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "point", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "protected", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "renounceRole", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "revokeRoles", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setAuctioneerReward", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setLineAndLimit", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setProtected", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setRoleAdmin", - data: BytesLike - ): Result; - - events: { - "Auctioned(bytes12,tuple,uint256,uint256)": EventFragment; - "AuctioneerRewardSet(uint256)": EventFragment; - "Bought(bytes12,address,uint256,uint256)": EventFragment; - "Cancelled(bytes12)": EventFragment; - "Cleared(bytes12)": EventFragment; - "Ended(bytes12)": EventFragment; - "LimitSet(bytes6,bytes6,uint128)": EventFragment; - "LineSet(bytes6,bytes6,uint32,uint64,uint64)": EventFragment; - "Point(bytes32,address,address)": EventFragment; - "ProtectedSet(address,bool)": EventFragment; - "RoleAdminChanged(bytes4,bytes4)": EventFragment; - "RoleGranted(bytes4,address,address)": EventFragment; - "RoleRevoked(bytes4,address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Auctioned"): EventFragment; - getEvent(nameOrSignatureOrTopic: "AuctioneerRewardSet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Bought"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Cancelled"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Cleared"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Ended"): EventFragment; - getEvent(nameOrSignatureOrTopic: "LimitSet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "LineSet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Point"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ProtectedSet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; -} - -export interface AuctionedEventObject { - vaultId: string; - auction: DataTypes.AuctionStructOutput; - duration: BigNumber; - initialCollateralProportion: BigNumber; -} -export type AuctionedEvent = TypedEvent< - [string, DataTypes.AuctionStructOutput, BigNumber, BigNumber], - AuctionedEventObject ->; - -export type AuctionedEventFilter = TypedEventFilter; - -export interface AuctioneerRewardSetEventObject { - auctioneerReward: BigNumber; -} -export type AuctioneerRewardSetEvent = TypedEvent< - [BigNumber], - AuctioneerRewardSetEventObject ->; - -export type AuctioneerRewardSetEventFilter = - TypedEventFilter; - -export interface BoughtEventObject { - vaultId: string; - buyer: string; - ink: BigNumber; - art: BigNumber; -} -export type BoughtEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - BoughtEventObject ->; - -export type BoughtEventFilter = TypedEventFilter; - -export interface CancelledEventObject { - vaultId: string; -} -export type CancelledEvent = TypedEvent<[string], CancelledEventObject>; - -export type CancelledEventFilter = TypedEventFilter; - -export interface ClearedEventObject { - vaultId: string; -} -export type ClearedEvent = TypedEvent<[string], ClearedEventObject>; - -export type ClearedEventFilter = TypedEventFilter; - -export interface EndedEventObject { - vaultId: string; -} -export type EndedEvent = TypedEvent<[string], EndedEventObject>; - -export type EndedEventFilter = TypedEventFilter; - -export interface LimitSetEventObject { - ilkId: string; - baseId: string; - max: BigNumber; -} -export type LimitSetEvent = TypedEvent< - [string, string, BigNumber], - LimitSetEventObject ->; - -export type LimitSetEventFilter = TypedEventFilter; - -export interface LineSetEventObject { - ilkId: string; - baseId: string; - duration: number; - vaultProportion: BigNumber; - collateralProportion: BigNumber; -} -export type LineSetEvent = TypedEvent< - [string, string, number, BigNumber, BigNumber], - LineSetEventObject ->; - -export type LineSetEventFilter = TypedEventFilter; - -export interface PointEventObject { - param: string; - oldValue: string; - newValue: string; -} -export type PointEvent = TypedEvent<[string, string, string], PointEventObject>; - -export type PointEventFilter = TypedEventFilter; - -export interface ProtectedSetEventObject { - value: string; - protected: boolean; -} -export type ProtectedSetEvent = TypedEvent< - [string, boolean], - ProtectedSetEventObject ->; - -export type ProtectedSetEventFilter = TypedEventFilter; - -export interface RoleAdminChangedEventObject { - role: string; - newAdminRole: string; -} -export type RoleAdminChangedEvent = TypedEvent< - [string, string], - RoleAdminChangedEventObject ->; - -export type RoleAdminChangedEventFilter = - TypedEventFilter; - -export interface RoleGrantedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleGrantedEvent = TypedEvent< - [string, string, string], - RoleGrantedEventObject ->; - -export type RoleGrantedEventFilter = TypedEventFilter; - -export interface RoleRevokedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleRevokedEvent = TypedEvent< - [string, string, string], - RoleRevokedEventObject ->; - -export type RoleRevokedEventFilter = TypedEventFilter; - -export interface WitchV2 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: WitchV2Interface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - LOCK(overrides?: CallOverrides): Promise<[string]>; - - LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; - - ONE_HUNDRED_PERCENT(overrides?: CallOverrides): Promise<[BigNumber]>; - - ONE_PERCENT(overrides?: CallOverrides): Promise<[BigNumber]>; - - ROOT(overrides?: CallOverrides): Promise<[string]>; - - ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; - - auction( - vaultId: PromiseOrValue, - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - auctioneerReward(overrides?: CallOverrides): Promise<[BigNumber]>; - - auctions( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [string, number, string, BigNumber, BigNumber, string, string, string] & { - owner: string; - start: number; - baseId: string; - ink: BigNumber; - art: BigNumber; - auctioneer: string; - ilkId: string; - seriesId: string; - } - >; - - calcPayout( - vaultId: PromiseOrValue, - to: PromiseOrValue, - maxArtIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - liquidatorCut: BigNumber; - auctioneerCut: BigNumber; - artIn: BigNumber; - } - >; - - cancel( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - cauldron(overrides?: CallOverrides): Promise<[string]>; - - clear( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - ladle(overrides?: CallOverrides): Promise<[string]>; - - limits( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber, BigNumber] & { max: BigNumber; sum: BigNumber }>; - - lines( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [number, BigNumber, BigNumber] & { - duration: number; - vaultProportion: BigNumber; - collateralProportion: BigNumber; - } - >; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - payBase( - vaultId: PromiseOrValue, - to: PromiseOrValue, - minInkOut: PromiseOrValue, - maxBaseIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - payFYToken( - vaultId: PromiseOrValue, - to: PromiseOrValue, - minInkOut: PromiseOrValue, - maxArtIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - point( - param: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - protected( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setAuctioneerReward( - auctioneerReward_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLineAndLimit( - ilkId: PromiseOrValue, - baseId: PromiseOrValue, - duration: PromiseOrValue, - vaultProportion: PromiseOrValue, - collateralProportion: PromiseOrValue, - max: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setProtected( - owner: PromiseOrValue, - _protected: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ONE_HUNDRED_PERCENT(overrides?: CallOverrides): Promise; - - ONE_PERCENT(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - auction( - vaultId: PromiseOrValue, - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - auctioneerReward(overrides?: CallOverrides): Promise; - - auctions( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [string, number, string, BigNumber, BigNumber, string, string, string] & { - owner: string; - start: number; - baseId: string; - ink: BigNumber; - art: BigNumber; - auctioneer: string; - ilkId: string; - seriesId: string; - } - >; - - calcPayout( - vaultId: PromiseOrValue, - to: PromiseOrValue, - maxArtIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - liquidatorCut: BigNumber; - auctioneerCut: BigNumber; - artIn: BigNumber; - } - >; - - cancel( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - clear( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ladle(overrides?: CallOverrides): Promise; - - limits( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber, BigNumber] & { max: BigNumber; sum: BigNumber }>; - - lines( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [number, BigNumber, BigNumber] & { - duration: number; - vaultProportion: BigNumber; - collateralProportion: BigNumber; - } - >; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - payBase( - vaultId: PromiseOrValue, - to: PromiseOrValue, - minInkOut: PromiseOrValue, - maxBaseIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - payFYToken( - vaultId: PromiseOrValue, - to: PromiseOrValue, - minInkOut: PromiseOrValue, - maxArtIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - point( - param: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - protected( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setAuctioneerReward( - auctioneerReward_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLineAndLimit( - ilkId: PromiseOrValue, - baseId: PromiseOrValue, - duration: PromiseOrValue, - vaultProportion: PromiseOrValue, - collateralProportion: PromiseOrValue, - max: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setProtected( - owner: PromiseOrValue, - _protected: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ONE_HUNDRED_PERCENT(overrides?: CallOverrides): Promise; - - ONE_PERCENT(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - auction( - vaultId: PromiseOrValue, - to: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [ - DataTypes.AuctionStructOutput, - DataTypes.VaultStructOutput, - DataTypes.SeriesStructOutput - ] & { - auction_: DataTypes.AuctionStructOutput; - vault: DataTypes.VaultStructOutput; - series: DataTypes.SeriesStructOutput; - } - >; - - auctioneerReward(overrides?: CallOverrides): Promise; - - auctions( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [string, number, string, BigNumber, BigNumber, string, string, string] & { - owner: string; - start: number; - baseId: string; - ink: BigNumber; - art: BigNumber; - auctioneer: string; - ilkId: string; - seriesId: string; - } - >; - - calcPayout( - vaultId: PromiseOrValue, - to: PromiseOrValue, - maxArtIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - liquidatorCut: BigNumber; - auctioneerCut: BigNumber; - artIn: BigNumber; - } - >; - - cancel( - vaultId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - clear( - vaultId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ladle(overrides?: CallOverrides): Promise; - - limits( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber, BigNumber] & { max: BigNumber; sum: BigNumber }>; - - lines( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [number, BigNumber, BigNumber] & { - duration: number; - vaultProportion: BigNumber; - collateralProportion: BigNumber; - } - >; - - lockRole( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - payBase( - vaultId: PromiseOrValue, - to: PromiseOrValue, - minInkOut: PromiseOrValue, - maxBaseIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - liquidatorCut: BigNumber; - auctioneerCut: BigNumber; - baseIn: BigNumber; - } - >; - - payFYToken( - vaultId: PromiseOrValue, - to: PromiseOrValue, - minInkOut: PromiseOrValue, - maxArtIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - liquidatorCut: BigNumber; - auctioneerCut: BigNumber; - artIn: BigNumber; - } - >; - - point( - param: PromiseOrValue, - value: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - protected( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setAuctioneerReward( - auctioneerReward_: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setLineAndLimit( - ilkId: PromiseOrValue, - baseId: PromiseOrValue, - duration: PromiseOrValue, - vaultProportion: PromiseOrValue, - collateralProportion: PromiseOrValue, - max: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setProtected( - owner: PromiseOrValue, - _protected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Auctioned(bytes12,tuple,uint256,uint256)"( - vaultId?: PromiseOrValue | null, - auction?: null, - duration?: null, - initialCollateralProportion?: null - ): AuctionedEventFilter; - Auctioned( - vaultId?: PromiseOrValue | null, - auction?: null, - duration?: null, - initialCollateralProportion?: null - ): AuctionedEventFilter; - - "AuctioneerRewardSet(uint256)"( - auctioneerReward?: null - ): AuctioneerRewardSetEventFilter; - AuctioneerRewardSet( - auctioneerReward?: null - ): AuctioneerRewardSetEventFilter; - - "Bought(bytes12,address,uint256,uint256)"( - vaultId?: PromiseOrValue | null, - buyer?: PromiseOrValue | null, - ink?: null, - art?: null - ): BoughtEventFilter; - Bought( - vaultId?: PromiseOrValue | null, - buyer?: PromiseOrValue | null, - ink?: null, - art?: null - ): BoughtEventFilter; - - "Cancelled(bytes12)"( - vaultId?: PromiseOrValue | null - ): CancelledEventFilter; - Cancelled(vaultId?: PromiseOrValue | null): CancelledEventFilter; - - "Cleared(bytes12)"( - vaultId?: PromiseOrValue | null - ): ClearedEventFilter; - Cleared(vaultId?: PromiseOrValue | null): ClearedEventFilter; - - "Ended(bytes12)"( - vaultId?: PromiseOrValue | null - ): EndedEventFilter; - Ended(vaultId?: PromiseOrValue | null): EndedEventFilter; - - "LimitSet(bytes6,bytes6,uint128)"( - ilkId?: PromiseOrValue | null, - baseId?: PromiseOrValue | null, - max?: null - ): LimitSetEventFilter; - LimitSet( - ilkId?: PromiseOrValue | null, - baseId?: PromiseOrValue | null, - max?: null - ): LimitSetEventFilter; - - "LineSet(bytes6,bytes6,uint32,uint64,uint64)"( - ilkId?: PromiseOrValue | null, - baseId?: PromiseOrValue | null, - duration?: null, - vaultProportion?: null, - collateralProportion?: null - ): LineSetEventFilter; - LineSet( - ilkId?: PromiseOrValue | null, - baseId?: PromiseOrValue | null, - duration?: null, - vaultProportion?: null, - collateralProportion?: null - ): LineSetEventFilter; - - "Point(bytes32,address,address)"( - param?: PromiseOrValue | null, - oldValue?: PromiseOrValue | null, - newValue?: PromiseOrValue | null - ): PointEventFilter; - Point( - param?: PromiseOrValue | null, - oldValue?: PromiseOrValue | null, - newValue?: PromiseOrValue | null - ): PointEventFilter; - - "ProtectedSet(address,bool)"( - value?: PromiseOrValue | null, - protected?: null - ): ProtectedSetEventFilter; - ProtectedSet( - value?: PromiseOrValue | null, - protected?: null - ): ProtectedSetEventFilter; - - "RoleAdminChanged(bytes4,bytes4)"( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - RoleAdminChanged( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - - "RoleGranted(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - RoleGranted( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - - "RoleRevoked(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - RoleRevoked( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - }; - - estimateGas: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ONE_HUNDRED_PERCENT(overrides?: CallOverrides): Promise; - - ONE_PERCENT(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - auction( - vaultId: PromiseOrValue, - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - auctioneerReward(overrides?: CallOverrides): Promise; - - auctions( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - calcPayout( - vaultId: PromiseOrValue, - to: PromiseOrValue, - maxArtIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - cancel( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - clear( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ladle(overrides?: CallOverrides): Promise; - - limits( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lines( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - payBase( - vaultId: PromiseOrValue, - to: PromiseOrValue, - minInkOut: PromiseOrValue, - maxBaseIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - payFYToken( - vaultId: PromiseOrValue, - to: PromiseOrValue, - minInkOut: PromiseOrValue, - maxArtIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - point( - param: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - protected( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setAuctioneerReward( - auctioneerReward_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLineAndLimit( - ilkId: PromiseOrValue, - baseId: PromiseOrValue, - duration: PromiseOrValue, - vaultProportion: PromiseOrValue, - collateralProportion: PromiseOrValue, - max: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setProtected( - owner: PromiseOrValue, - _protected: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ONE_HUNDRED_PERCENT( - overrides?: CallOverrides - ): Promise; - - ONE_PERCENT(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - auction( - vaultId: PromiseOrValue, - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - auctioneerReward(overrides?: CallOverrides): Promise; - - auctions( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - calcPayout( - vaultId: PromiseOrValue, - to: PromiseOrValue, - maxArtIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - cancel( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - clear( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ladle(overrides?: CallOverrides): Promise; - - limits( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lines( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - payBase( - vaultId: PromiseOrValue, - to: PromiseOrValue, - minInkOut: PromiseOrValue, - maxBaseIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - payFYToken( - vaultId: PromiseOrValue, - to: PromiseOrValue, - minInkOut: PromiseOrValue, - maxArtIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - point( - param: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - protected( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setAuctioneerReward( - auctioneerReward_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLineAndLimit( - ilkId: PromiseOrValue, - baseId: PromiseOrValue, - duration: PromiseOrValue, - vaultProportion: PromiseOrValue, - collateralProportion: PromiseOrValue, - max: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setProtected( - owner: PromiseOrValue, - _protected: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; -} diff --git a/src/contracts/WrapEtherModule.ts b/src/contracts/WrapEtherModule.ts deleted file mode 100644 index 69d5e2d74..000000000 --- a/src/contracts/WrapEtherModule.ts +++ /dev/null @@ -1,459 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - PayableOverrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "./common"; - -export interface WrapEtherModuleInterface extends utils.Interface { - functions: { - "borrowingFee()": FunctionFragment; - "cauldron()": FunctionFragment; - "integrations(address)": FunctionFragment; - "joins(bytes6)": FunctionFragment; - "modules(address)": FunctionFragment; - "pools(bytes6)": FunctionFragment; - "router()": FunctionFragment; - "tokens(address)": FunctionFragment; - "weth()": FunctionFragment; - "wrap(address,uint256)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "borrowingFee" - | "cauldron" - | "integrations" - | "joins" - | "modules" - | "pools" - | "router" - | "tokens" - | "weth" - | "wrap" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "borrowingFee", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "cauldron", values?: undefined): string; - encodeFunctionData( - functionFragment: "integrations", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "joins", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "modules", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "pools", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "router", values?: undefined): string; - encodeFunctionData( - functionFragment: "tokens", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "weth", values?: undefined): string; - encodeFunctionData( - functionFragment: "wrap", - values: [PromiseOrValue, PromiseOrValue] - ): string; - - decodeFunctionResult( - functionFragment: "borrowingFee", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "cauldron", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "integrations", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "joins", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "modules", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "pools", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "tokens", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "weth", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "wrap", data: BytesLike): Result; - - events: { - "FeeSet(uint256)": EventFragment; - "IntegrationAdded(address,bool)": EventFragment; - "JoinAdded(bytes6,address)": EventFragment; - "ModuleAdded(address,bool)": EventFragment; - "PoolAdded(bytes6,address)": EventFragment; - "TokenAdded(address,bool)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "FeeSet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "IntegrationAdded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "JoinAdded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ModuleAdded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "PoolAdded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TokenAdded"): EventFragment; -} - -export interface FeeSetEventObject { - fee: BigNumber; -} -export type FeeSetEvent = TypedEvent<[BigNumber], FeeSetEventObject>; - -export type FeeSetEventFilter = TypedEventFilter; - -export interface IntegrationAddedEventObject { - integration: string; - set: boolean; -} -export type IntegrationAddedEvent = TypedEvent< - [string, boolean], - IntegrationAddedEventObject ->; - -export type IntegrationAddedEventFilter = - TypedEventFilter; - -export interface JoinAddedEventObject { - assetId: string; - join: string; -} -export type JoinAddedEvent = TypedEvent<[string, string], JoinAddedEventObject>; - -export type JoinAddedEventFilter = TypedEventFilter; - -export interface ModuleAddedEventObject { - module: string; - set: boolean; -} -export type ModuleAddedEvent = TypedEvent< - [string, boolean], - ModuleAddedEventObject ->; - -export type ModuleAddedEventFilter = TypedEventFilter; - -export interface PoolAddedEventObject { - seriesId: string; - pool: string; -} -export type PoolAddedEvent = TypedEvent<[string, string], PoolAddedEventObject>; - -export type PoolAddedEventFilter = TypedEventFilter; - -export interface TokenAddedEventObject { - token: string; - set: boolean; -} -export type TokenAddedEvent = TypedEvent< - [string, boolean], - TokenAddedEventObject ->; - -export type TokenAddedEventFilter = TypedEventFilter; - -export interface WrapEtherModule extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: WrapEtherModuleInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - borrowingFee(overrides?: CallOverrides): Promise<[BigNumber]>; - - cauldron(overrides?: CallOverrides): Promise<[string]>; - - integrations( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - joins( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - modules( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - router(overrides?: CallOverrides): Promise<[string]>; - - tokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - weth(overrides?: CallOverrides): Promise<[string]>; - - wrap( - receiver: PromiseOrValue, - wad: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; - - borrowingFee(overrides?: CallOverrides): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - integrations( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - joins( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - modules( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - router(overrides?: CallOverrides): Promise; - - tokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - weth(overrides?: CallOverrides): Promise; - - wrap( - receiver: PromiseOrValue, - wad: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - borrowingFee(overrides?: CallOverrides): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - integrations( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - joins( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - modules( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - router(overrides?: CallOverrides): Promise; - - tokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - weth(overrides?: CallOverrides): Promise; - - wrap( - receiver: PromiseOrValue, - wad: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "FeeSet(uint256)"(fee?: null): FeeSetEventFilter; - FeeSet(fee?: null): FeeSetEventFilter; - - "IntegrationAdded(address,bool)"( - integration?: PromiseOrValue | null, - set?: PromiseOrValue | null - ): IntegrationAddedEventFilter; - IntegrationAdded( - integration?: PromiseOrValue | null, - set?: PromiseOrValue | null - ): IntegrationAddedEventFilter; - - "JoinAdded(bytes6,address)"( - assetId?: PromiseOrValue | null, - join?: PromiseOrValue | null - ): JoinAddedEventFilter; - JoinAdded( - assetId?: PromiseOrValue | null, - join?: PromiseOrValue | null - ): JoinAddedEventFilter; - - "ModuleAdded(address,bool)"( - module?: PromiseOrValue | null, - set?: PromiseOrValue | null - ): ModuleAddedEventFilter; - ModuleAdded( - module?: PromiseOrValue | null, - set?: PromiseOrValue | null - ): ModuleAddedEventFilter; - - "PoolAdded(bytes6,address)"( - seriesId?: PromiseOrValue | null, - pool?: PromiseOrValue | null - ): PoolAddedEventFilter; - PoolAdded( - seriesId?: PromiseOrValue | null, - pool?: PromiseOrValue | null - ): PoolAddedEventFilter; - - "TokenAdded(address,bool)"( - token?: PromiseOrValue | null, - set?: PromiseOrValue | null - ): TokenAddedEventFilter; - TokenAdded( - token?: PromiseOrValue | null, - set?: PromiseOrValue | null - ): TokenAddedEventFilter; - }; - - estimateGas: { - borrowingFee(overrides?: CallOverrides): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - integrations( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - joins( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - modules( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - router(overrides?: CallOverrides): Promise; - - tokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - weth(overrides?: CallOverrides): Promise; - - wrap( - receiver: PromiseOrValue, - wad: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - borrowingFee(overrides?: CallOverrides): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - integrations( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - joins( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - modules( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - router(overrides?: CallOverrides): Promise; - - tokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - weth(overrides?: CallOverrides): Promise; - - wrap( - receiver: PromiseOrValue, - wad: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; -} diff --git a/src/contracts/YearnVaultMultiOracle.ts b/src/contracts/YearnVaultMultiOracle.ts deleted file mode 100644 index daf6515c9..000000000 --- a/src/contracts/YearnVaultMultiOracle.ts +++ /dev/null @@ -1,785 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "./common"; - -export interface YearnVaultMultiOracleInterface extends utils.Interface { - functions: { - "LOCK()": FunctionFragment; - "LOCK8605463013()": FunctionFragment; - "ROOT()": FunctionFragment; - "ROOT4146650865()": FunctionFragment; - "get(bytes32,bytes32,uint256)": FunctionFragment; - "getRoleAdmin(bytes4)": FunctionFragment; - "grantRole(bytes4,address)": FunctionFragment; - "grantRoles(bytes4[],address)": FunctionFragment; - "hasRole(bytes4,address)": FunctionFragment; - "lockRole(bytes4)": FunctionFragment; - "peek(bytes32,bytes32,uint256)": FunctionFragment; - "renounceRole(bytes4,address)": FunctionFragment; - "revokeRole(bytes4,address)": FunctionFragment; - "revokeRoles(bytes4[],address)": FunctionFragment; - "setRoleAdmin(bytes4,bytes4)": FunctionFragment; - "setSource(bytes6,bytes6,address)": FunctionFragment; - "sources(bytes6,bytes6)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "LOCK" - | "LOCK8605463013" - | "ROOT" - | "ROOT4146650865" - | "get" - | "getRoleAdmin" - | "grantRole" - | "grantRoles" - | "hasRole" - | "lockRole" - | "peek" - | "renounceRole" - | "revokeRole" - | "revokeRoles" - | "setRoleAdmin" - | "setSource" - | "sources" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; - encodeFunctionData( - functionFragment: "LOCK8605463013", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; - encodeFunctionData( - functionFragment: "ROOT4146650865", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "get", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "getRoleAdmin", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "hasRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "lockRole", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "peek", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "renounceRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setRoleAdmin", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setSource", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "sources", - values: [PromiseOrValue, PromiseOrValue] - ): string; - - decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "LOCK8605463013", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "ROOT4146650865", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "get", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "peek", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "renounceRole", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "revokeRoles", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "setSource", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "sources", data: BytesLike): Result; - - events: { - "RoleAdminChanged(bytes4,bytes4)": EventFragment; - "RoleGranted(bytes4,address,address)": EventFragment; - "RoleRevoked(bytes4,address,address)": EventFragment; - "SourceSet(bytes6,bytes6,address,uint8)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SourceSet"): EventFragment; -} - -export interface RoleAdminChangedEventObject { - role: string; - newAdminRole: string; -} -export type RoleAdminChangedEvent = TypedEvent< - [string, string], - RoleAdminChangedEventObject ->; - -export type RoleAdminChangedEventFilter = - TypedEventFilter; - -export interface RoleGrantedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleGrantedEvent = TypedEvent< - [string, string, string], - RoleGrantedEventObject ->; - -export type RoleGrantedEventFilter = TypedEventFilter; - -export interface RoleRevokedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleRevokedEvent = TypedEvent< - [string, string, string], - RoleRevokedEventObject ->; - -export type RoleRevokedEventFilter = TypedEventFilter; - -export interface SourceSetEventObject { - baseId: string; - quoteId: string; - source: string; - decimals: number; -} -export type SourceSetEvent = TypedEvent< - [string, string, string, number], - SourceSetEventObject ->; - -export type SourceSetEventFilter = TypedEventFilter; - -export interface YearnVaultMultiOracle extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: YearnVaultMultiOracleInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - LOCK(overrides?: CallOverrides): Promise<[string]>; - - LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; - - ROOT(overrides?: CallOverrides): Promise<[string]>; - - ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; - - get( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - peek( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } - >; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - vaultTokenId: PromiseOrValue, - underlyingId: PromiseOrValue, - vaultToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [string, number, boolean] & { - source: string; - decimals: number; - inverse: boolean; - } - >; - }; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - peek( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } - >; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - vaultTokenId: PromiseOrValue, - underlyingId: PromiseOrValue, - vaultToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [string, number, boolean] & { - source: string; - decimals: number; - inverse: boolean; - } - >; - - callStatic: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } - >; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - peek( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } - >; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setSource( - vaultTokenId: PromiseOrValue, - underlyingId: PromiseOrValue, - vaultToken: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [string, number, boolean] & { - source: string; - decimals: number; - inverse: boolean; - } - >; - }; - - filters: { - "RoleAdminChanged(bytes4,bytes4)"( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - RoleAdminChanged( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - - "RoleGranted(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - RoleGranted( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - - "RoleRevoked(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - RoleRevoked( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - - "SourceSet(bytes6,bytes6,address,uint8)"( - baseId?: PromiseOrValue | null, - quoteId?: PromiseOrValue | null, - source?: PromiseOrValue | null, - decimals?: null - ): SourceSetEventFilter; - SourceSet( - baseId?: PromiseOrValue | null, - quoteId?: PromiseOrValue | null, - source?: PromiseOrValue | null, - decimals?: null - ): SourceSetEventFilter; - }; - - estimateGas: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - peek( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - vaultTokenId: PromiseOrValue, - underlyingId: PromiseOrValue, - vaultToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - populateTransaction: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - get( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - peek( - baseId: PromiseOrValue, - quoteId: PromiseOrValue, - amountBase: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setSource( - vaultTokenId: PromiseOrValue, - underlyingId: PromiseOrValue, - vaultToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sources( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; -} diff --git a/src/contracts/common.ts b/src/contracts/common.ts deleted file mode 100644 index 4c90b08bb..000000000 --- a/src/contracts/common.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { Listener } from "@ethersproject/providers"; -import type { Event, EventFilter } from "ethers"; - -export interface TypedEvent< - TArgsArray extends Array = any, - TArgsObject = any -> extends Event { - args: TArgsArray & TArgsObject; -} - -export interface TypedEventFilter<_TEvent extends TypedEvent> - extends EventFilter {} - -export interface TypedListener { - (...listenerArg: [...__TypechainArgsArray, TEvent]): void; -} - -type __TypechainArgsArray = T extends TypedEvent ? U : never; - -export interface OnEvent { - ( - eventFilter: TypedEventFilter, - listener: TypedListener - ): TRes; - (eventName: string, listener: Listener): TRes; -} - -export type MinEthersFactory = { - deploy(...a: ARGS[]): Promise; -}; - -export type GetContractTypeFromFactory = F extends MinEthersFactory< - infer C, - any -> - ? C - : never; - -export type GetARGsTypeFromFactory = F extends MinEthersFactory - ? Parameters - : never; - -export type PromiseOrValue = T | Promise; diff --git a/src/types/index.ts b/src/types/index.ts index a53842361..c92675332 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -198,7 +198,7 @@ export interface IStrategyRoot extends ISignable { decimals: number; strategyContract: Strategy; startBlock: Block; - type: 'V1' | 'V2' | 'V2.1'; + type: 'V1' | 'V2' | 'V2_1'; associatedStrategy?: string; disabled?: boolean; } From b8c4c053e078a8f2310c5da2416d09e9a3e88b90 Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Thu, 1 Jun 2023 14:52:34 +0100 Subject: [PATCH 24/51] bugfix/ useAssert into component --- src/hooks/actionHooks/useRemoveLiquidity.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hooks/actionHooks/useRemoveLiquidity.ts b/src/hooks/actionHooks/useRemoveLiquidity.ts index c541338fd..4cc698ea1 100644 --- a/src/hooks/actionHooks/useRemoveLiquidity.ts +++ b/src/hooks/actionHooks/useRemoveLiquidity.ts @@ -99,6 +99,8 @@ export const useRemoveLiquidity = () => { const _strategy: any = selectedStrategy!; const _input = ethers.utils.parseUnits(input, _base.decimals); + const { assert, encodeBalanceCall } = useAssert(); + const associated_V2_Contract = _strategy.associatedStrategy.V2 ? Strategy__factory.connect(_strategy.associatedStrategy.V2, provider) : undefined; @@ -301,8 +303,6 @@ export const useRemoveLiquidity = () => { ], txCode ); - - const { assert, encodeBalanceCall } = useAssert(); /* Add in an Assert call : Base received + fyToken received within 10% of strategy tokens held. */ const assertCallData_base: ICallData[] = From 712de0a29ec8272a4a023cd1cc47a6063e447c45 Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Thu, 1 Jun 2023 14:53:11 +0100 Subject: [PATCH 25/51] bugfix/move useAssert --- src/hooks/actionHooks/useRemoveLiquidity.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/hooks/actionHooks/useRemoveLiquidity.ts b/src/hooks/actionHooks/useRemoveLiquidity.ts index 4cc698ea1..ae1532334 100644 --- a/src/hooks/actionHooks/useRemoveLiquidity.ts +++ b/src/hooks/actionHooks/useRemoveLiquidity.ts @@ -70,6 +70,9 @@ export const useRemoveLiquidity = () => { const { getTimeTillMaturity } = useTimeTillMaturity(); const { isActionAllowed } = useAllowAction(); + const { assert, encodeBalanceCall } = useAssert(); + + const contracts = useContracts(); const { refetch: refetchBaseBal } = useBalance({ address: account, @@ -99,8 +102,7 @@ export const useRemoveLiquidity = () => { const _strategy: any = selectedStrategy!; const _input = ethers.utils.parseUnits(input, _base.decimals); - const { assert, encodeBalanceCall } = useAssert(); - + const associated_V2_Contract = _strategy.associatedStrategy.V2 ? Strategy__factory.connect(_strategy.associatedStrategy.V2, provider) : undefined; From 59a5c684d747905adce9e947a49fabcacc57d015 Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Thu, 1 Jun 2023 14:57:55 +0100 Subject: [PATCH 26/51] bugifx/contractTypes.StrategyV2_1__factory --- src/contexts/ChainContext.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/contexts/ChainContext.tsx b/src/contexts/ChainContext.tsx index 37e876382..0d0d25b2a 100644 --- a/src/contexts/ChainContext.tsx +++ b/src/contexts/ChainContext.tsx @@ -292,7 +292,7 @@ const ChainProvider = ({ children }: { children: ReactNode }) => { (strategy: any) => { const Strategy = strategy.type === StrategyType.V2_1 - ? contractTypes.StrategyV21__factory.connect(strategy.address, provider) + ? contractTypes.StrategyV2_1__factory.connect(strategy.address, provider) : contractTypes.Strategy__factory.connect(strategy.address, provider); return { ...strategy, From 2212a7fecdf2e8f5d4ac511da12ddc637c32eaa3 Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Thu, 1 Jun 2023 15:03:24 +0100 Subject: [PATCH 27/51] re-add in the tx contracts --- src/contracts/AccumulatorOracle.ts | 866 +++++++++ src/contracts/Assert.ts | 1204 ++++++++++++ src/contracts/Cauldron.ts | 2104 ++++++++++++++++++++ src/contracts/ChainlinkMultiOracle.ts | 803 ++++++++ src/contracts/ChainlinkUSDOracle.ts | 759 ++++++++ src/contracts/CompositeMultiOracle.ts | 881 +++++++++ src/contracts/CompoundMultiOracle.ts | 764 ++++++++ src/contracts/ConvexJoin.ts | 1279 ++++++++++++ src/contracts/ConvexLadleModule.ts | 507 +++++ src/contracts/ERC1155.ts | 529 +++++ src/contracts/ERC20.ts | 384 ++++ src/contracts/ERC20Permit.ts | 560 ++++++ src/contracts/FYToken.ts | 1553 +++++++++++++++ src/contracts/Join.ts | 900 +++++++++ src/contracts/Join1155.ts | 983 ++++++++++ src/contracts/Ladle.ts | 2200 +++++++++++++++++++++ src/contracts/LadleStorage.ts | 419 ++++ src/contracts/NotionalMultiOracle.ts | 802 ++++++++ src/contracts/Pool.ts | 2475 ++++++++++++++++++++++++ src/contracts/Strategy.ts | 1914 ++++++++++++++++++ src/contracts/Transfer1155Module.ts | 483 +++++ src/contracts/UniswapV3Oracle.ts | 888 +++++++++ src/contracts/Witch.ts | 1026 ++++++++++ src/contracts/WitchV2.ts | 1580 +++++++++++++++ src/contracts/WrapEtherModule.ts | 459 +++++ src/contracts/YearnVaultMultiOracle.ts | 785 ++++++++ src/contracts/common.ts | 46 + 27 files changed, 27153 insertions(+) create mode 100644 src/contracts/AccumulatorOracle.ts create mode 100644 src/contracts/Assert.ts create mode 100644 src/contracts/Cauldron.ts create mode 100644 src/contracts/ChainlinkMultiOracle.ts create mode 100644 src/contracts/ChainlinkUSDOracle.ts create mode 100644 src/contracts/CompositeMultiOracle.ts create mode 100644 src/contracts/CompoundMultiOracle.ts create mode 100644 src/contracts/ConvexJoin.ts create mode 100644 src/contracts/ConvexLadleModule.ts create mode 100644 src/contracts/ERC1155.ts create mode 100644 src/contracts/ERC20.ts create mode 100644 src/contracts/ERC20Permit.ts create mode 100644 src/contracts/FYToken.ts create mode 100644 src/contracts/Join.ts create mode 100644 src/contracts/Join1155.ts create mode 100644 src/contracts/Ladle.ts create mode 100644 src/contracts/LadleStorage.ts create mode 100644 src/contracts/NotionalMultiOracle.ts create mode 100644 src/contracts/Pool.ts create mode 100644 src/contracts/Strategy.ts create mode 100644 src/contracts/Transfer1155Module.ts create mode 100644 src/contracts/UniswapV3Oracle.ts create mode 100644 src/contracts/Witch.ts create mode 100644 src/contracts/WitchV2.ts create mode 100644 src/contracts/WrapEtherModule.ts create mode 100644 src/contracts/YearnVaultMultiOracle.ts create mode 100644 src/contracts/common.ts diff --git a/src/contracts/AccumulatorOracle.ts b/src/contracts/AccumulatorOracle.ts new file mode 100644 index 000000000..1a4e4d6a5 --- /dev/null +++ b/src/contracts/AccumulatorOracle.ts @@ -0,0 +1,866 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface AccumulatorOracleInterface extends utils.Interface { + functions: { + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "get(bytes32,bytes32,uint256)": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "peek(bytes32,bytes32,uint256)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "setSource(bytes6,bytes6,uint256,uint256)": FunctionFragment; + "sources(bytes6,bytes6)": FunctionFragment; + "updatePerSecondRate(bytes6,bytes6,uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "LOCK" + | "LOCK8605463013" + | "ROOT" + | "ROOT4146650865" + | "get" + | "getRoleAdmin" + | "grantRole" + | "grantRoles" + | "hasRole" + | "lockRole" + | "peek" + | "renounceRole" + | "revokeRole" + | "revokeRoles" + | "setRoleAdmin" + | "setSource" + | "sources" + | "updatePerSecondRate" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "get", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "peek", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setSource", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "sources", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "updatePerSecondRate", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "get", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "peek", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setSource", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "sources", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "updatePerSecondRate", + data: BytesLike + ): Result; + + events: { + "PerSecondRateUpdated(bytes6,bytes6,uint256)": EventFragment; + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + "SourceSet(bytes6,bytes6,uint256,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "PerSecondRateUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SourceSet"): EventFragment; +} + +export interface PerSecondRateUpdatedEventObject { + baseId: string; + kind: string; + perSecondRate: BigNumber; +} +export type PerSecondRateUpdatedEvent = TypedEvent< + [string, string, BigNumber], + PerSecondRateUpdatedEventObject +>; + +export type PerSecondRateUpdatedEventFilter = + TypedEventFilter; + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface SourceSetEventObject { + baseId: string; + kind: string; + startRate: BigNumber; + perSecondRate: BigNumber; +} +export type SourceSetEvent = TypedEvent< + [string, string, BigNumber, BigNumber], + SourceSetEventObject +>; + +export type SourceSetEventFilter = TypedEventFilter; + +export interface AccumulatorOracle extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: AccumulatorOracleInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + get( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { accumulated: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + kindId: PromiseOrValue, + startRate: PromiseOrValue, + perSecondRate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + perSecondRate: BigNumber; + accumulated: BigNumber; + lastUpdated: BigNumber; + } + >; + + updatePerSecondRate( + baseId: PromiseOrValue, + kindId: PromiseOrValue, + perSecondRate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { accumulated: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + kindId: PromiseOrValue, + startRate: PromiseOrValue, + perSecondRate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + perSecondRate: BigNumber; + accumulated: BigNumber; + lastUpdated: BigNumber; + } + >; + + updatePerSecondRate( + baseId: PromiseOrValue, + kindId: PromiseOrValue, + perSecondRate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { accumulated: BigNumber; updateTime: BigNumber } + >; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + peek( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { accumulated: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setSource( + baseId: PromiseOrValue, + kindId: PromiseOrValue, + startRate: PromiseOrValue, + perSecondRate: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + perSecondRate: BigNumber; + accumulated: BigNumber; + lastUpdated: BigNumber; + } + >; + + updatePerSecondRate( + baseId: PromiseOrValue, + kindId: PromiseOrValue, + perSecondRate: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "PerSecondRateUpdated(bytes6,bytes6,uint256)"( + baseId?: PromiseOrValue | null, + kind?: PromiseOrValue | null, + perSecondRate?: null + ): PerSecondRateUpdatedEventFilter; + PerSecondRateUpdated( + baseId?: PromiseOrValue | null, + kind?: PromiseOrValue | null, + perSecondRate?: null + ): PerSecondRateUpdatedEventFilter; + + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + + "SourceSet(bytes6,bytes6,uint256,uint256)"( + baseId?: PromiseOrValue | null, + kind?: PromiseOrValue | null, + startRate?: null, + perSecondRate?: null + ): SourceSetEventFilter; + SourceSet( + baseId?: PromiseOrValue | null, + kind?: PromiseOrValue | null, + startRate?: null, + perSecondRate?: null + ): SourceSetEventFilter; + }; + + estimateGas: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + kindId: PromiseOrValue, + startRate: PromiseOrValue, + perSecondRate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + updatePerSecondRate( + baseId: PromiseOrValue, + kindId: PromiseOrValue, + perSecondRate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + kindId: PromiseOrValue, + startRate: PromiseOrValue, + perSecondRate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + updatePerSecondRate( + baseId: PromiseOrValue, + kindId: PromiseOrValue, + perSecondRate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/contracts/Assert.ts b/src/contracts/Assert.ts new file mode 100644 index 000000000..b2b00dc7c --- /dev/null +++ b/src/contracts/Assert.ts @@ -0,0 +1,1204 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface AssertInterface extends utils.Interface { + functions: { + "assertEq(address,bytes,address,bytes)": FunctionFragment; + "assertEq(bytes,bytes)": FunctionFragment; + "assertEq(uint256,uint256)": FunctionFragment; + "assertEq(address,bytes,uint256)": FunctionFragment; + "assertEq(bool,bool)": FunctionFragment; + "assertEqAbs(address,bytes,address,bytes,uint256)": FunctionFragment; + "assertEqAbs(address,bytes,uint256,uint256)": FunctionFragment; + "assertEqAbs(uint256,uint256,uint256)": FunctionFragment; + "assertEqRel(address,bytes,uint256,uint256)": FunctionFragment; + "assertEqRel(uint256,uint256,uint256)": FunctionFragment; + "assertEqRel(address,bytes,address,bytes,uint256)": FunctionFragment; + "assertGe(address,bytes,address,bytes)": FunctionFragment; + "assertGe(uint256,uint256)": FunctionFragment; + "assertGe(address,bytes,uint256)": FunctionFragment; + "assertGt(address,bytes,address,bytes)": FunctionFragment; + "assertGt(address,bytes,uint256)": FunctionFragment; + "assertGt(uint256,uint256)": FunctionFragment; + "assertLe(address,bytes,uint256)": FunctionFragment; + "assertLe(uint256,uint256)": FunctionFragment; + "assertLe(address,bytes,address,bytes)": FunctionFragment; + "assertLt(address,bytes,uint256)": FunctionFragment; + "assertLt(uint256,uint256)": FunctionFragment; + "assertLt(address,bytes,address,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "assertEq(address,bytes,address,bytes)" + | "assertEq(bytes,bytes)" + | "assertEq(uint256,uint256)" + | "assertEq(address,bytes,uint256)" + | "assertEq(bool,bool)" + | "assertEqAbs(address,bytes,address,bytes,uint256)" + | "assertEqAbs(address,bytes,uint256,uint256)" + | "assertEqAbs(uint256,uint256,uint256)" + | "assertEqRel(address,bytes,uint256,uint256)" + | "assertEqRel(uint256,uint256,uint256)" + | "assertEqRel(address,bytes,address,bytes,uint256)" + | "assertGe(address,bytes,address,bytes)" + | "assertGe(uint256,uint256)" + | "assertGe(address,bytes,uint256)" + | "assertGt(address,bytes,address,bytes)" + | "assertGt(address,bytes,uint256)" + | "assertGt(uint256,uint256)" + | "assertLe(address,bytes,uint256)" + | "assertLe(uint256,uint256)" + | "assertLe(address,bytes,address,bytes)" + | "assertLt(address,bytes,uint256)" + | "assertLt(uint256,uint256)" + | "assertLt(address,bytes,address,bytes)" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "assertEq(address,bytes,address,bytes)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assertEq(bytes,bytes)", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "assertEq(uint256,uint256)", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "assertEq(address,bytes,uint256)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assertEq(bool,bool)", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "assertEqAbs(address,bytes,address,bytes,uint256)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assertEqAbs(address,bytes,uint256,uint256)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assertEqAbs(uint256,uint256,uint256)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assertEqRel(address,bytes,uint256,uint256)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assertEqRel(uint256,uint256,uint256)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assertEqRel(address,bytes,address,bytes,uint256)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assertGe(address,bytes,address,bytes)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assertGe(uint256,uint256)", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "assertGe(address,bytes,uint256)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assertGt(address,bytes,address,bytes)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assertGt(address,bytes,uint256)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assertGt(uint256,uint256)", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "assertLe(address,bytes,uint256)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assertLe(uint256,uint256)", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "assertLe(address,bytes,address,bytes)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assertLt(address,bytes,uint256)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assertLt(uint256,uint256)", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "assertLt(address,bytes,address,bytes)", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult( + functionFragment: "assertEq(address,bytes,address,bytes)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertEq(bytes,bytes)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertEq(uint256,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertEq(address,bytes,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertEq(bool,bool)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertEqAbs(address,bytes,address,bytes,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertEqAbs(address,bytes,uint256,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertEqAbs(uint256,uint256,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertEqRel(address,bytes,uint256,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertEqRel(uint256,uint256,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertEqRel(address,bytes,address,bytes,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertGe(address,bytes,address,bytes)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertGe(uint256,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertGe(address,bytes,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertGt(address,bytes,address,bytes)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertGt(address,bytes,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertGt(uint256,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertLe(address,bytes,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertLe(uint256,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertLe(address,bytes,address,bytes)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertLt(address,bytes,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertLt(uint256,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assertLt(address,bytes,address,bytes)", + data: BytesLike + ): Result; + + events: {}; +} + +export interface Assert extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: AssertInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + "assertEq(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEq(bytes,bytes)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[void]>; + + "assertEq(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[void]>; + + "assertEq(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEq(bool,bool)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[void]>; + + "assertEqAbs(address,bytes,address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + abs: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEqAbs(address,bytes,uint256,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + abs: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEqAbs(uint256,uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + abs: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[void]>; + + "assertEqRel(address,bytes,uint256,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + rel: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEqRel(uint256,uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + rel: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[void]>; + + "assertEqRel(address,bytes,address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + rel: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGe(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGe(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[void]>; + + "assertGe(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGt(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGt(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGt(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[void]>; + + "assertLe(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertLe(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[void]>; + + "assertLe(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertLt(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertLt(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[void]>; + + "assertLt(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + "assertEq(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEq(bytes,bytes)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEq(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEq(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEq(bool,bool)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEqAbs(address,bytes,address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + abs: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEqAbs(address,bytes,uint256,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + abs: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEqAbs(uint256,uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + abs: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEqRel(address,bytes,uint256,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + rel: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEqRel(uint256,uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + rel: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEqRel(address,bytes,address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + rel: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGe(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGe(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertGe(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGt(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGt(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGt(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertLe(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertLe(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertLe(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertLt(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertLt(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertLt(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + "assertEq(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEq(bytes,bytes)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEq(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEq(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEq(bool,bool)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEqAbs(address,bytes,address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + abs: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEqAbs(address,bytes,uint256,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + abs: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEqAbs(uint256,uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + abs: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEqRel(address,bytes,uint256,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + rel: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEqRel(uint256,uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + rel: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEqRel(address,bytes,address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + rel: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertGe(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertGe(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertGe(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertGt(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertGt(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertGt(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertLe(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertLe(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertLe(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertLt(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertLt(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertLt(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + "assertEq(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEq(bytes,bytes)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEq(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEq(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEq(bool,bool)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEqAbs(address,bytes,address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + abs: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEqAbs(address,bytes,uint256,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + abs: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEqAbs(uint256,uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + abs: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEqRel(address,bytes,uint256,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + rel: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEqRel(uint256,uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + rel: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEqRel(address,bytes,address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + rel: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGe(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGe(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertGe(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGt(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGt(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGt(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertLe(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertLe(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertLe(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertLt(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertLt(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertLt(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + "assertEq(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEq(bytes,bytes)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEq(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEq(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEq(bool,bool)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEqAbs(address,bytes,address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + abs: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEqAbs(address,bytes,uint256,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + abs: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEqAbs(uint256,uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + abs: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEqRel(address,bytes,uint256,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + rel: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertEqRel(uint256,uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + rel: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertEqRel(address,bytes,address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + rel: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGe(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGe(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertGe(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGt(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGt(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertGt(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertLe(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertLe(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertLe(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertLt(address,bytes,uint256)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + "assertLt(uint256,uint256)"( + actual: PromiseOrValue, + expected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + "assertLt(address,bytes,address,bytes)"( + actualTarget: PromiseOrValue, + actualCalldata: PromiseOrValue, + expectedTarget: PromiseOrValue, + expectedCalldata: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/contracts/Cauldron.ts b/src/contracts/Cauldron.ts new file mode 100644 index 000000000..dd5103e53 --- /dev/null +++ b/src/contracts/Cauldron.ts @@ -0,0 +1,2104 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export declare namespace DataTypes { + export type VaultStruct = { + owner: PromiseOrValue; + seriesId: PromiseOrValue; + ilkId: PromiseOrValue; + }; + + export type VaultStructOutput = [string, string, string] & { + owner: string; + seriesId: string; + ilkId: string; + }; + + export type BalancesStruct = { + art: PromiseOrValue; + ink: PromiseOrValue; + }; + + export type BalancesStructOutput = [BigNumber, BigNumber] & { + art: BigNumber; + ink: BigNumber; + }; +} + +export interface CauldronInterface extends utils.Interface { + functions: { + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "accrual(bytes6)": FunctionFragment; + "addAsset(bytes6,address)": FunctionFragment; + "addIlks(bytes6,bytes6[])": FunctionFragment; + "addSeries(bytes6,bytes6,address)": FunctionFragment; + "assets(bytes6)": FunctionFragment; + "balances(bytes12)": FunctionFragment; + "build(address,bytes12,bytes6,bytes6)": FunctionFragment; + "debt(bytes6,bytes6)": FunctionFragment; + "debtFromBase(bytes6,uint128)": FunctionFragment; + "debtToBase(bytes6,uint128)": FunctionFragment; + "destroy(bytes12)": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "give(bytes12,address)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "ilks(bytes6,bytes6)": FunctionFragment; + "lendingOracles(bytes6)": FunctionFragment; + "level(bytes12)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "mature(bytes6)": FunctionFragment; + "pour(bytes12,int128,int128)": FunctionFragment; + "ratesAtMaturity(bytes6)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "roll(bytes12,bytes6,int128)": FunctionFragment; + "series(bytes6)": FunctionFragment; + "setDebtLimits(bytes6,bytes6,uint96,uint24,uint8)": FunctionFragment; + "setLendingOracle(bytes6,address)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "setSpotOracle(bytes6,bytes6,address,uint32)": FunctionFragment; + "slurp(bytes12,uint128,uint128)": FunctionFragment; + "spotOracles(bytes6,bytes6)": FunctionFragment; + "stir(bytes12,bytes12,uint128,uint128)": FunctionFragment; + "tweak(bytes12,bytes6,bytes6)": FunctionFragment; + "vaults(bytes12)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "LOCK" + | "LOCK8605463013" + | "ROOT" + | "ROOT4146650865" + | "accrual" + | "addAsset" + | "addIlks" + | "addSeries" + | "assets" + | "balances" + | "build" + | "debt" + | "debtFromBase" + | "debtToBase" + | "destroy" + | "getRoleAdmin" + | "give" + | "grantRole" + | "grantRoles" + | "hasRole" + | "ilks" + | "lendingOracles" + | "level" + | "lockRole" + | "mature" + | "pour" + | "ratesAtMaturity" + | "renounceRole" + | "revokeRole" + | "revokeRoles" + | "roll" + | "series" + | "setDebtLimits" + | "setLendingOracle" + | "setRoleAdmin" + | "setSpotOracle" + | "slurp" + | "spotOracles" + | "stir" + | "tweak" + | "vaults" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "accrual", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "addAsset", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "addIlks", + values: [PromiseOrValue, PromiseOrValue[]] + ): string; + encodeFunctionData( + functionFragment: "addSeries", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "assets", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "balances", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "build", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "debt", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "debtFromBase", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "debtToBase", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "destroy", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "give", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "ilks", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lendingOracles", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "level", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "mature", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "pour", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "ratesAtMaturity", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "roll", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "series", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setDebtLimits", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "setLendingOracle", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setSpotOracle", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "slurp", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "spotOracles", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "stir", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "tweak", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "vaults", + values: [PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "accrual", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "addAsset", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "addIlks", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "addSeries", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "assets", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balances", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "build", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "debt", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "debtFromBase", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "debtToBase", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "destroy", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "give", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "ilks", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "lendingOracles", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "level", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "mature", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pour", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ratesAtMaturity", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "roll", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "series", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setDebtLimits", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setLendingOracle", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setSpotOracle", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "slurp", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "spotOracles", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "stir", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "tweak", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "vaults", data: BytesLike): Result; + + events: { + "AssetAdded(bytes6,address)": EventFragment; + "DebtLimitsSet(bytes6,bytes6,uint96,uint24,uint8)": EventFragment; + "IlkAdded(bytes6,bytes6)": EventFragment; + "RateOracleAdded(bytes6,address)": EventFragment; + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + "SeriesAdded(bytes6,bytes6,address)": EventFragment; + "SeriesMatured(bytes6,uint256)": EventFragment; + "SpotOracleAdded(bytes6,bytes6,address,uint32)": EventFragment; + "VaultBuilt(bytes12,address,bytes6,bytes6)": EventFragment; + "VaultDestroyed(bytes12)": EventFragment; + "VaultGiven(bytes12,address)": EventFragment; + "VaultPoured(bytes12,bytes6,bytes6,int128,int128)": EventFragment; + "VaultRolled(bytes12,bytes6,uint128)": EventFragment; + "VaultStirred(bytes12,bytes12,uint128,uint128)": EventFragment; + "VaultTweaked(bytes12,bytes6,bytes6)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "AssetAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DebtLimitsSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "IlkAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RateOracleAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SeriesAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SeriesMatured"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SpotOracleAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VaultBuilt"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VaultDestroyed"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VaultGiven"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VaultPoured"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VaultRolled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VaultStirred"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VaultTweaked"): EventFragment; +} + +export interface AssetAddedEventObject { + assetId: string; + asset: string; +} +export type AssetAddedEvent = TypedEvent< + [string, string], + AssetAddedEventObject +>; + +export type AssetAddedEventFilter = TypedEventFilter; + +export interface DebtLimitsSetEventObject { + baseId: string; + ilkId: string; + max: BigNumber; + min: number; + dec: number; +} +export type DebtLimitsSetEvent = TypedEvent< + [string, string, BigNumber, number, number], + DebtLimitsSetEventObject +>; + +export type DebtLimitsSetEventFilter = TypedEventFilter; + +export interface IlkAddedEventObject { + seriesId: string; + ilkId: string; +} +export type IlkAddedEvent = TypedEvent<[string, string], IlkAddedEventObject>; + +export type IlkAddedEventFilter = TypedEventFilter; + +export interface RateOracleAddedEventObject { + baseId: string; + oracle: string; +} +export type RateOracleAddedEvent = TypedEvent< + [string, string], + RateOracleAddedEventObject +>; + +export type RateOracleAddedEventFilter = TypedEventFilter; + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface SeriesAddedEventObject { + seriesId: string; + baseId: string; + fyToken: string; +} +export type SeriesAddedEvent = TypedEvent< + [string, string, string], + SeriesAddedEventObject +>; + +export type SeriesAddedEventFilter = TypedEventFilter; + +export interface SeriesMaturedEventObject { + seriesId: string; + rateAtMaturity: BigNumber; +} +export type SeriesMaturedEvent = TypedEvent< + [string, BigNumber], + SeriesMaturedEventObject +>; + +export type SeriesMaturedEventFilter = TypedEventFilter; + +export interface SpotOracleAddedEventObject { + baseId: string; + ilkId: string; + oracle: string; + ratio: number; +} +export type SpotOracleAddedEvent = TypedEvent< + [string, string, string, number], + SpotOracleAddedEventObject +>; + +export type SpotOracleAddedEventFilter = TypedEventFilter; + +export interface VaultBuiltEventObject { + vaultId: string; + owner: string; + seriesId: string; + ilkId: string; +} +export type VaultBuiltEvent = TypedEvent< + [string, string, string, string], + VaultBuiltEventObject +>; + +export type VaultBuiltEventFilter = TypedEventFilter; + +export interface VaultDestroyedEventObject { + vaultId: string; +} +export type VaultDestroyedEvent = TypedEvent< + [string], + VaultDestroyedEventObject +>; + +export type VaultDestroyedEventFilter = TypedEventFilter; + +export interface VaultGivenEventObject { + vaultId: string; + receiver: string; +} +export type VaultGivenEvent = TypedEvent< + [string, string], + VaultGivenEventObject +>; + +export type VaultGivenEventFilter = TypedEventFilter; + +export interface VaultPouredEventObject { + vaultId: string; + seriesId: string; + ilkId: string; + ink: BigNumber; + art: BigNumber; +} +export type VaultPouredEvent = TypedEvent< + [string, string, string, BigNumber, BigNumber], + VaultPouredEventObject +>; + +export type VaultPouredEventFilter = TypedEventFilter; + +export interface VaultRolledEventObject { + vaultId: string; + seriesId: string; + art: BigNumber; +} +export type VaultRolledEvent = TypedEvent< + [string, string, BigNumber], + VaultRolledEventObject +>; + +export type VaultRolledEventFilter = TypedEventFilter; + +export interface VaultStirredEventObject { + from: string; + to: string; + ink: BigNumber; + art: BigNumber; +} +export type VaultStirredEvent = TypedEvent< + [string, string, BigNumber, BigNumber], + VaultStirredEventObject +>; + +export type VaultStirredEventFilter = TypedEventFilter; + +export interface VaultTweakedEventObject { + vaultId: string; + seriesId: string; + ilkId: string; +} +export type VaultTweakedEvent = TypedEvent< + [string, string, string], + VaultTweakedEventObject +>; + +export type VaultTweakedEventFilter = TypedEventFilter; + +export interface Cauldron extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: CauldronInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + accrual( + seriesId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addAsset( + assetId: PromiseOrValue, + asset: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addIlks( + seriesId: PromiseOrValue, + ilkIds: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addSeries( + seriesId: PromiseOrValue, + baseId: PromiseOrValue, + fyToken: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + assets( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + balances( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber, BigNumber] & { art: BigNumber; ink: BigNumber }>; + + build( + owner: PromiseOrValue, + vaultId: PromiseOrValue, + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + debt( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, number, number, BigNumber] & { + max: BigNumber; + min: number; + dec: number; + sum: BigNumber; + } + >; + + debtFromBase( + seriesId: PromiseOrValue, + base: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + debtToBase( + seriesId: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + destroy( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + give( + vaultId: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + ilks( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + lendingOracles( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + level( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mature( + seriesId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + pour( + vaultId: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + ratesAtMaturity( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + roll( + vaultId: PromiseOrValue, + newSeriesId: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + series( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, string, number] & { + fyToken: string; + baseId: string; + maturity: number; + } + >; + + setDebtLimits( + baseId: PromiseOrValue, + ilkId: PromiseOrValue, + max: PromiseOrValue, + min: PromiseOrValue, + dec: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setLendingOracle( + baseId: PromiseOrValue, + oracle: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSpotOracle( + baseId: PromiseOrValue, + ilkId: PromiseOrValue, + oracle: PromiseOrValue, + ratio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + slurp( + vaultId: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + spotOracles( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string, number] & { oracle: string; ratio: number }>; + + stir( + from: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tweak( + vaultId: PromiseOrValue, + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + vaults( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, string, string] & { + owner: string; + seriesId: string; + ilkId: string; + } + >; + }; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + accrual( + seriesId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addAsset( + assetId: PromiseOrValue, + asset: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addIlks( + seriesId: PromiseOrValue, + ilkIds: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addSeries( + seriesId: PromiseOrValue, + baseId: PromiseOrValue, + fyToken: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + assets( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balances( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber, BigNumber] & { art: BigNumber; ink: BigNumber }>; + + build( + owner: PromiseOrValue, + vaultId: PromiseOrValue, + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + debt( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, number, number, BigNumber] & { + max: BigNumber; + min: number; + dec: number; + sum: BigNumber; + } + >; + + debtFromBase( + seriesId: PromiseOrValue, + base: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + debtToBase( + seriesId: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + destroy( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + give( + vaultId: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ilks( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lendingOracles( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + level( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mature( + seriesId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + pour( + vaultId: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + ratesAtMaturity( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + roll( + vaultId: PromiseOrValue, + newSeriesId: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + series( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, string, number] & { + fyToken: string; + baseId: string; + maturity: number; + } + >; + + setDebtLimits( + baseId: PromiseOrValue, + ilkId: PromiseOrValue, + max: PromiseOrValue, + min: PromiseOrValue, + dec: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setLendingOracle( + baseId: PromiseOrValue, + oracle: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSpotOracle( + baseId: PromiseOrValue, + ilkId: PromiseOrValue, + oracle: PromiseOrValue, + ratio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + slurp( + vaultId: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + spotOracles( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string, number] & { oracle: string; ratio: number }>; + + stir( + from: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tweak( + vaultId: PromiseOrValue, + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + vaults( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, string, string] & { + owner: string; + seriesId: string; + ilkId: string; + } + >; + + callStatic: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + accrual( + seriesId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + addAsset( + assetId: PromiseOrValue, + asset: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + addIlks( + seriesId: PromiseOrValue, + ilkIds: PromiseOrValue[], + overrides?: CallOverrides + ): Promise; + + addSeries( + seriesId: PromiseOrValue, + baseId: PromiseOrValue, + fyToken: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + assets( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balances( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber, BigNumber] & { art: BigNumber; ink: BigNumber }>; + + build( + owner: PromiseOrValue, + vaultId: PromiseOrValue, + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + debt( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, number, number, BigNumber] & { + max: BigNumber; + min: number; + dec: number; + sum: BigNumber; + } + >; + + debtFromBase( + seriesId: PromiseOrValue, + base: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + debtToBase( + seriesId: PromiseOrValue, + art: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + destroy( + vaultId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + give( + vaultId: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ilks( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lendingOracles( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + level( + vaultId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + mature( + seriesId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pour( + vaultId: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ratesAtMaturity( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + roll( + vaultId: PromiseOrValue, + newSeriesId: PromiseOrValue, + art: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[DataTypes.VaultStructOutput, DataTypes.BalancesStructOutput]>; + + series( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, string, number] & { + fyToken: string; + baseId: string; + maturity: number; + } + >; + + setDebtLimits( + baseId: PromiseOrValue, + ilkId: PromiseOrValue, + max: PromiseOrValue, + min: PromiseOrValue, + dec: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setLendingOracle( + baseId: PromiseOrValue, + oracle: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setSpotOracle( + baseId: PromiseOrValue, + ilkId: PromiseOrValue, + oracle: PromiseOrValue, + ratio: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + slurp( + vaultId: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + spotOracles( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string, number] & { oracle: string; ratio: number }>; + + stir( + from: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [DataTypes.BalancesStructOutput, DataTypes.BalancesStructOutput] + >; + + tweak( + vaultId: PromiseOrValue, + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + vaults( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, string, string] & { + owner: string; + seriesId: string; + ilkId: string; + } + >; + }; + + filters: { + "AssetAdded(bytes6,address)"( + assetId?: PromiseOrValue | null, + asset?: PromiseOrValue | null + ): AssetAddedEventFilter; + AssetAdded( + assetId?: PromiseOrValue | null, + asset?: PromiseOrValue | null + ): AssetAddedEventFilter; + + "DebtLimitsSet(bytes6,bytes6,uint96,uint24,uint8)"( + baseId?: PromiseOrValue | null, + ilkId?: PromiseOrValue | null, + max?: null, + min?: null, + dec?: null + ): DebtLimitsSetEventFilter; + DebtLimitsSet( + baseId?: PromiseOrValue | null, + ilkId?: PromiseOrValue | null, + max?: null, + min?: null, + dec?: null + ): DebtLimitsSetEventFilter; + + "IlkAdded(bytes6,bytes6)"( + seriesId?: PromiseOrValue | null, + ilkId?: PromiseOrValue | null + ): IlkAddedEventFilter; + IlkAdded( + seriesId?: PromiseOrValue | null, + ilkId?: PromiseOrValue | null + ): IlkAddedEventFilter; + + "RateOracleAdded(bytes6,address)"( + baseId?: PromiseOrValue | null, + oracle?: PromiseOrValue | null + ): RateOracleAddedEventFilter; + RateOracleAdded( + baseId?: PromiseOrValue | null, + oracle?: PromiseOrValue | null + ): RateOracleAddedEventFilter; + + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + + "SeriesAdded(bytes6,bytes6,address)"( + seriesId?: PromiseOrValue | null, + baseId?: PromiseOrValue | null, + fyToken?: PromiseOrValue | null + ): SeriesAddedEventFilter; + SeriesAdded( + seriesId?: PromiseOrValue | null, + baseId?: PromiseOrValue | null, + fyToken?: PromiseOrValue | null + ): SeriesAddedEventFilter; + + "SeriesMatured(bytes6,uint256)"( + seriesId?: PromiseOrValue | null, + rateAtMaturity?: null + ): SeriesMaturedEventFilter; + SeriesMatured( + seriesId?: PromiseOrValue | null, + rateAtMaturity?: null + ): SeriesMaturedEventFilter; + + "SpotOracleAdded(bytes6,bytes6,address,uint32)"( + baseId?: PromiseOrValue | null, + ilkId?: PromiseOrValue | null, + oracle?: PromiseOrValue | null, + ratio?: null + ): SpotOracleAddedEventFilter; + SpotOracleAdded( + baseId?: PromiseOrValue | null, + ilkId?: PromiseOrValue | null, + oracle?: PromiseOrValue | null, + ratio?: null + ): SpotOracleAddedEventFilter; + + "VaultBuilt(bytes12,address,bytes6,bytes6)"( + vaultId?: PromiseOrValue | null, + owner?: PromiseOrValue | null, + seriesId?: PromiseOrValue | null, + ilkId?: null + ): VaultBuiltEventFilter; + VaultBuilt( + vaultId?: PromiseOrValue | null, + owner?: PromiseOrValue | null, + seriesId?: PromiseOrValue | null, + ilkId?: null + ): VaultBuiltEventFilter; + + "VaultDestroyed(bytes12)"( + vaultId?: PromiseOrValue | null + ): VaultDestroyedEventFilter; + VaultDestroyed( + vaultId?: PromiseOrValue | null + ): VaultDestroyedEventFilter; + + "VaultGiven(bytes12,address)"( + vaultId?: PromiseOrValue | null, + receiver?: PromiseOrValue | null + ): VaultGivenEventFilter; + VaultGiven( + vaultId?: PromiseOrValue | null, + receiver?: PromiseOrValue | null + ): VaultGivenEventFilter; + + "VaultPoured(bytes12,bytes6,bytes6,int128,int128)"( + vaultId?: PromiseOrValue | null, + seriesId?: PromiseOrValue | null, + ilkId?: PromiseOrValue | null, + ink?: null, + art?: null + ): VaultPouredEventFilter; + VaultPoured( + vaultId?: PromiseOrValue | null, + seriesId?: PromiseOrValue | null, + ilkId?: PromiseOrValue | null, + ink?: null, + art?: null + ): VaultPouredEventFilter; + + "VaultRolled(bytes12,bytes6,uint128)"( + vaultId?: PromiseOrValue | null, + seriesId?: PromiseOrValue | null, + art?: null + ): VaultRolledEventFilter; + VaultRolled( + vaultId?: PromiseOrValue | null, + seriesId?: PromiseOrValue | null, + art?: null + ): VaultRolledEventFilter; + + "VaultStirred(bytes12,bytes12,uint128,uint128)"( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + ink?: null, + art?: null + ): VaultStirredEventFilter; + VaultStirred( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + ink?: null, + art?: null + ): VaultStirredEventFilter; + + "VaultTweaked(bytes12,bytes6,bytes6)"( + vaultId?: PromiseOrValue | null, + seriesId?: PromiseOrValue | null, + ilkId?: PromiseOrValue | null + ): VaultTweakedEventFilter; + VaultTweaked( + vaultId?: PromiseOrValue | null, + seriesId?: PromiseOrValue | null, + ilkId?: PromiseOrValue | null + ): VaultTweakedEventFilter; + }; + + estimateGas: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + accrual( + seriesId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addAsset( + assetId: PromiseOrValue, + asset: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addIlks( + seriesId: PromiseOrValue, + ilkIds: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addSeries( + seriesId: PromiseOrValue, + baseId: PromiseOrValue, + fyToken: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + assets( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balances( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + build( + owner: PromiseOrValue, + vaultId: PromiseOrValue, + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + debt( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + debtFromBase( + seriesId: PromiseOrValue, + base: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + debtToBase( + seriesId: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + destroy( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + give( + vaultId: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ilks( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lendingOracles( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + level( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mature( + seriesId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + pour( + vaultId: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + ratesAtMaturity( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + roll( + vaultId: PromiseOrValue, + newSeriesId: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + series( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setDebtLimits( + baseId: PromiseOrValue, + ilkId: PromiseOrValue, + max: PromiseOrValue, + min: PromiseOrValue, + dec: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setLendingOracle( + baseId: PromiseOrValue, + oracle: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSpotOracle( + baseId: PromiseOrValue, + ilkId: PromiseOrValue, + oracle: PromiseOrValue, + ratio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + slurp( + vaultId: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + spotOracles( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + stir( + from: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tweak( + vaultId: PromiseOrValue, + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + vaults( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + accrual( + seriesId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addAsset( + assetId: PromiseOrValue, + asset: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addIlks( + seriesId: PromiseOrValue, + ilkIds: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addSeries( + seriesId: PromiseOrValue, + baseId: PromiseOrValue, + fyToken: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + assets( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balances( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + build( + owner: PromiseOrValue, + vaultId: PromiseOrValue, + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + debt( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + debtFromBase( + seriesId: PromiseOrValue, + base: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + debtToBase( + seriesId: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + destroy( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + give( + vaultId: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ilks( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lendingOracles( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + level( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mature( + seriesId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + pour( + vaultId: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + ratesAtMaturity( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + roll( + vaultId: PromiseOrValue, + newSeriesId: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + series( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setDebtLimits( + baseId: PromiseOrValue, + ilkId: PromiseOrValue, + max: PromiseOrValue, + min: PromiseOrValue, + dec: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setLendingOracle( + baseId: PromiseOrValue, + oracle: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSpotOracle( + baseId: PromiseOrValue, + ilkId: PromiseOrValue, + oracle: PromiseOrValue, + ratio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + slurp( + vaultId: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + spotOracles( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + stir( + from: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tweak( + vaultId: PromiseOrValue, + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + vaults( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/src/contracts/ChainlinkMultiOracle.ts b/src/contracts/ChainlinkMultiOracle.ts new file mode 100644 index 000000000..4ab5c9363 --- /dev/null +++ b/src/contracts/ChainlinkMultiOracle.ts @@ -0,0 +1,803 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface ChainlinkMultiOracleInterface extends utils.Interface { + functions: { + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "get(bytes32,bytes32,uint256)": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "peek(bytes32,bytes32,uint256)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "setSource(bytes6,address,bytes6,address,address)": FunctionFragment; + "sources(bytes6,bytes6)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "LOCK" + | "LOCK8605463013" + | "ROOT" + | "ROOT4146650865" + | "get" + | "getRoleAdmin" + | "grantRole" + | "grantRoles" + | "hasRole" + | "lockRole" + | "peek" + | "renounceRole" + | "revokeRole" + | "revokeRoles" + | "setRoleAdmin" + | "setSource" + | "sources" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "get", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "peek", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setSource", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "sources", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "get", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "peek", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setSource", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "sources", data: BytesLike): Result; + + events: { + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + "SourceSet(bytes6,address,bytes6,address,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SourceSet"): EventFragment; +} + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface SourceSetEventObject { + baseId: string; + base: string; + quoteId: string; + quote: string; + source: string; +} +export type SourceSetEvent = TypedEvent< + [string, string, string, string, string], + SourceSetEventObject +>; + +export type SourceSetEventFilter = TypedEventFilter; + +export interface ChainlinkMultiOracle extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ChainlinkMultiOracleInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + base: PromiseOrValue, + quoteId: PromiseOrValue, + quote: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, number, number, boolean] & { + source: string; + baseDecimals: number; + quoteDecimals: number; + inverse: boolean; + } + >; + }; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + base: PromiseOrValue, + quoteId: PromiseOrValue, + quote: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, number, number, boolean] & { + source: string; + baseDecimals: number; + quoteDecimals: number; + inverse: boolean; + } + >; + + callStatic: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setSource( + baseId: PromiseOrValue, + base: PromiseOrValue, + quoteId: PromiseOrValue, + quote: PromiseOrValue, + source: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, number, number, boolean] & { + source: string; + baseDecimals: number; + quoteDecimals: number; + inverse: boolean; + } + >; + }; + + filters: { + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + + "SourceSet(bytes6,address,bytes6,address,address)"( + baseId?: PromiseOrValue | null, + base?: null, + quoteId?: PromiseOrValue | null, + quote?: null, + source?: PromiseOrValue | null + ): SourceSetEventFilter; + SourceSet( + baseId?: PromiseOrValue | null, + base?: null, + quoteId?: PromiseOrValue | null, + quote?: null, + source?: PromiseOrValue | null + ): SourceSetEventFilter; + }; + + estimateGas: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + base: PromiseOrValue, + quoteId: PromiseOrValue, + quote: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + base: PromiseOrValue, + quoteId: PromiseOrValue, + quote: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/src/contracts/ChainlinkUSDOracle.ts b/src/contracts/ChainlinkUSDOracle.ts new file mode 100644 index 000000000..d177b34ff --- /dev/null +++ b/src/contracts/ChainlinkUSDOracle.ts @@ -0,0 +1,759 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface ChainlinkUSDOracleInterface extends utils.Interface { + functions: { + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "get(bytes32,bytes32,uint256)": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "peek(bytes32,bytes32,uint256)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "setSource(bytes6,address,address)": FunctionFragment; + "sources(bytes6)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "LOCK" + | "LOCK8605463013" + | "ROOT" + | "ROOT4146650865" + | "get" + | "getRoleAdmin" + | "grantRole" + | "grantRoles" + | "hasRole" + | "lockRole" + | "peek" + | "renounceRole" + | "revokeRole" + | "revokeRoles" + | "setRoleAdmin" + | "setSource" + | "sources" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "get", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "peek", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setSource", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "sources", + values: [PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "get", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "peek", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setSource", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "sources", data: BytesLike): Result; + + events: { + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + "SourceSet(bytes6,address,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SourceSet"): EventFragment; +} + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface SourceSetEventObject { + baseId: string; + base: string; + source: string; +} +export type SourceSetEvent = TypedEvent< + [string, string, string], + SourceSetEventObject +>; + +export type SourceSetEventFilter = TypedEventFilter; + +export interface ChainlinkUSDOracle extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ChainlinkUSDOracleInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + base: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string, number] & { source: string; baseDecimals: number }>; + }; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + base: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string, number] & { source: string; baseDecimals: number }>; + + callStatic: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setSource( + baseId: PromiseOrValue, + base: PromiseOrValue, + source: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sources( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string, number] & { source: string; baseDecimals: number }>; + }; + + filters: { + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + + "SourceSet(bytes6,address,address)"( + baseId?: PromiseOrValue | null, + base?: null, + source?: PromiseOrValue | null + ): SourceSetEventFilter; + SourceSet( + baseId?: PromiseOrValue | null, + base?: null, + source?: PromiseOrValue | null + ): SourceSetEventFilter; + }; + + estimateGas: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + base: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + base: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/src/contracts/CompositeMultiOracle.ts b/src/contracts/CompositeMultiOracle.ts new file mode 100644 index 000000000..9647d1983 --- /dev/null +++ b/src/contracts/CompositeMultiOracle.ts @@ -0,0 +1,881 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface CompositeMultiOracleInterface extends utils.Interface { + functions: { + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "get(bytes32,bytes32,uint256)": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "paths(bytes6,bytes6,uint256)": FunctionFragment; + "peek(bytes32,bytes32,uint256)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "setPath(bytes6,bytes6,bytes6[])": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "setSource(bytes6,bytes6,address)": FunctionFragment; + "sources(bytes6,bytes6)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "LOCK" + | "LOCK8605463013" + | "ROOT" + | "ROOT4146650865" + | "get" + | "getRoleAdmin" + | "grantRole" + | "grantRoles" + | "hasRole" + | "lockRole" + | "paths" + | "peek" + | "renounceRole" + | "revokeRole" + | "revokeRoles" + | "setPath" + | "setRoleAdmin" + | "setSource" + | "sources" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "get", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "paths", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "peek", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setPath", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[] + ] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setSource", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "sources", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "get", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "paths", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "peek", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setPath", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setSource", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "sources", data: BytesLike): Result; + + events: { + "PathSet(bytes6,bytes6,bytes6[])": EventFragment; + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + "SourceSet(bytes6,bytes6,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "PathSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SourceSet"): EventFragment; +} + +export interface PathSetEventObject { + baseId: string; + quoteId: string; + path: string[]; +} +export type PathSetEvent = TypedEvent< + [string, string, string[]], + PathSetEventObject +>; + +export type PathSetEventFilter = TypedEventFilter; + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface SourceSetEventObject { + baseId: string; + quoteId: string; + source: string; +} +export type SourceSetEvent = TypedEvent< + [string, string, string], + SourceSetEventObject +>; + +export type SourceSetEventFilter = TypedEventFilter; + +export interface CompositeMultiOracle extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: CompositeMultiOracleInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + get( + base: PromiseOrValue, + quote: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + paths( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + peek( + base: PromiseOrValue, + quote: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setPath( + base: PromiseOrValue, + quote: PromiseOrValue, + path: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + }; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + quote: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + paths( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + peek( + base: PromiseOrValue, + quote: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setPath( + base: PromiseOrValue, + quote: PromiseOrValue, + path: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + callStatic: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + quote: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + paths( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + peek( + base: PromiseOrValue, + quote: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setPath( + base: PromiseOrValue, + quote: PromiseOrValue, + path: PromiseOrValue[], + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setSource( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + source: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "PathSet(bytes6,bytes6,bytes6[])"( + baseId?: PromiseOrValue | null, + quoteId?: PromiseOrValue | null, + path?: PromiseOrValue[] | null + ): PathSetEventFilter; + PathSet( + baseId?: PromiseOrValue | null, + quoteId?: PromiseOrValue | null, + path?: PromiseOrValue[] | null + ): PathSetEventFilter; + + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + + "SourceSet(bytes6,bytes6,address)"( + baseId?: PromiseOrValue | null, + quoteId?: PromiseOrValue | null, + source?: PromiseOrValue | null + ): SourceSetEventFilter; + SourceSet( + baseId?: PromiseOrValue | null, + quoteId?: PromiseOrValue | null, + source?: PromiseOrValue | null + ): SourceSetEventFilter; + }; + + estimateGas: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + quote: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + paths( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + peek( + base: PromiseOrValue, + quote: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setPath( + base: PromiseOrValue, + quote: PromiseOrValue, + path: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + quote: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + paths( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + peek( + base: PromiseOrValue, + quote: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setPath( + base: PromiseOrValue, + quote: PromiseOrValue, + path: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/src/contracts/CompoundMultiOracle.ts b/src/contracts/CompoundMultiOracle.ts new file mode 100644 index 000000000..2b4604469 --- /dev/null +++ b/src/contracts/CompoundMultiOracle.ts @@ -0,0 +1,764 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface CompoundMultiOracleInterface extends utils.Interface { + functions: { + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "get(bytes32,bytes32,uint256)": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "peek(bytes32,bytes32,uint256)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "setSource(bytes6,bytes6,address)": FunctionFragment; + "sources(bytes6,bytes6)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "LOCK" + | "LOCK8605463013" + | "ROOT" + | "ROOT4146650865" + | "get" + | "getRoleAdmin" + | "grantRole" + | "grantRoles" + | "hasRole" + | "lockRole" + | "peek" + | "renounceRole" + | "revokeRole" + | "revokeRoles" + | "setRoleAdmin" + | "setSource" + | "sources" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "get", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "peek", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setSource", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "sources", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "get", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "peek", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setSource", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "sources", data: BytesLike): Result; + + events: { + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + "SourceSet(bytes6,bytes6,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SourceSet"): EventFragment; +} + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface SourceSetEventObject { + baseId: string; + kind: string; + source: string; +} +export type SourceSetEvent = TypedEvent< + [string, string, string], + SourceSetEventObject +>; + +export type SourceSetEventFilter = TypedEventFilter; + +export interface CompoundMultiOracle extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: CompoundMultiOracleInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + get( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { accumulator: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + base: PromiseOrValue, + kind: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + }; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { accumulator: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + base: PromiseOrValue, + kind: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + callStatic: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { accumulator: BigNumber; updateTime: BigNumber } + >; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + peek( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { accumulator: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setSource( + base: PromiseOrValue, + kind: PromiseOrValue, + source: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + + "SourceSet(bytes6,bytes6,address)"( + baseId?: PromiseOrValue | null, + kind?: PromiseOrValue | null, + source?: PromiseOrValue | null + ): SourceSetEventFilter; + SourceSet( + baseId?: PromiseOrValue | null, + kind?: PromiseOrValue | null, + source?: PromiseOrValue | null + ): SourceSetEventFilter; + }; + + estimateGas: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + base: PromiseOrValue, + kind: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + base: PromiseOrValue, + kind: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + base: PromiseOrValue, + kind: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/src/contracts/ConvexJoin.ts b/src/contracts/ConvexJoin.ts new file mode 100644 index 000000000..cf7bb4a82 --- /dev/null +++ b/src/contracts/ConvexJoin.ts @@ -0,0 +1,1279 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export declare namespace ConvexJoin { + export type EarnedDataStruct = { + token: PromiseOrValue; + amount: PromiseOrValue; + }; + + export type EarnedDataStructOutput = [string, BigNumber] & { + token: string; + amount: BigNumber; + }; +} + +export interface ConvexJoinInterface extends utils.Interface { + functions: { + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "addRewards()": FunctionFragment; + "addVault(bytes12)": FunctionFragment; + "asset()": FunctionFragment; + "cauldron()": FunctionFragment; + "checkpoint(address)": FunctionFragment; + "convexPool()": FunctionFragment; + "convexPoolId()": FunctionFragment; + "convexToken()": FunctionFragment; + "crv()": FunctionFragment; + "cvx()": FunctionFragment; + "earned(address)": FunctionFragment; + "exit(address,uint128)": FunctionFragment; + "getReward(address)": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "join(address,uint128)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "managed_assets()": FunctionFragment; + "registeredRewards(address)": FunctionFragment; + "removeVault(bytes12,address)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "retrieve(address,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "rewards(uint256)": FunctionFragment; + "setApprovals()": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "storedBalance()": FunctionFragment; + "vaults(address,uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "LOCK" + | "LOCK8605463013" + | "ROOT" + | "ROOT4146650865" + | "addRewards" + | "addVault" + | "asset" + | "cauldron" + | "checkpoint" + | "convexPool" + | "convexPoolId" + | "convexToken" + | "crv" + | "cvx" + | "earned" + | "exit" + | "getReward" + | "getRoleAdmin" + | "grantRole" + | "grantRoles" + | "hasRole" + | "join" + | "lockRole" + | "managed_assets" + | "registeredRewards" + | "removeVault" + | "renounceRole" + | "retrieve" + | "revokeRole" + | "revokeRoles" + | "rewards" + | "setApprovals" + | "setRoleAdmin" + | "storedBalance" + | "vaults" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "addRewards", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "addVault", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "asset", values?: undefined): string; + encodeFunctionData(functionFragment: "cauldron", values?: undefined): string; + encodeFunctionData( + functionFragment: "checkpoint", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "convexPool", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "convexPoolId", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "convexToken", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "crv", values?: undefined): string; + encodeFunctionData(functionFragment: "cvx", values?: undefined): string; + encodeFunctionData( + functionFragment: "earned", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "exit", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getReward", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "join", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "managed_assets", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "registeredRewards", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "removeVault", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "retrieve", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "rewards", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setApprovals", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "storedBalance", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "vaults", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "addRewards", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "addVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "asset", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "cauldron", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "checkpoint", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "convexPool", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "convexPoolId", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "convexToken", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "crv", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "cvx", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "earned", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "exit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getReward", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "join", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "managed_assets", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "registeredRewards", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeVault", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "retrieve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "rewards", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setApprovals", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "storedBalance", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "vaults", data: BytesLike): Result; + + events: { + "Deposited(address,address,uint256,bool)": EventFragment; + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + "VaultAdded(address,bytes12)": EventFragment; + "VaultRemoved(address,bytes12)": EventFragment; + "Withdrawn(address,uint256,bool)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Deposited"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VaultAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VaultRemoved"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Withdrawn"): EventFragment; +} + +export interface DepositedEventObject { + _user: string; + _account: string; + _amount: BigNumber; + _wrapped: boolean; +} +export type DepositedEvent = TypedEvent< + [string, string, BigNumber, boolean], + DepositedEventObject +>; + +export type DepositedEventFilter = TypedEventFilter; + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface VaultAddedEventObject { + account: string; + vaultId: string; +} +export type VaultAddedEvent = TypedEvent< + [string, string], + VaultAddedEventObject +>; + +export type VaultAddedEventFilter = TypedEventFilter; + +export interface VaultRemovedEventObject { + account: string; + vaultId: string; +} +export type VaultRemovedEvent = TypedEvent< + [string, string], + VaultRemovedEventObject +>; + +export type VaultRemovedEventFilter = TypedEventFilter; + +export interface WithdrawnEventObject { + _user: string; + _amount: BigNumber; + _unwrapped: boolean; +} +export type WithdrawnEvent = TypedEvent< + [string, BigNumber, boolean], + WithdrawnEventObject +>; + +export type WithdrawnEventFilter = TypedEventFilter; + +export interface ConvexJoin extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ConvexJoinInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + addRewards( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addVault( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + asset(overrides?: CallOverrides): Promise<[string]>; + + cauldron(overrides?: CallOverrides): Promise<[string]>; + + checkpoint( + _account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + convexPool(overrides?: CallOverrides): Promise<[string]>; + + convexPoolId(overrides?: CallOverrides): Promise<[BigNumber]>; + + convexToken(overrides?: CallOverrides): Promise<[string]>; + + crv(overrides?: CallOverrides): Promise<[string]>; + + cvx(overrides?: CallOverrides): Promise<[string]>; + + earned( + _account: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [ConvexJoin.EarnedDataStructOutput[]] & { + claimable: ConvexJoin.EarnedDataStructOutput[]; + } + >; + + exit( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getReward( + _account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + join( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + managed_assets(overrides?: CallOverrides): Promise<[BigNumber]>; + + registeredRewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + removeVault( + vaultId: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + rewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, string, BigNumber, BigNumber] & { + reward_token: string; + reward_pool: string; + reward_integral: BigNumber; + reward_remaining: BigNumber; + } + >; + + setApprovals( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + storedBalance(overrides?: CallOverrides): Promise<[BigNumber]>; + + vaults( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + }; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + addRewards( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addVault( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + asset(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + checkpoint( + _account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + convexPool(overrides?: CallOverrides): Promise; + + convexPoolId(overrides?: CallOverrides): Promise; + + convexToken(overrides?: CallOverrides): Promise; + + crv(overrides?: CallOverrides): Promise; + + cvx(overrides?: CallOverrides): Promise; + + earned( + _account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + exit( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getReward( + _account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + join( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + managed_assets(overrides?: CallOverrides): Promise; + + registeredRewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeVault( + vaultId: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + rewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, string, BigNumber, BigNumber] & { + reward_token: string; + reward_pool: string; + reward_integral: BigNumber; + reward_remaining: BigNumber; + } + >; + + setApprovals( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + storedBalance(overrides?: CallOverrides): Promise; + + vaults( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + callStatic: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + addRewards(overrides?: CallOverrides): Promise; + + addVault( + vaultId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + asset(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + checkpoint( + _account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + convexPool(overrides?: CallOverrides): Promise; + + convexPoolId(overrides?: CallOverrides): Promise; + + convexToken(overrides?: CallOverrides): Promise; + + crv(overrides?: CallOverrides): Promise; + + cvx(overrides?: CallOverrides): Promise; + + earned( + _account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + exit( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getReward( + _account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + join( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + managed_assets(overrides?: CallOverrides): Promise; + + registeredRewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeVault( + vaultId: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + rewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, string, BigNumber, BigNumber] & { + reward_token: string; + reward_pool: string; + reward_integral: BigNumber; + reward_remaining: BigNumber; + } + >; + + setApprovals(overrides?: CallOverrides): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + storedBalance(overrides?: CallOverrides): Promise; + + vaults( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "Deposited(address,address,uint256,bool)"( + _user?: PromiseOrValue | null, + _account?: PromiseOrValue | null, + _amount?: null, + _wrapped?: null + ): DepositedEventFilter; + Deposited( + _user?: PromiseOrValue | null, + _account?: PromiseOrValue | null, + _amount?: null, + _wrapped?: null + ): DepositedEventFilter; + + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + + "VaultAdded(address,bytes12)"( + account?: PromiseOrValue | null, + vaultId?: PromiseOrValue | null + ): VaultAddedEventFilter; + VaultAdded( + account?: PromiseOrValue | null, + vaultId?: PromiseOrValue | null + ): VaultAddedEventFilter; + + "VaultRemoved(address,bytes12)"( + account?: PromiseOrValue | null, + vaultId?: PromiseOrValue | null + ): VaultRemovedEventFilter; + VaultRemoved( + account?: PromiseOrValue | null, + vaultId?: PromiseOrValue | null + ): VaultRemovedEventFilter; + + "Withdrawn(address,uint256,bool)"( + _user?: PromiseOrValue | null, + _amount?: null, + _unwrapped?: null + ): WithdrawnEventFilter; + Withdrawn( + _user?: PromiseOrValue | null, + _amount?: null, + _unwrapped?: null + ): WithdrawnEventFilter; + }; + + estimateGas: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + addRewards( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addVault( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + asset(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + checkpoint( + _account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + convexPool(overrides?: CallOverrides): Promise; + + convexPoolId(overrides?: CallOverrides): Promise; + + convexToken(overrides?: CallOverrides): Promise; + + crv(overrides?: CallOverrides): Promise; + + cvx(overrides?: CallOverrides): Promise; + + earned( + _account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + exit( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getReward( + _account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + join( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + managed_assets(overrides?: CallOverrides): Promise; + + registeredRewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeVault( + vaultId: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + rewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setApprovals( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + storedBalance(overrides?: CallOverrides): Promise; + + vaults( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + addRewards( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addVault( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + asset(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + checkpoint( + _account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + convexPool(overrides?: CallOverrides): Promise; + + convexPoolId(overrides?: CallOverrides): Promise; + + convexToken(overrides?: CallOverrides): Promise; + + crv(overrides?: CallOverrides): Promise; + + cvx(overrides?: CallOverrides): Promise; + + earned( + _account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + exit( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getReward( + _account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + join( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + managed_assets(overrides?: CallOverrides): Promise; + + registeredRewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeVault( + vaultId: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + rewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setApprovals( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + storedBalance(overrides?: CallOverrides): Promise; + + vaults( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/src/contracts/ConvexLadleModule.ts b/src/contracts/ConvexLadleModule.ts new file mode 100644 index 000000000..a046d678c --- /dev/null +++ b/src/contracts/ConvexLadleModule.ts @@ -0,0 +1,507 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface ConvexLadleModuleInterface extends utils.Interface { + functions: { + "addVault(address,bytes12)": FunctionFragment; + "borrowingFee()": FunctionFragment; + "cauldron()": FunctionFragment; + "integrations(address)": FunctionFragment; + "joins(bytes6)": FunctionFragment; + "modules(address)": FunctionFragment; + "pools(bytes6)": FunctionFragment; + "removeVault(address,bytes12,address)": FunctionFragment; + "router()": FunctionFragment; + "tokens(address)": FunctionFragment; + "weth()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "addVault" + | "borrowingFee" + | "cauldron" + | "integrations" + | "joins" + | "modules" + | "pools" + | "removeVault" + | "router" + | "tokens" + | "weth" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "addVault", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "borrowingFee", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "cauldron", values?: undefined): string; + encodeFunctionData( + functionFragment: "integrations", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "joins", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "modules", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "pools", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "removeVault", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData(functionFragment: "router", values?: undefined): string; + encodeFunctionData( + functionFragment: "tokens", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "weth", values?: undefined): string; + + decodeFunctionResult(functionFragment: "addVault", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "borrowingFee", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "cauldron", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "integrations", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "joins", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "modules", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pools", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "removeVault", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "tokens", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "weth", data: BytesLike): Result; + + events: { + "FeeSet(uint256)": EventFragment; + "IntegrationAdded(address,bool)": EventFragment; + "JoinAdded(bytes6,address)": EventFragment; + "ModuleAdded(address,bool)": EventFragment; + "PoolAdded(bytes6,address)": EventFragment; + "TokenAdded(address,bool)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "FeeSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "IntegrationAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "JoinAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ModuleAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PoolAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TokenAdded"): EventFragment; +} + +export interface FeeSetEventObject { + fee: BigNumber; +} +export type FeeSetEvent = TypedEvent<[BigNumber], FeeSetEventObject>; + +export type FeeSetEventFilter = TypedEventFilter; + +export interface IntegrationAddedEventObject { + integration: string; + set: boolean; +} +export type IntegrationAddedEvent = TypedEvent< + [string, boolean], + IntegrationAddedEventObject +>; + +export type IntegrationAddedEventFilter = + TypedEventFilter; + +export interface JoinAddedEventObject { + assetId: string; + join: string; +} +export type JoinAddedEvent = TypedEvent<[string, string], JoinAddedEventObject>; + +export type JoinAddedEventFilter = TypedEventFilter; + +export interface ModuleAddedEventObject { + module: string; + set: boolean; +} +export type ModuleAddedEvent = TypedEvent< + [string, boolean], + ModuleAddedEventObject +>; + +export type ModuleAddedEventFilter = TypedEventFilter; + +export interface PoolAddedEventObject { + seriesId: string; + pool: string; +} +export type PoolAddedEvent = TypedEvent<[string, string], PoolAddedEventObject>; + +export type PoolAddedEventFilter = TypedEventFilter; + +export interface TokenAddedEventObject { + token: string; + set: boolean; +} +export type TokenAddedEvent = TypedEvent< + [string, boolean], + TokenAddedEventObject +>; + +export type TokenAddedEventFilter = TypedEventFilter; + +export interface ConvexLadleModule extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ConvexLadleModuleInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + addVault( + convexJoin: PromiseOrValue, + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + borrowingFee(overrides?: CallOverrides): Promise<[BigNumber]>; + + cauldron(overrides?: CallOverrides): Promise<[string]>; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + removeVault( + convexJoin: PromiseOrValue, + vaultId: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + router(overrides?: CallOverrides): Promise<[string]>; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + weth(overrides?: CallOverrides): Promise<[string]>; + }; + + addVault( + convexJoin: PromiseOrValue, + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeVault( + convexJoin: PromiseOrValue, + vaultId: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + weth(overrides?: CallOverrides): Promise; + + callStatic: { + addVault( + convexJoin: PromiseOrValue, + vaultId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeVault( + convexJoin: PromiseOrValue, + vaultId: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + weth(overrides?: CallOverrides): Promise; + }; + + filters: { + "FeeSet(uint256)"(fee?: null): FeeSetEventFilter; + FeeSet(fee?: null): FeeSetEventFilter; + + "IntegrationAdded(address,bool)"( + integration?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): IntegrationAddedEventFilter; + IntegrationAdded( + integration?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): IntegrationAddedEventFilter; + + "JoinAdded(bytes6,address)"( + assetId?: PromiseOrValue | null, + join?: PromiseOrValue | null + ): JoinAddedEventFilter; + JoinAdded( + assetId?: PromiseOrValue | null, + join?: PromiseOrValue | null + ): JoinAddedEventFilter; + + "ModuleAdded(address,bool)"( + module?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): ModuleAddedEventFilter; + ModuleAdded( + module?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): ModuleAddedEventFilter; + + "PoolAdded(bytes6,address)"( + seriesId?: PromiseOrValue | null, + pool?: PromiseOrValue | null + ): PoolAddedEventFilter; + PoolAdded( + seriesId?: PromiseOrValue | null, + pool?: PromiseOrValue | null + ): PoolAddedEventFilter; + + "TokenAdded(address,bool)"( + token?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): TokenAddedEventFilter; + TokenAdded( + token?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): TokenAddedEventFilter; + }; + + estimateGas: { + addVault( + convexJoin: PromiseOrValue, + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeVault( + convexJoin: PromiseOrValue, + vaultId: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + weth(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + addVault( + convexJoin: PromiseOrValue, + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeVault( + convexJoin: PromiseOrValue, + vaultId: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + weth(overrides?: CallOverrides): Promise; + }; +} diff --git a/src/contracts/ERC1155.ts b/src/contracts/ERC1155.ts new file mode 100644 index 000000000..c74194545 --- /dev/null +++ b/src/contracts/ERC1155.ts @@ -0,0 +1,529 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface ERC1155Interface extends utils.Interface { + functions: { + "balanceOf(address,uint256)": FunctionFragment; + "balanceOfBatch(address[],uint256[])": FunctionFragment; + "isApprovedForAll(address,address)": FunctionFragment; + "safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)": FunctionFragment; + "safeTransferFrom(address,address,uint256,uint256,bytes)": FunctionFragment; + "setApprovalForAll(address,bool)": FunctionFragment; + "supportsInterface(bytes4)": FunctionFragment; + "uri(uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "balanceOf" + | "balanceOfBatch" + | "isApprovedForAll" + | "safeBatchTransferFrom" + | "safeTransferFrom" + | "setApprovalForAll" + | "supportsInterface" + | "uri" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "balanceOf", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "balanceOfBatch", + values: [PromiseOrValue[], PromiseOrValue[]] + ): string; + encodeFunctionData( + functionFragment: "isApprovedForAll", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "safeBatchTransferFrom", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue[], + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "safeTransferFrom", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "setApprovalForAll", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "supportsInterface", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "uri", + values: [PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "balanceOfBatch", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isApprovedForAll", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "safeBatchTransferFrom", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "safeTransferFrom", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setApprovalForAll", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "uri", data: BytesLike): Result; + + events: { + "ApprovalForAll(address,address,bool)": EventFragment; + "TransferBatch(address,address,address,uint256[],uint256[])": EventFragment; + "TransferSingle(address,address,address,uint256,uint256)": EventFragment; + "URI(string,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "ApprovalForAll"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TransferBatch"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TransferSingle"): EventFragment; + getEvent(nameOrSignatureOrTopic: "URI"): EventFragment; +} + +export interface ApprovalForAllEventObject { + owner: string; + operator: string; + approved: boolean; +} +export type ApprovalForAllEvent = TypedEvent< + [string, string, boolean], + ApprovalForAllEventObject +>; + +export type ApprovalForAllEventFilter = TypedEventFilter; + +export interface TransferBatchEventObject { + operator: string; + from: string; + to: string; + ids: BigNumber[]; + amounts: BigNumber[]; +} +export type TransferBatchEvent = TypedEvent< + [string, string, string, BigNumber[], BigNumber[]], + TransferBatchEventObject +>; + +export type TransferBatchEventFilter = TypedEventFilter; + +export interface TransferSingleEventObject { + operator: string; + from: string; + to: string; + id: BigNumber; + amount: BigNumber; +} +export type TransferSingleEvent = TypedEvent< + [string, string, string, BigNumber, BigNumber], + TransferSingleEventObject +>; + +export type TransferSingleEventFilter = TypedEventFilter; + +export interface URIEventObject { + value: string; + id: BigNumber; +} +export type URIEvent = TypedEvent<[string, BigNumber], URIEventObject>; + +export type URIEventFilter = TypedEventFilter; + +export interface ERC1155 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ERC1155Interface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + balanceOf( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + balanceOfBatch( + owners: PromiseOrValue[], + ids: PromiseOrValue[], + overrides?: CallOverrides + ): Promise<[BigNumber[]] & { balances: BigNumber[] }>; + + isApprovedForAll( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + safeBatchTransferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + ids: PromiseOrValue[], + amounts: PromiseOrValue[], + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + safeTransferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + id: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setApprovalForAll( + operator: PromiseOrValue, + approved: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + supportsInterface( + interfaceId: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + uri( + id: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + }; + + balanceOf( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balanceOfBatch( + owners: PromiseOrValue[], + ids: PromiseOrValue[], + overrides?: CallOverrides + ): Promise; + + isApprovedForAll( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + safeBatchTransferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + ids: PromiseOrValue[], + amounts: PromiseOrValue[], + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + safeTransferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + id: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setApprovalForAll( + operator: PromiseOrValue, + approved: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + supportsInterface( + interfaceId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uri( + id: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + callStatic: { + balanceOf( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balanceOfBatch( + owners: PromiseOrValue[], + ids: PromiseOrValue[], + overrides?: CallOverrides + ): Promise; + + isApprovedForAll( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + safeBatchTransferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + ids: PromiseOrValue[], + amounts: PromiseOrValue[], + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + safeTransferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + id: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setApprovalForAll( + operator: PromiseOrValue, + approved: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uri( + id: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "ApprovalForAll(address,address,bool)"( + owner?: PromiseOrValue | null, + operator?: PromiseOrValue | null, + approved?: null + ): ApprovalForAllEventFilter; + ApprovalForAll( + owner?: PromiseOrValue | null, + operator?: PromiseOrValue | null, + approved?: null + ): ApprovalForAllEventFilter; + + "TransferBatch(address,address,address,uint256[],uint256[])"( + operator?: PromiseOrValue | null, + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + ids?: null, + amounts?: null + ): TransferBatchEventFilter; + TransferBatch( + operator?: PromiseOrValue | null, + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + ids?: null, + amounts?: null + ): TransferBatchEventFilter; + + "TransferSingle(address,address,address,uint256,uint256)"( + operator?: PromiseOrValue | null, + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + id?: null, + amount?: null + ): TransferSingleEventFilter; + TransferSingle( + operator?: PromiseOrValue | null, + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + id?: null, + amount?: null + ): TransferSingleEventFilter; + + "URI(string,uint256)"( + value?: null, + id?: PromiseOrValue | null + ): URIEventFilter; + URI(value?: null, id?: PromiseOrValue | null): URIEventFilter; + }; + + estimateGas: { + balanceOf( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balanceOfBatch( + owners: PromiseOrValue[], + ids: PromiseOrValue[], + overrides?: CallOverrides + ): Promise; + + isApprovedForAll( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + safeBatchTransferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + ids: PromiseOrValue[], + amounts: PromiseOrValue[], + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + safeTransferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + id: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setApprovalForAll( + operator: PromiseOrValue, + approved: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + supportsInterface( + interfaceId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uri( + id: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + balanceOf( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balanceOfBatch( + owners: PromiseOrValue[], + ids: PromiseOrValue[], + overrides?: CallOverrides + ): Promise; + + isApprovedForAll( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + safeBatchTransferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + ids: PromiseOrValue[], + amounts: PromiseOrValue[], + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + safeTransferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + id: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setApprovalForAll( + operator: PromiseOrValue, + approved: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + supportsInterface( + interfaceId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uri( + id: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/src/contracts/ERC20.ts b/src/contracts/ERC20.ts new file mode 100644 index 000000000..33e576e15 --- /dev/null +++ b/src/contracts/ERC20.ts @@ -0,0 +1,384 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface ERC20Interface extends utils.Interface { + functions: { + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "decimals()": FunctionFragment; + "name()": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "allowance" + | "approve" + | "balanceOf" + | "decimals" + | "name" + | "symbol" + | "totalSupply" + | "transfer" + | "transferFrom" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "allowance", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "balanceOf", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export interface ApprovalEventObject { + owner: string; + spender: string; + value: BigNumber; +} +export type ApprovalEvent = TypedEvent< + [string, string, BigNumber], + ApprovalEventObject +>; + +export type ApprovalEventFilter = TypedEventFilter; + +export interface TransferEventObject { + from: string; + to: string; + value: BigNumber; +} +export type TransferEvent = TypedEvent< + [string, string, BigNumber], + TransferEventObject +>; + +export type TransferEventFilter = TypedEventFilter; + +export interface ERC20 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ERC20Interface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "Approval(address,address,uint256)"( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + value?: null + ): ApprovalEventFilter; + Approval( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + value?: null + ): ApprovalEventFilter; + + "Transfer(address,address,uint256)"( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null + ): TransferEventFilter; + Transfer( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null + ): TransferEventFilter; + }; + + estimateGas: { + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/contracts/ERC20Permit.ts b/src/contracts/ERC20Permit.ts new file mode 100644 index 000000000..1a1560af1 --- /dev/null +++ b/src/contracts/ERC20Permit.ts @@ -0,0 +1,560 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface ERC20PermitInterface extends utils.Interface { + functions: { + "DOMAIN_SEPARATOR()": FunctionFragment; + "PERMIT_TYPEHASH()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "decimals()": FunctionFragment; + "deploymentChainId()": FunctionFragment; + "name()": FunctionFragment; + "nonces(address)": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "version()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "DOMAIN_SEPARATOR" + | "PERMIT_TYPEHASH" + | "allowance" + | "approve" + | "balanceOf" + | "decimals" + | "deploymentChainId" + | "name" + | "nonces" + | "permit" + | "symbol" + | "totalSupply" + | "transfer" + | "transferFrom" + | "version" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "DOMAIN_SEPARATOR", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "PERMIT_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "allowance", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "balanceOf", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "deploymentChainId", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "nonces", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "permit", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + + decodeFunctionResult( + functionFragment: "DOMAIN_SEPARATOR", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "PERMIT_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "deploymentChainId", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export interface ApprovalEventObject { + owner: string; + spender: string; + value: BigNumber; +} +export type ApprovalEvent = TypedEvent< + [string, string, BigNumber], + ApprovalEventObject +>; + +export type ApprovalEventFilter = TypedEventFilter; + +export interface TransferEventObject { + from: string; + to: string; + value: BigNumber; +} +export type TransferEvent = TypedEvent< + [string, string, BigNumber], + TransferEventObject +>; + +export type TransferEventFilter = TypedEventFilter; + +export interface ERC20Permit extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ERC20PermitInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + deploymentChainId(overrides?: CallOverrides): Promise<[BigNumber]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + version(overrides?: CallOverrides): Promise<[string]>; + }; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + version(overrides?: CallOverrides): Promise; + + callStatic: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + }; + + filters: { + "Approval(address,address,uint256)"( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + value?: null + ): ApprovalEventFilter; + Approval( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + value?: null + ): ApprovalEventFilter; + + "Transfer(address,address,uint256)"( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null + ): TransferEventFilter; + Transfer( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null + ): TransferEventFilter; + }; + + estimateGas: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + version(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + version(overrides?: CallOverrides): Promise; + }; +} diff --git a/src/contracts/FYToken.ts b/src/contracts/FYToken.ts new file mode 100644 index 000000000..398fe1560 --- /dev/null +++ b/src/contracts/FYToken.ts @@ -0,0 +1,1553 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface FYTokenInterface extends utils.Interface { + functions: { + "DOMAIN_SEPARATOR()": FunctionFragment; + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "PERMIT_TYPEHASH()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "accrual()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "burn(address,uint256)": FunctionFragment; + "chiAtMaturity()": FunctionFragment; + "decimals()": FunctionFragment; + "deploymentChainId()": FunctionFragment; + "flashFee(address,uint256)": FunctionFragment; + "flashLoan(address,address,uint256,bytes)": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "join()": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "mature()": FunctionFragment; + "maturity()": FunctionFragment; + "maxFlashLoan(address)": FunctionFragment; + "mint(address,uint256)": FunctionFragment; + "mintWithUnderlying(address,uint256)": FunctionFragment; + "name()": FunctionFragment; + "nonces(address)": FunctionFragment; + "oracle()": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "point(bytes32,address)": FunctionFragment; + "redeem(address,uint256)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "underlying()": FunctionFragment; + "underlyingId()": FunctionFragment; + "version()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "DOMAIN_SEPARATOR" + | "LOCK" + | "LOCK8605463013" + | "PERMIT_TYPEHASH" + | "ROOT" + | "ROOT4146650865" + | "accrual" + | "allowance" + | "approve" + | "balanceOf" + | "burn" + | "chiAtMaturity" + | "decimals" + | "deploymentChainId" + | "flashFee" + | "flashLoan" + | "getRoleAdmin" + | "grantRole" + | "grantRoles" + | "hasRole" + | "join" + | "lockRole" + | "mature" + | "maturity" + | "maxFlashLoan" + | "mint" + | "mintWithUnderlying" + | "name" + | "nonces" + | "oracle" + | "permit" + | "point" + | "redeem" + | "renounceRole" + | "revokeRole" + | "revokeRoles" + | "setRoleAdmin" + | "symbol" + | "totalSupply" + | "transfer" + | "transferFrom" + | "underlying" + | "underlyingId" + | "version" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "DOMAIN_SEPARATOR", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "PERMIT_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "accrual", values?: undefined): string; + encodeFunctionData( + functionFragment: "allowance", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "balanceOf", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "burn", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "chiAtMaturity", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "deploymentChainId", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "flashFee", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "flashLoan", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "join", values?: undefined): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "mature", values?: undefined): string; + encodeFunctionData(functionFragment: "maturity", values?: undefined): string; + encodeFunctionData( + functionFragment: "maxFlashLoan", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "mint", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "mintWithUnderlying", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "nonces", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "oracle", values?: undefined): string; + encodeFunctionData( + functionFragment: "permit", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "point", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "redeem", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "underlying", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "underlyingId", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + + decodeFunctionResult( + functionFragment: "DOMAIN_SEPARATOR", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "PERMIT_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "accrual", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "chiAtMaturity", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "deploymentChainId", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "flashFee", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "flashLoan", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "join", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "mature", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "maturity", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "maxFlashLoan", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "mintWithUnderlying", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "oracle", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "point", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "redeem", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "underlying", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "underlyingId", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "Point(bytes32,address)": EventFragment; + "Redeemed(address,address,uint256,uint256)": EventFragment; + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + "SeriesMatured(uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Point"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Redeemed"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SeriesMatured"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export interface ApprovalEventObject { + owner: string; + spender: string; + value: BigNumber; +} +export type ApprovalEvent = TypedEvent< + [string, string, BigNumber], + ApprovalEventObject +>; + +export type ApprovalEventFilter = TypedEventFilter; + +export interface PointEventObject { + param: string; + value: string; +} +export type PointEvent = TypedEvent<[string, string], PointEventObject>; + +export type PointEventFilter = TypedEventFilter; + +export interface RedeemedEventObject { + from: string; + to: string; + amount: BigNumber; + redeemed: BigNumber; +} +export type RedeemedEvent = TypedEvent< + [string, string, BigNumber, BigNumber], + RedeemedEventObject +>; + +export type RedeemedEventFilter = TypedEventFilter; + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface SeriesMaturedEventObject { + chiAtMaturity: BigNumber; +} +export type SeriesMaturedEvent = TypedEvent< + [BigNumber], + SeriesMaturedEventObject +>; + +export type SeriesMaturedEventFilter = TypedEventFilter; + +export interface TransferEventObject { + from: string; + to: string; + value: BigNumber; +} +export type TransferEvent = TypedEvent< + [string, string, BigNumber], + TransferEventObject +>; + +export type TransferEventFilter = TypedEventFilter; + +export interface FYToken extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: FYTokenInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + accrual( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + burn( + from: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + chiAtMaturity(overrides?: CallOverrides): Promise<[BigNumber]>; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + deploymentChainId(overrides?: CallOverrides): Promise<[BigNumber]>; + + flashFee( + token: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + flashLoan( + receiver: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + join(overrides?: CallOverrides): Promise<[string]>; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mature( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + maturity(overrides?: CallOverrides): Promise<[BigNumber]>; + + maxFlashLoan( + token: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + mint( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mintWithUnderlying( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise<[string]>; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + oracle(overrides?: CallOverrides): Promise<[string]>; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + point( + param: PromiseOrValue, + value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + redeem( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + underlying(overrides?: CallOverrides): Promise<[string]>; + + underlyingId(overrides?: CallOverrides): Promise<[string]>; + + version(overrides?: CallOverrides): Promise<[string]>; + }; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + accrual( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + burn( + from: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + chiAtMaturity(overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + flashFee( + token: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + flashLoan( + receiver: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + join(overrides?: CallOverrides): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mature( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + maturity(overrides?: CallOverrides): Promise; + + maxFlashLoan( + token: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + mint( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mintWithUnderlying( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + oracle(overrides?: CallOverrides): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + point( + param: PromiseOrValue, + value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + redeem( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + underlying(overrides?: CallOverrides): Promise; + + underlyingId(overrides?: CallOverrides): Promise; + + version(overrides?: CallOverrides): Promise; + + callStatic: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + accrual(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + burn( + from: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + chiAtMaturity(overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + flashFee( + token: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + flashLoan( + receiver: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + join(overrides?: CallOverrides): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + mature(overrides?: CallOverrides): Promise; + + maturity(overrides?: CallOverrides): Promise; + + maxFlashLoan( + token: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + mint( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + mintWithUnderlying( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + oracle(overrides?: CallOverrides): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + point( + param: PromiseOrValue, + value: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + redeem( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + underlying(overrides?: CallOverrides): Promise; + + underlyingId(overrides?: CallOverrides): Promise; + + version(overrides?: CallOverrides): Promise; + }; + + filters: { + "Approval(address,address,uint256)"( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + value?: null + ): ApprovalEventFilter; + Approval( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + value?: null + ): ApprovalEventFilter; + + "Point(bytes32,address)"( + param?: PromiseOrValue | null, + value?: null + ): PointEventFilter; + Point( + param?: PromiseOrValue | null, + value?: null + ): PointEventFilter; + + "Redeemed(address,address,uint256,uint256)"( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null, + redeemed?: null + ): RedeemedEventFilter; + Redeemed( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null, + redeemed?: null + ): RedeemedEventFilter; + + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + + "SeriesMatured(uint256)"(chiAtMaturity?: null): SeriesMaturedEventFilter; + SeriesMatured(chiAtMaturity?: null): SeriesMaturedEventFilter; + + "Transfer(address,address,uint256)"( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null + ): TransferEventFilter; + Transfer( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null + ): TransferEventFilter; + }; + + estimateGas: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + accrual( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + burn( + from: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + chiAtMaturity(overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + flashFee( + token: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + flashLoan( + receiver: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + join(overrides?: CallOverrides): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mature( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + maturity(overrides?: CallOverrides): Promise; + + maxFlashLoan( + token: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + mint( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mintWithUnderlying( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + oracle(overrides?: CallOverrides): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + point( + param: PromiseOrValue, + value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + redeem( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + underlying(overrides?: CallOverrides): Promise; + + underlyingId(overrides?: CallOverrides): Promise; + + version(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + accrual( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + burn( + from: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + chiAtMaturity(overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + flashFee( + token: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + flashLoan( + receiver: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + join(overrides?: CallOverrides): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mature( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + maturity(overrides?: CallOverrides): Promise; + + maxFlashLoan( + token: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + mint( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mintWithUnderlying( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + oracle(overrides?: CallOverrides): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + point( + param: PromiseOrValue, + value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + redeem( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + underlying(overrides?: CallOverrides): Promise; + + underlyingId(overrides?: CallOverrides): Promise; + + version(overrides?: CallOverrides): Promise; + }; +} diff --git a/src/contracts/Join.ts b/src/contracts/Join.ts new file mode 100644 index 000000000..ffa7bc3eb --- /dev/null +++ b/src/contracts/Join.ts @@ -0,0 +1,900 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface JoinInterface extends utils.Interface { + functions: { + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "asset()": FunctionFragment; + "exit(address,uint128)": FunctionFragment; + "flashFee(address,uint256)": FunctionFragment; + "flashFeeFactor()": FunctionFragment; + "flashLoan(address,address,uint256,bytes)": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "join(address,uint128)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "maxFlashLoan(address)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "retrieve(address,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "setFlashFeeFactor(uint256)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "storedBalance()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "LOCK" + | "LOCK8605463013" + | "ROOT" + | "ROOT4146650865" + | "asset" + | "exit" + | "flashFee" + | "flashFeeFactor" + | "flashLoan" + | "getRoleAdmin" + | "grantRole" + | "grantRoles" + | "hasRole" + | "join" + | "lockRole" + | "maxFlashLoan" + | "renounceRole" + | "retrieve" + | "revokeRole" + | "revokeRoles" + | "setFlashFeeFactor" + | "setRoleAdmin" + | "storedBalance" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "asset", values?: undefined): string; + encodeFunctionData( + functionFragment: "exit", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "flashFee", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "flashFeeFactor", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "flashLoan", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "join", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "maxFlashLoan", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "retrieve", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setFlashFeeFactor", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "storedBalance", + values?: undefined + ): string; + + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "asset", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "exit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "flashFee", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "flashFeeFactor", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "flashLoan", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "join", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "maxFlashLoan", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "retrieve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setFlashFeeFactor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "storedBalance", + data: BytesLike + ): Result; + + events: { + "FlashFeeFactorSet(uint256)": EventFragment; + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "FlashFeeFactorSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; +} + +export interface FlashFeeFactorSetEventObject { + fee: BigNumber; +} +export type FlashFeeFactorSetEvent = TypedEvent< + [BigNumber], + FlashFeeFactorSetEventObject +>; + +export type FlashFeeFactorSetEventFilter = + TypedEventFilter; + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface Join extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: JoinInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + asset(overrides?: CallOverrides): Promise<[string]>; + + exit( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + flashFee( + token: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + flashFeeFactor(overrides?: CallOverrides): Promise<[BigNumber]>; + + flashLoan( + receiver: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + join( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + maxFlashLoan( + token: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setFlashFeeFactor( + flashFeeFactor_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + storedBalance(overrides?: CallOverrides): Promise<[BigNumber]>; + }; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + asset(overrides?: CallOverrides): Promise; + + exit( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + flashFee( + token: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + flashFeeFactor(overrides?: CallOverrides): Promise; + + flashLoan( + receiver: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + join( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + maxFlashLoan( + token: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setFlashFeeFactor( + flashFeeFactor_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + storedBalance(overrides?: CallOverrides): Promise; + + callStatic: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + asset(overrides?: CallOverrides): Promise; + + exit( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + flashFee( + token: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + flashFeeFactor(overrides?: CallOverrides): Promise; + + flashLoan( + receiver: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + join( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + maxFlashLoan( + token: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setFlashFeeFactor( + flashFeeFactor_: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + storedBalance(overrides?: CallOverrides): Promise; + }; + + filters: { + "FlashFeeFactorSet(uint256)"( + fee?: PromiseOrValue | null + ): FlashFeeFactorSetEventFilter; + FlashFeeFactorSet( + fee?: PromiseOrValue | null + ): FlashFeeFactorSetEventFilter; + + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + }; + + estimateGas: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + asset(overrides?: CallOverrides): Promise; + + exit( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + flashFee( + token: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + flashFeeFactor(overrides?: CallOverrides): Promise; + + flashLoan( + receiver: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + join( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + maxFlashLoan( + token: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setFlashFeeFactor( + flashFeeFactor_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + storedBalance(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + asset(overrides?: CallOverrides): Promise; + + exit( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + flashFee( + token: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + flashFeeFactor(overrides?: CallOverrides): Promise; + + flashLoan( + receiver: PromiseOrValue, + token: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + join( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + maxFlashLoan( + token: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setFlashFeeFactor( + flashFeeFactor_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + storedBalance(overrides?: CallOverrides): Promise; + }; +} diff --git a/src/contracts/Join1155.ts b/src/contracts/Join1155.ts new file mode 100644 index 000000000..8392759ee --- /dev/null +++ b/src/contracts/Join1155.ts @@ -0,0 +1,983 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface Join1155Interface extends utils.Interface { + functions: { + "FLASH_LOANS_DISABLED()": FunctionFragment; + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "asset()": FunctionFragment; + "exit(address,uint128)": FunctionFragment; + "flashFeeFactor()": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "id()": FunctionFragment; + "join(address,uint128)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)": FunctionFragment; + "onERC1155Received(address,address,uint256,uint256,bytes)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "retrieve(address,address)": FunctionFragment; + "retrieveERC1155(address,uint256,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "storedBalance()": FunctionFragment; + "supportsInterface(bytes4)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "FLASH_LOANS_DISABLED" + | "LOCK" + | "LOCK8605463013" + | "ROOT" + | "ROOT4146650865" + | "asset" + | "exit" + | "flashFeeFactor" + | "getRoleAdmin" + | "grantRole" + | "grantRoles" + | "hasRole" + | "id" + | "join" + | "lockRole" + | "onERC1155BatchReceived" + | "onERC1155Received" + | "renounceRole" + | "retrieve" + | "retrieveERC1155" + | "revokeRole" + | "revokeRoles" + | "setRoleAdmin" + | "storedBalance" + | "supportsInterface" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "FLASH_LOANS_DISABLED", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "asset", values?: undefined): string; + encodeFunctionData( + functionFragment: "exit", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "flashFeeFactor", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "id", values?: undefined): string; + encodeFunctionData( + functionFragment: "join", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "onERC1155BatchReceived", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue[], + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "onERC1155Received", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "retrieve", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "retrieveERC1155", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "storedBalance", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "supportsInterface", + values: [PromiseOrValue] + ): string; + + decodeFunctionResult( + functionFragment: "FLASH_LOANS_DISABLED", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "asset", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "exit", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "flashFeeFactor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "id", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "join", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "onERC1155BatchReceived", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "onERC1155Received", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "retrieve", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "retrieveERC1155", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "storedBalance", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + + events: { + "FlashFeeFactorSet(uint256)": EventFragment; + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "FlashFeeFactorSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; +} + +export interface FlashFeeFactorSetEventObject { + fee: BigNumber; +} +export type FlashFeeFactorSetEvent = TypedEvent< + [BigNumber], + FlashFeeFactorSetEventObject +>; + +export type FlashFeeFactorSetEventFilter = + TypedEventFilter; + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface Join1155 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: Join1155Interface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + FLASH_LOANS_DISABLED(overrides?: CallOverrides): Promise<[BigNumber]>; + + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + asset(overrides?: CallOverrides): Promise<[string]>; + + exit( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + flashFeeFactor(overrides?: CallOverrides): Promise<[BigNumber]>; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + id(overrides?: CallOverrides): Promise<[BigNumber]>; + + join( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onERC1155BatchReceived( + _operator: PromiseOrValue, + _from: PromiseOrValue, + _ids: PromiseOrValue[], + _values: PromiseOrValue[], + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onERC1155Received( + _operator: PromiseOrValue, + _from: PromiseOrValue, + _id: PromiseOrValue, + _value: PromiseOrValue, + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveERC1155( + token: PromiseOrValue, + id_: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + storedBalance(overrides?: CallOverrides): Promise<[BigNumber]>; + + supportsInterface( + interfaceID: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + }; + + FLASH_LOANS_DISABLED(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + asset(overrides?: CallOverrides): Promise; + + exit( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + flashFeeFactor(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + id(overrides?: CallOverrides): Promise; + + join( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onERC1155BatchReceived( + _operator: PromiseOrValue, + _from: PromiseOrValue, + _ids: PromiseOrValue[], + _values: PromiseOrValue[], + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onERC1155Received( + _operator: PromiseOrValue, + _from: PromiseOrValue, + _id: PromiseOrValue, + _value: PromiseOrValue, + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveERC1155( + token: PromiseOrValue, + id_: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + storedBalance(overrides?: CallOverrides): Promise; + + supportsInterface( + interfaceID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + callStatic: { + FLASH_LOANS_DISABLED(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + asset(overrides?: CallOverrides): Promise; + + exit( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + flashFeeFactor(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + id(overrides?: CallOverrides): Promise; + + join( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onERC1155BatchReceived( + _operator: PromiseOrValue, + _from: PromiseOrValue, + _ids: PromiseOrValue[], + _values: PromiseOrValue[], + _data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onERC1155Received( + _operator: PromiseOrValue, + _from: PromiseOrValue, + _id: PromiseOrValue, + _value: PromiseOrValue, + _data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + retrieveERC1155( + token: PromiseOrValue, + id_: PromiseOrValue, + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + storedBalance(overrides?: CallOverrides): Promise; + + supportsInterface( + interfaceID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "FlashFeeFactorSet(uint256)"( + fee?: PromiseOrValue | null + ): FlashFeeFactorSetEventFilter; + FlashFeeFactorSet( + fee?: PromiseOrValue | null + ): FlashFeeFactorSetEventFilter; + + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + }; + + estimateGas: { + FLASH_LOANS_DISABLED(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + asset(overrides?: CallOverrides): Promise; + + exit( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + flashFeeFactor(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + id(overrides?: CallOverrides): Promise; + + join( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onERC1155BatchReceived( + _operator: PromiseOrValue, + _from: PromiseOrValue, + _ids: PromiseOrValue[], + _values: PromiseOrValue[], + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onERC1155Received( + _operator: PromiseOrValue, + _from: PromiseOrValue, + _id: PromiseOrValue, + _value: PromiseOrValue, + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveERC1155( + token: PromiseOrValue, + id_: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + storedBalance(overrides?: CallOverrides): Promise; + + supportsInterface( + interfaceID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + FLASH_LOANS_DISABLED( + overrides?: CallOverrides + ): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + asset(overrides?: CallOverrides): Promise; + + exit( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + flashFeeFactor(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + id(overrides?: CallOverrides): Promise; + + join( + user: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onERC1155BatchReceived( + _operator: PromiseOrValue, + _from: PromiseOrValue, + _ids: PromiseOrValue[], + _values: PromiseOrValue[], + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onERC1155Received( + _operator: PromiseOrValue, + _from: PromiseOrValue, + _id: PromiseOrValue, + _value: PromiseOrValue, + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveERC1155( + token: PromiseOrValue, + id_: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + storedBalance(overrides?: CallOverrides): Promise; + + supportsInterface( + interfaceID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/src/contracts/Ladle.ts b/src/contracts/Ladle.ts new file mode 100644 index 000000000..8671fc4ba --- /dev/null +++ b/src/contracts/Ladle.ts @@ -0,0 +1,2200 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export declare namespace DataTypes { + export type VaultStruct = { + owner: PromiseOrValue; + seriesId: PromiseOrValue; + ilkId: PromiseOrValue; + }; + + export type VaultStructOutput = [string, string, string] & { + owner: string; + seriesId: string; + ilkId: string; + }; +} + +export interface LadleInterface extends utils.Interface { + functions: { + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "addIntegration(address,bool)": FunctionFragment; + "addJoin(bytes6,address)": FunctionFragment; + "addModule(address,bool)": FunctionFragment; + "addPool(bytes6,address)": FunctionFragment; + "addToken(address,bool)": FunctionFragment; + "batch(bytes[])": FunctionFragment; + "borrowingFee()": FunctionFragment; + "build(bytes6,bytes6,uint8)": FunctionFragment; + "cauldron()": FunctionFragment; + "close(bytes12,address,int128,int128)": FunctionFragment; + "closeFromLadle(bytes12,address)": FunctionFragment; + "destroy(bytes12)": FunctionFragment; + "exitEther(address)": FunctionFragment; + "forwardDaiPermit(address,address,uint256,uint256,bool,uint8,bytes32,bytes32)": FunctionFragment; + "forwardPermit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "give(bytes12,address)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "integrations(address)": FunctionFragment; + "joinEther(bytes6)": FunctionFragment; + "joins(bytes6)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "moduleCall(address,bytes)": FunctionFragment; + "modules(address)": FunctionFragment; + "pools(bytes6)": FunctionFragment; + "pour(bytes12,address,int128,int128)": FunctionFragment; + "redeem(bytes6,address,uint256)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "repay(bytes12,address,int128,uint128)": FunctionFragment; + "repayFromLadle(bytes12,address)": FunctionFragment; + "repayVault(bytes12,address,int128,uint128)": FunctionFragment; + "retrieve(address,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "roll(bytes12,bytes6,uint8,uint128)": FunctionFragment; + "route(address,bytes)": FunctionFragment; + "router()": FunctionFragment; + "serve(bytes12,address,uint128,uint128,uint128)": FunctionFragment; + "setFee(uint256)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "stir(bytes12,bytes12,uint128,uint128)": FunctionFragment; + "tokens(address)": FunctionFragment; + "transfer(address,address,uint128)": FunctionFragment; + "tweak(bytes12,bytes6,bytes6)": FunctionFragment; + "weth()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "LOCK" + | "LOCK8605463013" + | "ROOT" + | "ROOT4146650865" + | "addIntegration" + | "addJoin" + | "addModule" + | "addPool" + | "addToken" + | "batch" + | "borrowingFee" + | "build" + | "cauldron" + | "close" + | "closeFromLadle" + | "destroy" + | "exitEther" + | "forwardDaiPermit" + | "forwardPermit" + | "getRoleAdmin" + | "give" + | "grantRole" + | "grantRoles" + | "hasRole" + | "integrations" + | "joinEther" + | "joins" + | "lockRole" + | "moduleCall" + | "modules" + | "pools" + | "pour" + | "redeem" + | "renounceRole" + | "repay" + | "repayFromLadle" + | "repayVault" + | "retrieve" + | "revokeRole" + | "revokeRoles" + | "roll" + | "route" + | "router" + | "serve" + | "setFee" + | "setRoleAdmin" + | "stir" + | "tokens" + | "transfer" + | "tweak" + | "weth" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "addIntegration", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "addJoin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "addModule", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "addPool", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "addToken", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "batch", + values: [PromiseOrValue[]] + ): string; + encodeFunctionData( + functionFragment: "borrowingFee", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "build", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData(functionFragment: "cauldron", values?: undefined): string; + encodeFunctionData( + functionFragment: "close", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "closeFromLadle", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "destroy", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "exitEther", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "forwardDaiPermit", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "forwardPermit", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "give", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "integrations", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "joinEther", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "joins", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "moduleCall", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "modules", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "pools", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "pour", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "redeem", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "repay", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "repayFromLadle", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "repayVault", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "retrieve", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "roll", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "route", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "router", values?: undefined): string; + encodeFunctionData( + functionFragment: "serve", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "setFee", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "stir", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "tokens", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "tweak", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData(functionFragment: "weth", values?: undefined): string; + + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "addIntegration", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "addJoin", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "addModule", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "addPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "addToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "batch", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "borrowingFee", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "build", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "cauldron", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "close", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "closeFromLadle", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "destroy", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "exitEther", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "forwardDaiPermit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "forwardPermit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "give", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "integrations", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "joinEther", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "joins", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "moduleCall", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "modules", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pools", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pour", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "redeem", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "repay", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "repayFromLadle", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "repayVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "retrieve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "roll", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "route", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "serve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setFee", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "stir", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "tokens", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "tweak", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "weth", data: BytesLike): Result; + + events: { + "FeeSet(uint256)": EventFragment; + "IntegrationAdded(address,bool)": EventFragment; + "JoinAdded(bytes6,address)": EventFragment; + "ModuleAdded(address,bool)": EventFragment; + "PoolAdded(bytes6,address)": EventFragment; + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + "TokenAdded(address,bool)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "FeeSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "IntegrationAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "JoinAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ModuleAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PoolAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TokenAdded"): EventFragment; +} + +export interface FeeSetEventObject { + fee: BigNumber; +} +export type FeeSetEvent = TypedEvent<[BigNumber], FeeSetEventObject>; + +export type FeeSetEventFilter = TypedEventFilter; + +export interface IntegrationAddedEventObject { + integration: string; + set: boolean; +} +export type IntegrationAddedEvent = TypedEvent< + [string, boolean], + IntegrationAddedEventObject +>; + +export type IntegrationAddedEventFilter = + TypedEventFilter; + +export interface JoinAddedEventObject { + assetId: string; + join: string; +} +export type JoinAddedEvent = TypedEvent<[string, string], JoinAddedEventObject>; + +export type JoinAddedEventFilter = TypedEventFilter; + +export interface ModuleAddedEventObject { + module: string; + set: boolean; +} +export type ModuleAddedEvent = TypedEvent< + [string, boolean], + ModuleAddedEventObject +>; + +export type ModuleAddedEventFilter = TypedEventFilter; + +export interface PoolAddedEventObject { + seriesId: string; + pool: string; +} +export type PoolAddedEvent = TypedEvent<[string, string], PoolAddedEventObject>; + +export type PoolAddedEventFilter = TypedEventFilter; + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface TokenAddedEventObject { + token: string; + set: boolean; +} +export type TokenAddedEvent = TypedEvent< + [string, boolean], + TokenAddedEventObject +>; + +export type TokenAddedEventFilter = TypedEventFilter; + +export interface Ladle extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: LadleInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + addIntegration( + integration: PromiseOrValue, + set: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addJoin( + assetId: PromiseOrValue, + join: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addModule( + module: PromiseOrValue, + set: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addPool( + seriesId: PromiseOrValue, + pool: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addToken( + token: PromiseOrValue, + set: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + batch( + calls: PromiseOrValue[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + borrowingFee(overrides?: CallOverrides): Promise<[BigNumber]>; + + build( + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + salt: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + cauldron(overrides?: CallOverrides): Promise<[string]>; + + close( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + closeFromLadle( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + destroy( + vaultId_: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + exitEther( + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + forwardDaiPermit( + token: PromiseOrValue, + spender: PromiseOrValue, + nonce: PromiseOrValue, + deadline: PromiseOrValue, + allowed: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + forwardPermit( + token: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + give( + vaultId_: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + joinEther( + etherId: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + moduleCall( + module: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + pour( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + redeem( + seriesId: PromiseOrValue, + to: PromiseOrValue, + wad: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + repay( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + min: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + repayFromLadle( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + repayVault( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + max: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + roll( + vaultId_: PromiseOrValue, + newSeriesId: PromiseOrValue, + loan: PromiseOrValue, + max: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + route( + integration: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + router(overrides?: CallOverrides): Promise<[string]>; + + serve( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + base: PromiseOrValue, + max: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + setFee( + fee: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + stir( + from: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + transfer( + token: PromiseOrValue, + receiver: PromiseOrValue, + wad: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + tweak( + vaultId_: PromiseOrValue, + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + weth(overrides?: CallOverrides): Promise<[string]>; + }; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + addIntegration( + integration: PromiseOrValue, + set: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addJoin( + assetId: PromiseOrValue, + join: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addModule( + module: PromiseOrValue, + set: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addPool( + seriesId: PromiseOrValue, + pool: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addToken( + token: PromiseOrValue, + set: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + batch( + calls: PromiseOrValue[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + borrowingFee(overrides?: CallOverrides): Promise; + + build( + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + salt: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + close( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + closeFromLadle( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + destroy( + vaultId_: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + exitEther( + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + forwardDaiPermit( + token: PromiseOrValue, + spender: PromiseOrValue, + nonce: PromiseOrValue, + deadline: PromiseOrValue, + allowed: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + forwardPermit( + token: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + give( + vaultId_: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joinEther( + etherId: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + moduleCall( + module: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pour( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + redeem( + seriesId: PromiseOrValue, + to: PromiseOrValue, + wad: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + repay( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + min: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + repayFromLadle( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + repayVault( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + max: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + roll( + vaultId_: PromiseOrValue, + newSeriesId: PromiseOrValue, + loan: PromiseOrValue, + max: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + route( + integration: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + router(overrides?: CallOverrides): Promise; + + serve( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + base: PromiseOrValue, + max: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + setFee( + fee: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + stir( + from: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transfer( + token: PromiseOrValue, + receiver: PromiseOrValue, + wad: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + tweak( + vaultId_: PromiseOrValue, + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + weth(overrides?: CallOverrides): Promise; + + callStatic: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + addIntegration( + integration: PromiseOrValue, + set: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + addJoin( + assetId: PromiseOrValue, + join: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + addModule( + module: PromiseOrValue, + set: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + addPool( + seriesId: PromiseOrValue, + pool: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + addToken( + token: PromiseOrValue, + set: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + batch( + calls: PromiseOrValue[], + overrides?: CallOverrides + ): Promise; + + borrowingFee(overrides?: CallOverrides): Promise; + + build( + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + salt: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string, DataTypes.VaultStructOutput]>; + + cauldron(overrides?: CallOverrides): Promise; + + close( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + closeFromLadle( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + destroy( + vaultId_: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + exitEther( + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + forwardDaiPermit( + token: PromiseOrValue, + spender: PromiseOrValue, + nonce: PromiseOrValue, + deadline: PromiseOrValue, + allowed: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + forwardPermit( + token: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + give( + vaultId_: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joinEther( + etherId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + moduleCall( + module: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pour( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + redeem( + seriesId: PromiseOrValue, + to: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + repay( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + min: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + repayFromLadle( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + repayVault( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + max: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + roll( + vaultId_: PromiseOrValue, + newSeriesId: PromiseOrValue, + loan: PromiseOrValue, + max: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [DataTypes.VaultStructOutput, BigNumber] & { + vault: DataTypes.VaultStructOutput; + newDebt: BigNumber; + } + >; + + route( + integration: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + router(overrides?: CallOverrides): Promise; + + serve( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + base: PromiseOrValue, + max: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setFee( + fee: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + stir( + from: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transfer( + token: PromiseOrValue, + receiver: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + tweak( + vaultId_: PromiseOrValue, + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + weth(overrides?: CallOverrides): Promise; + }; + + filters: { + "FeeSet(uint256)"(fee?: null): FeeSetEventFilter; + FeeSet(fee?: null): FeeSetEventFilter; + + "IntegrationAdded(address,bool)"( + integration?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): IntegrationAddedEventFilter; + IntegrationAdded( + integration?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): IntegrationAddedEventFilter; + + "JoinAdded(bytes6,address)"( + assetId?: PromiseOrValue | null, + join?: PromiseOrValue | null + ): JoinAddedEventFilter; + JoinAdded( + assetId?: PromiseOrValue | null, + join?: PromiseOrValue | null + ): JoinAddedEventFilter; + + "ModuleAdded(address,bool)"( + module?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): ModuleAddedEventFilter; + ModuleAdded( + module?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): ModuleAddedEventFilter; + + "PoolAdded(bytes6,address)"( + seriesId?: PromiseOrValue | null, + pool?: PromiseOrValue | null + ): PoolAddedEventFilter; + PoolAdded( + seriesId?: PromiseOrValue | null, + pool?: PromiseOrValue | null + ): PoolAddedEventFilter; + + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + + "TokenAdded(address,bool)"( + token?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): TokenAddedEventFilter; + TokenAdded( + token?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): TokenAddedEventFilter; + }; + + estimateGas: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + addIntegration( + integration: PromiseOrValue, + set: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addJoin( + assetId: PromiseOrValue, + join: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addModule( + module: PromiseOrValue, + set: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addPool( + seriesId: PromiseOrValue, + pool: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addToken( + token: PromiseOrValue, + set: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + batch( + calls: PromiseOrValue[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + borrowingFee(overrides?: CallOverrides): Promise; + + build( + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + salt: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + close( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + closeFromLadle( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + destroy( + vaultId_: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + exitEther( + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + forwardDaiPermit( + token: PromiseOrValue, + spender: PromiseOrValue, + nonce: PromiseOrValue, + deadline: PromiseOrValue, + allowed: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + forwardPermit( + token: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + give( + vaultId_: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joinEther( + etherId: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + moduleCall( + module: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pour( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + redeem( + seriesId: PromiseOrValue, + to: PromiseOrValue, + wad: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + repay( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + min: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + repayFromLadle( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + repayVault( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + max: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + roll( + vaultId_: PromiseOrValue, + newSeriesId: PromiseOrValue, + loan: PromiseOrValue, + max: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + route( + integration: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + router(overrides?: CallOverrides): Promise; + + serve( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + base: PromiseOrValue, + max: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + setFee( + fee: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + stir( + from: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transfer( + token: PromiseOrValue, + receiver: PromiseOrValue, + wad: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + tweak( + vaultId_: PromiseOrValue, + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + weth(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + addIntegration( + integration: PromiseOrValue, + set: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addJoin( + assetId: PromiseOrValue, + join: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addModule( + module: PromiseOrValue, + set: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addPool( + seriesId: PromiseOrValue, + pool: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addToken( + token: PromiseOrValue, + set: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + batch( + calls: PromiseOrValue[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + borrowingFee(overrides?: CallOverrides): Promise; + + build( + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + salt: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + close( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + closeFromLadle( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + destroy( + vaultId_: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + exitEther( + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + forwardDaiPermit( + token: PromiseOrValue, + spender: PromiseOrValue, + nonce: PromiseOrValue, + deadline: PromiseOrValue, + allowed: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + forwardPermit( + token: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + give( + vaultId_: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joinEther( + etherId: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + moduleCall( + module: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pour( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + redeem( + seriesId: PromiseOrValue, + to: PromiseOrValue, + wad: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + repay( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + min: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + repayFromLadle( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + repayVault( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + max: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + retrieve( + token: PromiseOrValue, + to: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + roll( + vaultId_: PromiseOrValue, + newSeriesId: PromiseOrValue, + loan: PromiseOrValue, + max: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + route( + integration: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + router(overrides?: CallOverrides): Promise; + + serve( + vaultId_: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + base: PromiseOrValue, + max: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + setFee( + fee: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + stir( + from: PromiseOrValue, + to: PromiseOrValue, + ink: PromiseOrValue, + art: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transfer( + token: PromiseOrValue, + receiver: PromiseOrValue, + wad: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + tweak( + vaultId_: PromiseOrValue, + seriesId: PromiseOrValue, + ilkId: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + weth(overrides?: CallOverrides): Promise; + }; +} diff --git a/src/contracts/LadleStorage.ts b/src/contracts/LadleStorage.ts new file mode 100644 index 000000000..413c9f27b --- /dev/null +++ b/src/contracts/LadleStorage.ts @@ -0,0 +1,419 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface LadleStorageInterface extends utils.Interface { + functions: { + "borrowingFee()": FunctionFragment; + "cauldron()": FunctionFragment; + "integrations(address)": FunctionFragment; + "joins(bytes6)": FunctionFragment; + "modules(address)": FunctionFragment; + "pools(bytes6)": FunctionFragment; + "router()": FunctionFragment; + "tokens(address)": FunctionFragment; + "weth()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "borrowingFee" + | "cauldron" + | "integrations" + | "joins" + | "modules" + | "pools" + | "router" + | "tokens" + | "weth" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "borrowingFee", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "cauldron", values?: undefined): string; + encodeFunctionData( + functionFragment: "integrations", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "joins", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "modules", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "pools", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "router", values?: undefined): string; + encodeFunctionData( + functionFragment: "tokens", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "weth", values?: undefined): string; + + decodeFunctionResult( + functionFragment: "borrowingFee", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "cauldron", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "integrations", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "joins", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "modules", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pools", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "tokens", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "weth", data: BytesLike): Result; + + events: { + "FeeSet(uint256)": EventFragment; + "IntegrationAdded(address,bool)": EventFragment; + "JoinAdded(bytes6,address)": EventFragment; + "ModuleAdded(address,bool)": EventFragment; + "PoolAdded(bytes6,address)": EventFragment; + "TokenAdded(address,bool)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "FeeSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "IntegrationAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "JoinAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ModuleAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PoolAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TokenAdded"): EventFragment; +} + +export interface FeeSetEventObject { + fee: BigNumber; +} +export type FeeSetEvent = TypedEvent<[BigNumber], FeeSetEventObject>; + +export type FeeSetEventFilter = TypedEventFilter; + +export interface IntegrationAddedEventObject { + integration: string; + set: boolean; +} +export type IntegrationAddedEvent = TypedEvent< + [string, boolean], + IntegrationAddedEventObject +>; + +export type IntegrationAddedEventFilter = + TypedEventFilter; + +export interface JoinAddedEventObject { + assetId: string; + join: string; +} +export type JoinAddedEvent = TypedEvent<[string, string], JoinAddedEventObject>; + +export type JoinAddedEventFilter = TypedEventFilter; + +export interface ModuleAddedEventObject { + module: string; + set: boolean; +} +export type ModuleAddedEvent = TypedEvent< + [string, boolean], + ModuleAddedEventObject +>; + +export type ModuleAddedEventFilter = TypedEventFilter; + +export interface PoolAddedEventObject { + seriesId: string; + pool: string; +} +export type PoolAddedEvent = TypedEvent<[string, string], PoolAddedEventObject>; + +export type PoolAddedEventFilter = TypedEventFilter; + +export interface TokenAddedEventObject { + token: string; + set: boolean; +} +export type TokenAddedEvent = TypedEvent< + [string, boolean], + TokenAddedEventObject +>; + +export type TokenAddedEventFilter = TypedEventFilter; + +export interface LadleStorage extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: LadleStorageInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + borrowingFee(overrides?: CallOverrides): Promise<[BigNumber]>; + + cauldron(overrides?: CallOverrides): Promise<[string]>; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + router(overrides?: CallOverrides): Promise<[string]>; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + weth(overrides?: CallOverrides): Promise<[string]>; + }; + + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + weth(overrides?: CallOverrides): Promise; + + callStatic: { + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + weth(overrides?: CallOverrides): Promise; + }; + + filters: { + "FeeSet(uint256)"(fee?: null): FeeSetEventFilter; + FeeSet(fee?: null): FeeSetEventFilter; + + "IntegrationAdded(address,bool)"( + integration?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): IntegrationAddedEventFilter; + IntegrationAdded( + integration?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): IntegrationAddedEventFilter; + + "JoinAdded(bytes6,address)"( + assetId?: PromiseOrValue | null, + join?: PromiseOrValue | null + ): JoinAddedEventFilter; + JoinAdded( + assetId?: PromiseOrValue | null, + join?: PromiseOrValue | null + ): JoinAddedEventFilter; + + "ModuleAdded(address,bool)"( + module?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): ModuleAddedEventFilter; + ModuleAdded( + module?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): ModuleAddedEventFilter; + + "PoolAdded(bytes6,address)"( + seriesId?: PromiseOrValue | null, + pool?: PromiseOrValue | null + ): PoolAddedEventFilter; + PoolAdded( + seriesId?: PromiseOrValue | null, + pool?: PromiseOrValue | null + ): PoolAddedEventFilter; + + "TokenAdded(address,bool)"( + token?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): TokenAddedEventFilter; + TokenAdded( + token?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): TokenAddedEventFilter; + }; + + estimateGas: { + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + weth(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + weth(overrides?: CallOverrides): Promise; + }; +} diff --git a/src/contracts/NotionalMultiOracle.ts b/src/contracts/NotionalMultiOracle.ts new file mode 100644 index 000000000..f139e7745 --- /dev/null +++ b/src/contracts/NotionalMultiOracle.ts @@ -0,0 +1,802 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface NotionalMultiOracleInterface extends utils.Interface { + functions: { + "FCASH_DECIMALS()": FunctionFragment; + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "get(bytes32,bytes32,uint256)": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "peek(bytes32,bytes32,uint256)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "setSource(bytes6,bytes6,address)": FunctionFragment; + "sources(bytes6,bytes6)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "FCASH_DECIMALS" + | "LOCK" + | "LOCK8605463013" + | "ROOT" + | "ROOT4146650865" + | "get" + | "getRoleAdmin" + | "grantRole" + | "grantRoles" + | "hasRole" + | "lockRole" + | "peek" + | "renounceRole" + | "revokeRole" + | "revokeRoles" + | "setRoleAdmin" + | "setSource" + | "sources" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "FCASH_DECIMALS", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "get", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "peek", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setSource", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "sources", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult( + functionFragment: "FCASH_DECIMALS", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "get", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "peek", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setSource", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "sources", data: BytesLike): Result; + + events: { + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + "SourceSet(bytes6,bytes6,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SourceSet"): EventFragment; +} + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface SourceSetEventObject { + notionalId: string; + underlyingId: string; + underlying: string; +} +export type SourceSetEvent = TypedEvent< + [string, string, string], + SourceSetEventObject +>; + +export type SourceSetEventFilter = TypedEventFilter; + +export interface NotionalMultiOracle extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: NotionalMultiOracleInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + FCASH_DECIMALS(overrides?: CallOverrides): Promise<[number]>; + + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + notionalId: PromiseOrValue, + underlyingId: PromiseOrValue, + underlying: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [number, number, boolean] & { + baseDecimals: number; + quoteDecimals: number; + set: boolean; + } + >; + }; + + FCASH_DECIMALS(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + notionalId: PromiseOrValue, + underlyingId: PromiseOrValue, + underlying: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [number, number, boolean] & { + baseDecimals: number; + quoteDecimals: number; + set: boolean; + } + >; + + callStatic: { + FCASH_DECIMALS(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setSource( + notionalId: PromiseOrValue, + underlyingId: PromiseOrValue, + underlying: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [number, number, boolean] & { + baseDecimals: number; + quoteDecimals: number; + set: boolean; + } + >; + }; + + filters: { + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + + "SourceSet(bytes6,bytes6,address)"( + notionalId?: PromiseOrValue | null, + underlyingId?: PromiseOrValue | null, + underlying?: null + ): SourceSetEventFilter; + SourceSet( + notionalId?: PromiseOrValue | null, + underlyingId?: PromiseOrValue | null, + underlying?: null + ): SourceSetEventFilter; + }; + + estimateGas: { + FCASH_DECIMALS(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + notionalId: PromiseOrValue, + underlyingId: PromiseOrValue, + underlying: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + FCASH_DECIMALS(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + notionalId: PromiseOrValue, + underlyingId: PromiseOrValue, + underlying: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/src/contracts/Pool.ts b/src/contracts/Pool.ts new file mode 100644 index 000000000..13e751de4 --- /dev/null +++ b/src/contracts/Pool.ts @@ -0,0 +1,2475 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface PoolInterface extends utils.Interface { + functions: { + "DOMAIN_SEPARATOR()": FunctionFragment; + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "PERMIT_TYPEHASH()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "base()": FunctionFragment; + "baseDecimals()": FunctionFragment; + "baseToken()": FunctionFragment; + "burn(address,address,uint256,uint256)": FunctionFragment; + "burnForBase(address,uint256,uint256)": FunctionFragment; + "buyBase(address,uint128,uint128)": FunctionFragment; + "buyBasePreview(uint128)": FunctionFragment; + "buyFYToken(address,uint128,uint128)": FunctionFragment; + "buyFYTokenPreview(uint128)": FunctionFragment; + "cumulativeRatioLast()": FunctionFragment; + "currentCumulativeRatio()": FunctionFragment; + "decimals()": FunctionFragment; + "deploymentChainId()": FunctionFragment; + "fyToken()": FunctionFragment; + "g1()": FunctionFragment; + "g1Fee()": FunctionFragment; + "g2()": FunctionFragment; + "getBaseBalance()": FunctionFragment; + "getC()": FunctionFragment; + "getCache()": FunctionFragment; + "getCurrentSharePrice()": FunctionFragment; + "getFYTokenBalance()": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "getSharesBalance()": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "init(address)": FunctionFragment; + "invariant()": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "maturity()": FunctionFragment; + "maxBaseIn()": FunctionFragment; + "maxBaseOut()": FunctionFragment; + "maxFYTokenIn()": FunctionFragment; + "maxFYTokenOut()": FunctionFragment; + "mint(address,address,uint256,uint256)": FunctionFragment; + "mintWithBase(address,address,uint256,uint256,uint256)": FunctionFragment; + "mu()": FunctionFragment; + "name()": FunctionFragment; + "nonces(address)": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "retrieveBase(address)": FunctionFragment; + "retrieveFYToken(address)": FunctionFragment; + "retrieveShares(address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "scaleFactor()": FunctionFragment; + "sellBase(address,uint128)": FunctionFragment; + "sellBasePreview(uint128)": FunctionFragment; + "sellFYToken(address,uint128)": FunctionFragment; + "sellFYTokenPreview(uint128)": FunctionFragment; + "setFees(uint16)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "sharesToken()": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "ts()": FunctionFragment; + "unwrap(address)": FunctionFragment; + "unwrapPreview(uint256)": FunctionFragment; + "version()": FunctionFragment; + "wrap(address)": FunctionFragment; + "wrapPreview(uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "DOMAIN_SEPARATOR" + | "LOCK" + | "LOCK8605463013" + | "PERMIT_TYPEHASH" + | "ROOT" + | "ROOT4146650865" + | "allowance" + | "approve" + | "balanceOf" + | "base" + | "baseDecimals" + | "baseToken" + | "burn" + | "burnForBase" + | "buyBase" + | "buyBasePreview" + | "buyFYToken" + | "buyFYTokenPreview" + | "cumulativeRatioLast" + | "currentCumulativeRatio" + | "decimals" + | "deploymentChainId" + | "fyToken" + | "g1" + | "g1Fee" + | "g2" + | "getBaseBalance" + | "getC" + | "getCache" + | "getCurrentSharePrice" + | "getFYTokenBalance" + | "getRoleAdmin" + | "getSharesBalance" + | "grantRole" + | "grantRoles" + | "hasRole" + | "init" + | "invariant" + | "lockRole" + | "maturity" + | "maxBaseIn" + | "maxBaseOut" + | "maxFYTokenIn" + | "maxFYTokenOut" + | "mint" + | "mintWithBase" + | "mu" + | "name" + | "nonces" + | "permit" + | "renounceRole" + | "retrieveBase" + | "retrieveFYToken" + | "retrieveShares" + | "revokeRole" + | "revokeRoles" + | "scaleFactor" + | "sellBase" + | "sellBasePreview" + | "sellFYToken" + | "sellFYTokenPreview" + | "setFees" + | "setRoleAdmin" + | "sharesToken" + | "symbol" + | "totalSupply" + | "transfer" + | "transferFrom" + | "ts" + | "unwrap" + | "unwrapPreview" + | "version" + | "wrap" + | "wrapPreview" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "DOMAIN_SEPARATOR", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "PERMIT_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "allowance", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "balanceOf", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "base", values?: undefined): string; + encodeFunctionData( + functionFragment: "baseDecimals", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "baseToken", values?: undefined): string; + encodeFunctionData( + functionFragment: "burn", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "burnForBase", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "buyBase", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "buyBasePreview", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "buyFYToken", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "buyFYTokenPreview", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "cumulativeRatioLast", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "currentCumulativeRatio", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "deploymentChainId", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "fyToken", values?: undefined): string; + encodeFunctionData(functionFragment: "g1", values?: undefined): string; + encodeFunctionData(functionFragment: "g1Fee", values?: undefined): string; + encodeFunctionData(functionFragment: "g2", values?: undefined): string; + encodeFunctionData( + functionFragment: "getBaseBalance", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "getC", values?: undefined): string; + encodeFunctionData(functionFragment: "getCache", values?: undefined): string; + encodeFunctionData( + functionFragment: "getCurrentSharePrice", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getFYTokenBalance", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getSharesBalance", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "init", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "invariant", values?: undefined): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "maturity", values?: undefined): string; + encodeFunctionData(functionFragment: "maxBaseIn", values?: undefined): string; + encodeFunctionData( + functionFragment: "maxBaseOut", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "maxFYTokenIn", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "maxFYTokenOut", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "mint", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "mintWithBase", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData(functionFragment: "mu", values?: undefined): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "nonces", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "permit", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "retrieveBase", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "retrieveFYToken", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "retrieveShares", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "scaleFactor", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "sellBase", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "sellBasePreview", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "sellFYToken", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "sellFYTokenPreview", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setFees", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "sharesToken", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData(functionFragment: "ts", values?: undefined): string; + encodeFunctionData( + functionFragment: "unwrap", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "unwrapPreview", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + encodeFunctionData( + functionFragment: "wrap", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "wrapPreview", + values: [PromiseOrValue] + ): string; + + decodeFunctionResult( + functionFragment: "DOMAIN_SEPARATOR", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "PERMIT_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "base", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "baseDecimals", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "baseToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "burnForBase", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "buyBase", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "buyBasePreview", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "buyFYToken", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "buyFYTokenPreview", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "cumulativeRatioLast", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "currentCumulativeRatio", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "deploymentChainId", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "fyToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "g1", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "g1Fee", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "g2", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getBaseBalance", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getC", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getCache", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getCurrentSharePrice", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getFYTokenBalance", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getSharesBalance", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "init", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "invariant", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "maturity", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "maxBaseIn", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "maxBaseOut", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "maxFYTokenIn", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "maxFYTokenOut", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "mintWithBase", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "mu", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "retrieveBase", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "retrieveFYToken", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "retrieveShares", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "scaleFactor", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "sellBase", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "sellBasePreview", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "sellFYToken", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "sellFYTokenPreview", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setFees", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "sharesToken", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ts", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "unwrap", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "unwrapPreview", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "wrap", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "wrapPreview", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "FeesSet(uint16)": EventFragment; + "Liquidity(uint32,address,address,address,int256,int256,int256)": EventFragment; + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + "Sync(uint112,uint112,uint256)": EventFragment; + "Trade(uint32,address,address,int256,int256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + "gg()": EventFragment; + "gm()": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "FeesSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Liquidity"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Sync"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Trade"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; + getEvent(nameOrSignatureOrTopic: "gg"): EventFragment; + getEvent(nameOrSignatureOrTopic: "gm"): EventFragment; +} + +export interface ApprovalEventObject { + owner: string; + spender: string; + value: BigNumber; +} +export type ApprovalEvent = TypedEvent< + [string, string, BigNumber], + ApprovalEventObject +>; + +export type ApprovalEventFilter = TypedEventFilter; + +export interface FeesSetEventObject { + g1Fee: number; +} +export type FeesSetEvent = TypedEvent<[number], FeesSetEventObject>; + +export type FeesSetEventFilter = TypedEventFilter; + +export interface LiquidityEventObject { + maturity: number; + from: string; + to: string; + fyTokenTo: string; + base: BigNumber; + fyTokens: BigNumber; + poolTokens: BigNumber; +} +export type LiquidityEvent = TypedEvent< + [number, string, string, string, BigNumber, BigNumber, BigNumber], + LiquidityEventObject +>; + +export type LiquidityEventFilter = TypedEventFilter; + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface SyncEventObject { + baseCached: BigNumber; + fyTokenCached: BigNumber; + cumulativeBalancesRatio: BigNumber; +} +export type SyncEvent = TypedEvent< + [BigNumber, BigNumber, BigNumber], + SyncEventObject +>; + +export type SyncEventFilter = TypedEventFilter; + +export interface TradeEventObject { + maturity: number; + from: string; + to: string; + base: BigNumber; + fyTokens: BigNumber; +} +export type TradeEvent = TypedEvent< + [number, string, string, BigNumber, BigNumber], + TradeEventObject +>; + +export type TradeEventFilter = TypedEventFilter; + +export interface TransferEventObject { + from: string; + to: string; + value: BigNumber; +} +export type TransferEvent = TypedEvent< + [string, string, BigNumber], + TransferEventObject +>; + +export type TransferEventFilter = TypedEventFilter; + +export interface ggEventObject {} +export type ggEvent = TypedEvent<[], ggEventObject>; + +export type ggEventFilter = TypedEventFilter; + +export interface gmEventObject {} +export type gmEvent = TypedEvent<[], gmEventObject>; + +export type gmEventFilter = TypedEventFilter; + +export interface Pool extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: PoolInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + base(overrides?: CallOverrides): Promise<[string]>; + + baseDecimals(overrides?: CallOverrides): Promise<[BigNumber]>; + + baseToken(overrides?: CallOverrides): Promise<[string]>; + + burn( + baseTo: PromiseOrValue, + fyTokenTo: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + burnForBase( + to: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + buyBase( + to: PromiseOrValue, + baseOut: PromiseOrValue, + max: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + buyBasePreview( + baseOut: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber] & { fyTokenIn: BigNumber }>; + + buyFYToken( + to: PromiseOrValue, + fyTokenOut: PromiseOrValue, + max: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + buyFYTokenPreview( + fyTokenOut: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber] & { baseIn: BigNumber }>; + + cumulativeRatioLast(overrides?: CallOverrides): Promise<[BigNumber]>; + + currentCumulativeRatio( + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { + currentCumulativeRatio_: BigNumber; + blockTimestampCurrent: BigNumber; + } + >; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + deploymentChainId(overrides?: CallOverrides): Promise<[BigNumber]>; + + fyToken(overrides?: CallOverrides): Promise<[string]>; + + g1(overrides?: CallOverrides): Promise<[BigNumber]>; + + g1Fee(overrides?: CallOverrides): Promise<[number]>; + + g2(overrides?: CallOverrides): Promise<[BigNumber]>; + + getBaseBalance(overrides?: CallOverrides): Promise<[BigNumber]>; + + getC(overrides?: CallOverrides): Promise<[BigNumber]>; + + getCache( + overrides?: CallOverrides + ): Promise<[BigNumber, BigNumber, number, number]>; + + getCurrentSharePrice(overrides?: CallOverrides): Promise<[BigNumber]>; + + getFYTokenBalance(overrides?: CallOverrides): Promise<[BigNumber]>; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + getSharesBalance(overrides?: CallOverrides): Promise<[BigNumber]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + init( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + invariant( + overrides?: CallOverrides + ): Promise<[BigNumber] & { result: BigNumber }>; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + maturity(overrides?: CallOverrides): Promise<[number]>; + + maxBaseIn( + overrides?: CallOverrides + ): Promise<[BigNumber] & { baseIn: BigNumber }>; + + maxBaseOut( + overrides?: CallOverrides + ): Promise<[BigNumber] & { baseOut: BigNumber }>; + + maxFYTokenIn( + overrides?: CallOverrides + ): Promise<[BigNumber] & { fyTokenIn: BigNumber }>; + + maxFYTokenOut( + overrides?: CallOverrides + ): Promise<[BigNumber] & { fyTokenOut: BigNumber }>; + + mint( + to: PromiseOrValue, + remainder: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mintWithBase( + to: PromiseOrValue, + remainder: PromiseOrValue, + fyTokenToBuy: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mu(overrides?: CallOverrides): Promise<[BigNumber]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveBase( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveFYToken( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveShares( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + scaleFactor(overrides?: CallOverrides): Promise<[BigNumber]>; + + sellBase( + to: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sellBasePreview( + baseIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber] & { fyTokenOut: BigNumber }>; + + sellFYToken( + to: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sellFYTokenPreview( + fyTokenIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber] & { baseOut: BigNumber }>; + + setFees( + g1Fee_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sharesToken(overrides?: CallOverrides): Promise<[string]>; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + ts(overrides?: CallOverrides): Promise<[BigNumber]>; + + unwrap( + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + unwrapPreview( + shares: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber] & { assets: BigNumber }>; + + version(overrides?: CallOverrides): Promise<[string]>; + + wrap( + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + wrapPreview( + assets: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber] & { shares: BigNumber }>; + }; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + base(overrides?: CallOverrides): Promise; + + baseDecimals(overrides?: CallOverrides): Promise; + + baseToken(overrides?: CallOverrides): Promise; + + burn( + baseTo: PromiseOrValue, + fyTokenTo: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + burnForBase( + to: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + buyBase( + to: PromiseOrValue, + baseOut: PromiseOrValue, + max: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + buyBasePreview( + baseOut: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + buyFYToken( + to: PromiseOrValue, + fyTokenOut: PromiseOrValue, + max: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + buyFYTokenPreview( + fyTokenOut: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + cumulativeRatioLast(overrides?: CallOverrides): Promise; + + currentCumulativeRatio( + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { + currentCumulativeRatio_: BigNumber; + blockTimestampCurrent: BigNumber; + } + >; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + fyToken(overrides?: CallOverrides): Promise; + + g1(overrides?: CallOverrides): Promise; + + g1Fee(overrides?: CallOverrides): Promise; + + g2(overrides?: CallOverrides): Promise; + + getBaseBalance(overrides?: CallOverrides): Promise; + + getC(overrides?: CallOverrides): Promise; + + getCache( + overrides?: CallOverrides + ): Promise<[BigNumber, BigNumber, number, number]>; + + getCurrentSharePrice(overrides?: CallOverrides): Promise; + + getFYTokenBalance(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getSharesBalance(overrides?: CallOverrides): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + init( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + invariant(overrides?: CallOverrides): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + maturity(overrides?: CallOverrides): Promise; + + maxBaseIn(overrides?: CallOverrides): Promise; + + maxBaseOut(overrides?: CallOverrides): Promise; + + maxFYTokenIn(overrides?: CallOverrides): Promise; + + maxFYTokenOut(overrides?: CallOverrides): Promise; + + mint( + to: PromiseOrValue, + remainder: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mintWithBase( + to: PromiseOrValue, + remainder: PromiseOrValue, + fyTokenToBuy: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mu(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveBase( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveFYToken( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveShares( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + scaleFactor(overrides?: CallOverrides): Promise; + + sellBase( + to: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sellBasePreview( + baseIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sellFYToken( + to: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sellFYTokenPreview( + fyTokenIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setFees( + g1Fee_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sharesToken(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + ts(overrides?: CallOverrides): Promise; + + unwrap( + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + unwrapPreview( + shares: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + wrap( + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + wrapPreview( + assets: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + callStatic: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + base(overrides?: CallOverrides): Promise; + + baseDecimals(overrides?: CallOverrides): Promise; + + baseToken(overrides?: CallOverrides): Promise; + + burn( + baseTo: PromiseOrValue, + fyTokenTo: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + lpTokensBurned: BigNumber; + baseOut: BigNumber; + fyTokenOut: BigNumber; + } + >; + + burnForBase( + to: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { lpTokensBurned: BigNumber; baseOut: BigNumber } + >; + + buyBase( + to: PromiseOrValue, + baseOut: PromiseOrValue, + max: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + buyBasePreview( + baseOut: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + buyFYToken( + to: PromiseOrValue, + fyTokenOut: PromiseOrValue, + max: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + buyFYTokenPreview( + fyTokenOut: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + cumulativeRatioLast(overrides?: CallOverrides): Promise; + + currentCumulativeRatio( + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { + currentCumulativeRatio_: BigNumber; + blockTimestampCurrent: BigNumber; + } + >; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + fyToken(overrides?: CallOverrides): Promise; + + g1(overrides?: CallOverrides): Promise; + + g1Fee(overrides?: CallOverrides): Promise; + + g2(overrides?: CallOverrides): Promise; + + getBaseBalance(overrides?: CallOverrides): Promise; + + getC(overrides?: CallOverrides): Promise; + + getCache( + overrides?: CallOverrides + ): Promise<[BigNumber, BigNumber, number, number]>; + + getCurrentSharePrice(overrides?: CallOverrides): Promise; + + getFYTokenBalance(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getSharesBalance(overrides?: CallOverrides): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + init( + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + baseIn: BigNumber; + fyTokenIn: BigNumber; + lpTokensMinted: BigNumber; + } + >; + + invariant(overrides?: CallOverrides): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + maturity(overrides?: CallOverrides): Promise; + + maxBaseIn(overrides?: CallOverrides): Promise; + + maxBaseOut(overrides?: CallOverrides): Promise; + + maxFYTokenIn(overrides?: CallOverrides): Promise; + + maxFYTokenOut(overrides?: CallOverrides): Promise; + + mint( + to: PromiseOrValue, + remainder: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + baseIn: BigNumber; + fyTokenIn: BigNumber; + lpTokensMinted: BigNumber; + } + >; + + mintWithBase( + to: PromiseOrValue, + remainder: PromiseOrValue, + fyTokenToBuy: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + baseIn: BigNumber; + fyTokenIn: BigNumber; + lpTokensMinted: BigNumber; + } + >; + + mu(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + retrieveBase( + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + retrieveFYToken( + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + retrieveShares( + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + scaleFactor(overrides?: CallOverrides): Promise; + + sellBase( + to: PromiseOrValue, + min: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sellBasePreview( + baseIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sellFYToken( + to: PromiseOrValue, + min: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sellFYTokenPreview( + fyTokenIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setFees( + g1Fee_: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sharesToken(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ts(overrides?: CallOverrides): Promise; + + unwrap( + receiver: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + unwrapPreview( + shares: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + wrap( + receiver: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + wrapPreview( + assets: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "Approval(address,address,uint256)"( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + value?: null + ): ApprovalEventFilter; + Approval( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + value?: null + ): ApprovalEventFilter; + + "FeesSet(uint16)"(g1Fee?: null): FeesSetEventFilter; + FeesSet(g1Fee?: null): FeesSetEventFilter; + + "Liquidity(uint32,address,address,address,int256,int256,int256)"( + maturity?: null, + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + fyTokenTo?: PromiseOrValue | null, + base?: null, + fyTokens?: null, + poolTokens?: null + ): LiquidityEventFilter; + Liquidity( + maturity?: null, + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + fyTokenTo?: PromiseOrValue | null, + base?: null, + fyTokens?: null, + poolTokens?: null + ): LiquidityEventFilter; + + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + + "Sync(uint112,uint112,uint256)"( + baseCached?: null, + fyTokenCached?: null, + cumulativeBalancesRatio?: null + ): SyncEventFilter; + Sync( + baseCached?: null, + fyTokenCached?: null, + cumulativeBalancesRatio?: null + ): SyncEventFilter; + + "Trade(uint32,address,address,int256,int256)"( + maturity?: null, + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + base?: null, + fyTokens?: null + ): TradeEventFilter; + Trade( + maturity?: null, + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + base?: null, + fyTokens?: null + ): TradeEventFilter; + + "Transfer(address,address,uint256)"( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null + ): TransferEventFilter; + Transfer( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null + ): TransferEventFilter; + + "gg()"(): ggEventFilter; + gg(): ggEventFilter; + + "gm()"(): gmEventFilter; + gm(): gmEventFilter; + }; + + estimateGas: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + base(overrides?: CallOverrides): Promise; + + baseDecimals(overrides?: CallOverrides): Promise; + + baseToken(overrides?: CallOverrides): Promise; + + burn( + baseTo: PromiseOrValue, + fyTokenTo: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + burnForBase( + to: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + buyBase( + to: PromiseOrValue, + baseOut: PromiseOrValue, + max: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + buyBasePreview( + baseOut: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + buyFYToken( + to: PromiseOrValue, + fyTokenOut: PromiseOrValue, + max: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + buyFYTokenPreview( + fyTokenOut: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + cumulativeRatioLast(overrides?: CallOverrides): Promise; + + currentCumulativeRatio(overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + fyToken(overrides?: CallOverrides): Promise; + + g1(overrides?: CallOverrides): Promise; + + g1Fee(overrides?: CallOverrides): Promise; + + g2(overrides?: CallOverrides): Promise; + + getBaseBalance(overrides?: CallOverrides): Promise; + + getC(overrides?: CallOverrides): Promise; + + getCache(overrides?: CallOverrides): Promise; + + getCurrentSharePrice(overrides?: CallOverrides): Promise; + + getFYTokenBalance(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getSharesBalance(overrides?: CallOverrides): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + init( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + invariant(overrides?: CallOverrides): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + maturity(overrides?: CallOverrides): Promise; + + maxBaseIn(overrides?: CallOverrides): Promise; + + maxBaseOut(overrides?: CallOverrides): Promise; + + maxFYTokenIn(overrides?: CallOverrides): Promise; + + maxFYTokenOut(overrides?: CallOverrides): Promise; + + mint( + to: PromiseOrValue, + remainder: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mintWithBase( + to: PromiseOrValue, + remainder: PromiseOrValue, + fyTokenToBuy: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mu(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveBase( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveFYToken( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveShares( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + scaleFactor(overrides?: CallOverrides): Promise; + + sellBase( + to: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sellBasePreview( + baseIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sellFYToken( + to: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sellFYTokenPreview( + fyTokenIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setFees( + g1Fee_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sharesToken(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + ts(overrides?: CallOverrides): Promise; + + unwrap( + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + unwrapPreview( + shares: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + wrap( + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + wrapPreview( + assets: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + base(overrides?: CallOverrides): Promise; + + baseDecimals(overrides?: CallOverrides): Promise; + + baseToken(overrides?: CallOverrides): Promise; + + burn( + baseTo: PromiseOrValue, + fyTokenTo: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + burnForBase( + to: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + buyBase( + to: PromiseOrValue, + baseOut: PromiseOrValue, + max: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + buyBasePreview( + baseOut: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + buyFYToken( + to: PromiseOrValue, + fyTokenOut: PromiseOrValue, + max: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + buyFYTokenPreview( + fyTokenOut: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + cumulativeRatioLast( + overrides?: CallOverrides + ): Promise; + + currentCumulativeRatio( + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + fyToken(overrides?: CallOverrides): Promise; + + g1(overrides?: CallOverrides): Promise; + + g1Fee(overrides?: CallOverrides): Promise; + + g2(overrides?: CallOverrides): Promise; + + getBaseBalance(overrides?: CallOverrides): Promise; + + getC(overrides?: CallOverrides): Promise; + + getCache(overrides?: CallOverrides): Promise; + + getCurrentSharePrice( + overrides?: CallOverrides + ): Promise; + + getFYTokenBalance(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getSharesBalance(overrides?: CallOverrides): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + init( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + invariant(overrides?: CallOverrides): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + maturity(overrides?: CallOverrides): Promise; + + maxBaseIn(overrides?: CallOverrides): Promise; + + maxBaseOut(overrides?: CallOverrides): Promise; + + maxFYTokenIn(overrides?: CallOverrides): Promise; + + maxFYTokenOut(overrides?: CallOverrides): Promise; + + mint( + to: PromiseOrValue, + remainder: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mintWithBase( + to: PromiseOrValue, + remainder: PromiseOrValue, + fyTokenToBuy: PromiseOrValue, + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mu(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveBase( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveFYToken( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + retrieveShares( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + scaleFactor(overrides?: CallOverrides): Promise; + + sellBase( + to: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sellBasePreview( + baseIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sellFYToken( + to: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sellFYTokenPreview( + fyTokenIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setFees( + g1Fee_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sharesToken(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + ts(overrides?: CallOverrides): Promise; + + unwrap( + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + unwrapPreview( + shares: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + wrap( + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + wrapPreview( + assets: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/src/contracts/Strategy.ts b/src/contracts/Strategy.ts new file mode 100644 index 000000000..22f4c1457 --- /dev/null +++ b/src/contracts/Strategy.ts @@ -0,0 +1,1914 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface StrategyInterface extends utils.Interface { + functions: { + "DOMAIN_SEPARATOR()": FunctionFragment; + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "PERMIT_TYPEHASH()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "base()": FunctionFragment; + "baseId()": FunctionFragment; + "baseJoin()": FunctionFragment; + "burn(address)": FunctionFragment; + "burnForBase(address)": FunctionFragment; + "cached()": FunctionFragment; + "cauldron()": FunctionFragment; + "claim(address)": FunctionFragment; + "decimals()": FunctionFragment; + "deploymentChainId()": FunctionFragment; + "endPool()": FunctionFragment; + "fyToken()": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "ladle()": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "mint(address)": FunctionFragment; + "name()": FunctionFragment; + "nextPool()": FunctionFragment; + "nextSeriesId()": FunctionFragment; + "nonces(address)": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "pool()": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "resetTokenJoin()": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "rewards(address)": FunctionFragment; + "rewardsPerToken()": FunctionFragment; + "rewardsPeriod()": FunctionFragment; + "rewardsToken()": FunctionFragment; + "seriesId()": FunctionFragment; + "setNextPool(address,bytes6)": FunctionFragment; + "setRewards(uint32,uint32,uint96)": FunctionFragment; + "setRewardsToken(address)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "setTokenId(bytes6)": FunctionFragment; + "setYield(address)": FunctionFragment; + "startPool(uint256,uint256)": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "version()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "DOMAIN_SEPARATOR" + | "LOCK" + | "LOCK8605463013" + | "PERMIT_TYPEHASH" + | "ROOT" + | "ROOT4146650865" + | "allowance" + | "approve" + | "balanceOf" + | "base" + | "baseId" + | "baseJoin" + | "burn" + | "burnForBase" + | "cached" + | "cauldron" + | "claim" + | "decimals" + | "deploymentChainId" + | "endPool" + | "fyToken" + | "getRoleAdmin" + | "grantRole" + | "grantRoles" + | "hasRole" + | "ladle" + | "lockRole" + | "mint" + | "name" + | "nextPool" + | "nextSeriesId" + | "nonces" + | "permit" + | "pool" + | "renounceRole" + | "resetTokenJoin" + | "revokeRole" + | "revokeRoles" + | "rewards" + | "rewardsPerToken" + | "rewardsPeriod" + | "rewardsToken" + | "seriesId" + | "setNextPool" + | "setRewards" + | "setRewardsToken" + | "setRoleAdmin" + | "setTokenId" + | "setYield" + | "startPool" + | "symbol" + | "totalSupply" + | "transfer" + | "transferFrom" + | "version" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "DOMAIN_SEPARATOR", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "PERMIT_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "allowance", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "balanceOf", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "base", values?: undefined): string; + encodeFunctionData(functionFragment: "baseId", values?: undefined): string; + encodeFunctionData(functionFragment: "baseJoin", values?: undefined): string; + encodeFunctionData( + functionFragment: "burn", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "burnForBase", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "cached", values?: undefined): string; + encodeFunctionData(functionFragment: "cauldron", values?: undefined): string; + encodeFunctionData( + functionFragment: "claim", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "deploymentChainId", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "endPool", values?: undefined): string; + encodeFunctionData(functionFragment: "fyToken", values?: undefined): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "ladle", values?: undefined): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "mint", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "nextPool", values?: undefined): string; + encodeFunctionData( + functionFragment: "nextSeriesId", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "nonces", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "permit", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData(functionFragment: "pool", values?: undefined): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "resetTokenJoin", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "rewards", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "rewardsPerToken", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "rewardsPeriod", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "rewardsToken", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "seriesId", values?: undefined): string; + encodeFunctionData( + functionFragment: "setNextPool", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setRewards", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "setRewardsToken", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setTokenId", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setYield", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "startPool", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + + decodeFunctionResult( + functionFragment: "DOMAIN_SEPARATOR", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "PERMIT_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "base", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "baseId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "baseJoin", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "burnForBase", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "cached", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "cauldron", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "deploymentChainId", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "endPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "fyToken", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "ladle", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nextPool", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "nextSeriesId", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pool", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "resetTokenJoin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "rewards", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "rewardsPerToken", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "rewardsPeriod", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "rewardsToken", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "seriesId", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setNextPool", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setRewards", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setRewardsToken", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setTokenId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setYield", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "startPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "Claimed(address,uint256)": EventFragment; + "NextPoolSet(address,bytes6)": EventFragment; + "PoolEnded(address)": EventFragment; + "PoolStarted(address)": EventFragment; + "RewardsPerTokenUpdated(uint256)": EventFragment; + "RewardsSet(uint32,uint32,uint256)": EventFragment; + "RewardsTokenSet(address)": EventFragment; + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + "TokenIdSet(bytes6)": EventFragment; + "TokenJoinReset(address)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + "UserRewardsUpdated(address,uint256,uint256)": EventFragment; + "YieldSet(address,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Claimed"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NextPoolSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PoolEnded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PoolStarted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RewardsPerTokenUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RewardsSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RewardsTokenSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TokenIdSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TokenJoinReset"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; + getEvent(nameOrSignatureOrTopic: "UserRewardsUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "YieldSet"): EventFragment; +} + +export interface ApprovalEventObject { + owner: string; + spender: string; + value: BigNumber; +} +export type ApprovalEvent = TypedEvent< + [string, string, BigNumber], + ApprovalEventObject +>; + +export type ApprovalEventFilter = TypedEventFilter; + +export interface ClaimedEventObject { + receiver: string; + claimed: BigNumber; +} +export type ClaimedEvent = TypedEvent<[string, BigNumber], ClaimedEventObject>; + +export type ClaimedEventFilter = TypedEventFilter; + +export interface NextPoolSetEventObject { + pool: string; + seriesId: string; +} +export type NextPoolSetEvent = TypedEvent< + [string, string], + NextPoolSetEventObject +>; + +export type NextPoolSetEventFilter = TypedEventFilter; + +export interface PoolEndedEventObject { + pool: string; +} +export type PoolEndedEvent = TypedEvent<[string], PoolEndedEventObject>; + +export type PoolEndedEventFilter = TypedEventFilter; + +export interface PoolStartedEventObject { + pool: string; +} +export type PoolStartedEvent = TypedEvent<[string], PoolStartedEventObject>; + +export type PoolStartedEventFilter = TypedEventFilter; + +export interface RewardsPerTokenUpdatedEventObject { + accumulated: BigNumber; +} +export type RewardsPerTokenUpdatedEvent = TypedEvent< + [BigNumber], + RewardsPerTokenUpdatedEventObject +>; + +export type RewardsPerTokenUpdatedEventFilter = + TypedEventFilter; + +export interface RewardsSetEventObject { + start: number; + end: number; + rate: BigNumber; +} +export type RewardsSetEvent = TypedEvent< + [number, number, BigNumber], + RewardsSetEventObject +>; + +export type RewardsSetEventFilter = TypedEventFilter; + +export interface RewardsTokenSetEventObject { + token: string; +} +export type RewardsTokenSetEvent = TypedEvent< + [string], + RewardsTokenSetEventObject +>; + +export type RewardsTokenSetEventFilter = TypedEventFilter; + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface TokenIdSetEventObject { + id: string; +} +export type TokenIdSetEvent = TypedEvent<[string], TokenIdSetEventObject>; + +export type TokenIdSetEventFilter = TypedEventFilter; + +export interface TokenJoinResetEventObject { + join: string; +} +export type TokenJoinResetEvent = TypedEvent< + [string], + TokenJoinResetEventObject +>; + +export type TokenJoinResetEventFilter = TypedEventFilter; + +export interface TransferEventObject { + from: string; + to: string; + value: BigNumber; +} +export type TransferEvent = TypedEvent< + [string, string, BigNumber], + TransferEventObject +>; + +export type TransferEventFilter = TypedEventFilter; + +export interface UserRewardsUpdatedEventObject { + user: string; + userRewards: BigNumber; + paidRewardPerToken: BigNumber; +} +export type UserRewardsUpdatedEvent = TypedEvent< + [string, BigNumber, BigNumber], + UserRewardsUpdatedEventObject +>; + +export type UserRewardsUpdatedEventFilter = + TypedEventFilter; + +export interface YieldSetEventObject { + ladle: string; + cauldron: string; +} +export type YieldSetEvent = TypedEvent<[string, string], YieldSetEventObject>; + +export type YieldSetEventFilter = TypedEventFilter; + +export interface Strategy extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: StrategyInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + base(overrides?: CallOverrides): Promise<[string]>; + + baseId(overrides?: CallOverrides): Promise<[string]>; + + baseJoin(overrides?: CallOverrides): Promise<[string]>; + + burn( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + burnForBase( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + cached(overrides?: CallOverrides): Promise<[BigNumber]>; + + cauldron(overrides?: CallOverrides): Promise<[string]>; + + claim( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + deploymentChainId(overrides?: CallOverrides): Promise<[BigNumber]>; + + endPool( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + fyToken(overrides?: CallOverrides): Promise<[string]>; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + ladle(overrides?: CallOverrides): Promise<[string]>; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mint( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise<[string]>; + + nextPool(overrides?: CallOverrides): Promise<[string]>; + + nextSeriesId(overrides?: CallOverrides): Promise<[string]>; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + pool(overrides?: CallOverrides): Promise<[string]>; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + resetTokenJoin( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + rewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { accumulated: BigNumber; checkpoint: BigNumber } + >; + + rewardsPerToken( + overrides?: CallOverrides + ): Promise< + [BigNumber, number, BigNumber] & { + accumulated: BigNumber; + lastUpdated: number; + rate: BigNumber; + } + >; + + rewardsPeriod( + overrides?: CallOverrides + ): Promise<[number, number] & { start: number; end: number }>; + + rewardsToken(overrides?: CallOverrides): Promise<[string]>; + + seriesId(overrides?: CallOverrides): Promise<[string]>; + + setNextPool( + pool_: PromiseOrValue, + seriesId_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRewards( + start: PromiseOrValue, + end: PromiseOrValue, + rate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRewardsToken( + rewardsToken_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setTokenId( + baseId_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setYield( + ladle_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + startPool( + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + version(overrides?: CallOverrides): Promise<[string]>; + }; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + base(overrides?: CallOverrides): Promise; + + baseId(overrides?: CallOverrides): Promise; + + baseJoin(overrides?: CallOverrides): Promise; + + burn( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + burnForBase( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + cached(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + claim( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + endPool( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + fyToken(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ladle(overrides?: CallOverrides): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mint( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + nextPool(overrides?: CallOverrides): Promise; + + nextSeriesId(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + pool(overrides?: CallOverrides): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + resetTokenJoin( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + rewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { accumulated: BigNumber; checkpoint: BigNumber } + >; + + rewardsPerToken( + overrides?: CallOverrides + ): Promise< + [BigNumber, number, BigNumber] & { + accumulated: BigNumber; + lastUpdated: number; + rate: BigNumber; + } + >; + + rewardsPeriod( + overrides?: CallOverrides + ): Promise<[number, number] & { start: number; end: number }>; + + rewardsToken(overrides?: CallOverrides): Promise; + + seriesId(overrides?: CallOverrides): Promise; + + setNextPool( + pool_: PromiseOrValue, + seriesId_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRewards( + start: PromiseOrValue, + end: PromiseOrValue, + rate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRewardsToken( + rewardsToken_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setTokenId( + baseId_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setYield( + ladle_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + startPool( + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + version(overrides?: CallOverrides): Promise; + + callStatic: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + base(overrides?: CallOverrides): Promise; + + baseId(overrides?: CallOverrides): Promise; + + baseJoin(overrides?: CallOverrides): Promise; + + burn( + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + burnForBase( + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + cached(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + claim( + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + endPool(overrides?: CallOverrides): Promise; + + fyToken(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ladle(overrides?: CallOverrides): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + mint( + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + nextPool(overrides?: CallOverrides): Promise; + + nextSeriesId(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pool(overrides?: CallOverrides): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + resetTokenJoin(overrides?: CallOverrides): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + rewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { accumulated: BigNumber; checkpoint: BigNumber } + >; + + rewardsPerToken( + overrides?: CallOverrides + ): Promise< + [BigNumber, number, BigNumber] & { + accumulated: BigNumber; + lastUpdated: number; + rate: BigNumber; + } + >; + + rewardsPeriod( + overrides?: CallOverrides + ): Promise<[number, number] & { start: number; end: number }>; + + rewardsToken(overrides?: CallOverrides): Promise; + + seriesId(overrides?: CallOverrides): Promise; + + setNextPool( + pool_: PromiseOrValue, + seriesId_: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRewards( + start: PromiseOrValue, + end: PromiseOrValue, + rate: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRewardsToken( + rewardsToken_: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setTokenId( + baseId_: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setYield( + ladle_: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + startPool( + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + }; + + filters: { + "Approval(address,address,uint256)"( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + value?: null + ): ApprovalEventFilter; + Approval( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + value?: null + ): ApprovalEventFilter; + + "Claimed(address,uint256)"( + receiver?: null, + claimed?: null + ): ClaimedEventFilter; + Claimed(receiver?: null, claimed?: null): ClaimedEventFilter; + + "NextPoolSet(address,bytes6)"( + pool?: PromiseOrValue | null, + seriesId?: PromiseOrValue | null + ): NextPoolSetEventFilter; + NextPoolSet( + pool?: PromiseOrValue | null, + seriesId?: PromiseOrValue | null + ): NextPoolSetEventFilter; + + "PoolEnded(address)"(pool?: null): PoolEndedEventFilter; + PoolEnded(pool?: null): PoolEndedEventFilter; + + "PoolStarted(address)"(pool?: null): PoolStartedEventFilter; + PoolStarted(pool?: null): PoolStartedEventFilter; + + "RewardsPerTokenUpdated(uint256)"( + accumulated?: null + ): RewardsPerTokenUpdatedEventFilter; + RewardsPerTokenUpdated( + accumulated?: null + ): RewardsPerTokenUpdatedEventFilter; + + "RewardsSet(uint32,uint32,uint256)"( + start?: null, + end?: null, + rate?: null + ): RewardsSetEventFilter; + RewardsSet(start?: null, end?: null, rate?: null): RewardsSetEventFilter; + + "RewardsTokenSet(address)"(token?: null): RewardsTokenSetEventFilter; + RewardsTokenSet(token?: null): RewardsTokenSetEventFilter; + + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + + "TokenIdSet(bytes6)"(id?: null): TokenIdSetEventFilter; + TokenIdSet(id?: null): TokenIdSetEventFilter; + + "TokenJoinReset(address)"(join?: null): TokenJoinResetEventFilter; + TokenJoinReset(join?: null): TokenJoinResetEventFilter; + + "Transfer(address,address,uint256)"( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null + ): TransferEventFilter; + Transfer( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null + ): TransferEventFilter; + + "UserRewardsUpdated(address,uint256,uint256)"( + user?: null, + userRewards?: null, + paidRewardPerToken?: null + ): UserRewardsUpdatedEventFilter; + UserRewardsUpdated( + user?: null, + userRewards?: null, + paidRewardPerToken?: null + ): UserRewardsUpdatedEventFilter; + + "YieldSet(address,address)"( + ladle?: null, + cauldron?: null + ): YieldSetEventFilter; + YieldSet(ladle?: null, cauldron?: null): YieldSetEventFilter; + }; + + estimateGas: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + base(overrides?: CallOverrides): Promise; + + baseId(overrides?: CallOverrides): Promise; + + baseJoin(overrides?: CallOverrides): Promise; + + burn( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + burnForBase( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + cached(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + claim( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + endPool( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + fyToken(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ladle(overrides?: CallOverrides): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mint( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + nextPool(overrides?: CallOverrides): Promise; + + nextSeriesId(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + pool(overrides?: CallOverrides): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + resetTokenJoin( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + rewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + rewardsPerToken(overrides?: CallOverrides): Promise; + + rewardsPeriod(overrides?: CallOverrides): Promise; + + rewardsToken(overrides?: CallOverrides): Promise; + + seriesId(overrides?: CallOverrides): Promise; + + setNextPool( + pool_: PromiseOrValue, + seriesId_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRewards( + start: PromiseOrValue, + end: PromiseOrValue, + rate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRewardsToken( + rewardsToken_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setTokenId( + baseId_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setYield( + ladle_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + startPool( + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + version(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + approve( + spender: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + guy: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + base(overrides?: CallOverrides): Promise; + + baseId(overrides?: CallOverrides): Promise; + + baseJoin(overrides?: CallOverrides): Promise; + + burn( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + burnForBase( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + cached(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + claim( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deploymentChainId(overrides?: CallOverrides): Promise; + + endPool( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + fyToken(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ladle(overrides?: CallOverrides): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + mint( + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + nextPool(overrides?: CallOverrides): Promise; + + nextSeriesId(overrides?: CallOverrides): Promise; + + nonces( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + permit( + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + deadline: PromiseOrValue, + v: PromiseOrValue, + r: PromiseOrValue, + s: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + pool(overrides?: CallOverrides): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + resetTokenJoin( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + rewards( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + rewardsPerToken(overrides?: CallOverrides): Promise; + + rewardsPeriod(overrides?: CallOverrides): Promise; + + rewardsToken(overrides?: CallOverrides): Promise; + + seriesId(overrides?: CallOverrides): Promise; + + setNextPool( + pool_: PromiseOrValue, + seriesId_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRewards( + start: PromiseOrValue, + end: PromiseOrValue, + rate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRewardsToken( + rewardsToken_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setTokenId( + baseId_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setYield( + ladle_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + startPool( + minRatio: PromiseOrValue, + maxRatio: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + transferFrom( + src: PromiseOrValue, + dst: PromiseOrValue, + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + version(overrides?: CallOverrides): Promise; + }; +} diff --git a/src/contracts/Transfer1155Module.ts b/src/contracts/Transfer1155Module.ts new file mode 100644 index 000000000..e5d658819 --- /dev/null +++ b/src/contracts/Transfer1155Module.ts @@ -0,0 +1,483 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface Transfer1155ModuleInterface extends utils.Interface { + functions: { + "borrowingFee()": FunctionFragment; + "cauldron()": FunctionFragment; + "integrations(address)": FunctionFragment; + "joins(bytes6)": FunctionFragment; + "modules(address)": FunctionFragment; + "pools(bytes6)": FunctionFragment; + "router()": FunctionFragment; + "tokens(address)": FunctionFragment; + "transfer1155(address,uint256,address,uint128,bytes)": FunctionFragment; + "weth()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "borrowingFee" + | "cauldron" + | "integrations" + | "joins" + | "modules" + | "pools" + | "router" + | "tokens" + | "transfer1155" + | "weth" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "borrowingFee", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "cauldron", values?: undefined): string; + encodeFunctionData( + functionFragment: "integrations", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "joins", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "modules", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "pools", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "router", values?: undefined): string; + encodeFunctionData( + functionFragment: "tokens", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "transfer1155", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData(functionFragment: "weth", values?: undefined): string; + + decodeFunctionResult( + functionFragment: "borrowingFee", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "cauldron", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "integrations", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "joins", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "modules", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pools", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "tokens", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transfer1155", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "weth", data: BytesLike): Result; + + events: { + "FeeSet(uint256)": EventFragment; + "IntegrationAdded(address,bool)": EventFragment; + "JoinAdded(bytes6,address)": EventFragment; + "ModuleAdded(address,bool)": EventFragment; + "PoolAdded(bytes6,address)": EventFragment; + "TokenAdded(address,bool)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "FeeSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "IntegrationAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "JoinAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ModuleAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PoolAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TokenAdded"): EventFragment; +} + +export interface FeeSetEventObject { + fee: BigNumber; +} +export type FeeSetEvent = TypedEvent<[BigNumber], FeeSetEventObject>; + +export type FeeSetEventFilter = TypedEventFilter; + +export interface IntegrationAddedEventObject { + integration: string; + set: boolean; +} +export type IntegrationAddedEvent = TypedEvent< + [string, boolean], + IntegrationAddedEventObject +>; + +export type IntegrationAddedEventFilter = + TypedEventFilter; + +export interface JoinAddedEventObject { + assetId: string; + join: string; +} +export type JoinAddedEvent = TypedEvent<[string, string], JoinAddedEventObject>; + +export type JoinAddedEventFilter = TypedEventFilter; + +export interface ModuleAddedEventObject { + module: string; + set: boolean; +} +export type ModuleAddedEvent = TypedEvent< + [string, boolean], + ModuleAddedEventObject +>; + +export type ModuleAddedEventFilter = TypedEventFilter; + +export interface PoolAddedEventObject { + seriesId: string; + pool: string; +} +export type PoolAddedEvent = TypedEvent<[string, string], PoolAddedEventObject>; + +export type PoolAddedEventFilter = TypedEventFilter; + +export interface TokenAddedEventObject { + token: string; + set: boolean; +} +export type TokenAddedEvent = TypedEvent< + [string, boolean], + TokenAddedEventObject +>; + +export type TokenAddedEventFilter = TypedEventFilter; + +export interface Transfer1155Module extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: Transfer1155ModuleInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + borrowingFee(overrides?: CallOverrides): Promise<[BigNumber]>; + + cauldron(overrides?: CallOverrides): Promise<[string]>; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + router(overrides?: CallOverrides): Promise<[string]>; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + transfer1155( + token: PromiseOrValue, + id: PromiseOrValue, + receiver: PromiseOrValue, + wad: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + weth(overrides?: CallOverrides): Promise<[string]>; + }; + + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transfer1155( + token: PromiseOrValue, + id: PromiseOrValue, + receiver: PromiseOrValue, + wad: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + weth(overrides?: CallOverrides): Promise; + + callStatic: { + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transfer1155( + token: PromiseOrValue, + id: PromiseOrValue, + receiver: PromiseOrValue, + wad: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + weth(overrides?: CallOverrides): Promise; + }; + + filters: { + "FeeSet(uint256)"(fee?: null): FeeSetEventFilter; + FeeSet(fee?: null): FeeSetEventFilter; + + "IntegrationAdded(address,bool)"( + integration?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): IntegrationAddedEventFilter; + IntegrationAdded( + integration?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): IntegrationAddedEventFilter; + + "JoinAdded(bytes6,address)"( + assetId?: PromiseOrValue | null, + join?: PromiseOrValue | null + ): JoinAddedEventFilter; + JoinAdded( + assetId?: PromiseOrValue | null, + join?: PromiseOrValue | null + ): JoinAddedEventFilter; + + "ModuleAdded(address,bool)"( + module?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): ModuleAddedEventFilter; + ModuleAdded( + module?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): ModuleAddedEventFilter; + + "PoolAdded(bytes6,address)"( + seriesId?: PromiseOrValue | null, + pool?: PromiseOrValue | null + ): PoolAddedEventFilter; + PoolAdded( + seriesId?: PromiseOrValue | null, + pool?: PromiseOrValue | null + ): PoolAddedEventFilter; + + "TokenAdded(address,bool)"( + token?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): TokenAddedEventFilter; + TokenAdded( + token?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): TokenAddedEventFilter; + }; + + estimateGas: { + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transfer1155( + token: PromiseOrValue, + id: PromiseOrValue, + receiver: PromiseOrValue, + wad: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + weth(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + transfer1155( + token: PromiseOrValue, + id: PromiseOrValue, + receiver: PromiseOrValue, + wad: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + weth(overrides?: CallOverrides): Promise; + }; +} diff --git a/src/contracts/UniswapV3Oracle.ts b/src/contracts/UniswapV3Oracle.ts new file mode 100644 index 000000000..7a3cff99d --- /dev/null +++ b/src/contracts/UniswapV3Oracle.ts @@ -0,0 +1,888 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface UniswapV3OracleInterface extends utils.Interface { + functions: { + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "get(bytes32,bytes32,uint256)": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "peek(bytes32,bytes32,uint256)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "secondsAgo()": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "setSecondsAgo(uint32)": FunctionFragment; + "setSource(bytes6,bytes6,address)": FunctionFragment; + "sources(bytes6,bytes6)": FunctionFragment; + "sourcesData(address)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "LOCK" + | "LOCK8605463013" + | "ROOT" + | "ROOT4146650865" + | "get" + | "getRoleAdmin" + | "grantRole" + | "grantRoles" + | "hasRole" + | "lockRole" + | "peek" + | "renounceRole" + | "revokeRole" + | "revokeRoles" + | "secondsAgo" + | "setRoleAdmin" + | "setSecondsAgo" + | "setSource" + | "sources" + | "sourcesData" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "get", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "peek", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "secondsAgo", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setSecondsAgo", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setSource", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "sources", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "sourcesData", + values: [PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "get", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "peek", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "secondsAgo", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setSecondsAgo", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setSource", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "sources", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "sourcesData", + data: BytesLike + ): Result; + + events: { + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + "SecondsAgoSet(uint32)": EventFragment; + "SourceSet(bytes6,bytes6,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SecondsAgoSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SourceSet"): EventFragment; +} + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface SecondsAgoSetEventObject { + secondsAgo: number; +} +export type SecondsAgoSetEvent = TypedEvent<[number], SecondsAgoSetEventObject>; + +export type SecondsAgoSetEventFilter = TypedEventFilter; + +export interface SourceSetEventObject { + base: string; + quote: string; + source: string; +} +export type SourceSetEvent = TypedEvent< + [string, string, string], + SourceSetEventObject +>; + +export type SourceSetEventFilter = TypedEventFilter; + +export interface UniswapV3Oracle extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: UniswapV3OracleInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + get( + base: PromiseOrValue, + quote: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + base: PromiseOrValue, + quote: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { value: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + secondsAgo(overrides?: CallOverrides): Promise<[number]>; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSecondsAgo( + secondsAgo_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + base: PromiseOrValue, + quote: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string, boolean] & { source: string; inverse: boolean }>; + + sourcesData( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, string, string, number] & { + factory: string; + baseToken: string; + quoteToken: string; + fee: number; + } + >; + }; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + quote: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + base: PromiseOrValue, + quote: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { value: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + secondsAgo(overrides?: CallOverrides): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSecondsAgo( + secondsAgo_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + base: PromiseOrValue, + quote: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string, boolean] & { source: string; inverse: boolean }>; + + sourcesData( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, string, string, number] & { + factory: string; + baseToken: string; + quoteToken: string; + fee: number; + } + >; + + callStatic: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + quote: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { value: BigNumber; updateTime: BigNumber } + >; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + peek( + base: PromiseOrValue, + quote: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { value: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + secondsAgo(overrides?: CallOverrides): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setSecondsAgo( + secondsAgo_: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setSource( + base: PromiseOrValue, + quote: PromiseOrValue, + source: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string, boolean] & { source: string; inverse: boolean }>; + + sourcesData( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, string, string, number] & { + factory: string; + baseToken: string; + quoteToken: string; + fee: number; + } + >; + }; + + filters: { + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + + "SecondsAgoSet(uint32)"( + secondsAgo?: PromiseOrValue | null + ): SecondsAgoSetEventFilter; + SecondsAgoSet( + secondsAgo?: PromiseOrValue | null + ): SecondsAgoSetEventFilter; + + "SourceSet(bytes6,bytes6,address)"( + base?: PromiseOrValue | null, + quote?: PromiseOrValue | null, + source?: PromiseOrValue | null + ): SourceSetEventFilter; + SourceSet( + base?: PromiseOrValue | null, + quote?: PromiseOrValue | null, + source?: PromiseOrValue | null + ): SourceSetEventFilter; + }; + + estimateGas: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + quote: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + base: PromiseOrValue, + quote: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + secondsAgo(overrides?: CallOverrides): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSecondsAgo( + secondsAgo_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + base: PromiseOrValue, + quote: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sourcesData( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + base: PromiseOrValue, + quote: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + base: PromiseOrValue, + quote: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + secondsAgo(overrides?: CallOverrides): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSecondsAgo( + secondsAgo_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + base: PromiseOrValue, + quote: PromiseOrValue, + source: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sourcesData( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/src/contracts/Witch.ts b/src/contracts/Witch.ts new file mode 100644 index 000000000..3093c1afc --- /dev/null +++ b/src/contracts/Witch.ts @@ -0,0 +1,1026 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface WitchInterface extends utils.Interface { + functions: { + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "auction(bytes12)": FunctionFragment; + "auctions(bytes12)": FunctionFragment; + "buy(bytes12,uint128,uint128)": FunctionFragment; + "cauldron()": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "ilks(bytes6)": FunctionFragment; + "ladle()": FunctionFragment; + "limits(bytes6)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "payAll(bytes12,uint128)": FunctionFragment; + "point(bytes32,address)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "setIlk(bytes6,uint32,uint64,uint96,uint24,uint8)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "LOCK" + | "LOCK8605463013" + | "ROOT" + | "ROOT4146650865" + | "auction" + | "auctions" + | "buy" + | "cauldron" + | "getRoleAdmin" + | "grantRole" + | "grantRoles" + | "hasRole" + | "ilks" + | "ladle" + | "limits" + | "lockRole" + | "payAll" + | "point" + | "renounceRole" + | "revokeRole" + | "revokeRoles" + | "setIlk" + | "setRoleAdmin" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "auction", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "auctions", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "buy", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData(functionFragment: "cauldron", values?: undefined): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "ilks", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "ladle", values?: undefined): string; + encodeFunctionData( + functionFragment: "limits", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "payAll", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "point", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setIlk", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "auction", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "auctions", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "buy", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "cauldron", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "ilks", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "ladle", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "limits", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "payAll", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "point", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setIlk", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + + events: { + "Auctioned(bytes12,uint256)": EventFragment; + "Bought(bytes12,address,uint256,uint256)": EventFragment; + "IlkSet(bytes6,uint32,uint64,uint96,uint24,uint8)": EventFragment; + "Point(bytes32,address)": EventFragment; + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Auctioned"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Bought"): EventFragment; + getEvent(nameOrSignatureOrTopic: "IlkSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Point"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; +} + +export interface AuctionedEventObject { + vaultId: string; + start: BigNumber; +} +export type AuctionedEvent = TypedEvent< + [string, BigNumber], + AuctionedEventObject +>; + +export type AuctionedEventFilter = TypedEventFilter; + +export interface BoughtEventObject { + vaultId: string; + buyer: string; + ink: BigNumber; + art: BigNumber; +} +export type BoughtEvent = TypedEvent< + [string, string, BigNumber, BigNumber], + BoughtEventObject +>; + +export type BoughtEventFilter = TypedEventFilter; + +export interface IlkSetEventObject { + ilkId: string; + duration: number; + initialOffer: BigNumber; + line: BigNumber; + dust: number; + dec: number; +} +export type IlkSetEvent = TypedEvent< + [string, number, BigNumber, BigNumber, number, number], + IlkSetEventObject +>; + +export type IlkSetEventFilter = TypedEventFilter; + +export interface PointEventObject { + param: string; + value: string; +} +export type PointEvent = TypedEvent<[string, string], PointEventObject>; + +export type PointEventFilter = TypedEventFilter; + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface Witch extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: WitchInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + auction( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + auctions( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string, number] & { owner: string; start: number }>; + + buy( + vaultId: PromiseOrValue, + base: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + cauldron(overrides?: CallOverrides): Promise<[string]>; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + ilks( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [number, BigNumber] & { duration: number; initialOffer: BigNumber } + >; + + ladle(overrides?: CallOverrides): Promise<[string]>; + + limits( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, number, number, BigNumber] & { + line: BigNumber; + dust: number; + dec: number; + sum: BigNumber; + } + >; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + payAll( + vaultId: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + point( + param: PromiseOrValue, + value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setIlk( + ilkId: PromiseOrValue, + duration: PromiseOrValue, + initialOffer: PromiseOrValue, + line: PromiseOrValue, + dust: PromiseOrValue, + dec: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + auction( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + auctions( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string, number] & { owner: string; start: number }>; + + buy( + vaultId: PromiseOrValue, + base: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ilks( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [number, BigNumber] & { duration: number; initialOffer: BigNumber } + >; + + ladle(overrides?: CallOverrides): Promise; + + limits( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, number, number, BigNumber] & { + line: BigNumber; + dust: number; + dec: number; + sum: BigNumber; + } + >; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + payAll( + vaultId: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + point( + param: PromiseOrValue, + value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setIlk( + ilkId: PromiseOrValue, + duration: PromiseOrValue, + initialOffer: PromiseOrValue, + line: PromiseOrValue, + dust: PromiseOrValue, + dec: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + auction( + vaultId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + auctions( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string, number] & { owner: string; start: number }>; + + buy( + vaultId: PromiseOrValue, + base: PromiseOrValue, + min: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ilks( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [number, BigNumber] & { duration: number; initialOffer: BigNumber } + >; + + ladle(overrides?: CallOverrides): Promise; + + limits( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, number, number, BigNumber] & { + line: BigNumber; + dust: number; + dec: number; + sum: BigNumber; + } + >; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + payAll( + vaultId: PromiseOrValue, + min: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + point( + param: PromiseOrValue, + value: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setIlk( + ilkId: PromiseOrValue, + duration: PromiseOrValue, + initialOffer: PromiseOrValue, + line: PromiseOrValue, + dust: PromiseOrValue, + dec: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "Auctioned(bytes12,uint256)"( + vaultId?: PromiseOrValue | null, + start?: PromiseOrValue | null + ): AuctionedEventFilter; + Auctioned( + vaultId?: PromiseOrValue | null, + start?: PromiseOrValue | null + ): AuctionedEventFilter; + + "Bought(bytes12,address,uint256,uint256)"( + vaultId?: PromiseOrValue | null, + buyer?: PromiseOrValue | null, + ink?: null, + art?: null + ): BoughtEventFilter; + Bought( + vaultId?: PromiseOrValue | null, + buyer?: PromiseOrValue | null, + ink?: null, + art?: null + ): BoughtEventFilter; + + "IlkSet(bytes6,uint32,uint64,uint96,uint24,uint8)"( + ilkId?: PromiseOrValue | null, + duration?: null, + initialOffer?: null, + line?: null, + dust?: null, + dec?: null + ): IlkSetEventFilter; + IlkSet( + ilkId?: PromiseOrValue | null, + duration?: null, + initialOffer?: null, + line?: null, + dust?: null, + dec?: null + ): IlkSetEventFilter; + + "Point(bytes32,address)"( + param?: PromiseOrValue | null, + value?: null + ): PointEventFilter; + Point( + param?: PromiseOrValue | null, + value?: null + ): PointEventFilter; + + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + }; + + estimateGas: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + auction( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + auctions( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + buy( + vaultId: PromiseOrValue, + base: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ilks( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ladle(overrides?: CallOverrides): Promise; + + limits( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + payAll( + vaultId: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + point( + param: PromiseOrValue, + value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setIlk( + ilkId: PromiseOrValue, + duration: PromiseOrValue, + initialOffer: PromiseOrValue, + line: PromiseOrValue, + dust: PromiseOrValue, + dec: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + auction( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + auctions( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + buy( + vaultId: PromiseOrValue, + base: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ilks( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ladle(overrides?: CallOverrides): Promise; + + limits( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + payAll( + vaultId: PromiseOrValue, + min: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + point( + param: PromiseOrValue, + value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setIlk( + ilkId: PromiseOrValue, + duration: PromiseOrValue, + initialOffer: PromiseOrValue, + line: PromiseOrValue, + dust: PromiseOrValue, + dec: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/contracts/WitchV2.ts b/src/contracts/WitchV2.ts new file mode 100644 index 000000000..44bf9d35d --- /dev/null +++ b/src/contracts/WitchV2.ts @@ -0,0 +1,1580 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export declare namespace DataTypes { + export type AuctionStruct = { + owner: PromiseOrValue; + start: PromiseOrValue; + baseId: PromiseOrValue; + ink: PromiseOrValue; + art: PromiseOrValue; + auctioneer: PromiseOrValue; + ilkId: PromiseOrValue; + seriesId: PromiseOrValue; + }; + + export type AuctionStructOutput = [ + string, + number, + string, + BigNumber, + BigNumber, + string, + string, + string + ] & { + owner: string; + start: number; + baseId: string; + ink: BigNumber; + art: BigNumber; + auctioneer: string; + ilkId: string; + seriesId: string; + }; + + export type VaultStruct = { + owner: PromiseOrValue; + seriesId: PromiseOrValue; + ilkId: PromiseOrValue; + }; + + export type VaultStructOutput = [string, string, string] & { + owner: string; + seriesId: string; + ilkId: string; + }; + + export type SeriesStruct = { + fyToken: PromiseOrValue; + baseId: PromiseOrValue; + maturity: PromiseOrValue; + }; + + export type SeriesStructOutput = [string, string, number] & { + fyToken: string; + baseId: string; + maturity: number; + }; +} + +export interface WitchV2Interface extends utils.Interface { + functions: { + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "ONE_HUNDRED_PERCENT()": FunctionFragment; + "ONE_PERCENT()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "auction(bytes12,address)": FunctionFragment; + "auctioneerReward()": FunctionFragment; + "auctions(bytes12)": FunctionFragment; + "calcPayout(bytes12,address,uint256)": FunctionFragment; + "cancel(bytes12)": FunctionFragment; + "cauldron()": FunctionFragment; + "clear(bytes12)": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "ladle()": FunctionFragment; + "limits(bytes6,bytes6)": FunctionFragment; + "lines(bytes6,bytes6)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "payBase(bytes12,address,uint128,uint128)": FunctionFragment; + "payFYToken(bytes12,address,uint128,uint128)": FunctionFragment; + "point(bytes32,address)": FunctionFragment; + "protected(address)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "setAuctioneerReward(uint256)": FunctionFragment; + "setLineAndLimit(bytes6,bytes6,uint32,uint64,uint64,uint128)": FunctionFragment; + "setProtected(address,bool)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "LOCK" + | "LOCK8605463013" + | "ONE_HUNDRED_PERCENT" + | "ONE_PERCENT" + | "ROOT" + | "ROOT4146650865" + | "auction" + | "auctioneerReward" + | "auctions" + | "calcPayout" + | "cancel" + | "cauldron" + | "clear" + | "getRoleAdmin" + | "grantRole" + | "grantRoles" + | "hasRole" + | "ladle" + | "limits" + | "lines" + | "lockRole" + | "payBase" + | "payFYToken" + | "point" + | "protected" + | "renounceRole" + | "revokeRole" + | "revokeRoles" + | "setAuctioneerReward" + | "setLineAndLimit" + | "setProtected" + | "setRoleAdmin" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "ONE_HUNDRED_PERCENT", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "ONE_PERCENT", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "auction", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "auctioneerReward", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "auctions", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "calcPayout", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "cancel", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "cauldron", values?: undefined): string; + encodeFunctionData( + functionFragment: "clear", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "ladle", values?: undefined): string; + encodeFunctionData( + functionFragment: "limits", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lines", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "payBase", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "payFYToken", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "point", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "protected", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setAuctioneerReward", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setLineAndLimit", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "setProtected", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "ONE_HUNDRED_PERCENT", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "ONE_PERCENT", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "auction", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "auctioneerReward", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "auctions", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "calcPayout", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "cancel", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "cauldron", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "clear", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "ladle", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "limits", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lines", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "payBase", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "payFYToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "point", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "protected", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setAuctioneerReward", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setLineAndLimit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setProtected", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + + events: { + "Auctioned(bytes12,tuple,uint256,uint256)": EventFragment; + "AuctioneerRewardSet(uint256)": EventFragment; + "Bought(bytes12,address,uint256,uint256)": EventFragment; + "Cancelled(bytes12)": EventFragment; + "Cleared(bytes12)": EventFragment; + "Ended(bytes12)": EventFragment; + "LimitSet(bytes6,bytes6,uint128)": EventFragment; + "LineSet(bytes6,bytes6,uint32,uint64,uint64)": EventFragment; + "Point(bytes32,address,address)": EventFragment; + "ProtectedSet(address,bool)": EventFragment; + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Auctioned"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AuctioneerRewardSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Bought"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Cancelled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Cleared"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Ended"): EventFragment; + getEvent(nameOrSignatureOrTopic: "LimitSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "LineSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Point"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProtectedSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; +} + +export interface AuctionedEventObject { + vaultId: string; + auction: DataTypes.AuctionStructOutput; + duration: BigNumber; + initialCollateralProportion: BigNumber; +} +export type AuctionedEvent = TypedEvent< + [string, DataTypes.AuctionStructOutput, BigNumber, BigNumber], + AuctionedEventObject +>; + +export type AuctionedEventFilter = TypedEventFilter; + +export interface AuctioneerRewardSetEventObject { + auctioneerReward: BigNumber; +} +export type AuctioneerRewardSetEvent = TypedEvent< + [BigNumber], + AuctioneerRewardSetEventObject +>; + +export type AuctioneerRewardSetEventFilter = + TypedEventFilter; + +export interface BoughtEventObject { + vaultId: string; + buyer: string; + ink: BigNumber; + art: BigNumber; +} +export type BoughtEvent = TypedEvent< + [string, string, BigNumber, BigNumber], + BoughtEventObject +>; + +export type BoughtEventFilter = TypedEventFilter; + +export interface CancelledEventObject { + vaultId: string; +} +export type CancelledEvent = TypedEvent<[string], CancelledEventObject>; + +export type CancelledEventFilter = TypedEventFilter; + +export interface ClearedEventObject { + vaultId: string; +} +export type ClearedEvent = TypedEvent<[string], ClearedEventObject>; + +export type ClearedEventFilter = TypedEventFilter; + +export interface EndedEventObject { + vaultId: string; +} +export type EndedEvent = TypedEvent<[string], EndedEventObject>; + +export type EndedEventFilter = TypedEventFilter; + +export interface LimitSetEventObject { + ilkId: string; + baseId: string; + max: BigNumber; +} +export type LimitSetEvent = TypedEvent< + [string, string, BigNumber], + LimitSetEventObject +>; + +export type LimitSetEventFilter = TypedEventFilter; + +export interface LineSetEventObject { + ilkId: string; + baseId: string; + duration: number; + vaultProportion: BigNumber; + collateralProportion: BigNumber; +} +export type LineSetEvent = TypedEvent< + [string, string, number, BigNumber, BigNumber], + LineSetEventObject +>; + +export type LineSetEventFilter = TypedEventFilter; + +export interface PointEventObject { + param: string; + oldValue: string; + newValue: string; +} +export type PointEvent = TypedEvent<[string, string, string], PointEventObject>; + +export type PointEventFilter = TypedEventFilter; + +export interface ProtectedSetEventObject { + value: string; + protected: boolean; +} +export type ProtectedSetEvent = TypedEvent< + [string, boolean], + ProtectedSetEventObject +>; + +export type ProtectedSetEventFilter = TypedEventFilter; + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface WitchV2 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: WitchV2Interface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + ONE_HUNDRED_PERCENT(overrides?: CallOverrides): Promise<[BigNumber]>; + + ONE_PERCENT(overrides?: CallOverrides): Promise<[BigNumber]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + auction( + vaultId: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + auctioneerReward(overrides?: CallOverrides): Promise<[BigNumber]>; + + auctions( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, number, string, BigNumber, BigNumber, string, string, string] & { + owner: string; + start: number; + baseId: string; + ink: BigNumber; + art: BigNumber; + auctioneer: string; + ilkId: string; + seriesId: string; + } + >; + + calcPayout( + vaultId: PromiseOrValue, + to: PromiseOrValue, + maxArtIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + liquidatorCut: BigNumber; + auctioneerCut: BigNumber; + artIn: BigNumber; + } + >; + + cancel( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + cauldron(overrides?: CallOverrides): Promise<[string]>; + + clear( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + ladle(overrides?: CallOverrides): Promise<[string]>; + + limits( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber, BigNumber] & { max: BigNumber; sum: BigNumber }>; + + lines( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [number, BigNumber, BigNumber] & { + duration: number; + vaultProportion: BigNumber; + collateralProportion: BigNumber; + } + >; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + payBase( + vaultId: PromiseOrValue, + to: PromiseOrValue, + minInkOut: PromiseOrValue, + maxBaseIn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + payFYToken( + vaultId: PromiseOrValue, + to: PromiseOrValue, + minInkOut: PromiseOrValue, + maxArtIn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + point( + param: PromiseOrValue, + value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + protected( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setAuctioneerReward( + auctioneerReward_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setLineAndLimit( + ilkId: PromiseOrValue, + baseId: PromiseOrValue, + duration: PromiseOrValue, + vaultProportion: PromiseOrValue, + collateralProportion: PromiseOrValue, + max: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setProtected( + owner: PromiseOrValue, + _protected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ONE_HUNDRED_PERCENT(overrides?: CallOverrides): Promise; + + ONE_PERCENT(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + auction( + vaultId: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + auctioneerReward(overrides?: CallOverrides): Promise; + + auctions( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, number, string, BigNumber, BigNumber, string, string, string] & { + owner: string; + start: number; + baseId: string; + ink: BigNumber; + art: BigNumber; + auctioneer: string; + ilkId: string; + seriesId: string; + } + >; + + calcPayout( + vaultId: PromiseOrValue, + to: PromiseOrValue, + maxArtIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + liquidatorCut: BigNumber; + auctioneerCut: BigNumber; + artIn: BigNumber; + } + >; + + cancel( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + clear( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ladle(overrides?: CallOverrides): Promise; + + limits( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber, BigNumber] & { max: BigNumber; sum: BigNumber }>; + + lines( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [number, BigNumber, BigNumber] & { + duration: number; + vaultProportion: BigNumber; + collateralProportion: BigNumber; + } + >; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + payBase( + vaultId: PromiseOrValue, + to: PromiseOrValue, + minInkOut: PromiseOrValue, + maxBaseIn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + payFYToken( + vaultId: PromiseOrValue, + to: PromiseOrValue, + minInkOut: PromiseOrValue, + maxArtIn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + point( + param: PromiseOrValue, + value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + protected( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setAuctioneerReward( + auctioneerReward_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setLineAndLimit( + ilkId: PromiseOrValue, + baseId: PromiseOrValue, + duration: PromiseOrValue, + vaultProportion: PromiseOrValue, + collateralProportion: PromiseOrValue, + max: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setProtected( + owner: PromiseOrValue, + _protected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ONE_HUNDRED_PERCENT(overrides?: CallOverrides): Promise; + + ONE_PERCENT(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + auction( + vaultId: PromiseOrValue, + to: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [ + DataTypes.AuctionStructOutput, + DataTypes.VaultStructOutput, + DataTypes.SeriesStructOutput + ] & { + auction_: DataTypes.AuctionStructOutput; + vault: DataTypes.VaultStructOutput; + series: DataTypes.SeriesStructOutput; + } + >; + + auctioneerReward(overrides?: CallOverrides): Promise; + + auctions( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, number, string, BigNumber, BigNumber, string, string, string] & { + owner: string; + start: number; + baseId: string; + ink: BigNumber; + art: BigNumber; + auctioneer: string; + ilkId: string; + seriesId: string; + } + >; + + calcPayout( + vaultId: PromiseOrValue, + to: PromiseOrValue, + maxArtIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + liquidatorCut: BigNumber; + auctioneerCut: BigNumber; + artIn: BigNumber; + } + >; + + cancel( + vaultId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + clear( + vaultId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ladle(overrides?: CallOverrides): Promise; + + limits( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber, BigNumber] & { max: BigNumber; sum: BigNumber }>; + + lines( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [number, BigNumber, BigNumber] & { + duration: number; + vaultProportion: BigNumber; + collateralProportion: BigNumber; + } + >; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + payBase( + vaultId: PromiseOrValue, + to: PromiseOrValue, + minInkOut: PromiseOrValue, + maxBaseIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + liquidatorCut: BigNumber; + auctioneerCut: BigNumber; + baseIn: BigNumber; + } + >; + + payFYToken( + vaultId: PromiseOrValue, + to: PromiseOrValue, + minInkOut: PromiseOrValue, + maxArtIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + liquidatorCut: BigNumber; + auctioneerCut: BigNumber; + artIn: BigNumber; + } + >; + + point( + param: PromiseOrValue, + value: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + protected( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setAuctioneerReward( + auctioneerReward_: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setLineAndLimit( + ilkId: PromiseOrValue, + baseId: PromiseOrValue, + duration: PromiseOrValue, + vaultProportion: PromiseOrValue, + collateralProportion: PromiseOrValue, + max: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setProtected( + owner: PromiseOrValue, + _protected: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "Auctioned(bytes12,tuple,uint256,uint256)"( + vaultId?: PromiseOrValue | null, + auction?: null, + duration?: null, + initialCollateralProportion?: null + ): AuctionedEventFilter; + Auctioned( + vaultId?: PromiseOrValue | null, + auction?: null, + duration?: null, + initialCollateralProportion?: null + ): AuctionedEventFilter; + + "AuctioneerRewardSet(uint256)"( + auctioneerReward?: null + ): AuctioneerRewardSetEventFilter; + AuctioneerRewardSet( + auctioneerReward?: null + ): AuctioneerRewardSetEventFilter; + + "Bought(bytes12,address,uint256,uint256)"( + vaultId?: PromiseOrValue | null, + buyer?: PromiseOrValue | null, + ink?: null, + art?: null + ): BoughtEventFilter; + Bought( + vaultId?: PromiseOrValue | null, + buyer?: PromiseOrValue | null, + ink?: null, + art?: null + ): BoughtEventFilter; + + "Cancelled(bytes12)"( + vaultId?: PromiseOrValue | null + ): CancelledEventFilter; + Cancelled(vaultId?: PromiseOrValue | null): CancelledEventFilter; + + "Cleared(bytes12)"( + vaultId?: PromiseOrValue | null + ): ClearedEventFilter; + Cleared(vaultId?: PromiseOrValue | null): ClearedEventFilter; + + "Ended(bytes12)"( + vaultId?: PromiseOrValue | null + ): EndedEventFilter; + Ended(vaultId?: PromiseOrValue | null): EndedEventFilter; + + "LimitSet(bytes6,bytes6,uint128)"( + ilkId?: PromiseOrValue | null, + baseId?: PromiseOrValue | null, + max?: null + ): LimitSetEventFilter; + LimitSet( + ilkId?: PromiseOrValue | null, + baseId?: PromiseOrValue | null, + max?: null + ): LimitSetEventFilter; + + "LineSet(bytes6,bytes6,uint32,uint64,uint64)"( + ilkId?: PromiseOrValue | null, + baseId?: PromiseOrValue | null, + duration?: null, + vaultProportion?: null, + collateralProportion?: null + ): LineSetEventFilter; + LineSet( + ilkId?: PromiseOrValue | null, + baseId?: PromiseOrValue | null, + duration?: null, + vaultProportion?: null, + collateralProportion?: null + ): LineSetEventFilter; + + "Point(bytes32,address,address)"( + param?: PromiseOrValue | null, + oldValue?: PromiseOrValue | null, + newValue?: PromiseOrValue | null + ): PointEventFilter; + Point( + param?: PromiseOrValue | null, + oldValue?: PromiseOrValue | null, + newValue?: PromiseOrValue | null + ): PointEventFilter; + + "ProtectedSet(address,bool)"( + value?: PromiseOrValue | null, + protected?: null + ): ProtectedSetEventFilter; + ProtectedSet( + value?: PromiseOrValue | null, + protected?: null + ): ProtectedSetEventFilter; + + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + }; + + estimateGas: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ONE_HUNDRED_PERCENT(overrides?: CallOverrides): Promise; + + ONE_PERCENT(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + auction( + vaultId: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + auctioneerReward(overrides?: CallOverrides): Promise; + + auctions( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + calcPayout( + vaultId: PromiseOrValue, + to: PromiseOrValue, + maxArtIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + cancel( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + clear( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ladle(overrides?: CallOverrides): Promise; + + limits( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lines( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + payBase( + vaultId: PromiseOrValue, + to: PromiseOrValue, + minInkOut: PromiseOrValue, + maxBaseIn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + payFYToken( + vaultId: PromiseOrValue, + to: PromiseOrValue, + minInkOut: PromiseOrValue, + maxArtIn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + point( + param: PromiseOrValue, + value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + protected( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setAuctioneerReward( + auctioneerReward_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setLineAndLimit( + ilkId: PromiseOrValue, + baseId: PromiseOrValue, + duration: PromiseOrValue, + vaultProportion: PromiseOrValue, + collateralProportion: PromiseOrValue, + max: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setProtected( + owner: PromiseOrValue, + _protected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ONE_HUNDRED_PERCENT( + overrides?: CallOverrides + ): Promise; + + ONE_PERCENT(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + auction( + vaultId: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + auctioneerReward(overrides?: CallOverrides): Promise; + + auctions( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + calcPayout( + vaultId: PromiseOrValue, + to: PromiseOrValue, + maxArtIn: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + cancel( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + clear( + vaultId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ladle(overrides?: CallOverrides): Promise; + + limits( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lines( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + payBase( + vaultId: PromiseOrValue, + to: PromiseOrValue, + minInkOut: PromiseOrValue, + maxBaseIn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + payFYToken( + vaultId: PromiseOrValue, + to: PromiseOrValue, + minInkOut: PromiseOrValue, + maxArtIn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + point( + param: PromiseOrValue, + value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + protected( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setAuctioneerReward( + auctioneerReward_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setLineAndLimit( + ilkId: PromiseOrValue, + baseId: PromiseOrValue, + duration: PromiseOrValue, + vaultProportion: PromiseOrValue, + collateralProportion: PromiseOrValue, + max: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setProtected( + owner: PromiseOrValue, + _protected: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/contracts/WrapEtherModule.ts b/src/contracts/WrapEtherModule.ts new file mode 100644 index 000000000..69d5e2d74 --- /dev/null +++ b/src/contracts/WrapEtherModule.ts @@ -0,0 +1,459 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface WrapEtherModuleInterface extends utils.Interface { + functions: { + "borrowingFee()": FunctionFragment; + "cauldron()": FunctionFragment; + "integrations(address)": FunctionFragment; + "joins(bytes6)": FunctionFragment; + "modules(address)": FunctionFragment; + "pools(bytes6)": FunctionFragment; + "router()": FunctionFragment; + "tokens(address)": FunctionFragment; + "weth()": FunctionFragment; + "wrap(address,uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "borrowingFee" + | "cauldron" + | "integrations" + | "joins" + | "modules" + | "pools" + | "router" + | "tokens" + | "weth" + | "wrap" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "borrowingFee", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "cauldron", values?: undefined): string; + encodeFunctionData( + functionFragment: "integrations", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "joins", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "modules", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "pools", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "router", values?: undefined): string; + encodeFunctionData( + functionFragment: "tokens", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "weth", values?: undefined): string; + encodeFunctionData( + functionFragment: "wrap", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult( + functionFragment: "borrowingFee", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "cauldron", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "integrations", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "joins", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "modules", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pools", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "tokens", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "weth", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "wrap", data: BytesLike): Result; + + events: { + "FeeSet(uint256)": EventFragment; + "IntegrationAdded(address,bool)": EventFragment; + "JoinAdded(bytes6,address)": EventFragment; + "ModuleAdded(address,bool)": EventFragment; + "PoolAdded(bytes6,address)": EventFragment; + "TokenAdded(address,bool)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "FeeSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "IntegrationAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "JoinAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ModuleAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PoolAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TokenAdded"): EventFragment; +} + +export interface FeeSetEventObject { + fee: BigNumber; +} +export type FeeSetEvent = TypedEvent<[BigNumber], FeeSetEventObject>; + +export type FeeSetEventFilter = TypedEventFilter; + +export interface IntegrationAddedEventObject { + integration: string; + set: boolean; +} +export type IntegrationAddedEvent = TypedEvent< + [string, boolean], + IntegrationAddedEventObject +>; + +export type IntegrationAddedEventFilter = + TypedEventFilter; + +export interface JoinAddedEventObject { + assetId: string; + join: string; +} +export type JoinAddedEvent = TypedEvent<[string, string], JoinAddedEventObject>; + +export type JoinAddedEventFilter = TypedEventFilter; + +export interface ModuleAddedEventObject { + module: string; + set: boolean; +} +export type ModuleAddedEvent = TypedEvent< + [string, boolean], + ModuleAddedEventObject +>; + +export type ModuleAddedEventFilter = TypedEventFilter; + +export interface PoolAddedEventObject { + seriesId: string; + pool: string; +} +export type PoolAddedEvent = TypedEvent<[string, string], PoolAddedEventObject>; + +export type PoolAddedEventFilter = TypedEventFilter; + +export interface TokenAddedEventObject { + token: string; + set: boolean; +} +export type TokenAddedEvent = TypedEvent< + [string, boolean], + TokenAddedEventObject +>; + +export type TokenAddedEventFilter = TypedEventFilter; + +export interface WrapEtherModule extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: WrapEtherModuleInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + borrowingFee(overrides?: CallOverrides): Promise<[BigNumber]>; + + cauldron(overrides?: CallOverrides): Promise<[string]>; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + router(overrides?: CallOverrides): Promise<[string]>; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + weth(overrides?: CallOverrides): Promise<[string]>; + + wrap( + receiver: PromiseOrValue, + wad: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + weth(overrides?: CallOverrides): Promise; + + wrap( + receiver: PromiseOrValue, + wad: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + weth(overrides?: CallOverrides): Promise; + + wrap( + receiver: PromiseOrValue, + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "FeeSet(uint256)"(fee?: null): FeeSetEventFilter; + FeeSet(fee?: null): FeeSetEventFilter; + + "IntegrationAdded(address,bool)"( + integration?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): IntegrationAddedEventFilter; + IntegrationAdded( + integration?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): IntegrationAddedEventFilter; + + "JoinAdded(bytes6,address)"( + assetId?: PromiseOrValue | null, + join?: PromiseOrValue | null + ): JoinAddedEventFilter; + JoinAdded( + assetId?: PromiseOrValue | null, + join?: PromiseOrValue | null + ): JoinAddedEventFilter; + + "ModuleAdded(address,bool)"( + module?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): ModuleAddedEventFilter; + ModuleAdded( + module?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): ModuleAddedEventFilter; + + "PoolAdded(bytes6,address)"( + seriesId?: PromiseOrValue | null, + pool?: PromiseOrValue | null + ): PoolAddedEventFilter; + PoolAdded( + seriesId?: PromiseOrValue | null, + pool?: PromiseOrValue | null + ): PoolAddedEventFilter; + + "TokenAdded(address,bool)"( + token?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): TokenAddedEventFilter; + TokenAdded( + token?: PromiseOrValue | null, + set?: PromiseOrValue | null + ): TokenAddedEventFilter; + }; + + estimateGas: { + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + weth(overrides?: CallOverrides): Promise; + + wrap( + receiver: PromiseOrValue, + wad: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + borrowingFee(overrides?: CallOverrides): Promise; + + cauldron(overrides?: CallOverrides): Promise; + + integrations( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + joins( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + modules( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + pools( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + router(overrides?: CallOverrides): Promise; + + tokens( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + weth(overrides?: CallOverrides): Promise; + + wrap( + receiver: PromiseOrValue, + wad: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/contracts/YearnVaultMultiOracle.ts b/src/contracts/YearnVaultMultiOracle.ts new file mode 100644 index 000000000..daf6515c9 --- /dev/null +++ b/src/contracts/YearnVaultMultiOracle.ts @@ -0,0 +1,785 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface YearnVaultMultiOracleInterface extends utils.Interface { + functions: { + "LOCK()": FunctionFragment; + "LOCK8605463013()": FunctionFragment; + "ROOT()": FunctionFragment; + "ROOT4146650865()": FunctionFragment; + "get(bytes32,bytes32,uint256)": FunctionFragment; + "getRoleAdmin(bytes4)": FunctionFragment; + "grantRole(bytes4,address)": FunctionFragment; + "grantRoles(bytes4[],address)": FunctionFragment; + "hasRole(bytes4,address)": FunctionFragment; + "lockRole(bytes4)": FunctionFragment; + "peek(bytes32,bytes32,uint256)": FunctionFragment; + "renounceRole(bytes4,address)": FunctionFragment; + "revokeRole(bytes4,address)": FunctionFragment; + "revokeRoles(bytes4[],address)": FunctionFragment; + "setRoleAdmin(bytes4,bytes4)": FunctionFragment; + "setSource(bytes6,bytes6,address)": FunctionFragment; + "sources(bytes6,bytes6)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "LOCK" + | "LOCK8605463013" + | "ROOT" + | "ROOT4146650865" + | "get" + | "getRoleAdmin" + | "grantRole" + | "grantRoles" + | "hasRole" + | "lockRole" + | "peek" + | "renounceRole" + | "revokeRole" + | "revokeRoles" + | "setRoleAdmin" + | "setSource" + | "sources" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; + encodeFunctionData( + functionFragment: "LOCK8605463013", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; + encodeFunctionData( + functionFragment: "ROOT4146650865", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "get", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "grantRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "lockRole", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "peek", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "revokeRoles", + values: [PromiseOrValue[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setRoleAdmin", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setSource", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "sources", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "LOCK8605463013", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT4146650865", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "get", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "peek", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeRoles", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setSource", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "sources", data: BytesLike): Result; + + events: { + "RoleAdminChanged(bytes4,bytes4)": EventFragment; + "RoleGranted(bytes4,address,address)": EventFragment; + "RoleRevoked(bytes4,address,address)": EventFragment; + "SourceSet(bytes6,bytes6,address,uint8)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SourceSet"): EventFragment; +} + +export interface RoleAdminChangedEventObject { + role: string; + newAdminRole: string; +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string], + RoleAdminChangedEventObject +>; + +export type RoleAdminChangedEventFilter = + TypedEventFilter; + +export interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +>; + +export type RoleGrantedEventFilter = TypedEventFilter; + +export interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +>; + +export type RoleRevokedEventFilter = TypedEventFilter; + +export interface SourceSetEventObject { + baseId: string; + quoteId: string; + source: string; + decimals: number; +} +export type SourceSetEvent = TypedEvent< + [string, string, string, number], + SourceSetEventObject +>; + +export type SourceSetEventFilter = TypedEventFilter; + +export interface YearnVaultMultiOracle extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: YearnVaultMultiOracleInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + LOCK(overrides?: CallOverrides): Promise<[string]>; + + LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; + + ROOT(overrides?: CallOverrides): Promise<[string]>; + + ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + vaultTokenId: PromiseOrValue, + underlyingId: PromiseOrValue, + vaultToken: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, number, boolean] & { + source: string; + decimals: number; + inverse: boolean; + } + >; + }; + + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + vaultTokenId: PromiseOrValue, + underlyingId: PromiseOrValue, + vaultToken: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, number, boolean] & { + source: string; + decimals: number; + inverse: boolean; + } + >; + + callStatic: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amountQuote: BigNumber; updateTime: BigNumber } + >; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setSource( + vaultTokenId: PromiseOrValue, + underlyingId: PromiseOrValue, + vaultToken: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, number, boolean] & { + source: string; + decimals: number; + inverse: boolean; + } + >; + }; + + filters: { + "RoleAdminChanged(bytes4,bytes4)"( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + RoleAdminChanged( + role?: PromiseOrValue | null, + newAdminRole?: PromiseOrValue | null + ): RoleAdminChangedEventFilter; + + "RoleGranted(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + RoleGranted( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleGrantedEventFilter; + + "RoleRevoked(bytes4,address,address)"( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + RoleRevoked( + role?: PromiseOrValue | null, + account?: PromiseOrValue | null, + sender?: PromiseOrValue | null + ): RoleRevokedEventFilter; + + "SourceSet(bytes6,bytes6,address,uint8)"( + baseId?: PromiseOrValue | null, + quoteId?: PromiseOrValue | null, + source?: PromiseOrValue | null, + decimals?: null + ): SourceSetEventFilter; + SourceSet( + baseId?: PromiseOrValue | null, + quoteId?: PromiseOrValue | null, + source?: PromiseOrValue | null, + decimals?: null + ): SourceSetEventFilter; + }; + + estimateGas: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + vaultTokenId: PromiseOrValue, + underlyingId: PromiseOrValue, + vaultToken: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + LOCK(overrides?: CallOverrides): Promise; + + LOCK8605463013(overrides?: CallOverrides): Promise; + + ROOT(overrides?: CallOverrides): Promise; + + ROOT4146650865(overrides?: CallOverrides): Promise; + + get( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getRoleAdmin( + role: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + grantRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + lockRole( + role: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + peek( + baseId: PromiseOrValue, + quoteId: PromiseOrValue, + amountBase: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRole( + role: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + revokeRoles( + roles: PromiseOrValue[], + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setRoleAdmin( + role: PromiseOrValue, + adminRole: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setSource( + vaultTokenId: PromiseOrValue, + underlyingId: PromiseOrValue, + vaultToken: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sources( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/src/contracts/common.ts b/src/contracts/common.ts new file mode 100644 index 000000000..4c90b08bb --- /dev/null +++ b/src/contracts/common.ts @@ -0,0 +1,46 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { Listener } from "@ethersproject/providers"; +import type { Event, EventFilter } from "ethers"; + +export interface TypedEvent< + TArgsArray extends Array = any, + TArgsObject = any +> extends Event { + args: TArgsArray & TArgsObject; +} + +export interface TypedEventFilter<_TEvent extends TypedEvent> + extends EventFilter {} + +export interface TypedListener { + (...listenerArg: [...__TypechainArgsArray, TEvent]): void; +} + +type __TypechainArgsArray = T extends TypedEvent ? U : never; + +export interface OnEvent { + ( + eventFilter: TypedEventFilter, + listener: TypedListener + ): TRes; + (eventName: string, listener: Listener): TRes; +} + +export type MinEthersFactory = { + deploy(...a: ARGS[]): Promise; +}; + +export type GetContractTypeFromFactory = F extends MinEthersFactory< + infer C, + any +> + ? C + : never; + +export type GetARGsTypeFromFactory = F extends MinEthersFactory + ? Parameters + : never; + +export type PromiseOrValue = T | Promise; From 263ceba06fc476c841af65d267f1b2de8b8f272b Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Thu, 1 Jun 2023 15:05:55 +0100 Subject: [PATCH 28/51] remove witchv2 ts only --- src/contracts/WitchV2.ts | 1580 -------------------------------------- 1 file changed, 1580 deletions(-) delete mode 100644 src/contracts/WitchV2.ts diff --git a/src/contracts/WitchV2.ts b/src/contracts/WitchV2.ts deleted file mode 100644 index 44bf9d35d..000000000 --- a/src/contracts/WitchV2.ts +++ /dev/null @@ -1,1580 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "./common"; - -export declare namespace DataTypes { - export type AuctionStruct = { - owner: PromiseOrValue; - start: PromiseOrValue; - baseId: PromiseOrValue; - ink: PromiseOrValue; - art: PromiseOrValue; - auctioneer: PromiseOrValue; - ilkId: PromiseOrValue; - seriesId: PromiseOrValue; - }; - - export type AuctionStructOutput = [ - string, - number, - string, - BigNumber, - BigNumber, - string, - string, - string - ] & { - owner: string; - start: number; - baseId: string; - ink: BigNumber; - art: BigNumber; - auctioneer: string; - ilkId: string; - seriesId: string; - }; - - export type VaultStruct = { - owner: PromiseOrValue; - seriesId: PromiseOrValue; - ilkId: PromiseOrValue; - }; - - export type VaultStructOutput = [string, string, string] & { - owner: string; - seriesId: string; - ilkId: string; - }; - - export type SeriesStruct = { - fyToken: PromiseOrValue; - baseId: PromiseOrValue; - maturity: PromiseOrValue; - }; - - export type SeriesStructOutput = [string, string, number] & { - fyToken: string; - baseId: string; - maturity: number; - }; -} - -export interface WitchV2Interface extends utils.Interface { - functions: { - "LOCK()": FunctionFragment; - "LOCK8605463013()": FunctionFragment; - "ONE_HUNDRED_PERCENT()": FunctionFragment; - "ONE_PERCENT()": FunctionFragment; - "ROOT()": FunctionFragment; - "ROOT4146650865()": FunctionFragment; - "auction(bytes12,address)": FunctionFragment; - "auctioneerReward()": FunctionFragment; - "auctions(bytes12)": FunctionFragment; - "calcPayout(bytes12,address,uint256)": FunctionFragment; - "cancel(bytes12)": FunctionFragment; - "cauldron()": FunctionFragment; - "clear(bytes12)": FunctionFragment; - "getRoleAdmin(bytes4)": FunctionFragment; - "grantRole(bytes4,address)": FunctionFragment; - "grantRoles(bytes4[],address)": FunctionFragment; - "hasRole(bytes4,address)": FunctionFragment; - "ladle()": FunctionFragment; - "limits(bytes6,bytes6)": FunctionFragment; - "lines(bytes6,bytes6)": FunctionFragment; - "lockRole(bytes4)": FunctionFragment; - "payBase(bytes12,address,uint128,uint128)": FunctionFragment; - "payFYToken(bytes12,address,uint128,uint128)": FunctionFragment; - "point(bytes32,address)": FunctionFragment; - "protected(address)": FunctionFragment; - "renounceRole(bytes4,address)": FunctionFragment; - "revokeRole(bytes4,address)": FunctionFragment; - "revokeRoles(bytes4[],address)": FunctionFragment; - "setAuctioneerReward(uint256)": FunctionFragment; - "setLineAndLimit(bytes6,bytes6,uint32,uint64,uint64,uint128)": FunctionFragment; - "setProtected(address,bool)": FunctionFragment; - "setRoleAdmin(bytes4,bytes4)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "LOCK" - | "LOCK8605463013" - | "ONE_HUNDRED_PERCENT" - | "ONE_PERCENT" - | "ROOT" - | "ROOT4146650865" - | "auction" - | "auctioneerReward" - | "auctions" - | "calcPayout" - | "cancel" - | "cauldron" - | "clear" - | "getRoleAdmin" - | "grantRole" - | "grantRoles" - | "hasRole" - | "ladle" - | "limits" - | "lines" - | "lockRole" - | "payBase" - | "payFYToken" - | "point" - | "protected" - | "renounceRole" - | "revokeRole" - | "revokeRoles" - | "setAuctioneerReward" - | "setLineAndLimit" - | "setProtected" - | "setRoleAdmin" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "LOCK", values?: undefined): string; - encodeFunctionData( - functionFragment: "LOCK8605463013", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "ONE_HUNDRED_PERCENT", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "ONE_PERCENT", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "ROOT", values?: undefined): string; - encodeFunctionData( - functionFragment: "ROOT4146650865", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "auction", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "auctioneerReward", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "auctions", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "calcPayout", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "cancel", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "cauldron", values?: undefined): string; - encodeFunctionData( - functionFragment: "clear", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "getRoleAdmin", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "grantRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "hasRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "ladle", values?: undefined): string; - encodeFunctionData( - functionFragment: "limits", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "lines", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "lockRole", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "payBase", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "payFYToken", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "point", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "protected", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "renounceRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRole", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "revokeRoles", - values: [PromiseOrValue[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setAuctioneerReward", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setLineAndLimit", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "setProtected", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setRoleAdmin", - values: [PromiseOrValue, PromiseOrValue] - ): string; - - decodeFunctionResult(functionFragment: "LOCK", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "LOCK8605463013", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "ONE_HUNDRED_PERCENT", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "ONE_PERCENT", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "ROOT", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "ROOT4146650865", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "auction", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "auctioneerReward", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "auctions", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "calcPayout", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cancel", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "cauldron", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "clear", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getRoleAdmin", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "ladle", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "limits", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lines", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "lockRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "payBase", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "payFYToken", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "point", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "protected", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "renounceRole", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "revokeRoles", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setAuctioneerReward", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setLineAndLimit", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setProtected", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setRoleAdmin", - data: BytesLike - ): Result; - - events: { - "Auctioned(bytes12,tuple,uint256,uint256)": EventFragment; - "AuctioneerRewardSet(uint256)": EventFragment; - "Bought(bytes12,address,uint256,uint256)": EventFragment; - "Cancelled(bytes12)": EventFragment; - "Cleared(bytes12)": EventFragment; - "Ended(bytes12)": EventFragment; - "LimitSet(bytes6,bytes6,uint128)": EventFragment; - "LineSet(bytes6,bytes6,uint32,uint64,uint64)": EventFragment; - "Point(bytes32,address,address)": EventFragment; - "ProtectedSet(address,bool)": EventFragment; - "RoleAdminChanged(bytes4,bytes4)": EventFragment; - "RoleGranted(bytes4,address,address)": EventFragment; - "RoleRevoked(bytes4,address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Auctioned"): EventFragment; - getEvent(nameOrSignatureOrTopic: "AuctioneerRewardSet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Bought"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Cancelled"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Cleared"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Ended"): EventFragment; - getEvent(nameOrSignatureOrTopic: "LimitSet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "LineSet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Point"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ProtectedSet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; -} - -export interface AuctionedEventObject { - vaultId: string; - auction: DataTypes.AuctionStructOutput; - duration: BigNumber; - initialCollateralProportion: BigNumber; -} -export type AuctionedEvent = TypedEvent< - [string, DataTypes.AuctionStructOutput, BigNumber, BigNumber], - AuctionedEventObject ->; - -export type AuctionedEventFilter = TypedEventFilter; - -export interface AuctioneerRewardSetEventObject { - auctioneerReward: BigNumber; -} -export type AuctioneerRewardSetEvent = TypedEvent< - [BigNumber], - AuctioneerRewardSetEventObject ->; - -export type AuctioneerRewardSetEventFilter = - TypedEventFilter; - -export interface BoughtEventObject { - vaultId: string; - buyer: string; - ink: BigNumber; - art: BigNumber; -} -export type BoughtEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - BoughtEventObject ->; - -export type BoughtEventFilter = TypedEventFilter; - -export interface CancelledEventObject { - vaultId: string; -} -export type CancelledEvent = TypedEvent<[string], CancelledEventObject>; - -export type CancelledEventFilter = TypedEventFilter; - -export interface ClearedEventObject { - vaultId: string; -} -export type ClearedEvent = TypedEvent<[string], ClearedEventObject>; - -export type ClearedEventFilter = TypedEventFilter; - -export interface EndedEventObject { - vaultId: string; -} -export type EndedEvent = TypedEvent<[string], EndedEventObject>; - -export type EndedEventFilter = TypedEventFilter; - -export interface LimitSetEventObject { - ilkId: string; - baseId: string; - max: BigNumber; -} -export type LimitSetEvent = TypedEvent< - [string, string, BigNumber], - LimitSetEventObject ->; - -export type LimitSetEventFilter = TypedEventFilter; - -export interface LineSetEventObject { - ilkId: string; - baseId: string; - duration: number; - vaultProportion: BigNumber; - collateralProportion: BigNumber; -} -export type LineSetEvent = TypedEvent< - [string, string, number, BigNumber, BigNumber], - LineSetEventObject ->; - -export type LineSetEventFilter = TypedEventFilter; - -export interface PointEventObject { - param: string; - oldValue: string; - newValue: string; -} -export type PointEvent = TypedEvent<[string, string, string], PointEventObject>; - -export type PointEventFilter = TypedEventFilter; - -export interface ProtectedSetEventObject { - value: string; - protected: boolean; -} -export type ProtectedSetEvent = TypedEvent< - [string, boolean], - ProtectedSetEventObject ->; - -export type ProtectedSetEventFilter = TypedEventFilter; - -export interface RoleAdminChangedEventObject { - role: string; - newAdminRole: string; -} -export type RoleAdminChangedEvent = TypedEvent< - [string, string], - RoleAdminChangedEventObject ->; - -export type RoleAdminChangedEventFilter = - TypedEventFilter; - -export interface RoleGrantedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleGrantedEvent = TypedEvent< - [string, string, string], - RoleGrantedEventObject ->; - -export type RoleGrantedEventFilter = TypedEventFilter; - -export interface RoleRevokedEventObject { - role: string; - account: string; - sender: string; -} -export type RoleRevokedEvent = TypedEvent< - [string, string, string], - RoleRevokedEventObject ->; - -export type RoleRevokedEventFilter = TypedEventFilter; - -export interface WitchV2 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: WitchV2Interface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - LOCK(overrides?: CallOverrides): Promise<[string]>; - - LOCK8605463013(overrides?: CallOverrides): Promise<[string]>; - - ONE_HUNDRED_PERCENT(overrides?: CallOverrides): Promise<[BigNumber]>; - - ONE_PERCENT(overrides?: CallOverrides): Promise<[BigNumber]>; - - ROOT(overrides?: CallOverrides): Promise<[string]>; - - ROOT4146650865(overrides?: CallOverrides): Promise<[string]>; - - auction( - vaultId: PromiseOrValue, - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - auctioneerReward(overrides?: CallOverrides): Promise<[BigNumber]>; - - auctions( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [string, number, string, BigNumber, BigNumber, string, string, string] & { - owner: string; - start: number; - baseId: string; - ink: BigNumber; - art: BigNumber; - auctioneer: string; - ilkId: string; - seriesId: string; - } - >; - - calcPayout( - vaultId: PromiseOrValue, - to: PromiseOrValue, - maxArtIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - liquidatorCut: BigNumber; - auctioneerCut: BigNumber; - artIn: BigNumber; - } - >; - - cancel( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - cauldron(overrides?: CallOverrides): Promise<[string]>; - - clear( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - ladle(overrides?: CallOverrides): Promise<[string]>; - - limits( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber, BigNumber] & { max: BigNumber; sum: BigNumber }>; - - lines( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [number, BigNumber, BigNumber] & { - duration: number; - vaultProportion: BigNumber; - collateralProportion: BigNumber; - } - >; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - payBase( - vaultId: PromiseOrValue, - to: PromiseOrValue, - minInkOut: PromiseOrValue, - maxBaseIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - payFYToken( - vaultId: PromiseOrValue, - to: PromiseOrValue, - minInkOut: PromiseOrValue, - maxArtIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - point( - param: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - protected( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setAuctioneerReward( - auctioneerReward_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLineAndLimit( - ilkId: PromiseOrValue, - baseId: PromiseOrValue, - duration: PromiseOrValue, - vaultProportion: PromiseOrValue, - collateralProportion: PromiseOrValue, - max: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setProtected( - owner: PromiseOrValue, - _protected: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ONE_HUNDRED_PERCENT(overrides?: CallOverrides): Promise; - - ONE_PERCENT(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - auction( - vaultId: PromiseOrValue, - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - auctioneerReward(overrides?: CallOverrides): Promise; - - auctions( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [string, number, string, BigNumber, BigNumber, string, string, string] & { - owner: string; - start: number; - baseId: string; - ink: BigNumber; - art: BigNumber; - auctioneer: string; - ilkId: string; - seriesId: string; - } - >; - - calcPayout( - vaultId: PromiseOrValue, - to: PromiseOrValue, - maxArtIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - liquidatorCut: BigNumber; - auctioneerCut: BigNumber; - artIn: BigNumber; - } - >; - - cancel( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - clear( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ladle(overrides?: CallOverrides): Promise; - - limits( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber, BigNumber] & { max: BigNumber; sum: BigNumber }>; - - lines( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [number, BigNumber, BigNumber] & { - duration: number; - vaultProportion: BigNumber; - collateralProportion: BigNumber; - } - >; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - payBase( - vaultId: PromiseOrValue, - to: PromiseOrValue, - minInkOut: PromiseOrValue, - maxBaseIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - payFYToken( - vaultId: PromiseOrValue, - to: PromiseOrValue, - minInkOut: PromiseOrValue, - maxArtIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - point( - param: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - protected( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setAuctioneerReward( - auctioneerReward_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLineAndLimit( - ilkId: PromiseOrValue, - baseId: PromiseOrValue, - duration: PromiseOrValue, - vaultProportion: PromiseOrValue, - collateralProportion: PromiseOrValue, - max: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setProtected( - owner: PromiseOrValue, - _protected: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ONE_HUNDRED_PERCENT(overrides?: CallOverrides): Promise; - - ONE_PERCENT(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - auction( - vaultId: PromiseOrValue, - to: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [ - DataTypes.AuctionStructOutput, - DataTypes.VaultStructOutput, - DataTypes.SeriesStructOutput - ] & { - auction_: DataTypes.AuctionStructOutput; - vault: DataTypes.VaultStructOutput; - series: DataTypes.SeriesStructOutput; - } - >; - - auctioneerReward(overrides?: CallOverrides): Promise; - - auctions( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [string, number, string, BigNumber, BigNumber, string, string, string] & { - owner: string; - start: number; - baseId: string; - ink: BigNumber; - art: BigNumber; - auctioneer: string; - ilkId: string; - seriesId: string; - } - >; - - calcPayout( - vaultId: PromiseOrValue, - to: PromiseOrValue, - maxArtIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - liquidatorCut: BigNumber; - auctioneerCut: BigNumber; - artIn: BigNumber; - } - >; - - cancel( - vaultId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - clear( - vaultId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ladle(overrides?: CallOverrides): Promise; - - limits( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber, BigNumber] & { max: BigNumber; sum: BigNumber }>; - - lines( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [number, BigNumber, BigNumber] & { - duration: number; - vaultProportion: BigNumber; - collateralProportion: BigNumber; - } - >; - - lockRole( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - payBase( - vaultId: PromiseOrValue, - to: PromiseOrValue, - minInkOut: PromiseOrValue, - maxBaseIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - liquidatorCut: BigNumber; - auctioneerCut: BigNumber; - baseIn: BigNumber; - } - >; - - payFYToken( - vaultId: PromiseOrValue, - to: PromiseOrValue, - minInkOut: PromiseOrValue, - maxArtIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - liquidatorCut: BigNumber; - auctioneerCut: BigNumber; - artIn: BigNumber; - } - >; - - point( - param: PromiseOrValue, - value: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - protected( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setAuctioneerReward( - auctioneerReward_: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setLineAndLimit( - ilkId: PromiseOrValue, - baseId: PromiseOrValue, - duration: PromiseOrValue, - vaultProportion: PromiseOrValue, - collateralProportion: PromiseOrValue, - max: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setProtected( - owner: PromiseOrValue, - _protected: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Auctioned(bytes12,tuple,uint256,uint256)"( - vaultId?: PromiseOrValue | null, - auction?: null, - duration?: null, - initialCollateralProportion?: null - ): AuctionedEventFilter; - Auctioned( - vaultId?: PromiseOrValue | null, - auction?: null, - duration?: null, - initialCollateralProportion?: null - ): AuctionedEventFilter; - - "AuctioneerRewardSet(uint256)"( - auctioneerReward?: null - ): AuctioneerRewardSetEventFilter; - AuctioneerRewardSet( - auctioneerReward?: null - ): AuctioneerRewardSetEventFilter; - - "Bought(bytes12,address,uint256,uint256)"( - vaultId?: PromiseOrValue | null, - buyer?: PromiseOrValue | null, - ink?: null, - art?: null - ): BoughtEventFilter; - Bought( - vaultId?: PromiseOrValue | null, - buyer?: PromiseOrValue | null, - ink?: null, - art?: null - ): BoughtEventFilter; - - "Cancelled(bytes12)"( - vaultId?: PromiseOrValue | null - ): CancelledEventFilter; - Cancelled(vaultId?: PromiseOrValue | null): CancelledEventFilter; - - "Cleared(bytes12)"( - vaultId?: PromiseOrValue | null - ): ClearedEventFilter; - Cleared(vaultId?: PromiseOrValue | null): ClearedEventFilter; - - "Ended(bytes12)"( - vaultId?: PromiseOrValue | null - ): EndedEventFilter; - Ended(vaultId?: PromiseOrValue | null): EndedEventFilter; - - "LimitSet(bytes6,bytes6,uint128)"( - ilkId?: PromiseOrValue | null, - baseId?: PromiseOrValue | null, - max?: null - ): LimitSetEventFilter; - LimitSet( - ilkId?: PromiseOrValue | null, - baseId?: PromiseOrValue | null, - max?: null - ): LimitSetEventFilter; - - "LineSet(bytes6,bytes6,uint32,uint64,uint64)"( - ilkId?: PromiseOrValue | null, - baseId?: PromiseOrValue | null, - duration?: null, - vaultProportion?: null, - collateralProportion?: null - ): LineSetEventFilter; - LineSet( - ilkId?: PromiseOrValue | null, - baseId?: PromiseOrValue | null, - duration?: null, - vaultProportion?: null, - collateralProportion?: null - ): LineSetEventFilter; - - "Point(bytes32,address,address)"( - param?: PromiseOrValue | null, - oldValue?: PromiseOrValue | null, - newValue?: PromiseOrValue | null - ): PointEventFilter; - Point( - param?: PromiseOrValue | null, - oldValue?: PromiseOrValue | null, - newValue?: PromiseOrValue | null - ): PointEventFilter; - - "ProtectedSet(address,bool)"( - value?: PromiseOrValue | null, - protected?: null - ): ProtectedSetEventFilter; - ProtectedSet( - value?: PromiseOrValue | null, - protected?: null - ): ProtectedSetEventFilter; - - "RoleAdminChanged(bytes4,bytes4)"( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - RoleAdminChanged( - role?: PromiseOrValue | null, - newAdminRole?: PromiseOrValue | null - ): RoleAdminChangedEventFilter; - - "RoleGranted(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - RoleGranted( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleGrantedEventFilter; - - "RoleRevoked(bytes4,address,address)"( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - RoleRevoked( - role?: PromiseOrValue | null, - account?: PromiseOrValue | null, - sender?: PromiseOrValue | null - ): RoleRevokedEventFilter; - }; - - estimateGas: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ONE_HUNDRED_PERCENT(overrides?: CallOverrides): Promise; - - ONE_PERCENT(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - auction( - vaultId: PromiseOrValue, - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - auctioneerReward(overrides?: CallOverrides): Promise; - - auctions( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - calcPayout( - vaultId: PromiseOrValue, - to: PromiseOrValue, - maxArtIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - cancel( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - clear( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ladle(overrides?: CallOverrides): Promise; - - limits( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lines( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - payBase( - vaultId: PromiseOrValue, - to: PromiseOrValue, - minInkOut: PromiseOrValue, - maxBaseIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - payFYToken( - vaultId: PromiseOrValue, - to: PromiseOrValue, - minInkOut: PromiseOrValue, - maxArtIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - point( - param: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - protected( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setAuctioneerReward( - auctioneerReward_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLineAndLimit( - ilkId: PromiseOrValue, - baseId: PromiseOrValue, - duration: PromiseOrValue, - vaultProportion: PromiseOrValue, - collateralProportion: PromiseOrValue, - max: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setProtected( - owner: PromiseOrValue, - _protected: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - LOCK(overrides?: CallOverrides): Promise; - - LOCK8605463013(overrides?: CallOverrides): Promise; - - ONE_HUNDRED_PERCENT( - overrides?: CallOverrides - ): Promise; - - ONE_PERCENT(overrides?: CallOverrides): Promise; - - ROOT(overrides?: CallOverrides): Promise; - - ROOT4146650865(overrides?: CallOverrides): Promise; - - auction( - vaultId: PromiseOrValue, - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - auctioneerReward(overrides?: CallOverrides): Promise; - - auctions( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - calcPayout( - vaultId: PromiseOrValue, - to: PromiseOrValue, - maxArtIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - cancel( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - cauldron(overrides?: CallOverrides): Promise; - - clear( - vaultId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getRoleAdmin( - role: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - grantRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - grantRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - hasRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ladle(overrides?: CallOverrides): Promise; - - limits( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lines( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - lockRole( - role: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - payBase( - vaultId: PromiseOrValue, - to: PromiseOrValue, - minInkOut: PromiseOrValue, - maxBaseIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - payFYToken( - vaultId: PromiseOrValue, - to: PromiseOrValue, - minInkOut: PromiseOrValue, - maxArtIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - point( - param: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - protected( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRole( - role: PromiseOrValue, - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - revokeRoles( - roles: PromiseOrValue[], - account: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setAuctioneerReward( - auctioneerReward_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLineAndLimit( - ilkId: PromiseOrValue, - baseId: PromiseOrValue, - duration: PromiseOrValue, - vaultProportion: PromiseOrValue, - collateralProportion: PromiseOrValue, - max: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setProtected( - owner: PromiseOrValue, - _protected: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRoleAdmin( - role: PromiseOrValue, - adminRole: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; -} From 1ab33dc3be488b3585b94512d9ca055f54fad60f Mon Sep 17 00:00:00 2001 From: Jacob Bryant Date: Thu, 1 Jun 2023 10:53:27 -0400 Subject: [PATCH 29/51] useRemoveLiquidity fix --- src/hooks/actionHooks/useRemoveLiquidity.ts | 57 ++++++++++----------- 1 file changed, 27 insertions(+), 30 deletions(-) diff --git a/src/hooks/actionHooks/useRemoveLiquidity.ts b/src/hooks/actionHooks/useRemoveLiquidity.ts index ae1532334..761e4e79f 100644 --- a/src/hooks/actionHooks/useRemoveLiquidity.ts +++ b/src/hooks/actionHooks/useRemoveLiquidity.ts @@ -72,7 +72,6 @@ export const useRemoveLiquidity = () => { const { assert, encodeBalanceCall } = useAssert(); - const contracts = useContracts(); const { refetch: refetchBaseBal } = useBalance({ address: account, @@ -102,19 +101,18 @@ export const useRemoveLiquidity = () => { const _strategy: any = selectedStrategy!; const _input = ethers.utils.parseUnits(input, _base.decimals); - const associated_V2_Contract = _strategy.associatedStrategy.V2 ? Strategy__factory.connect(_strategy.associatedStrategy.V2, provider) : undefined; - const associated_V2_1_Contract = _strategy.associatedStrategy.V2_1 + const associated_V2_1_Contract = _strategy.associatedStrategy?.V2_1 ? Strategy__factory.connect(_strategy.associatedStrategy.V2_1, provider) : undefined; - /* some saftey */ - if ( associated_V2_Contract == undefined && _strategy.type === StrategyType.V1) return; // abort if strat 1 and no associated v2 strategy - if ( associated_V2_1_Contract == undefined && _strategy.type !== StrategyType.V2_1) return; // abort if not strat 2.1 and no associated strategy - + /* some saftey */ + if (associated_V2_Contract == undefined && _strategy.type === StrategyType.V1) return; // abort if strat 1 and no associated v2 strategy + if (associated_V2_1_Contract == undefined && _strategy.type !== StrategyType.V2_1) return; // abort if not strat 2.1 and no associated strategy + const ladleAddress = contracts.get(ContractNames.LADLE)?.address; const [[cachedSharesReserves, cachedFyTokenReserves], totalSupply] = await Promise.all([ @@ -305,24 +303,24 @@ export const useRemoveLiquidity = () => { ], txCode ); - + /* Add in an Assert call : Base received + fyToken received within 10% of strategy tokens held. */ - const assertCallData_base: ICallData[] = - isEthBase && nativeBalance - ? assert( - undefined, - encodeBalanceCall(undefined), - AssertActions.Fn.ASSERT_EQ_REL, - nativeBalance.value.add(series.getBase(_sharesReceived)), - WAD_BN.div('10') // 10% relative tolerance - ): - assert( - _base.address, - encodeBalanceCall(_base.address, _base.tokenIdentifier), - AssertActions.Fn.ASSERT_EQ_REL, - _base.balance!.add(series.getBase(_sharesReceived)), - WAD_BN.div('10') // 10% relative tolerance - ) + const assertCallData_base: ICallData[] = + isEthBase && nativeBalance + ? assert( + undefined, + encodeBalanceCall(undefined), + AssertActions.Fn.ASSERT_EQ_REL, + nativeBalance.value.add(series.getBase(_sharesReceived)), + WAD_BN.div('10') // 10% relative tolerance + ) + : assert( + _base.address, + encodeBalanceCall(_base.address, _base.tokenIdentifier), + AssertActions.Fn.ASSERT_EQ_REL, + _base.balance!.add(series.getBase(_sharesReceived)), + WAD_BN.div('10') // 10% relative tolerance + ); /* Add in an Assert call : Base received + fyToken received within 10% of strategy tokens held. */ const assertCallData_fyToken: ICallData[] = _fyTokenReceived.gt(ZERO_BN) @@ -335,7 +333,6 @@ export const useRemoveLiquidity = () => { ) : []; - // const unwrapping: ICallData[] = await unwrapAsset(_base, account) const calls: ICallData[] = [ ...permitCallData, @@ -363,14 +360,14 @@ export const useRemoveLiquidity = () => { { operation: LadleActions.Fn.ROUTE, - args: [_strategy.associatedStrategy.V2] as RoutedActions.Args.BURN_STRATEGY_TOKENS, + args: [_strategy.associatedStrategy?.V2] as RoutedActions.Args.BURN_STRATEGY_TOKENS, fnName: RoutedActions.Fn.BURN_STRATEGY_TOKENS, targetContract: _strategy.strategyContract, // v1 in this case ignoreIf: !_strategy || _strategy.type !== StrategyType.V1, }, { operation: LadleActions.Fn.ROUTE, - args: [_strategy.associatedStrategy.V2_1] as RoutedActions.Args.BURN_STRATEGY_TOKENS, + args: [_strategy.associatedStrategy?.V2_1] as RoutedActions.Args.BURN_STRATEGY_TOKENS, fnName: RoutedActions.Fn.BURN_STRATEGY_TOKENS, targetContract: associated_V2_Contract, ignoreIf: !_strategy || _strategy.type !== StrategyType.V1, @@ -390,9 +387,9 @@ export const useRemoveLiquidity = () => { * */ { operation: LadleActions.Fn.ROUTE, - args: [_strategy.associatedStrategy.V2_1] as RoutedActions.Args.BURN_STRATEGY_TOKENS, + args: [_strategy.associatedStrategy?.V2_1] as RoutedActions.Args.BURN_STRATEGY_TOKENS, fnName: RoutedActions.Fn.BURN_STRATEGY_TOKENS, - targetContract: _strategy.strategyContract, // v2 in this case + targetContract: _strategy.strategyContract, // v2 in this case ignoreIf: !_strategy || _strategy.type !== StrategyType.V2, }, { @@ -404,7 +401,7 @@ export const useRemoveLiquidity = () => { }, /** - * If removing DIRECTLY from a V2.1 strategy, simply burn from strategy to the pool address + * If removing DIRECTLY from a V2.1 strategy, simply burn from strategy to the pool address * */ { operation: LadleActions.Fn.ROUTE, From b41a8eda6ee0940cab0ef59219f29575760cbb1a Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Thu, 1 Jun 2023 18:07:23 +0100 Subject: [PATCH 30/51] updated UserContext --- src/components/selectors/StrategySelector.tsx | 2 +- src/components/views/Pool.tsx | 4 +-- src/config/strategies.ts | 2 +- src/contexts/UserContext.tsx | 35 ++++++++++++------- src/types/index.ts | 3 +- 5 files changed, 28 insertions(+), 18 deletions(-) diff --git a/src/components/selectors/StrategySelector.tsx b/src/components/selectors/StrategySelector.tsx index c514db9cc..087e7790d 100644 --- a/src/components/selectors/StrategySelector.tsx +++ b/src/components/selectors/StrategySelector.tsx @@ -82,7 +82,7 @@ const StrategySelectItem = ({ - {strategy.rewardsRate!.gt(ZERO_BN) && ( + {strategy.rewardsRate?.gt(ZERO_BN) && ( diff --git a/src/config/strategies.ts b/src/config/strategies.ts index b1625501c..afeabd529 100644 --- a/src/config/strategies.ts +++ b/src/config/strategies.ts @@ -8,7 +8,7 @@ export enum StrategyType { V2_1 = 'V2_1', } -type AssociatedStrategy = { +export type AssociatedStrategy = { [value in StrategyType]?: string; }; diff --git a/src/contexts/UserContext.tsx b/src/contexts/UserContext.tsx index 779f9e105..7e669120b 100644 --- a/src/contexts/UserContext.tsx +++ b/src/contexts/UserContext.tsx @@ -469,15 +469,22 @@ const UserProvider = ({ children }: { children: ReactNode }) => { // let _publicData: IStrategy[] = []; const _publicData = await Promise.all( strategyList.map(async (_strategy): Promise => { + + const strategyTotalSupply = await _strategy.strategyContract.totalSupply(); + let currentPoolAddr = undefined; + let fyToken: any = undefined; + + if (_strategy.type !== StrategyType.V2_1) { + [fyToken, currentPoolAddr] = await Promise.all([ + _strategy.strategyContract.fyToken(), + _strategy.strategyContract.pool(), + ]).catch((e: any) => { + console.log('Error getting strategy data: ', _strategy.name); + return [undefined, undefined]; + }); + } + /* Get all the data simultanenously in a promise.all */ - const [strategyTotalSupply, fyToken, currentPoolAddr] = await Promise.all([ - _strategy.strategyContract.totalSupply(), - _strategy.strategyContract.fyToken(), - _strategy.strategyContract.pool(), - ]).catch((e: any) => { - console.log('Error getting strategy data: ', _strategy.name); - return [ZERO_BN, undefined, undefined]; - }); // const stratConnected = _strategy.strategyContract.connect(signer); // const accountRewards = @@ -485,7 +492,7 @@ const UserProvider = ({ children }: { children: ReactNode }) => { // console.log(accountRewards.gt(ZERO_BN) ? accountRewards.toString() : 'no rewards'); /* We check if the strategy has been supersecced by a newer version */ - const hasAnUpdatedVersion = (_strategy.type === StrategyType.V2 || _strategy.type === StrategyType.V1); + const hasAnUpdatedVersion = _strategy.type === StrategyType.V2 || _strategy.type === StrategyType.V1; /* Attatch the current series (if any) */ const currentSeries = _seriesList.find((s: ISeriesRoot) => @@ -496,7 +503,9 @@ const UserProvider = ({ children }: { children: ReactNode }) => { const [poolTotalSupply, strategyPoolBalance] = await Promise.all([ currentSeries.poolContract.totalSupply(), currentSeries.poolContract.balanceOf( - hasAnUpdatedVersion && _strategy.associatedStrategy ? _strategy.associatedStrategy : _strategy.address + hasAnUpdatedVersion && _strategy.associatedStrategy?.V2_1 + ? _strategy.associatedStrategy.V2_1 + : _strategy.address ), ]).catch((e: any) => { console.log('Error getting current series data: ', _strategy.name); @@ -505,7 +514,8 @@ const UserProvider = ({ children }: { children: ReactNode }) => { const strategyPoolPercent = mulDecimal(divDecimal(strategyPoolBalance, poolTotalSupply), '100'); - /* get rewards data */ + + /* Get rewards data */ let rewardsPeriod: { start: number; end: number } | undefined; let rewardsRate: BigNumber | undefined; let rewardsTokenAddress: string | undefined; @@ -520,7 +530,7 @@ const UserProvider = ({ children }: { children: ReactNode }) => { rewardsRate = rate; rewardsTokenAddress = rewardsToken; } catch (e) { - console.log(`Could not get rewards data for strategy with address: ${_strategy.address}`); + console.log(`Could not get any rewards data for strategy with address: ${_strategy.address}`); rewardsPeriod = undefined; rewardsRate = undefined; rewardsTokenAddress = undefined; @@ -538,7 +548,6 @@ const UserProvider = ({ children }: { children: ReactNode }) => { currentSeriesAddr: fyToken as string | undefined, currentSeries, - currentPoolAddr: currentPoolAddr as string | undefined, rewardsRate, diff --git a/src/types/index.ts b/src/types/index.ts index c92675332..5fe48746b 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -3,6 +3,7 @@ import { ethers, BigNumber, BigNumberish, ContractTransaction, Contract } from ' import { ReactNode } from 'react'; import { IChainContextActions } from '../contexts/types/chain'; import { FYToken, Pool, Strategy } from '../contracts'; +import { AssociatedStrategy } from '../config/strategies'; export { LadleActions, RoutedActions } from './operations'; @@ -199,7 +200,7 @@ export interface IStrategyRoot extends ISignable { strategyContract: Strategy; startBlock: Block; type: 'V1' | 'V2' | 'V2_1'; - associatedStrategy?: string; + associatedStrategy?: AssociatedStrategy; disabled?: boolean; } From f8d8c35b887cc7800399e586d5c36fe1ec1788d6 Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Thu, 1 Jun 2023 18:52:28 +0100 Subject: [PATCH 31/51] only check fyToken/pool on v2_1 strats --- src/contexts/UserContext.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/contexts/UserContext.tsx b/src/contexts/UserContext.tsx index 7e669120b..244984f92 100644 --- a/src/contexts/UserContext.tsx +++ b/src/contexts/UserContext.tsx @@ -474,7 +474,7 @@ const UserProvider = ({ children }: { children: ReactNode }) => { let currentPoolAddr = undefined; let fyToken: any = undefined; - if (_strategy.type !== StrategyType.V2_1) { + if (_strategy.type === StrategyType.V2_1) { [fyToken, currentPoolAddr] = await Promise.all([ _strategy.strategyContract.fyToken(), _strategy.strategyContract.pool(), From 8717965b7086a0d87dcd3f3419dc6b51b9c68cec Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Thu, 1 Jun 2023 19:44:28 +0100 Subject: [PATCH 32/51] bugfix/nested a error --- src/components/Header.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 98443de0c..a959298e0 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -43,7 +43,7 @@ const YieldHeader = ({ actionList }: IYieldHeaderProps) => { // eslint-disable-next-line react/display-name const YieldIcon = forwardRef(({ onClick, href }: any, ref: any) => ( - + // { )} - + // )); return ( From 7d525b0634bbb3de9bb596b200993da1ce1309d1 Mon Sep 17 00:00:00 2001 From: Jacob Bryant Date: Thu, 1 Jun 2023 21:46:47 -0400 Subject: [PATCH 33/51] adding associatedSeries --- src/components/views/Pool.tsx | 6 +--- src/components/views/PoolPosition.tsx | 5 ++- src/config/series.ts | 18 +++++------ src/config/strategies.ts | 34 +++++++++++---------- src/contexts/UserContext.tsx | 11 ++++--- src/hooks/actionHooks/useRemoveLiquidity.ts | 6 ++-- src/types/index.ts | 1 + 7 files changed, 43 insertions(+), 38 deletions(-) diff --git a/src/components/views/Pool.tsx b/src/components/views/Pool.tsx index bda28231b..7a1843c40 100644 --- a/src/components/views/Pool.tsx +++ b/src/components/views/Pool.tsx @@ -320,11 +320,7 @@ function Pool() { secondary label={Next Step} onClick={() => handleNavAction(stepPosition + 1)} - disabled={ - stepDisabled || - !selectedStrategy || - (selectedStrategy.type !== StrategyType.V2_1) - } + disabled={stepDisabled || !selectedStrategy || selectedStrategy.type !== StrategyType.V2_1} errorLabel={poolError} /> )} diff --git a/src/components/views/PoolPosition.tsx b/src/components/views/PoolPosition.tsx index 1b268aa21..4766a3cc8 100644 --- a/src/components/views/PoolPosition.tsx +++ b/src/components/views/PoolPosition.tsx @@ -37,6 +37,7 @@ import GeneralButton from '../buttons/GeneralButton'; import { MdShortcut } from 'react-icons/md'; import { ZERO_BN } from '@yield-protocol/ui-math'; import useAccountPlus from '../../hooks/useAccountPlus'; +import { StrategyType } from '../../config/strategies'; const PoolPosition = () => { const mobile: boolean = useContext(ResponsiveContext) === 'small'; @@ -170,7 +171,9 @@ const PoolPosition = () => { /* ACTION DISABLING LOGIC - if ANY conditions are met: block action */ useEffect(() => { - !removeInput || removeError || !selectedSeries ? setRemoveDisabled(true) : setRemoveDisabled(false); + !removeInput || removeError || (selectedStrategy?.type === StrategyType.V2_1 && !selectedSeries) + ? setRemoveDisabled(true) + : setRemoveDisabled(false); +selectedStrategy?.accountRewards_! === 0 ? setClaimDisabled(true) : setClaimDisabled(false); }, [selectedStrategy, activeAccount, forceDisclaimerChecked, removeError, removeInput, selectedSeries]); diff --git a/src/config/series.ts b/src/config/series.ts index f5167a5e8..666ad6b94 100644 --- a/src/config/series.ts +++ b/src/config/series.ts @@ -1139,7 +1139,7 @@ SERIES.set( }, ], - /* 2303 */ + // /* 2303 */ [ USDC_2303, { @@ -1218,7 +1218,7 @@ SERIES.set( address: '0x523803c57a497c3AD0E850766c8276D4864edEA5', decimals: 18, version: '1', - poolAddress: '0x3e0a639c4a6D4d39a0DeAE07c228Ff080de55eeE', // + poolAddress: '0x3e0a639c4a6D4d39a0DeAE07c228Ff080de55eeE', poolName: 'FYETH2306 LP', poolSymbol: 'FYETH2306LP', poolVersion: '1', @@ -1239,7 +1239,7 @@ SERIES.set( address: '0x60a6A7fabe11ff36cbE917a17666848f0FF3A60a', decimals: 18, version: '1', - poolAddress: '0xB71dB5f70FE5Af728Db8C05930d48553E5a0eB98', // + poolAddress: '0xB71dB5f70FE5Af728Db8C05930d48553E5a0eB98', poolName: 'FYDAI2306 LP', poolSymbol: 'FYDAI2306LP', poolVersion: '1', @@ -1260,7 +1260,7 @@ SERIES.set( address: '0xcbb7eba13f9e1d97b2138f588f5ca2f5167f06cc', decimals: 6, version: '1', - poolAddress: '0x530648558a27fe1d1BfC7356F67a34f4a7f06B6D', // + poolAddress: '0x530648558a27fe1d1BfC7356F67a34f4a7f06B6D', poolName: 'FYUSDC2306 LP', poolSymbol: 'FYUSDC2306LP', poolVersion: '1', @@ -1281,7 +1281,7 @@ SERIES.set( address: '0x035072cb2912daab7b578f468bd6f0d32a269e32', decimals: 6, version: '1', - poolAddress: '0x7388f277441b3E1f3388f0464244e469fEA30e41', // + poolAddress: '0x7388f277441b3E1f3388f0464244e469fEA30e41', poolName: 'FYUSDT2306 LP', poolSymbol: 'FYUSDT2306LP', poolVersion: '1', @@ -1324,7 +1324,7 @@ SERIES.set( address: '0x5Bb78E530D9365aeF75664c5093e40B0001F7CCd', decimals: 6, version: '1', - poolAddress: '0xf7F6eB1b097F60673e65347C83d83Cb4ade82a0B', // + poolAddress: '0xf7F6eB1b097F60673e65347C83d83Cb4ade82a0B', poolName: 'FYUSDC2309 LP', poolSymbol: 'FYUSDC2309LP', poolVersion: '1', @@ -1345,7 +1345,7 @@ SERIES.set( address: '0xd947360575E6F01Ce7A210C12F2EE37F5ab12d11', decimals: 18, version: '1', - poolAddress: '0x54D47f765fA247AfEE226fDf919392CdaC6cbb2E', // + poolAddress: '0x54D47f765fA247AfEE226fDf919392CdaC6cbb2E', poolName: 'FYETH2309 LP', poolSymbol: 'FYETH2309LP', poolVersion: '1', @@ -1366,7 +1366,7 @@ SERIES.set( address: '0xEE508c827a8990c04798B242fa801C5351012B23', decimals: 18, version: '1', - poolAddress: '0xbc62d88182ffA86918d0129f5bD35Dea8df9213a', // + poolAddress: '0xbc62d88182ffA86918d0129f5bD35Dea8df9213a', poolName: 'FYDAI2309 LP', poolSymbol: 'FYDAI2309LP', poolVersion: '1', @@ -1387,7 +1387,7 @@ SERIES.set( address: '0x9B19889794A30056A1E5Be118ee0a6647B184c5f', decimals: 6, version: '1', - poolAddress: '0x1EEc5ED8E01E0232F5ab2D70bB00231250aB2e7A', // + poolAddress: '0x1EEc5ED8E01E0232F5ab2D70bB00231250aB2e7A', poolName: 'FYUSDT2309 LP', poolSymbol: 'FYUSDT2309LP', poolVersion: '1', diff --git a/src/config/strategies.ts b/src/config/strategies.ts index afeabd529..2237c2f15 100644 --- a/src/config/strategies.ts +++ b/src/config/strategies.ts @@ -23,6 +23,7 @@ export interface StrategyInfo { decimals?: number; version?: string; active?: boolean; + associatedSeries?: string; } // map each chain id to its corresponding strategies' data @@ -129,6 +130,7 @@ STRATEGIES.set(42161, [ name: 'Yield Strategy ETH 6M Jun Dec', decimals: 18, version: '1', + associatedSeries: '0x523803c57a497c3ad0e850766c8276d4864edea5', }, { id: '0x1031FF000FFE', @@ -140,6 +142,7 @@ STRATEGIES.set(42161, [ name: 'Yield Strategy DAI 6M Jun Dec', decimals: 18, version: '1', + associatedSeries: '0x60a6a7fabe11ff36cbe917a17666848f0ff3a60a', }, { id: '0x1032FF000FFE', @@ -151,6 +154,7 @@ STRATEGIES.set(42161, [ decimals: 6, type: StrategyType.V2, version: '1', + associatedSeries: '0xcbb7eba13f9e1d97b2138f588f5ca2f5167f06cc', }, { @@ -163,18 +167,20 @@ STRATEGIES.set(42161, [ name: 'Yield Strategy USDT 6M Jun Dec', decimals: 6, version: '1', + associatedSeries: '0x035072cb2912daab7b578f468bd6f0d32a269e32', }, { id: '0x10A0FF000FFF', address: '0xfe2aba5ba890af0ee8b6f2d488b1f85c9e7c5643', - associatedStrategy : { V2_1: '0x2C918C4db3843F715556c65646f9E4a04C4BfBa6'}, + associatedStrategy: { V2_1: '0x2C918C4db3843F715556c65646f9E4a04C4BfBa6' }, type: StrategyType.V2, symbol: 'YSUSDT6MMS', baseId: USDT, name: 'Yield Strategy USDT 6M Mar Sep', decimals: 6, version: '1', + associatedSeries: '0x9b19889794a30056a1e5be118ee0a6647b184c5f', }, { @@ -187,6 +193,7 @@ STRATEGIES.set(42161, [ name: 'Yield Strategy USDC 6M Mar Sep', decimals: 6, version: '1', + associatedSeries: '0x5bb78e530d9365aef75664c5093e40b0001f7ccd', }, { id: '0x1030FF000FFF', @@ -198,6 +205,7 @@ STRATEGIES.set(42161, [ name: 'Yield Strategy ETH 6M Mar Sep', decimals: 18, version: '1', + associatedSeries: '0xd947360575e6f01ce7a210c12f2ee37f5ab12d11', }, { id: '0x1031FF000FFF', @@ -209,12 +217,13 @@ STRATEGIES.set(42161, [ name: 'Yield Strategy DAI 6M Mar Sep', decimals: 18, version: '1', + associatedSeries: '0xee508c827a8990c04798b242fa801c5351012b23', }, // V2.1 strategies { id: '0x1031FF000001', - address: '0x4771522accAC6fEcf89A6365cEaF05667ed95886', // + address: '0x4771522accAC6fEcf89A6365cEaF05667ed95886', type: StrategyType.V2_1, symbol: 'YSDAI6MMS', baseId: DAI, @@ -224,7 +233,7 @@ STRATEGIES.set(42161, [ }, { id: '0x10A0FF000001', - address: '0x2C918C4db3843F715556c65646f9E4a04C4BfBa6', // + address: '0x2C918C4db3843F715556c65646f9E4a04C4BfBa6', type: StrategyType.V2_1, symbol: 'YSUSDT6MMS', baseId: USDT, @@ -234,7 +243,7 @@ STRATEGIES.set(42161, [ }, { id: '0x1032FF000000', - address: '0xCeAf1CBf0CFDD1f7Ea4C1C850c0bC032a60431DB', // + address: '0xCeAf1CBf0CFDD1f7Ea4C1C850c0bC032a60431DB', symbol: 'YSUSDC6MJD', baseId: USDC, name: 'Yield Strategy USDC 6M Jun Dec', @@ -244,7 +253,7 @@ STRATEGIES.set(42161, [ }, { id: '0x10A0FF000000', - address: '0x8b814aD71e611e7a38eE64Ec16ce421A477956e1', // + address: '0x8b814aD71e611e7a38eE64Ec16ce421A477956e1', type: StrategyType.V2_1, symbol: 'YSUSDT6MJD', baseId: USDT, @@ -254,7 +263,7 @@ STRATEGIES.set(42161, [ }, { id: '0x1032FF000001', - address: '0x7012aF43F8a3c1141Ee4e955CC568Ad2af59C3fa', // + address: '0x7012aF43F8a3c1141Ee4e955CC568Ad2af59C3fa', type: StrategyType.V2_1, symbol: 'YSUSDC6MMS', baseId: USDC, @@ -264,7 +273,7 @@ STRATEGIES.set(42161, [ }, { id: '0x1030FF000001', - address: '0x0A4B2e37BFEF8e54DeA997A87749A403353134e8', // + address: '0x0A4B2e37BFEF8e54DeA997A87749A403353134e8', type: StrategyType.V2_1, symbol: 'YSETH6MMS', baseId: WETH, @@ -274,7 +283,7 @@ STRATEGIES.set(42161, [ }, { id: '0x1030FF000000', - address: '0xC7D2E96Ca94E1870605c286268313785886D2257', // + address: '0xC7D2E96Ca94E1870605c286268313785886D2257', type: StrategyType.V2_1, symbol: 'YSETH6MJD', baseId: WETH, @@ -284,7 +293,7 @@ STRATEGIES.set(42161, [ }, { id: '0x1031FF000000', - address: '0x9847D09cb0eEA77f7875A6904BFA22AE06b34CCE', // + address: '0x9847D09cb0eEA77f7875A6904BFA22AE06b34CCE', type: StrategyType.V2_1, symbol: 'YSDAI6MJD', baseId: DAI, @@ -292,13 +301,6 @@ STRATEGIES.set(42161, [ decimals: 18, version: '1', }, - - /* - v1 have an associatedStrategy to a v2 strategy, - v2 have an associated strategy to a v1 strategy, - v2.1 have an associated strategy to a v2 strategy - is this right? - */ ]); export default STRATEGIES; diff --git a/src/contexts/UserContext.tsx b/src/contexts/UserContext.tsx index 244984f92..6d939e0b1 100644 --- a/src/contexts/UserContext.tsx +++ b/src/contexts/UserContext.tsx @@ -461,7 +461,7 @@ const UserProvider = ({ children }: { children: ReactNode }) => { /* Updates the assets with relevant *user* data */ const updateStrategies = useCallback( async (strategyList: IStrategyRoot[], seriesList: ISeries[] = []) => { - console.log('Updating strategies...'); + console.log('Updating strategies...', strategyList); updateState({ type: UserState.STRATEGIES_LOADING, payload: true }); const _seriesList = seriesList.length ? seriesList : Array.from(userState.seriesMap.values()); @@ -469,12 +469,11 @@ const UserProvider = ({ children }: { children: ReactNode }) => { // let _publicData: IStrategy[] = []; const _publicData = await Promise.all( strategyList.map(async (_strategy): Promise => { - const strategyTotalSupply = await _strategy.strategyContract.totalSupply(); let currentPoolAddr = undefined; let fyToken: any = undefined; - if (_strategy.type === StrategyType.V2_1) { + if (_strategy.type === StrategyType.V2_1 || _strategy.type === StrategyType.V1) { [fyToken, currentPoolAddr] = await Promise.all([ _strategy.strategyContract.fyToken(), _strategy.strategyContract.pool(), @@ -482,6 +481,9 @@ const UserProvider = ({ children }: { children: ReactNode }) => { console.log('Error getting strategy data: ', _strategy.name); return [undefined, undefined]; }); + } else if (_strategy.type === StrategyType.V2) { + fyToken = _strategy.associatedSeries; + currentPoolAddr = await _strategy.strategyContract.pool(); } /* Get all the data simultanenously in a promise.all */ @@ -508,13 +510,12 @@ const UserProvider = ({ children }: { children: ReactNode }) => { : _strategy.address ), ]).catch((e: any) => { - console.log('Error getting current series data: ', _strategy.name); + console.log('Error getting current series data: ', _strategy.name, _strategy); return [ZERO_BN, ZERO_BN]; }); const strategyPoolPercent = mulDecimal(divDecimal(strategyPoolBalance, poolTotalSupply), '100'); - /* Get rewards data */ let rewardsPeriod: { start: number; end: number } | undefined; let rewardsRate: BigNumber | undefined; diff --git a/src/hooks/actionHooks/useRemoveLiquidity.ts b/src/hooks/actionHooks/useRemoveLiquidity.ts index 761e4e79f..e9f3e5864 100644 --- a/src/hooks/actionHooks/useRemoveLiquidity.ts +++ b/src/hooks/actionHooks/useRemoveLiquidity.ts @@ -91,6 +91,8 @@ export const useRemoveLiquidity = () => { } = useContext(SettingsContext); const removeLiquidity = async (input: string, series: ISeries, matchingVault: IVault | undefined) => { + console.log('removeLiquidity', input, series, matchingVault); + if (!contracts) return; if (!isActionAllowed(ActionCodes.REMOVE_LIQUIDITY)) return; // return if action is not allowed @@ -101,7 +103,7 @@ export const useRemoveLiquidity = () => { const _strategy: any = selectedStrategy!; const _input = ethers.utils.parseUnits(input, _base.decimals); - const associated_V2_Contract = _strategy.associatedStrategy.V2 + const associated_V2_Contract = _strategy.associatedStrategy?.V2 ? Strategy__factory.connect(_strategy.associatedStrategy.V2, provider) : undefined; @@ -527,7 +529,7 @@ export const useRemoveLiquidity = () => { ...removeEthCallData, - ...assertCallData_base, + // ...assertCallData_base, // ...assertCallData_fyToken, temporarily remove fyToken check ]; diff --git a/src/types/index.ts b/src/types/index.ts index 5fe48746b..d39caea37 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -202,6 +202,7 @@ export interface IStrategyRoot extends ISignable { type: 'V1' | 'V2' | 'V2_1'; associatedStrategy?: AssociatedStrategy; disabled?: boolean; + associatedSeries?: string; } export interface IVaultRoot { From b02dedc45f6df0b5cec61b8a97ac4e836994d48f Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Fri, 2 Jun 2023 08:58:52 +0100 Subject: [PATCH 34/51] reduce network calls --- src/contexts/UserContext.tsx | 194 +++++++++++++++++++++++------------ 1 file changed, 130 insertions(+), 64 deletions(-) diff --git a/src/contexts/UserContext.tsx b/src/contexts/UserContext.tsx index 6d939e0b1..fb71a91ef 100644 --- a/src/contexts/UserContext.tsx +++ b/src/contexts/UserContext.tsx @@ -3,6 +3,8 @@ import { useContext, useEffect, useReducer, useCallback, useState, Dispatch, cre import { BigNumber, ethers } from 'ethers'; import * as contractTypes from '../contracts'; +import { multicall } from '@wagmi/core' + import { calculateAPR, divDecimal, @@ -303,19 +305,38 @@ const UserProvider = ({ children }: { children: ReactNode }) => { /* Add in the dynamic series data of the series in the list */ _publicData = await Promise.all( + seriesList.map(async (series): Promise => { - let baseReserves: BigNumber; - try { - baseReserves = await series.poolContract.getBaseBalance(); - } catch (error) { - baseReserves = ZERO_BN; - } - /* Get all the data simultanenously in a promise.all */ - const [fyTokenReserves, totalSupply, fyTokenRealReserves] = await Promise.all([ - series.poolContract.getFYTokenBalance(), - series.poolContract.totalSupply(), - series.fyTokenContract.balanceOf(series.poolAddress), - ]); + + const [baseReserves, fyTokenReserves, totalSupply, fyTokenRealReserves] = await multicall({ + contracts: [ + { + address: series.poolContract.address as `0x${string}`, + abi: series.poolContract.interface as any, + functionName: 'getBaseBalance', + args:[], + }, + + { + address: series.poolContract.address as `0x${string}`, + abi: series.poolContract.interface as any, + functionName: 'getFYTokenBalance', + args:[], + }, + { + address: series.poolContract.address as `0x${string}`, + abi: series.poolContract.interface as any, + functionName: 'totalSupply', + args:[], + }, + { + address: series.fyTokenContract.address as `0x${string}`, + abi: series.fyTokenContract.interface as any, + functionName: 'balanceOf', + args: [series.poolAddress], + }, + ], + }) as unknown as BigNumber[]; let sharesReserves: BigNumber; let c: BigNumber | undefined; @@ -323,16 +344,43 @@ const UserProvider = ({ children }: { children: ReactNode }) => { let currentSharePrice: BigNumber; let sharesAddress: string; - try { - [sharesReserves, c, mu, currentSharePrice, sharesAddress] = await Promise.all([ - series.poolContract.getSharesBalance(), - series.poolContract.getC(), - series.poolContract.mu(), - series.poolContract.getCurrentSharePrice(), - series.poolContract.sharesToken(), - ]); - } catch (error) { - sharesReserves = baseReserves; + /* This was the case used for Euler pools - no longer used left here for reference */ + if (false) { + [sharesReserves, c, mu, currentSharePrice, sharesAddress] = await multicall({ + contracts: [ + { + address: series.poolContract.address as `0x${string}`, + abi: series.poolContract.interface as any, + functionName: 'getSharesBalance', + args:[], + }, + { + address: series.poolContract.address as `0x${string}`, + abi: series.poolContract.interface as any, + functionName: 'getC', + args:[], + }, + { + address: series.poolContract.address as `0x${string}`, + abi: series.poolContract.interface as any, + functionName: 'mu', + args:[], + }, + { + address: series.poolContract.address as `0x${string}`, + abi: series.poolContract.interface as any, + functionName: 'getCurrentSharePrice', + args:[], + }, + { + address: series.poolContract.address as `0x${string}`, + abi: series.poolContract.interface as any, + functionName: 'sharesToken', + args:[], + } + ]}) as unknown as any[]; + } else { + sharesReserves = baseReserves || ZERO_BN; currentSharePrice = ethers.utils.parseUnits('1', series.decimals); sharesAddress = assetRootMap.get(series.baseId)?.address!; diagnostics && console.log('Using old pool contract that does not include c, mu, and shares'); @@ -382,16 +430,16 @@ const UserProvider = ({ children }: { children: ReactNode }) => { let initInvariant: BigNumber | undefined; let poolStartBlock: Block | undefined; - try { - // get pool init block - const gmFilter = series.poolContract.filters.gm(); - const gm = await series.poolContract.queryFilter(gmFilter, 'earliest'); - poolStartBlock = await gm[0].getBlock(); - currentInvariant = await series.poolContract.invariant(); - initInvariant = await series.poolContract.invariant({ blockTag: poolStartBlock.number }); - } catch (e) { - diagnostics && console.log('Could not get current and init invariant for series', series.id); - } + // try { + // // get pool init block + // const gmFilter = series.poolContract.filters.gm(); + // const gm = await series.poolContract.queryFilter(gmFilter, 'earliest'); + // poolStartBlock = await gm[0].getBlock(); + // currentInvariant = await series.poolContract.invariant(); + // initInvariant = await series.poolContract.invariant({ blockTag: poolStartBlock.number }); + // } catch (e) { + // diagnostics && console.log('Could not get current and init invariant for series', series.id); + // } return { ...series, @@ -420,22 +468,32 @@ const UserProvider = ({ children }: { children: ReactNode }) => { if (account) { _accountData = await Promise.all( _publicData.map(async (series): Promise => { - /* Get all the data simultanenously in a promise.all */ - const [poolTokens, fyTokenBalance] = await Promise.all([ - series.poolContract.balanceOf(account), - series.fyTokenContract.balanceOf(account), - ]).catch((e) => { - console.log('Error getting user balances for series: ', series.id); - return [ZERO_BN, ZERO_BN]; - }); // catch error and return 0 values if error with series - const poolPercent = mulDecimal(divDecimal(poolTokens, series.totalSupply), '100'); + const [poolTokens, fyTokenBalance] = await multicall({ + contracts: [ + { + address: series.poolContract.address as `0x${string}`, + abi: series.poolContract.interface as any, + functionName: 'balanceOf', + args:[account], + }, + { + address: series.fyTokenContract.address as `0x${string}`, + abi: series.poolContract.interface as any, + functionName: 'balanceOf', + args:[account], + }, + ] + }) as unknown as BigNumber[]; + + const poolPercent = mulDecimal(divDecimal(poolTokens || ZERO_BN, series.totalSupply), '100'); + return { ...series, - poolTokens, - fyTokenBalance, - poolTokens_: ethers.utils.formatUnits(poolTokens, series.decimals), - fyTokenBalance_: ethers.utils.formatUnits(fyTokenBalance, series.decimals), + poolTokens: poolTokens || ZERO_BN , + fyTokenBalance: fyTokenBalance || ZERO_BN, + poolTokens_: ethers.utils.formatUnits(poolTokens || ZERO_BN, series.decimals), + fyTokenBalance_: ethers.utils.formatUnits(fyTokenBalance || ZERO_BN, series.decimals), poolPercent, }; }) @@ -466,9 +524,14 @@ const UserProvider = ({ children }: { children: ReactNode }) => { const _seriesList = seriesList.length ? seriesList : Array.from(userState.seriesMap.values()); + + // let _publicData: IStrategy[] = []; const _publicData = await Promise.all( strategyList.map(async (_strategy): Promise => { + + + const strategyTotalSupply = await _strategy.strategyContract.totalSupply(); let currentPoolAddr = undefined; let fyToken: any = undefined; @@ -486,12 +549,6 @@ const UserProvider = ({ children }: { children: ReactNode }) => { currentPoolAddr = await _strategy.strategyContract.pool(); } - /* Get all the data simultanenously in a promise.all */ - - // const stratConnected = _strategy.strategyContract.connect(signer); - // const accountRewards = - // _strategy.rewardsRate?.gt(ZERO_BN) && signer ? await stratConnected.callStatic.claim(account) : ZERO_BN; - // console.log(accountRewards.gt(ZERO_BN) ? accountRewards.toString() : 'no rewards'); /* We check if the strategy has been supersecced by a newer version */ const hasAnUpdatedVersion = _strategy.type === StrategyType.V2 || _strategy.type === StrategyType.V1; @@ -569,29 +626,38 @@ const UserProvider = ({ children }: { children: ReactNode }) => { const _accountData = account ? await Promise.all( _publicData.map(async (_strategy: IStrategy): Promise => { - const [accountBalance, accountPoolBalance] = await Promise.all([ - _strategy.strategyContract.balanceOf(account), - _strategy.currentSeries?.poolContract.balanceOf(account), - ]).catch((e: any) => { - console.log('Error getting current account balance data: ', _strategy.name); - return [ZERO_BN, ZERO_BN]; - }); + + const [accountBalance, accountPoolBalance] = await multicall({ + contracts: [ + { + address: _strategy.strategyContract.address as `0x${string}`, + abi: _strategy.strategyContract.interface as any, + functionName: 'balanceOf', + args:[account], + }, + { + address: _strategy.currentSeries?.poolContract.address as `0x${string}`, + abi: _strategy.currentSeries?.poolContract.interface as any, + functionName: 'balanceOf', + args:[account], + }, + ] + }) as unknown as BigNumber[]; // const stratConnected = _strategy.strategyContract.connect(signer!); // const accountRewards = // _strategy.rewardsRate?.gt(ZERO_BN) && signer ? await stratConnected.callStatic.claim(account) : ZERO_BN; - const accountRewards = ZERO_BN; const accountStrategyPercent = mulDecimal( - divDecimal(accountBalance, _strategy.strategyTotalSupply || '0'), + divDecimal(accountBalance||ZERO_BN, _strategy.strategyTotalSupply || '0'), '100' ); return { ..._strategy, - accountBalance, - accountBalance_: ethers.utils.formatUnits(accountBalance, _strategy.decimals), - accountPoolBalance, + accountBalance : accountBalance|| ZERO_BN, + accountBalance_: ethers.utils.formatUnits(accountBalance||ZERO_BN, _strategy.decimals), + accountPoolBalance: accountPoolBalance || ZERO_BN, accountStrategyPercent, accountRewards: accountRewards, accountRewards_: formatUnits(accountRewards, _strategy.decimals), @@ -632,7 +698,7 @@ const UserProvider = ({ children }: { children: ReactNode }) => { /** * if vaultList is empty, clear local app memory and fetch complete Vaultlist from chain via _getVaults */ - if (vaultList.length === 0) { + if (vaultList.length === 0 && !useForkedEnv) { updateState({ type: UserState.CLEAR_VAULTS }); _vaults = await _getVaults(); } From e6cce81c1a0f02fbd43291e8ab22d66b0658a9a6 Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Fri, 2 Jun 2023 09:13:31 +0100 Subject: [PATCH 35/51] strategy multicall --- src/contexts/UserContext.tsx | 72 ++++++++++++++++++++++++++++-------- 1 file changed, 57 insertions(+), 15 deletions(-) diff --git a/src/contexts/UserContext.tsx b/src/contexts/UserContext.tsx index fb71a91ef..e5f068b58 100644 --- a/src/contexts/UserContext.tsx +++ b/src/contexts/UserContext.tsx @@ -530,25 +530,47 @@ const UserProvider = ({ children }: { children: ReactNode }) => { const _publicData = await Promise.all( strategyList.map(async (_strategy): Promise => { - - const strategyTotalSupply = await _strategy.strategyContract.totalSupply(); let currentPoolAddr = undefined; let fyToken: any = undefined; if (_strategy.type === StrategyType.V2_1 || _strategy.type === StrategyType.V1) { - [fyToken, currentPoolAddr] = await Promise.all([ - _strategy.strategyContract.fyToken(), - _strategy.strategyContract.pool(), - ]).catch((e: any) => { - console.log('Error getting strategy data: ', _strategy.name); - return [undefined, undefined]; - }); + [fyToken, currentPoolAddr] = await multicall({ + contracts: [ + { + address: _strategy.strategyContract.address as `0x${string}`, + abi: _strategy.strategyContract.interface as any, + functionName: 'fyToken', + args:[], + }, + { + address: _strategy.strategyContract.address as `0x${string}`, + abi: _strategy.strategyContract.interface as any, + functionName: 'pool', + args:[], + }, + ]}) as unknown as BigNumber[]; + } else if (_strategy.type === StrategyType.V2) { - fyToken = _strategy.associatedSeries; + currentPoolAddr = await _strategy.strategyContract.pool(); + fyToken = _strategy.associatedSeries; + } + // if (_strategy.type === StrategyType.V2_1 || _strategy.type === StrategyType.V1) { + // [fyToken, currentPoolAddr] = await Promise.all([ + // _strategy.strategyContract.fyToken(), + // _strategy.strategyContract.pool(), + // ]).catch((e: any) => { + // console.log('Error getting strategy data: ', _strategy.name); + // return [undefined, undefined]; + // }); + // } else if (_strategy.type === StrategyType.V2) { + // fyToken = _strategy.associatedSeries; + // currentPoolAddr = await _strategy.strategyContract.pool(); + // } + /* We check if the strategy has been supersecced by a newer version */ const hasAnUpdatedVersion = _strategy.type === StrategyType.V2 || _strategy.type === StrategyType.V1; @@ -579,14 +601,34 @@ const UserProvider = ({ children }: { children: ReactNode }) => { let rewardsTokenAddress: string | undefined; try { - const [{ rate }, { start, end }, rewardsToken] = await Promise.all([ - _strategy.strategyContract.rewardsPerToken(), - _strategy.strategyContract.rewardsPeriod(), - _strategy.strategyContract.rewardsToken(), - ]); + + const [{ rate }, { start, end }, rewardsToken] = await multicall({ + contracts: [ + { + address: _strategy.strategyContract.address as `0x${string}`, + abi: _strategy.strategyContract.interface as any, + functionName: 'rewardsPerToken', + args:[], + }, + { + address: _strategy.strategyContract.address as `0x${string}`, + abi: _strategy.strategyContract.interface as any, + functionName: 'rewardsPeriod', + args:[], + }, + { + address: _strategy.strategyContract.address as `0x${string}`, + abi: _strategy.strategyContract.interface as any, + functionName: 'rewardsToken', + args:[], + }, + + ]}) as unknown as any[]; + rewardsPeriod = { start, end }; rewardsRate = rate; rewardsTokenAddress = rewardsToken; + } catch (e) { console.log(`Could not get any rewards data for strategy with address: ${_strategy.address}`); rewardsPeriod = undefined; From fdd02b45fadb57eaf1ae536da99a4f3d12dabe34 Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Fri, 2 Jun 2023 09:38:06 +0100 Subject: [PATCH 36/51] messaging on strategy position item --- src/components/PositionAvatar.tsx | 6 +++++- src/components/positionItems/StrategyItem.tsx | 2 +- src/components/views/PoolPosition.tsx | 11 +++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/components/PositionAvatar.tsx b/src/components/PositionAvatar.tsx index 3b8c5b09a..409ee96b7 100644 --- a/src/components/PositionAvatar.tsx +++ b/src/components/PositionAvatar.tsx @@ -6,6 +6,8 @@ import styled from 'styled-components'; import { UserContext } from '../contexts/UserContext'; import { IVault, ISeries, IAsset, IStrategy, ActionType } from '../types'; import Logo from './logos/Logo'; +import { StrategyType } from '../config/strategies'; +import { FaExclamationCircle } from 'react-icons/fa'; const Outer = styled(Box)` position: relative; @@ -30,10 +32,12 @@ function PositionAvatar({ position, condensed, actionType, + type }: { position: IVault | ISeries | IStrategy; actionType: ActionType; condensed?: boolean; + type?: any; }) { const isVault = position?.id.length > 15; @@ -67,7 +71,7 @@ function PositionAvatar({ )} {actionType === ActionType.POOL && ( - {series?.seriesIsMature ? : } + {type !== StrategyType.V2_1 ? : } )} diff --git a/src/components/positionItems/StrategyItem.tsx b/src/components/positionItems/StrategyItem.tsx index 5ce1511a9..5412c5c6d 100644 --- a/src/components/positionItems/StrategyItem.tsx +++ b/src/components/positionItems/StrategyItem.tsx @@ -38,7 +38,7 @@ function StrategyItem({ strategy, index, condensed }: { strategy: IStrategy; ind return ( handleSelect(strategy)} index={index}> - + { const mobile: boolean = useContext(ResponsiveContext) === 'small'; @@ -278,6 +279,16 @@ const PoolPosition = () => { /> )} + {selectedStrategy?.type !== StrategyType.V2_1 && ( + } + loading={seriesLoading} + /> + ) + } + {selectedStrategy?.accountRewards?.gt(ZERO_BN) && selectedStrategy?.rewardsTokenAddress && ( Date: Fri, 2 Jun 2023 15:04:11 +0100 Subject: [PATCH 37/51] formatting+build confirmed --- src/components/views/PoolPosition.tsx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/components/views/PoolPosition.tsx b/src/components/views/PoolPosition.tsx index 42c5941df..9c920ceb6 100644 --- a/src/components/views/PoolPosition.tsx +++ b/src/components/views/PoolPosition.tsx @@ -280,14 +280,13 @@ const PoolPosition = () => { )} {selectedStrategy?.type !== StrategyType.V2_1 && ( - } - loading={seriesLoading} - /> - ) - } + } + loading={seriesLoading} + /> + )} {selectedStrategy?.accountRewards?.gt(ZERO_BN) && selectedStrategy?.rewardsTokenAddress && ( From ef08f804ca4ddf31bad57001b739679bb36700da Mon Sep 17 00:00:00 2001 From: Jacob Bryant Date: Fri, 2 Jun 2023 16:42:26 -0400 Subject: [PATCH 38/51] allow vaults loading on forks --- src/contexts/UserContext.tsx | 139 ++++++++++++++++------------------- 1 file changed, 64 insertions(+), 75 deletions(-) diff --git a/src/contexts/UserContext.tsx b/src/contexts/UserContext.tsx index e5f068b58..3772c5364 100644 --- a/src/contexts/UserContext.tsx +++ b/src/contexts/UserContext.tsx @@ -3,7 +3,7 @@ import { useContext, useEffect, useReducer, useCallback, useState, Dispatch, cre import { BigNumber, ethers } from 'ethers'; import * as contractTypes from '../contracts'; -import { multicall } from '@wagmi/core' +import { multicall } from '@wagmi/core'; import { calculateAPR, @@ -305,29 +305,27 @@ const UserProvider = ({ children }: { children: ReactNode }) => { /* Add in the dynamic series data of the series in the list */ _publicData = await Promise.all( - seriesList.map(async (series): Promise => { - - const [baseReserves, fyTokenReserves, totalSupply, fyTokenRealReserves] = await multicall({ + const [baseReserves, fyTokenReserves, totalSupply, fyTokenRealReserves] = (await multicall({ contracts: [ { address: series.poolContract.address as `0x${string}`, abi: series.poolContract.interface as any, functionName: 'getBaseBalance', - args:[], + args: [], }, { address: series.poolContract.address as `0x${string}`, abi: series.poolContract.interface as any, functionName: 'getFYTokenBalance', - args:[], + args: [], }, { address: series.poolContract.address as `0x${string}`, abi: series.poolContract.interface as any, functionName: 'totalSupply', - args:[], + args: [], }, { address: series.fyTokenContract.address as `0x${string}`, @@ -336,7 +334,7 @@ const UserProvider = ({ children }: { children: ReactNode }) => { args: [series.poolAddress], }, ], - }) as unknown as BigNumber[]; + })) as unknown as BigNumber[]; let sharesReserves: BigNumber; let c: BigNumber | undefined; @@ -346,39 +344,40 @@ const UserProvider = ({ children }: { children: ReactNode }) => { /* This was the case used for Euler pools - no longer used left here for reference */ if (false) { - [sharesReserves, c, mu, currentSharePrice, sharesAddress] = await multicall({ + [sharesReserves, c, mu, currentSharePrice, sharesAddress] = (await multicall({ contracts: [ { address: series.poolContract.address as `0x${string}`, abi: series.poolContract.interface as any, functionName: 'getSharesBalance', - args:[], + args: [], }, { address: series.poolContract.address as `0x${string}`, abi: series.poolContract.interface as any, functionName: 'getC', - args:[], + args: [], }, { address: series.poolContract.address as `0x${string}`, abi: series.poolContract.interface as any, functionName: 'mu', - args:[], + args: [], }, { address: series.poolContract.address as `0x${string}`, abi: series.poolContract.interface as any, functionName: 'getCurrentSharePrice', - args:[], + args: [], }, { address: series.poolContract.address as `0x${string}`, abi: series.poolContract.interface as any, functionName: 'sharesToken', - args:[], - } - ]}) as unknown as any[]; + args: [], + }, + ], + })) as unknown as any[]; } else { sharesReserves = baseReserves || ZERO_BN; currentSharePrice = ethers.utils.parseUnits('1', series.decimals); @@ -468,29 +467,28 @@ const UserProvider = ({ children }: { children: ReactNode }) => { if (account) { _accountData = await Promise.all( _publicData.map(async (series): Promise => { - - const [poolTokens, fyTokenBalance] = await multicall({ + const [poolTokens, fyTokenBalance] = (await multicall({ contracts: [ { address: series.poolContract.address as `0x${string}`, abi: series.poolContract.interface as any, functionName: 'balanceOf', - args:[account], + args: [account], }, { address: series.fyTokenContract.address as `0x${string}`, abi: series.poolContract.interface as any, functionName: 'balanceOf', - args:[account], - }, - ] - }) as unknown as BigNumber[]; + args: [account], + }, + ], + })) as unknown as BigNumber[]; const poolPercent = mulDecimal(divDecimal(poolTokens || ZERO_BN, series.totalSupply), '100'); return { ...series, - poolTokens: poolTokens || ZERO_BN , + poolTokens: poolTokens || ZERO_BN, fyTokenBalance: fyTokenBalance || ZERO_BN, poolTokens_: ethers.utils.formatUnits(poolTokens || ZERO_BN, series.decimals), fyTokenBalance_: ethers.utils.formatUnits(fyTokenBalance || ZERO_BN, series.decimals), @@ -524,38 +522,33 @@ const UserProvider = ({ children }: { children: ReactNode }) => { const _seriesList = seriesList.length ? seriesList : Array.from(userState.seriesMap.values()); - - // let _publicData: IStrategy[] = []; const _publicData = await Promise.all( strategyList.map(async (_strategy): Promise => { - const strategyTotalSupply = await _strategy.strategyContract.totalSupply(); let currentPoolAddr = undefined; let fyToken: any = undefined; if (_strategy.type === StrategyType.V2_1 || _strategy.type === StrategyType.V1) { - [fyToken, currentPoolAddr] = await multicall({ - contracts: [ - { - address: _strategy.strategyContract.address as `0x${string}`, - abi: _strategy.strategyContract.interface as any, - functionName: 'fyToken', - args:[], - }, - { - address: _strategy.strategyContract.address as `0x${string}`, - abi: _strategy.strategyContract.interface as any, - functionName: 'pool', - args:[], - }, - ]}) as unknown as BigNumber[]; - + [fyToken, currentPoolAddr] = (await multicall({ + contracts: [ + { + address: _strategy.strategyContract.address as `0x${string}`, + abi: _strategy.strategyContract.interface as any, + functionName: 'fyToken', + args: [], + }, + { + address: _strategy.strategyContract.address as `0x${string}`, + abi: _strategy.strategyContract.interface as any, + functionName: 'pool', + args: [], + }, + ], + })) as unknown as BigNumber[]; } else if (_strategy.type === StrategyType.V2) { - currentPoolAddr = await _strategy.strategyContract.pool(); fyToken = _strategy.associatedSeries; - } // if (_strategy.type === StrategyType.V2_1 || _strategy.type === StrategyType.V1) { @@ -571,7 +564,6 @@ const UserProvider = ({ children }: { children: ReactNode }) => { // currentPoolAddr = await _strategy.strategyContract.pool(); // } - /* We check if the strategy has been supersecced by a newer version */ const hasAnUpdatedVersion = _strategy.type === StrategyType.V2 || _strategy.type === StrategyType.V1; @@ -601,34 +593,32 @@ const UserProvider = ({ children }: { children: ReactNode }) => { let rewardsTokenAddress: string | undefined; try { - - const [{ rate }, { start, end }, rewardsToken] = await multicall({ + const [{ rate }, { start, end }, rewardsToken] = (await multicall({ contracts: [ { address: _strategy.strategyContract.address as `0x${string}`, abi: _strategy.strategyContract.interface as any, functionName: 'rewardsPerToken', - args:[], + args: [], }, { address: _strategy.strategyContract.address as `0x${string}`, abi: _strategy.strategyContract.interface as any, functionName: 'rewardsPeriod', - args:[], + args: [], }, { address: _strategy.strategyContract.address as `0x${string}`, abi: _strategy.strategyContract.interface as any, functionName: 'rewardsToken', - args:[], + args: [], }, - - ]}) as unknown as any[]; + ], + })) as unknown as any[]; rewardsPeriod = { start, end }; rewardsRate = rate; rewardsTokenAddress = rewardsToken; - } catch (e) { console.log(`Could not get any rewards data for strategy with address: ${_strategy.address}`); rewardsPeriod = undefined; @@ -668,37 +658,36 @@ const UserProvider = ({ children }: { children: ReactNode }) => { const _accountData = account ? await Promise.all( _publicData.map(async (_strategy: IStrategy): Promise => { - - const [accountBalance, accountPoolBalance] = await multicall({ - contracts: [ - { - address: _strategy.strategyContract.address as `0x${string}`, - abi: _strategy.strategyContract.interface as any, - functionName: 'balanceOf', - args:[account], - }, - { - address: _strategy.currentSeries?.poolContract.address as `0x${string}`, - abi: _strategy.currentSeries?.poolContract.interface as any, - functionName: 'balanceOf', - args:[account], - }, - ] - }) as unknown as BigNumber[]; + const [accountBalance, accountPoolBalance] = (await multicall({ + contracts: [ + { + address: _strategy.strategyContract.address as `0x${string}`, + abi: _strategy.strategyContract.interface as any, + functionName: 'balanceOf', + args: [account], + }, + { + address: _strategy.currentSeries?.poolContract.address as `0x${string}`, + abi: _strategy.currentSeries?.poolContract.interface as any, + functionName: 'balanceOf', + args: [account], + }, + ], + })) as unknown as BigNumber[]; // const stratConnected = _strategy.strategyContract.connect(signer!); // const accountRewards = // _strategy.rewardsRate?.gt(ZERO_BN) && signer ? await stratConnected.callStatic.claim(account) : ZERO_BN; const accountRewards = ZERO_BN; const accountStrategyPercent = mulDecimal( - divDecimal(accountBalance||ZERO_BN, _strategy.strategyTotalSupply || '0'), + divDecimal(accountBalance || ZERO_BN, _strategy.strategyTotalSupply || '0'), '100' ); return { ..._strategy, - accountBalance : accountBalance|| ZERO_BN, - accountBalance_: ethers.utils.formatUnits(accountBalance||ZERO_BN, _strategy.decimals), + accountBalance: accountBalance || ZERO_BN, + accountBalance_: ethers.utils.formatUnits(accountBalance || ZERO_BN, _strategy.decimals), accountPoolBalance: accountPoolBalance || ZERO_BN, accountStrategyPercent, accountRewards: accountRewards, @@ -740,7 +729,7 @@ const UserProvider = ({ children }: { children: ReactNode }) => { /** * if vaultList is empty, clear local app memory and fetch complete Vaultlist from chain via _getVaults */ - if (vaultList.length === 0 && !useForkedEnv) { + if (vaultList.length === 0) { updateState({ type: UserState.CLEAR_VAULTS }); _vaults = await _getVaults(); } From 31a3a8cb1faaae2c5e2b4986cc6908dee92e0c2b Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Mon, 5 Jun 2023 09:04:11 +0100 Subject: [PATCH 39/51] version bump --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4a845419e..26c11cf4b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "app-v2", - "version": "2.5.21", + "version": "2.5.22", "private": true, "dependencies": { "@ethersproject/providers": "^5.6.8", From 58987a89c68d682f856c07af50d01ba644f8ecdc Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Mon, 5 Jun 2023 15:32:15 +0100 Subject: [PATCH 40/51] remove public notice arbitrum --- src/components/PublicNotification.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/PublicNotification.tsx b/src/components/PublicNotification.tsx index bc581271a..381160761 100644 --- a/src/components/PublicNotification.tsx +++ b/src/components/PublicNotification.tsx @@ -11,7 +11,7 @@ const PublicNotification = ({ children }: PublicNotificationProps) => { const chainId = useChainId(); return ( <> - {/* {chainId === 1 ? ( */} + { chainId === 1 ? { - {/* ) : null} */} + : null + } ); }; From 981b8c7f38c362486ccc02de2732060c9c772fa4 Mon Sep 17 00:00:00 2001 From: marcomariscal Date: Mon, 5 Jun 2023 08:02:04 -0700 Subject: [PATCH 41/51] fix: handle undefined/null fetched series data --- src/contexts/UserContext.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/contexts/UserContext.tsx b/src/contexts/UserContext.tsx index 3772c5364..68423c061 100644 --- a/src/contexts/UserContext.tsx +++ b/src/contexts/UserContext.tsx @@ -334,7 +334,7 @@ const UserProvider = ({ children }: { children: ReactNode }) => { args: [series.poolAddress], }, ], - })) as unknown as BigNumber[]; + })) as unknown as (BigNumber | undefined | null)[]; let sharesReserves: BigNumber; let c: BigNumber | undefined; @@ -379,7 +379,7 @@ const UserProvider = ({ children }: { children: ReactNode }) => { ], })) as unknown as any[]; } else { - sharesReserves = baseReserves || ZERO_BN; + sharesReserves = baseReserves ?? ZERO_BN; currentSharePrice = ethers.utils.parseUnits('1', series.decimals); sharesAddress = assetRootMap.get(series.baseId)?.address!; diagnostics && console.log('Using old pool contract that does not include c, mu, and shares'); @@ -409,7 +409,7 @@ const UserProvider = ({ children }: { children: ReactNode }) => { /* Calculates the base/fyToken unit selling price */ const _sellRate = sellFYToken( sharesReserves, - fyTokenReserves, + fyTokenReserves || ZERO_BN, rateCheckAmount, getTimeTillMaturity(series.maturity), series.ts, @@ -444,10 +444,10 @@ const UserProvider = ({ children }: { children: ReactNode }) => { ...series, sharesReserves, sharesReserves_: ethers.utils.formatUnits(sharesReserves, series.decimals), - fyTokenReserves, - fyTokenRealReserves, - totalSupply, - totalSupply_: ethers.utils.formatUnits(totalSupply, series.decimals), + fyTokenReserves: fyTokenReserves || ZERO_BN, + fyTokenRealReserves: fyTokenRealReserves || ZERO_BN, + totalSupply: totalSupply || ZERO_BN, + totalSupply_: totalSupply ? ethers.utils.formatUnits(totalSupply, series.decimals) : '0', apr: `${Number(apr).toFixed(2)}`, seriesIsMature: isMature(series.maturity), c, @@ -511,7 +511,7 @@ const UserProvider = ({ children }: { children: ReactNode }) => { return newSeriesMap; }, - [account, diagnostics, getPoolAPY, getTimeTillMaturity, isMature] + [account, assetRootMap, diagnostics, getPoolAPY, getTimeTillMaturity, isMature] ); /* Updates the assets with relevant *user* data */ From 5a826414c0982aa651fda8ada6a44a7f146d55ea Mon Sep 17 00:00:00 2001 From: marcomariscal Date: Mon, 5 Jun 2023 08:10:33 -0700 Subject: [PATCH 42/51] feat: update fork based on recently executed proposal --- .env.local | 2 +- src/components/settings/SupportSettings.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.local b/.env.local index f865d88e5..b89eee3f1 100644 --- a/.env.local +++ b/.env.local @@ -4,7 +4,7 @@ REACT_APP_VERSION=$npm_package_version REACT_APP_RPC_URL_1='https://eth-mainnet.g.alchemy.com/v2/ZXDCq5iy0KrKR0XjsqC6E4QG7Z_FuXDv' REACT_APP_RPC_URL_42161='https://arb-mainnet.g.alchemy.com/v2/vtMM4_eLnOvkjkdckprVw3cIa64EVkDZ' -REACT_APP_DEFAULT_FORK_RPC_URL='https://rpc.tenderly.co/fork/29d59b62-1c40-4099-af37-c7ac8abb59fe' +REACT_APP_DEFAULT_FORK_RPC_URL='https://rpc.tenderly.co/fork/679cb075-9657-494c-bd6c-7f3fa8ec6a8f' REACT_APP_LOCALHOST_RPC_URL='http://127.0.0.1:8545' REACT_APP_RPC_URL_421611='https://arb-rinkeby.g.alchemy.com/v2/AY_Q_Uy-Kcfwmf5In5qwG636vaOIoA8L' diff --git a/src/components/settings/SupportSettings.tsx b/src/components/settings/SupportSettings.tsx index c1e967209..0f380cae2 100644 --- a/src/components/settings/SupportSettings.tsx +++ b/src/components/settings/SupportSettings.tsx @@ -48,7 +48,7 @@ const SupportSettings = () => { if (address && allowList.includes(address)) { setAllowSupport(true); } else { - setAllowSupport(false); + setAllowSupport(true); } }, [address]); From 5323a3466607185201cc4adefce580ac924f4559 Mon Sep 17 00:00:00 2001 From: marcomariscal Date: Mon, 5 Jun 2023 08:45:58 -0700 Subject: [PATCH 43/51] feat: don't show estimated value for non v2.1 strats --- src/components/views/PoolPosition.tsx | 14 ++++++++------ src/hooks/viewHelperHooks/usePoolHelpers.ts | 6 ++++++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/components/views/PoolPosition.tsx b/src/components/views/PoolPosition.tsx index 9c920ceb6..f4340cc8c 100644 --- a/src/components/views/PoolPosition.tsx +++ b/src/components/views/PoolPosition.tsx @@ -224,12 +224,14 @@ const PoolPosition = () => { /> } loading={seriesLoading} /> diff --git a/src/hooks/viewHelperHooks/usePoolHelpers.ts b/src/hooks/viewHelperHooks/usePoolHelpers.ts index 791e86dca..3c148a62d 100644 --- a/src/hooks/viewHelperHooks/usePoolHelpers.ts +++ b/src/hooks/viewHelperHooks/usePoolHelpers.ts @@ -22,6 +22,7 @@ import useTimeTillMaturity from '../useTimeTillMaturity'; import { useAccount, useBalance, Address } from 'wagmi'; import { WETH } from '../../config/assets'; import useAccountPlus from '../useAccountPlus'; +import { StrategyType } from '../../config/strategies'; export const usePoolHelpers = (input: string | undefined, removeLiquidityView: boolean = false) => { /* STATE FROM CONTEXT */ @@ -290,6 +291,11 @@ export const usePoolHelpers = (input: string | undefined, removeLiquidityView: b strategySeries.mu ); + // if non-current strategy, don't try to estimate base value because of difficutly in getting series data + if (strategy.type !== StrategyType.V2_1) { + return; + } + // if we could sell all fyToken to shares if (!fyTokenToShares.eq(ethers.constants.Zero)) { diagnostics && console.log('NO VAULT : pool trade is possible : USE REMOVE OPTION 4.1 '); From a416361132844eaf606e4ab0438ba92d7205be7f Mon Sep 17 00:00:00 2001 From: marcomariscal Date: Mon, 5 Jun 2023 08:46:56 -0700 Subject: [PATCH 44/51] feat: don't show input info wrap if no base received estimate --- src/components/views/PoolPosition.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/PoolPosition.tsx b/src/components/views/PoolPosition.tsx index f4340cc8c..11a109640 100644 --- a/src/components/views/PoolPosition.tsx +++ b/src/components/views/PoolPosition.tsx @@ -360,7 +360,7 @@ const PoolPosition = () => { /> - {removeInput && !partialRemoveRequired && !removeError && ( + {removeInput && !partialRemoveRequired && !removeError && removeBaseReceived_ && ( Approx. return {cleanValue(removeBaseReceived_, selectedBase?.digitFormat)}{' '} From 93ae371acc59d9f93c9159f65d56d3fe28178f25 Mon Sep 17 00:00:00 2001 From: marcomariscal Date: Mon, 5 Jun 2023 08:49:37 -0700 Subject: [PATCH 45/51] feat: info bite text --- src/components/views/PoolPosition.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/views/PoolPosition.tsx b/src/components/views/PoolPosition.tsx index 11a109640..0c8dce297 100644 --- a/src/components/views/PoolPosition.tsx +++ b/src/components/views/PoolPosition.tsx @@ -283,10 +283,10 @@ const PoolPosition = () => { {selectedStrategy?.type !== StrategyType.V2_1 && ( } - loading={seriesLoading} + loading={false} /> )} From 31fba1b7313acc75c05427a4b8d955a989d2b642 Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Mon, 5 Jun 2023 16:51:29 +0100 Subject: [PATCH 46/51] verbiage/NoActionReqd --- src/components/views/PoolPosition.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/views/PoolPosition.tsx b/src/components/views/PoolPosition.tsx index 9c920ceb6..f67e09473 100644 --- a/src/components/views/PoolPosition.tsx +++ b/src/components/views/PoolPosition.tsx @@ -281,8 +281,9 @@ const PoolPosition = () => { {selectedStrategy?.type !== StrategyType.V2_1 && ( } loading={seriesLoading} /> From 95d9d53e8ce48a6b2a07fc7c28610169a21df175 Mon Sep 17 00:00:00 2001 From: marcomariscal Date: Mon, 5 Jun 2023 08:55:15 -0700 Subject: [PATCH 47/51] fix: handle zero address as strategy rewards token --- src/contexts/UserContext.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/contexts/UserContext.tsx b/src/contexts/UserContext.tsx index 68423c061..6e5e2b899 100644 --- a/src/contexts/UserContext.tsx +++ b/src/contexts/UserContext.tsx @@ -642,7 +642,8 @@ const UserProvider = ({ children }: { children: ReactNode }) => { rewardsRate, rewardsPeriod, - rewardsTokenAddress, + rewardsTokenAddress: + rewardsTokenAddress === '0x0000000000000000000000000000000000000000' ? undefined : rewardsTokenAddress, }; } From efb5a3dddea562f96ee7df53aa8ff4abd5ba068f Mon Sep 17 00:00:00 2001 From: marcomariscal Date: Mon, 5 Jun 2023 08:55:39 -0700 Subject: [PATCH 48/51] fix: revert support settings --- src/components/settings/SupportSettings.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/settings/SupportSettings.tsx b/src/components/settings/SupportSettings.tsx index 0f380cae2..c1e967209 100644 --- a/src/components/settings/SupportSettings.tsx +++ b/src/components/settings/SupportSettings.tsx @@ -48,7 +48,7 @@ const SupportSettings = () => { if (address && allowList.includes(address)) { setAllowSupport(true); } else { - setAllowSupport(true); + setAllowSupport(false); } }, [address]); From 1413766ded9821ccb0c341f58bcce17f58704dd6 Mon Sep 17 00:00:00 2001 From: marcomariscal Date: Mon, 5 Jun 2023 09:18:29 -0700 Subject: [PATCH 49/51] fix: type prop --- src/components/views/PoolPosition.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/views/PoolPosition.tsx b/src/components/views/PoolPosition.tsx index 0c8dce297..afeed4a9a 100644 --- a/src/components/views/PoolPosition.tsx +++ b/src/components/views/PoolPosition.tsx @@ -205,7 +205,11 @@ const PoolPosition = () => { pad={{ top: mobile ? 'medium' : undefined }} > - + {formatStrategyName(_selectedStrategy?.name)} From bd84cc63598334cf05a345439c627b5ae9a82b5d Mon Sep 17 00:00:00 2001 From: marcomariscal Date: Mon, 5 Jun 2023 09:35:16 -0700 Subject: [PATCH 50/51] fix: use proper remove base max --- src/components/views/PoolPosition.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/PoolPosition.tsx b/src/components/views/PoolPosition.tsx index afeed4a9a..d354ac20e 100644 --- a/src/components/views/PoolPosition.tsx +++ b/src/components/views/PoolPosition.tsx @@ -229,7 +229,7 @@ const PoolPosition = () => { Date: Mon, 5 Jun 2023 09:57:36 -0700 Subject: [PATCH 51/51] chore: format --- src/hooks/useAccountPlus.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/hooks/useAccountPlus.ts b/src/hooks/useAccountPlus.ts index f4cf63518..e279c455e 100644 --- a/src/hooks/useAccountPlus.ts +++ b/src/hooks/useAccountPlus.ts @@ -7,12 +7,11 @@ import { SettingsContext } from '../contexts/SettingsContext'; * @returns mockUserAddress input when using mocked data, else simply the wagmi useAccount hook address */ const useAccountPlus = () => { - const { settingsState: { useMockedUser, mockUserAddress }, } = useContext(SettingsContext); const { address } = useAccount(); - const {data:nativeBalance} = useBalance({address}); + const { data: nativeBalance } = useBalance({ address }); return useMemo( () => (useMockedUser ? { address: mockUserAddress, nativeBalance } : { address, nativeBalance }),