diff --git a/src/apps/notional-finance-v3/arbitrum/notional-finance-v3.borrow.contract-position-fetcher.ts b/src/apps/notional-finance-v3/arbitrum/notional-finance-v3.borrow.contract-position-fetcher.ts new file mode 100644 index 000000000..24a2bb11f --- /dev/null +++ b/src/apps/notional-finance-v3/arbitrum/notional-finance-v3.borrow.contract-position-fetcher.ts @@ -0,0 +1,133 @@ +import { Inject } from '@nestjs/common'; +import BigNumber from 'bignumber.js'; +import { pick, range } from 'lodash'; + +import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; +import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; +import { getLabelFromToken } from '~app-toolkit/helpers/presentation/image.present'; +import { MetaType } from '~position/position.interface'; +import { GetDefinitionsParams } from '~position/template/app-token.template.types'; +import { ContractPositionTemplatePositionFetcher } from '~position/template/contract-position.template.position-fetcher'; +import { + GetDataPropsParams, + GetDisplayPropsParams, + GetTokenBalancesParams, + GetTokenDefinitionsParams, +} from '~position/template/contract-position.template.types'; + +import { NotionalFinanceV3ContractFactory, NotionalView } from '../contracts'; + +export type NotionalBorrowingDefinition = { + address: string; + underlyingTokenAddress: string; + currencyId: number; + tokenId: string; + maturity: number; + type: string; +}; + +export type NotionalBorrowingDataProps = { + currencyId: number; + tokenId: string; + maturity: number; + type: string; +}; + +@PositionTemplate() +export class EthereumNotionalFinanceV3BorrowContractPositionFetcher extends ContractPositionTemplatePositionFetcher< + NotionalView, + NotionalBorrowingDataProps, + NotionalBorrowingDefinition +> { + groupLabel = 'Borrow'; + + notionalViewContractAddress = '0x1344a36a1b56144c3bc62e7757377d288fde0369'; + + constructor( + @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, + @Inject(NotionalFinanceV3ContractFactory) protected readonly contractFactory: NotionalFinanceV3ContractFactory, + ) { + super(appToolkit); + } + + getContract(address: string): NotionalView { + return this.contractFactory.notionalView({ address, network: this.network }); + } + + async getDefinitions({ multicall }: GetDefinitionsParams): Promise { + const notionalViewContract = this.contractFactory.notionalView({ + address: this.notionalViewContractAddress, + network: this.network, + }); + + const currencyCount = await multicall.wrap(notionalViewContract).getMaxCurrencyId(); + const currencyRange = range(1, currencyCount + 1); + const definitions = await Promise.all( + currencyRange.map(async currencyId => { + const currency = await multicall.wrap(notionalViewContract).getCurrency(currencyId); + const underlyingTokenAddress = currency.underlyingToken.tokenAddress.toLowerCase(); + const activeMarkets = await multicall.wrap(notionalViewContract).getActiveMarkets(currencyId); + + const markets = await Promise.all( + activeMarkets.map(async activeMarket => { + const type = 'borrowing'; + const maturity = Number(activeMarket.maturity); + const tokenId = await multicall + .wrap(notionalViewContract) + .encodeToId(currencyId, maturity, 0) + .then(v => v.toString()); + + return { + address: this.notionalViewContractAddress, + currencyId, + underlyingTokenAddress, + maturity, + tokenId, + type, + }; + }), + ); + + return markets; + }), + ); + + return definitions.flat(); + } + + async getTokenDefinitions({ definition }: GetTokenDefinitionsParams) { + return [ + { metaType: MetaType.BORROWED, address: definition.address, network: this.network, tokenId: definition.tokenId }, + ]; + } + + async getDataProps( + params: GetDataPropsParams, + ) { + const defaultDataProps = await super.getDataProps(params); + const props = pick(params.definition, ['currencyId', 'tokenId', 'maturity', 'type']); + return { ...defaultDataProps, ...props, positionKey: Object.values(props).join(':') }; + } + + async getLabel({ contractPosition }: GetDisplayPropsParams): Promise { + return getLabelFromToken(contractPosition.tokens[0]); + } + + async getTokenBalancesPerPosition({ + address, + contractPosition, + contract, + }: GetTokenBalancesParams) { + const { maturity, currencyId } = contractPosition.dataProps; + const portfolio = await contract.getAccountPortfolio(address); + const debtPositions = portfolio.filter(v => v.notional.isNegative()); + const position = debtPositions.find(v => Number(v.maturity) === maturity && Number(v.currencyId) === currencyId); + if (!position) return [0]; + + const fcashAmountAtMaturity = new BigNumber(position.notional.toString()) + .times(10 ** contractPosition.tokens[0].decimals) + .div(10 ** 8); + + return [fcashAmountAtMaturity.abs().toString()]; + } +} diff --git a/src/apps/notional-finance-v3/arbitrum/notional-finance-v3.f-cash.token-fetcher.ts b/src/apps/notional-finance-v3/arbitrum/notional-finance-v3.f-cash.token-fetcher.ts new file mode 100644 index 000000000..eecdd6029 --- /dev/null +++ b/src/apps/notional-finance-v3/arbitrum/notional-finance-v3.f-cash.token-fetcher.ts @@ -0,0 +1,197 @@ +import { Inject } from '@nestjs/common'; +import { BigNumberish } from 'ethers'; +import { pick, range } from 'lodash'; + +import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; +import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; +import { IMulticallWrapper } from '~multicall'; +import { AppTokenPosition } from '~position/position.interface'; +import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; +import { + DefaultAppTokenDataProps, + GetAddressesParams, + GetDataPropsParams, + GetDefinitionsParams, + GetDisplayPropsParams, + GetPricePerShareParams, + GetTokenPropsParams, + GetUnderlyingTokensParams, +} from '~position/template/app-token.template.types'; + +import { NotionalFCash, NotionalFinanceV3ContractFactory } from '../contracts'; + +export type NotionalFCashTokenDefinition = { + address: string; + underlyingTokenAddress: string; + currencyId: number; + tokenId: string; + maturity: number; +}; + +export type NotionalFCashTokenDataProps = DefaultAppTokenDataProps & { + currencyId: number; + tokenId: string; + maturity: number; + positionKey: string; +}; + +const NOTIONAL_CONSTANT = 10 ** 7; +const SECONDS_IN_YEAR = 31104000; // 360 days + +@PositionTemplate() +export class ArbitrumNotionalFinanceV3FCashTokenFetcher extends AppTokenTemplatePositionFetcher< + NotionalFCash, + NotionalFCashTokenDataProps, + NotionalFCashTokenDefinition +> { + groupLabel = 'fCash'; + + notionalViewContractAddress = '0x1344a36a1b56144c3bc62e7757377d288fde0369'; + + constructor( + @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, + @Inject(NotionalFinanceV3ContractFactory) protected readonly contractFactory: NotionalFinanceV3ContractFactory, + ) { + super(appToolkit); + } + + getContract(address: string): NotionalFCash { + return this.contractFactory.notionalFCash({ address, network: this.network }); + } + + async getDefinitions({ multicall }: GetDefinitionsParams): Promise { + const notionalViewContract = this.contractFactory.notionalView({ + address: this.notionalViewContractAddress, + network: this.network, + }); + + const currencyCount = await multicall.wrap(notionalViewContract).getMaxCurrencyId(); + const currencyRange = range(1, currencyCount + 1); + const definitions = await Promise.all( + currencyRange.map(async currencyId => { + const currency = await multicall.wrap(notionalViewContract).getCurrency(currencyId); + const underlyingTokenAddress = currency.underlyingToken.tokenAddress.toLowerCase(); + const activeMarkets = await multicall.wrap(notionalViewContract).getActiveMarkets(currencyId); + + const markets = await Promise.all( + activeMarkets.map(async activeMarket => { + const maturity = Number(activeMarket.maturity); + const tokenId = await multicall + .wrap(notionalViewContract) + .encodeToId(currencyId, maturity, 0) + .then(v => v.toString()); + + return { + address: this.notionalViewContractAddress, + currencyId, + underlyingTokenAddress, + maturity, + tokenId, + }; + }), + ); + + return markets; + }), + ); + + return definitions.flat(); + } + + async getAddresses({ definitions }: GetAddressesParams) { + return definitions.map(v => v.address); + } + + async getSymbol({ appToken }: GetTokenPropsParams) { + return `f${appToken.tokens[0].symbol}`; + } + + async getSupply() { + return 0; + } + + async getDecimals({ appToken }: GetTokenPropsParams) { + return appToken.tokens[0].decimals; + } + + async getUnderlyingTokenDefinitions({ + definition, + }: GetUnderlyingTokensParams) { + return [{ address: definition.underlyingTokenAddress, network: this.network }]; + } + + async getPricePerShare({ + definition, + multicall, + }: GetPricePerShareParams) { + const notionalViewContract = this.contractFactory.notionalView({ + address: this.notionalViewContractAddress, + network: this.network, + }); + + const activeMarkets = await multicall.wrap(notionalViewContract).getActiveMarkets(definition.currencyId); + const market = activeMarkets.find(v => Number(v.maturity) === definition.maturity); + const apy = Number(market?.lastImpliedRate ?? 0) / NOTIONAL_CONSTANT; + + const dateNowEpoch = Date.now() / 1000; + const timeToMaturity = (definition.maturity - dateNowEpoch) / SECONDS_IN_YEAR; + const lastImpliedRate = apy / 100; + const fCashPV = 1 / Math.exp(lastImpliedRate * timeToMaturity); + + return [fCashPV]; + } + + async getLiquidity({ appToken }: GetDataPropsParams) { + return appToken.supply * appToken.price; + } + + async getReserves() { + return [0]; + } + + async getApy({ + definition, + multicall, + }: GetDataPropsParams) { + const notionalViewContract = this.contractFactory.notionalView({ + address: this.notionalViewContractAddress, + network: this.network, + }); + + const activeMarkets = await multicall.wrap(notionalViewContract).getActiveMarkets(definition.currencyId); + const market = activeMarkets.find(v => Number(v.maturity) === definition.maturity); + return Number(market?.lastImpliedRate ?? 0) / NOTIONAL_CONSTANT; + } + + async getDataProps( + params: GetDataPropsParams, + ) { + const defaultDataProps = await super.getDataProps(params); + return { + ...defaultDataProps, + ...pick(params.definition, ['currencyId', 'tokenId', 'maturity']), + positionKey: params.definition.tokenId, + }; + } + + async getLabel({ appToken }: GetDisplayPropsParams) { + const maturityDate = new Date(Number(appToken.dataProps.maturity) * 1000); + const year = maturityDate.getFullYear(); + const month = maturityDate.getMonth() + 1; + const day = maturityDate.getDate(); + const displayMaturity = day + '/' + month + '/' + year; + return `${appToken.symbol} - ${displayMaturity}`; + } + + getBalancePerToken({ + address, + appToken, + multicall, + }: { + address: string; + appToken: AppTokenPosition; + multicall: IMulticallWrapper; + }): Promise { + return multicall.wrap(this.getContract(appToken.address)).balanceOf(address, appToken.dataProps.tokenId); + } +} diff --git a/src/apps/notional-finance-v3/arbitrum/notional-finance-v3.n-token.token-fetcher.ts b/src/apps/notional-finance-v3/arbitrum/notional-finance-v3.n-token.token-fetcher.ts new file mode 100644 index 000000000..81de60010 --- /dev/null +++ b/src/apps/notional-finance-v3/arbitrum/notional-finance-v3.n-token.token-fetcher.ts @@ -0,0 +1,96 @@ +import { Inject } from '@nestjs/common'; +import { BigNumber } from 'ethers'; +import { compact, range } from 'lodash'; + +import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; +import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; +import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; +import { + DefaultAppTokenDataProps, + DefaultAppTokenDefinition, + GetAddressesParams, + GetDefinitionsParams, + GetPricePerShareParams, + GetUnderlyingTokensParams, + UnderlyingTokenDefinition, +} from '~position/template/app-token.template.types'; + +import { NotionalFinanceV3ContractFactory, NotionalPCash } from '../contracts'; + +export type NotionalFinanceV3PCashTokenDefinition = { + address: string; + currencyId: number; +}; + +@PositionTemplate() +export class ArbitrumNotionalFinanceV3NTokenTokenFetcher extends AppTokenTemplatePositionFetcher< + NotionalPCash, + DefaultAppTokenDataProps, + NotionalFinanceV3PCashTokenDefinition +> { + groupLabel = 'nTokens'; + notionalViewContractAddress = '0x1344a36a1b56144c3bc62e7757377d288fde0369'; + + constructor( + @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, + @Inject(NotionalFinanceV3ContractFactory) protected readonly contractFactory: NotionalFinanceV3ContractFactory, + ) { + super(appToolkit); + } + + getContract(address: string): NotionalPCash { + return this.contractFactory.notionalPCash({ network: this.network, address }); + } + + async getDefinitions({ multicall }: GetDefinitionsParams): Promise { + const notionalViewContract = this.contractFactory.notionalView({ + address: this.notionalViewContractAddress, + network: this.network, + }); + const maxCurrencyId = await multicall.wrap(notionalViewContract).getMaxCurrencyId(); + + const definitions = await Promise.all( + range(1, maxCurrencyId + 1).map(async currencyId => { + let address: string; + try { + address = await multicall.wrap(notionalViewContract).nTokenAddress(currencyId); + } catch (error) { + return null; + } + + return { + address, + currencyId, + }; + }), + ); + + return compact(definitions); + } + + async getAddresses({ definitions }: GetAddressesParams) { + return definitions.map(x => x.address); + } + + async getUnderlyingTokenDefinitions({ + contract, + }: GetUnderlyingTokensParams): Promise { + return [{ address: await contract.asset(), network: this.network }]; + } + + async getPricePerShare({ + appToken, + contract, + }: GetPricePerShareParams) { + let pricePerShareRaw: BigNumber; + try { + pricePerShareRaw = await contract.exchangeRate(); + } catch (error) { + pricePerShareRaw = BigNumber.from(10).pow(10 + appToken.tokens[0].decimals); + } + + const pricePerShare = Number(pricePerShareRaw) / 10 ** (10 + appToken.tokens[0].decimals); + + return [pricePerShare]; + } +} diff --git a/src/apps/notional-finance-v3/arbitrum/notional-finance-v3.p-cash.token-fetcher.ts b/src/apps/notional-finance-v3/arbitrum/notional-finance-v3.p-cash.token-fetcher.ts new file mode 100644 index 000000000..d0530f4a3 --- /dev/null +++ b/src/apps/notional-finance-v3/arbitrum/notional-finance-v3.p-cash.token-fetcher.ts @@ -0,0 +1,82 @@ +import { Inject } from '@nestjs/common'; +import { range } from 'lodash'; + +import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; +import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; +import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; +import { + DefaultAppTokenDataProps, + DefaultAppTokenDefinition, + GetAddressesParams, + GetDefinitionsParams, + GetPricePerShareParams, + GetUnderlyingTokensParams, + UnderlyingTokenDefinition, +} from '~position/template/app-token.template.types'; + +import { NotionalFinanceV3ContractFactory, NotionalPCash } from '../contracts'; + +export type NotionalFinanceV3PCashTokenDefinition = { + address: string; + currencyId: number; +}; + +@PositionTemplate() +export class ArbitrumNotionalFinanceV3PCashTokenFetcher extends AppTokenTemplatePositionFetcher< + NotionalPCash, + DefaultAppTokenDataProps, + NotionalFinanceV3PCashTokenDefinition +> { + groupLabel = 'Supply'; + notionalViewContractAddress = '0x1344a36a1b56144c3bc62e7757377d288fde0369'; + + constructor( + @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, + @Inject(NotionalFinanceV3ContractFactory) protected readonly contractFactory: NotionalFinanceV3ContractFactory, + ) { + super(appToolkit); + } + + getContract(address: string): NotionalPCash { + return this.contractFactory.notionalPCash({ network: this.network, address }); + } + + async getDefinitions({ multicall }: GetDefinitionsParams): Promise { + const notionalViewContract = this.contractFactory.notionalView({ + address: this.notionalViewContractAddress, + network: this.network, + }); + const maxCurrencyId = await multicall.wrap(notionalViewContract).getMaxCurrencyId(); + + return await Promise.all( + range(1, maxCurrencyId + 1).map(async currencyId => { + const address = await multicall.wrap(notionalViewContract).pCashAddress(currencyId); + + return { + address, + currencyId, + }; + }), + ); + } + + async getAddresses({ definitions }: GetAddressesParams) { + return definitions.map(x => x.address); + } + + async getUnderlyingTokenDefinitions({ + contract, + }: GetUnderlyingTokensParams): Promise { + return [{ address: await contract.asset(), network: this.network }]; + } + + async getPricePerShare({ + appToken, + contract, + }: GetPricePerShareParams) { + const pricePerShareRaw = await contract.exchangeRate(); + const pricePerShare = Number(pricePerShareRaw) / 10 ** 10 + appToken.tokens[0].decimals; + + return [pricePerShare]; + } +} diff --git a/src/apps/notional-finance-v3/arbitrum/notional-finance-v3.p-debt.token-fetcher.ts b/src/apps/notional-finance-v3/arbitrum/notional-finance-v3.p-debt.token-fetcher.ts new file mode 100644 index 000000000..7a6b5a2ce --- /dev/null +++ b/src/apps/notional-finance-v3/arbitrum/notional-finance-v3.p-debt.token-fetcher.ts @@ -0,0 +1,91 @@ +import { Inject } from '@nestjs/common'; +import { BigNumber } from 'ethers'; +import { range } from 'lodash'; + +import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; +import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; +import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; +import { + DefaultAppTokenDataProps, + DefaultAppTokenDefinition, + GetAddressesParams, + GetDefinitionsParams, + GetPricePerShareParams, + GetUnderlyingTokensParams, + UnderlyingTokenDefinition, +} from '~position/template/app-token.template.types'; + +import { NotionalFinanceV3ContractFactory, NotionalPCash } from '../contracts'; + +export type NotionalFinanceV3PDebtTokenDefinition = { + address: string; + currencyId: number; +}; + +@PositionTemplate() +export class ArbitrumNotionalFinanceV3PDebtTokenFetcher extends AppTokenTemplatePositionFetcher< + NotionalPCash, + DefaultAppTokenDataProps, + NotionalFinanceV3PDebtTokenDefinition +> { + groupLabel = 'Borrow'; + isDebt = true; + + notionalViewContractAddress = '0x1344a36a1b56144c3bc62e7757377d288fde0369'; + + constructor( + @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, + @Inject(NotionalFinanceV3ContractFactory) protected readonly contractFactory: NotionalFinanceV3ContractFactory, + ) { + super(appToolkit); + } + + getContract(address: string): NotionalPCash { + return this.contractFactory.notionalPCash({ network: this.network, address }); + } + + async getDefinitions({ multicall }: GetDefinitionsParams): Promise { + const notionalViewContract = this.contractFactory.notionalView({ + address: this.notionalViewContractAddress, + network: this.network, + }); + const maxCurrencyId = await multicall.wrap(notionalViewContract).getMaxCurrencyId(); + + return await Promise.all( + range(1, maxCurrencyId + 1).map(async currencyId => { + const address = await multicall.wrap(notionalViewContract).pDebtAddress(currencyId); + + return { + address, + currencyId, + }; + }), + ); + } + + async getAddresses({ definitions }: GetAddressesParams) { + return definitions.map(x => x.address); + } + + async getUnderlyingTokenDefinitions({ + contract, + }: GetUnderlyingTokensParams): Promise { + return [{ address: await contract.asset(), network: this.network }]; + } + + async getPricePerShare({ + appToken, + contract, + }: GetPricePerShareParams) { + let pricePerShareRaw: BigNumber; + try { + pricePerShareRaw = await contract.exchangeRate(); + } catch (error) { + pricePerShareRaw = BigNumber.from(10).pow(10 + appToken.tokens[0].decimals); + } + + const pricePerShare = Number(pricePerShareRaw) / 10 ** (10 + appToken.tokens[0].decimals); + + return [pricePerShare]; + } +} diff --git a/src/apps/notional-finance-v3/arbitrum/notional-finance-v3.supply.contract-position-fetcher.ts b/src/apps/notional-finance-v3/arbitrum/notional-finance-v3.supply.contract-position-fetcher.ts new file mode 100644 index 000000000..2ada82fb8 --- /dev/null +++ b/src/apps/notional-finance-v3/arbitrum/notional-finance-v3.supply.contract-position-fetcher.ts @@ -0,0 +1,135 @@ +import { Inject } from '@nestjs/common'; +import BigNumber from 'bignumber.js'; +import { BigNumberish } from 'ethers'; +import { pick, range } from 'lodash'; + +import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; +import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; +import { getLabelFromToken } from '~app-toolkit/helpers/presentation/image.present'; +import { MetaType } from '~position/position.interface'; +import { ContractPositionTemplatePositionFetcher } from '~position/template/contract-position.template.position-fetcher'; +import { + GetDataPropsParams, + GetDefinitionsParams, + GetDisplayPropsParams, + GetTokenBalancesParams, + GetTokenDefinitionsParams, +} from '~position/template/contract-position.template.types'; + +import { NotionalFinanceV3ContractFactory, NotionalView } from '../contracts'; + +export type NotionalFinanceLendingDefinition = { + address: string; + underlyingTokenAddress: string; + currencyId: number; + tokenId: string; + maturity: number; + type: string; +}; + +export type NotionalFinanceLendingDataProps = { + currencyId: number; + tokenId: string; + maturity: number; + type: string; + positionKey: string; +}; + +@PositionTemplate() +export class ArbitrumNotionalFinanceV3SupplyContractPositionFetcher extends ContractPositionTemplatePositionFetcher< + NotionalView, + NotionalFinanceLendingDataProps, + NotionalFinanceLendingDefinition +> { + groupLabel = 'Supply'; + + notionalViewContractAddress = '0x1344a36a1b56144c3bc62e7757377d288fde0369'; + + constructor( + @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, + @Inject(NotionalFinanceV3ContractFactory) protected readonly contractFactory: NotionalFinanceV3ContractFactory, + ) { + super(appToolkit); + } + + getContract(address: string): NotionalView { + return this.contractFactory.notionalView({ address, network: this.network }); + } + + async getDefinitions({ multicall }: GetDefinitionsParams): Promise { + const notionalViewContract = this.contractFactory.notionalView({ + address: this.notionalViewContractAddress, + network: this.network, + }); + + const currencyCount = await multicall.wrap(notionalViewContract).getMaxCurrencyId(); + const currencyRange = range(1, currencyCount + 1); + const definitions = await Promise.all( + currencyRange.map(async currencyId => { + const currency = await multicall.wrap(notionalViewContract).getCurrency(currencyId); + const underlyingTokenAddress = currency.underlyingToken.tokenAddress.toLowerCase(); + const activeMarkets = await multicall.wrap(notionalViewContract).getActiveMarkets(currencyId); + + const markets = await Promise.all( + activeMarkets.map(async activeMarket => { + const type = 'lending'; + const maturity = Number(activeMarket.maturity); + const tokenId = await multicall + .wrap(notionalViewContract) + .encodeToId(currencyId, maturity, 0) + .then(v => v.toString()); + + return { + address: this.notionalViewContractAddress, + currencyId, + underlyingTokenAddress, + maturity, + tokenId, + type, + }; + }), + ); + + return markets; + }), + ); + + return definitions.flat(); + } + + async getTokenDefinitions({ definition }: GetTokenDefinitionsParams) { + return [ + { metaType: MetaType.SUPPLIED, address: definition.address, network: this.network, tokenId: definition.tokenId }, + ]; + } + + async getDataProps( + params: GetDataPropsParams, + ) { + const defaultDataProps = await super.getDataProps(params); + const props = pick(params.definition, ['currencyId', 'tokenId', 'maturity', 'type']); + return { ...defaultDataProps, ...props, positionKey: Object.values(props).join(':') }; + } + + async getLabel({ contractPosition }: GetDisplayPropsParams): Promise { + return getLabelFromToken(contractPosition.tokens[0]); + } + + async getTokenBalancesPerPosition({ + address, + contractPosition, + contract, + }: GetTokenBalancesParams): Promise { + const { maturity, currencyId } = contractPosition.dataProps; + const portfolio = await contract.getAccountPortfolio(address); + const supplyPositions = portfolio.filter(v => !v.notional.isNegative()); + const position = supplyPositions.find(v => Number(v.maturity) === maturity && Number(v.currencyId) === currencyId); + if (!position) return [0]; + + const fcashAmountAtMaturity = new BigNumber(position.notional.toString()) + .times(10 ** contractPosition.tokens[0].decimals) + .div(10 ** 8); + + return [fcashAmountAtMaturity.abs().toString()]; + } +} diff --git a/src/apps/notional-finance-v3/assets/logo.png b/src/apps/notional-finance-v3/assets/logo.png new file mode 100644 index 000000000..7db6fb14d Binary files /dev/null and b/src/apps/notional-finance-v3/assets/logo.png differ diff --git a/src/apps/notional-finance-v3/contracts/abis/notional-f-cash.json b/src/apps/notional-finance-v3/contracts/abis/notional-f-cash.json new file mode 100644 index 000000000..048e36625 --- /dev/null +++ b/src/apps/notional-finance-v3/contracts/abis/notional-f-cash.json @@ -0,0 +1,501 @@ +[ + { + "inputs": [ + { "internalType": "string", "name": "name", "type": "string" }, + { "internalType": "string", "name": "symbol", "type": "string" }, + { "internalType": "uint256", "name": "maxTorSupply", "type": "uint256" }, + { + "internalType": "address", + "name": "mintTicketContractAddress", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "PaymentReleased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "MAX_MINTS_PER_TXN", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "tokenId", "type": "uint256" } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "owner", "type": "address" }, + { "internalType": "uint256", "name": "tokenId", "type": "uint256" } + ], + "name": "balanceOf", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "baseURI", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "tokenId", "type": "uint256" }], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "emergencySetStartingIndexBlock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "flipPreSaleState", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "flipSaleState", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "tokenId", "type": "uint256" }], + "name": "getApproved", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "owner", "type": "address" }, + { "internalType": "address", "name": "operator", "type": "address" } + ], + "name": "isApprovedForAll", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxTokenSupply", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxTokensPerTicket", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "mintPrice", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "numberOfTokens", "type": "uint256" }], + "name": "mintTOR", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "numberOfTokens", "type": "uint256" }], + "name": "mintUsingTicket", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "tokenId", "type": "uint256" }], + "name": "ownerOf", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "preSaleIsActive", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "provenance", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "reservedAmount", "type": "uint256" }], + "name": "reserveMint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "reservedAmount", + "type": "uint256" + }, + { "internalType": "address", "name": "mintAddress", "type": "address" } + ], + "name": "reserveMint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "from", "type": "address" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "tokenId", "type": "uint256" } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "from", "type": "address" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "tokenId", "type": "uint256" }, + { "internalType": "bytes", "name": "_data", "type": "bytes" } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "saleIsActive", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "operator", "type": "address" }, + { "internalType": "bool", "name": "approved", "type": "bool" } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "string", "name": "newBaseURI", "type": "string" }], + "name": "setBaseURI", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "maxTorSupply", "type": "uint256" }], + "name": "setMaxTokenSupply", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "maxTokensPerMintTicket", + "type": "uint256" + } + ], + "name": "setMaxTokensPerTicket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "newPrice", "type": "uint256" }], + "name": "setMintPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "string", "name": "provenanceHash", "type": "string" }], + "name": "setProvenanceHash", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "setStartingIndex", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "mintTicketContractAddress", + "type": "address" + } + ], + "name": "setTicketContractAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "startingIndex", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "startingIndexBlock", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" }], + "name": "supportsInterface", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "index", "type": "uint256" }], + "name": "tokenByIndex", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "owner", "type": "address" }, + { "internalType": "uint256", "name": "index", "type": "uint256" } + ], + "name": "tokenOfOwnerByIndex", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "tokenId", "type": "uint256" }], + "name": "tokenURI", + "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": "from", "type": "address" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "tokenId", "type": "uint256" } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "address payable", "name": "to", "type": "address" } + ], + "name": "withdrawForGiveaway", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/src/apps/notional-finance-v3/contracts/abis/notional-p-cash.json b/src/apps/notional-finance-v3/contracts/abis/notional-p-cash.json new file mode 100644 index 000000000..cb292b4b5 --- /dev/null +++ b/src/apps/notional-finance-v3/contracts/abis/notional-p-cash.json @@ -0,0 +1,362 @@ +[ + { + "inputs": [{ "internalType": "contract NotionalProxy", "name": "notional_", "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": true, "internalType": "address", "name": "caller", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "assets", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "shares", "type": "uint256" } + ], + "name": "Deposit", + "type": "event" + }, + { "anonymous": false, "inputs": [], "name": "ProxyRenamed", "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": true, "internalType": "address", "name": "caller", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "receiver", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "assets", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "shares", "type": "uint256" } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [], + "name": "EXCHANGE_RATE_PRECISION", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NOTIONAL", + "outputs": [{ "internalType": "contract NotionalProxy", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "account", "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": "amount", "type": "uint256" } + ], + "name": "approve", + "outputs": [{ "internalType": "bool", "name": "ret", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "asset", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], + "name": "balanceOf", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], + "name": "convertToAssets", + "outputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], + "name": "convertToShares", + "outputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "currencyId", + "outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "assets", "type": "uint256" }, + { "internalType": "address", "name": "receiver", "type": "address" } + ], + "name": "deposit", + "outputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "account", "type": "address" }, + { "internalType": "int256", "name": "netBalance", "type": "int256" } + ], + "name": "emitMintOrBurn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "minter", "type": "address" }, + { "internalType": "address", "name": "burner", "type": "address" }, + { "internalType": "uint256", "name": "mintAmount", "type": "uint256" }, + { "internalType": "uint256", "name": "transferAndBurnAmount", "type": "uint256" } + ], + "name": "emitMintTransferBurn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "from", "type": "address" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "emitTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "account", "type": "address" }, + { "internalType": "address", "name": "nToken", "type": "address" }, + { "internalType": "int256", "name": "accountToNToken", "type": "int256" }, + { "internalType": "uint256", "name": "cashToReserve", "type": "uint256" } + ], + "name": "emitfCashTradeTransfers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "exchangeRate", + "outputs": [{ "internalType": "uint256", "name": "rate", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint16", "name": "currencyId_", "type": "uint16" }, + { "internalType": "address", "name": "underlying_", "type": "address" }, + { "internalType": "string", "name": "underlyingName_", "type": "string" }, + { "internalType": "string", "name": "underlyingSymbol_", "type": "string" } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "maxDeposit", + "outputs": [{ "internalType": "uint256", "name": "maxAssets", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "maxMint", + "outputs": [{ "internalType": "uint256", "name": "maxShares", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }], + "name": "maxRedeem", + "outputs": [{ "internalType": "uint256", "name": "maxShares", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }], + "name": "maxWithdraw", + "outputs": [{ "internalType": "uint256", "name": "maxAssets", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "shares", "type": "uint256" }, + { "internalType": "address", "name": "receiver", "type": "address" } + ], + "name": "mint", + "outputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "nativeDecimals", + "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], + "name": "previewDeposit", + "outputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], + "name": "previewMint", + "outputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], + "name": "previewRedeem", + "outputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], + "name": "previewWithdraw", + "outputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "shares", "type": "uint256" }, + { "internalType": "address", "name": "receiver", "type": "address" }, + { "internalType": "address", "name": "owner", "type": "address" } + ], + "name": "redeem", + "outputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "string", "name": "underlyingName_", "type": "string" }, + { "internalType": "string", "name": "underlyingSymbol_", "type": "string" } + ], + "name": "rename", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalAssets", + "outputs": [{ "internalType": "uint256", "name": "totalManagedAssets", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "transfer", + "outputs": [{ "internalType": "bool", "name": "ret", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "from", "type": "address" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "transferFrom", + "outputs": [{ "internalType": "bool", "name": "ret", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "underlying", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "assets", "type": "uint256" }, + { "internalType": "address", "name": "receiver", "type": "address" }, + { "internalType": "address", "name": "owner", "type": "address" } + ], + "name": "withdraw", + "outputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/src/apps/notional-finance-v3/contracts/abis/notional-view.json b/src/apps/notional-finance-v3/contracts/abis/notional-view.json new file mode 100644 index 000000000..48711fa4a --- /dev/null +++ b/src/apps/notional-finance-v3/contracts/abis/notional-view.json @@ -0,0 +1,7494 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "AccountContextUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "AccountSettled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "supplyFactor", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "annualizedInterestRate", + "type": "uint256" + } + ], + "name": "CurrencyRebalanced", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "address", + "name": "nTokenAddress", + "type": "address" + } + ], + "name": "DeployNToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "int256", + "name": "harvestAmount", + "type": "int256" + } + ], + "name": "ExcessReserveBalanceHarvested", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "migrationEmissionRate", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "finalIntegralTotalSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "migrationTime", + "type": "uint256" + } + ], + "name": "IncentivesMigrated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "liquidated", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "liquidator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "localCurrencyId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "collateralCurrencyId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "int256", + "name": "netLocalFromLiquidator", + "type": "int256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "netCollateralTransfer", + "type": "int256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "netNTokenTransfer", + "type": "int256" + } + ], + "name": "LiquidateCollateralCurrency", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "liquidated", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "liquidator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "localCurrencyId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "int256", + "name": "netLocalFromLiquidator", + "type": "int256" + } + ], + "name": "LiquidateLocalCurrency", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "liquidated", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "liquidator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "localCurrencyId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "fCashCurrency", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "int256", + "name": "netLocalFromLiquidator", + "type": "int256" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "fCashMaturities", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "int256[]", + "name": "fCashNotionalTransfer", + "type": "int256[]" + } + ], + "name": "LiquidatefCashEvent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "newCurrencyId", + "type": "uint16" + } + ], + "name": "ListCurrency", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "MarketsInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pauseRouter", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "pauseGuardian", + "type": "address" + } + ], + "name": "PauseRouterAndGuardianUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "PrimeCashCurveChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "address", + "name": "oracle", + "type": "address" + } + ], + "name": "PrimeCashHoldingsOracleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "underlyingScalar", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "supplyScalar", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "debtScalar", + "type": "uint256" + } + ], + "name": "PrimeCashInterestAccrued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isCashProxy", + "type": "bool" + } + ], + "name": "PrimeProxyDeployed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint40", + "name": "cooldownTimeInSeconds", + "type": "uint40" + } + ], + "name": "RebalancingCooldownUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "components": [ + { + "internalType": "address", + "name": "holding", + "type": "address" + }, + { + "internalType": "uint8", + "name": "target", + "type": "uint8" + } + ], + "indexed": false, + "internalType": "struct NotionalTreasury.RebalancingTargetConfig[]", + "name": "targets", + "type": "tuple[]" + } + ], + "name": "RebalancingTargetsUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "int256", + "name": "newBalance", + "type": "int256" + } + ], + "name": "ReserveBalanceUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "bufferAmount", + "type": "uint256" + } + ], + "name": "ReserveBufferUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "currencyId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "supplyFactor", + "type": "int256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "debtFactor", + "type": "int256" + } + ], + "name": "SetPrimeSettlementRate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "int256", + "name": "cashIntoMarkets", + "type": "int256" + } + ], + "name": "SweepCashIntoMarkets", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "TokenMigrated", + "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": "amount", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousManager", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newManager", + "type": "address" + } + ], + "name": "TreasuryManagerChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "UpdateAssetRate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "UpdateAuthorizedCallbackContract", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "UpdateCashGroup", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "UpdateDepositParameters", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "UpdateETHRate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "UpdateGlobalTransferOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "newEmissionRate", + "type": "uint32" + } + ], + "name": "UpdateIncentiveEmissionRate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "UpdateInitializationParameters", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "marketIndex", + "type": "uint8" + } + ], + "name": "UpdateInterestRateCurve", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "maxUnderlyingSupply", + "type": "uint256" + } + ], + "name": "UpdateMaxUnderlyingSupply", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "address", + "name": "rewarder", + "type": "address" + } + ], + "name": "UpdateSecondaryIncentiveRewarder", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "UpdateTokenCollateralParameters", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "liquidator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "int256", + "name": "fCashDeposit", + "type": "int256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "cashToLiquidator", + "type": "int256" + } + ], + "name": "VaultAccountCashLiquidation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalUsedBorrowCapacity", + "type": "uint256" + } + ], + "name": "VaultBorrowCapacityChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "vaultSharesToLiquidator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "depositAmountPrimeCash", + "type": "int256" + } + ], + "name": "VaultDeleverageAccount", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vaultAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "disableDeleverage", + "type": "bool" + } + ], + "name": "VaultDeleverageStatus", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "liquidator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "vaultSharesToLiquidator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "transferSharesToLiquidator", + "type": "bool" + } + ], + "name": "VaultLiquidatorProfit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "enabled", + "type": "bool" + } + ], + "name": "VaultPauseStatus", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "netUnderlyingDebt", + "type": "int256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "netPrimeSupply", + "type": "int256" + } + ], + "name": "VaultSecondaryTransaction", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint80", + "name": "maxSecondaryBorrowCapacity", + "type": "uint80" + } + ], + "name": "VaultUpdateSecondaryBorrowCapacity", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "enabled", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint80", + "name": "maxPrimaryBorrowCapacity", + "type": "uint80" + } + ], + "name": "VaultUpdated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "accruePrimeInterest", + "outputs": [ + { + "components": [ + { + "internalType": "int256", + "name": "supplyFactor", + "type": "int256" + }, + { + "internalType": "int256", + "name": "debtFactor", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "oracleSupplyRate", + "type": "uint256" + } + ], + "internalType": "struct PrimeRate", + "name": "pr", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "lastAccrueTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalPrimeSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalPrimeDebt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "oracleSupplyRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastTotalUnderlyingValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "underlyingScalar", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "supplyScalar", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "debtScalar", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rateOracleTimeWindow", + "type": "uint256" + } + ], + "internalType": "struct PrimeCashFactors", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "balanceOfBatch", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "components": [ + { + "internalType": "enum DepositActionType", + "name": "actionType", + "type": "uint8" + }, + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "depositActionAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "withdrawAmountInternalPrecision", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "withdrawEntireCashBalance", + "type": "bool" + }, + { + "internalType": "bool", + "name": "redeemToUnderlying", + "type": "bool" + } + ], + "internalType": "struct BalanceAction[]", + "name": "actions", + "type": "tuple[]" + } + ], + "name": "batchBalanceAction", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "components": [ + { + "internalType": "enum DepositActionType", + "name": "actionType", + "type": "uint8" + }, + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "depositActionAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "withdrawAmountInternalPrecision", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "withdrawEntireCashBalance", + "type": "bool" + }, + { + "internalType": "bool", + "name": "redeemToUnderlying", + "type": "bool" + }, + { + "internalType": "bytes32[]", + "name": "trades", + "type": "bytes32[]" + } + ], + "internalType": "struct BalanceActionWithTrades[]", + "name": "actions", + "type": "tuple[]" + } + ], + "name": "batchBalanceAndTradeAction", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "components": [ + { + "internalType": "enum DepositActionType", + "name": "actionType", + "type": "uint8" + }, + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "depositActionAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "withdrawAmountInternalPrecision", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "withdrawEntireCashBalance", + "type": "bool" + }, + { + "internalType": "bool", + "name": "redeemToUnderlying", + "type": "bool" + }, + { + "internalType": "bytes32[]", + "name": "trades", + "type": "bytes32[]" + } + ], + "internalType": "struct BalanceActionWithTrades[]", + "name": "actions", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "callbackData", + "type": "bytes" + } + ], + "name": "batchBalanceAndTradeActionWithCallback", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "bool", + "name": "depositUnderlying", + "type": "bool" + }, + { + "internalType": "bytes32[]", + "name": "trades", + "type": "bytes32[]" + } + ], + "internalType": "struct BatchLend[]", + "name": "actions", + "type": "tuple[]" + } + ], + "name": "batchLend", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + }, + { + "internalType": "uint256[2]", + "name": "underlyingToBorrow", + "type": "uint256[2]" + }, + { + "internalType": "uint32[2]", + "name": "maxBorrowRate", + "type": "uint32[2]" + }, + { + "internalType": "uint32[2]", + "name": "minRollLendRate", + "type": "uint32[2]" + } + ], + "name": "borrowSecondaryCurrencyToVault", + "outputs": [ + { + "internalType": "int256[2]", + "name": "underlyingTokensTransferred", + "type": "int256[2]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "liquidateAccount", + "type": "address" + }, + { + "internalType": "uint16", + "name": "localCurrency", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "collateralCurrency", + "type": "uint16" + }, + { + "internalType": "uint128", + "name": "maxCollateralLiquidation", + "type": "uint128" + }, + { + "internalType": "uint96", + "name": "maxNTokenLiquidation", + "type": "uint96" + } + ], + "name": "calculateCollateralCurrencyLiquidation", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + }, + { + "internalType": "int256", + "name": "", + "type": "int256" + }, + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "currencyIndex", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "int256", + "name": "accountDebtUnderlying", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "vaultShares", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "int256", + "name": "tempCashBalance", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "lastUpdateBlockTime", + "type": "uint256" + } + ], + "internalType": "struct VaultAccount", + "name": "vaultAccount", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "internalType": "uint16", + "name": "flags", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "borrowCurrencyId", + "type": "uint16" + }, + { + "internalType": "int256", + "name": "minAccountBorrowSize", + "type": "int256" + }, + { + "internalType": "int256", + "name": "feeRate", + "type": "int256" + }, + { + "internalType": "int256", + "name": "minCollateralRatio", + "type": "int256" + }, + { + "internalType": "int256", + "name": "liquidationRate", + "type": "int256" + }, + { + "internalType": "int256", + "name": "reserveFeeShare", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "maxBorrowMarketIndex", + "type": "uint256" + }, + { + "internalType": "int256", + "name": "maxDeleverageCollateralRatio", + "type": "int256" + }, + { + "internalType": "uint16[2]", + "name": "secondaryBorrowCurrencies", + "type": "uint16[2]" + }, + { + "components": [ + { + "internalType": "int256", + "name": "supplyFactor", + "type": "int256" + }, + { + "internalType": "int256", + "name": "debtFactor", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "oracleSupplyRate", + "type": "uint256" + } + ], + "internalType": "struct PrimeRate", + "name": "primeRate", + "type": "tuple" + }, + { + "internalType": "int256", + "name": "maxRequiredAccountCollateralRatio", + "type": "int256" + }, + { + "internalType": "int256[2]", + "name": "minAccountSecondaryBorrow", + "type": "int256[2]" + }, + { + "internalType": "int256", + "name": "excessCashLiquidationBonus", + "type": "int256" + } + ], + "internalType": "struct VaultConfig", + "name": "vaultConfig", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + }, + { + "internalType": "int256", + "name": "totalDebtUnderlying", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "totalVaultShares", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isSettled", + "type": "bool" + } + ], + "internalType": "struct VaultState", + "name": "vaultState", + "type": "tuple" + }, + { + "internalType": "int256", + "name": "depositUnderlyingInternal", + "type": "int256" + } + ], + "name": "calculateDepositAmountInDeleverage", + "outputs": [ + { + "internalType": "int256", + "name": "depositInternal", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "vaultSharesToLiquidator", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "int256", + "name": "supplyFactor", + "type": "int256" + }, + { + "internalType": "int256", + "name": "debtFactor", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "oracleSupplyRate", + "type": "uint256" + } + ], + "internalType": "struct PrimeRate", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "liquidateAccount", + "type": "address" + }, + { + "internalType": "uint16", + "name": "localCurrency", + "type": "uint16" + }, + { + "internalType": "uint96", + "name": "maxNTokenLiquidation", + "type": "uint96" + } + ], + "name": "calculateLocalCurrencyLiquidation", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + }, + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint88", + "name": "amountToDepositExternalPrecision", + "type": "uint88" + } + ], + "name": "calculateNTokensToMint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "liquidateAccount", + "type": "address" + }, + { + "internalType": "uint16", + "name": "localCurrency", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "fCashCurrency", + "type": "uint16" + }, + { + "internalType": "uint256[]", + "name": "fCashMaturities", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "maxfCashLiquidateAmounts", + "type": "uint256[]" + } + ], + "name": "calculatefCashCrossCurrencyLiquidation", + "outputs": [ + { + "internalType": "int256[]", + "name": "", + "type": "int256[]" + }, + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "liquidateAccount", + "type": "address" + }, + { + "internalType": "uint16", + "name": "localCurrency", + "type": "uint16" + }, + { + "internalType": "uint256[]", + "name": "fCashMaturities", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "maxfCashLiquidateAmounts", + "type": "uint256[]" + } + ], + "name": "calculatefCashLocalLiquidation", + "outputs": [ + { + "internalType": "int256[]", + "name": "", + "type": "int256[]" + }, + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "checkVaultAccountCollateralRatio", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "ctokens", + "type": "address[]" + } + ], + "name": "claimCOMPAndTransfer", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "claimOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "int256", + "name": "cashBalanceInternal", + "type": "int256" + }, + { + "internalType": "bool", + "name": "useUnderlying", + "type": "bool" + } + ], + "name": "convertCashBalanceToExternal", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "int256", + "name": "nTokenBalance", + "type": "int256" + } + ], + "name": "convertNTokenToUnderlying", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + }, + { + "internalType": "int256", + "name": "fCashBalance", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "blockTime", + "type": "uint256" + } + ], + "name": "convertSettledfCash", + "outputs": [ + { + "internalType": "int256", + "name": "signedPrimeSupplyValue", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "int256", + "name": "underlyingExternal", + "type": "int256" + } + ], + "name": "convertUnderlyingToPrimeCash", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "decodeERC1155Id", + "outputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "assetType", + "type": "uint256" + }, + { + "internalType": "address", + "name": "vaultAddress", + "type": "address" + }, + { + "internalType": "bool", + "name": "isfCashDebt", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "name": "decodeToAssets", + "outputs": [ + { + "components": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "assetType", + "type": "uint256" + }, + { + "internalType": "int256", + "name": "notional", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "storageSlot", + "type": "uint256" + }, + { + "internalType": "enum AssetStorageState", + "name": "storageState", + "type": "uint8" + } + ], + "internalType": "struct PortfolioAsset[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "internalType": "address", + "name": "liquidator", + "type": "address" + }, + { + "internalType": "uint16", + "name": "currencyIndex", + "type": "uint16" + }, + { + "internalType": "int256", + "name": "depositUnderlyingInternal", + "type": "int256" + } + ], + "name": "deleverageAccount", + "outputs": [ + { + "internalType": "uint256", + "name": "vaultSharesFromLiquidation", + "type": "uint256" + }, + { + "internalType": "int256", + "name": "depositAmountPrimeCash", + "type": "int256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "amountExternalPrecision", + "type": "uint256" + } + ], + "name": "depositAssetToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "amountExternalPrecision", + "type": "uint256" + } + ], + "name": "depositUnderlyingToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "enableBitmapCurrency", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "maxMarketIndex", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "rateOracleTimeWindow5Min", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "maxDiscountFactor5BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "reserveFeeShare", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "debtBuffer25BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "fCashHaircut25BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "minOracleRate25BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "liquidationfCashHaircut25BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "liquidationDebtBuffer25BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "maxOracleRate25BPS", + "type": "uint8" + } + ], + "internalType": "struct CashGroupSettings", + "name": "cashGroup", + "type": "tuple" + }, + { + "internalType": "string", + "name": "underlyingName", + "type": "string" + }, + { + "internalType": "string", + "name": "underlyingSymbol", + "type": "string" + } + ], + "name": "enableCashGroup", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "allowPrimeBorrow", + "type": "bool" + } + ], + "name": "enablePrimeBorrow", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "string", + "name": "underlyingName", + "type": "string" + }, + { + "internalType": "string", + "name": "underlyingSymbol", + "type": "string" + } + ], + "name": "enablePrimeDebt", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "assetType", + "type": "uint256" + }, + { + "internalType": "address", + "name": "vaultAddress", + "type": "address" + }, + { + "internalType": "bool", + "name": "isfCashDebt", + "type": "bool" + } + ], + "name": "encode", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint40", + "name": "maturity", + "type": "uint40" + }, + { + "internalType": "uint8", + "name": "assetType", + "type": "uint8" + } + ], + "name": "encodeToId", + "outputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "internalType": "uint256", + "name": "depositAmountExternal", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "fCash", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "maxBorrowRate", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "vaultData", + "type": "bytes" + } + ], + "name": "enterVault", + "outputs": [ + { + "internalType": "uint256", + "name": "strategyTokensAdded", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "vaultSharesToRedeem", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "fCashToLend", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "minLendRate", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "exitVaultData", + "type": "bytes" + } + ], + "name": "exitVault", + "outputs": [ + { + "internalType": "uint256", + "name": "underlyingToReceiver", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getAccount", + "outputs": [ + { + "components": [ + { + "internalType": "uint40", + "name": "nextSettleTime", + "type": "uint40" + }, + { + "internalType": "bytes1", + "name": "hasDebt", + "type": "bytes1" + }, + { + "internalType": "uint8", + "name": "assetArrayLength", + "type": "uint8" + }, + { + "internalType": "uint16", + "name": "bitmapCurrencyId", + "type": "uint16" + }, + { + "internalType": "bytes18", + "name": "activeCurrencies", + "type": "bytes18" + }, + { + "internalType": "bool", + "name": "allowPrimeBorrow", + "type": "bool" + } + ], + "internalType": "struct AccountContext", + "name": "accountContext", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "int256", + "name": "cashBalance", + "type": "int256" + }, + { + "internalType": "int256", + "name": "nTokenBalance", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "lastClaimTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accountIncentiveDebt", + "type": "uint256" + } + ], + "internalType": "struct AccountBalance[]", + "name": "accountBalances", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "assetType", + "type": "uint256" + }, + { + "internalType": "int256", + "name": "notional", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "storageSlot", + "type": "uint256" + }, + { + "internalType": "enum AssetStorageState", + "name": "storageState", + "type": "uint8" + } + ], + "internalType": "struct PortfolioAsset[]", + "name": "portfolio", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getAccountBalance", + "outputs": [ + { + "internalType": "int256", + "name": "cashBalance", + "type": "int256" + }, + { + "internalType": "int256", + "name": "nTokenBalance", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "lastClaimTime", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getAccountContext", + "outputs": [ + { + "components": [ + { + "internalType": "uint40", + "name": "nextSettleTime", + "type": "uint40" + }, + { + "internalType": "bytes1", + "name": "hasDebt", + "type": "bytes1" + }, + { + "internalType": "uint8", + "name": "assetArrayLength", + "type": "uint8" + }, + { + "internalType": "uint16", + "name": "bitmapCurrencyId", + "type": "uint16" + }, + { + "internalType": "bytes18", + "name": "activeCurrencies", + "type": "bytes18" + }, + { + "internalType": "bool", + "name": "allowPrimeBorrow", + "type": "bool" + } + ], + "internalType": "struct AccountContext", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getAccountPortfolio", + "outputs": [ + { + "components": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "assetType", + "type": "uint256" + }, + { + "internalType": "int256", + "name": "notional", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "storageSlot", + "type": "uint256" + }, + { + "internalType": "enum AssetStorageState", + "name": "storageState", + "type": "uint8" + } + ], + "internalType": "struct PortfolioAsset[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getAccountPrimeDebtBalance", + "outputs": [ + { + "internalType": "int256", + "name": "debtBalance", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "getActiveMarkets", + "outputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "storageSlot", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + }, + { + "internalType": "int256", + "name": "totalfCash", + "type": "int256" + }, + { + "internalType": "int256", + "name": "totalPrimeCash", + "type": "int256" + }, + { + "internalType": "int256", + "name": "totalLiquidity", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "lastImpliedRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "oracleRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "previousTradeTime", + "type": "uint256" + } + ], + "internalType": "struct MarketParameters[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint32", + "name": "blockTime", + "type": "uint32" + } + ], + "name": "getActiveMarketsAtBlockTime", + "outputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "storageSlot", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + }, + { + "internalType": "int256", + "name": "totalfCash", + "type": "int256" + }, + { + "internalType": "int256", + "name": "totalPrimeCash", + "type": "int256" + }, + { + "internalType": "int256", + "name": "totalLiquidity", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "lastImpliedRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "oracleRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "previousTradeTime", + "type": "uint256" + } + ], + "internalType": "struct MarketParameters[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "getAssetsBitmap", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "callback", + "type": "address" + } + ], + "name": "getAuthorizedCallbackContractStatus", + "outputs": [ + { + "internalType": "bool", + "name": "isAuthorized", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getBalanceOfPrimeCash", + "outputs": [ + { + "internalType": "int256", + "name": "cashBalance", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "getBorrowCapacity", + "outputs": [ + { + "internalType": "uint256", + "name": "currentPrimeDebtUnderlying", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalfCashDebt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxBorrowCapacity", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "int88", + "name": "fCashAmount", + "type": "int88" + }, + { + "internalType": "uint256", + "name": "marketIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockTime", + "type": "uint256" + } + ], + "name": "getCashAmountGivenfCashAmount", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + }, + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "getCashGroup", + "outputs": [ + { + "components": [ + { + "internalType": "uint8", + "name": "maxMarketIndex", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "rateOracleTimeWindow5Min", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "maxDiscountFactor5BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "reserveFeeShare", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "debtBuffer25BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "fCashHaircut25BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "minOracleRate25BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "liquidationfCashHaircut25BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "liquidationDebtBuffer25BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "maxOracleRate25BPS", + "type": "uint8" + } + ], + "internalType": "struct CashGroupSettings", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "getCashGroupAndAssetRate", + "outputs": [ + { + "components": [ + { + "internalType": "uint8", + "name": "maxMarketIndex", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "rateOracleTimeWindow5Min", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "maxDiscountFactor5BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "reserveFeeShare", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "debtBuffer25BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "fCashHaircut25BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "minOracleRate25BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "liquidationfCashHaircut25BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "liquidationDebtBuffer25BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "maxOracleRate25BPS", + "type": "uint8" + } + ], + "internalType": "struct CashGroupSettings", + "name": "cashGroup", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "contract AssetRateAdapter", + "name": "rateOracle", + "type": "address" + }, + { + "internalType": "int256", + "name": "rate", + "type": "int256" + }, + { + "internalType": "int256", + "name": "underlyingDecimals", + "type": "int256" + } + ], + "internalType": "struct Deprecated_AssetRateParameters", + "name": "assetRate", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "getCurrency", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "internalType": "bool", + "name": "hasTransferFee", + "type": "bool" + }, + { + "internalType": "int256", + "name": "decimals", + "type": "int256" + }, + { + "internalType": "enum TokenType", + "name": "tokenType", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "deprecated_maxCollateralBalance", + "type": "uint256" + } + ], + "internalType": "struct Token", + "name": "assetToken", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "internalType": "bool", + "name": "hasTransferFee", + "type": "bool" + }, + { + "internalType": "int256", + "name": "decimals", + "type": "int256" + }, + { + "internalType": "enum TokenType", + "name": "tokenType", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "deprecated_maxCollateralBalance", + "type": "uint256" + } + ], + "internalType": "struct Token", + "name": "underlyingToken", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "getCurrencyAndRates", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "internalType": "bool", + "name": "hasTransferFee", + "type": "bool" + }, + { + "internalType": "int256", + "name": "decimals", + "type": "int256" + }, + { + "internalType": "enum TokenType", + "name": "tokenType", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "deprecated_maxCollateralBalance", + "type": "uint256" + } + ], + "internalType": "struct Token", + "name": "assetToken", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "internalType": "bool", + "name": "hasTransferFee", + "type": "bool" + }, + { + "internalType": "int256", + "name": "decimals", + "type": "int256" + }, + { + "internalType": "enum TokenType", + "name": "tokenType", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "deprecated_maxCollateralBalance", + "type": "uint256" + } + ], + "internalType": "struct Token", + "name": "underlyingToken", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "int256", + "name": "rateDecimals", + "type": "int256" + }, + { + "internalType": "int256", + "name": "rate", + "type": "int256" + }, + { + "internalType": "int256", + "name": "buffer", + "type": "int256" + }, + { + "internalType": "int256", + "name": "haircut", + "type": "int256" + }, + { + "internalType": "int256", + "name": "liquidationDiscount", + "type": "int256" + } + ], + "internalType": "struct ETHRate", + "name": "ethRate", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "contract AssetRateAdapter", + "name": "rateOracle", + "type": "address" + }, + { + "internalType": "int256", + "name": "rate", + "type": "int256" + }, + { + "internalType": "int256", + "name": "underlyingDecimals", + "type": "int256" + } + ], + "internalType": "struct Deprecated_AssetRateParameters", + "name": "assetRate", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + } + ], + "name": "getCurrencyId", + "outputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "fCashAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "minLendRate", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "blockTime", + "type": "uint256" + } + ], + "name": "getDepositFromfCashLend", + "outputs": [ + { + "internalType": "uint256", + "name": "depositAmountUnderlying", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "depositAmountAsset", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "marketIndex", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "encodedTrade", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "getDepositParameters", + "outputs": [ + { + "internalType": "int256[]", + "name": "depositShares", + "type": "int256[]" + }, + { + "internalType": "int256[]", + "name": "leverageThresholds", + "type": "int256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getFreeCollateral", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + }, + { + "internalType": "int256[]", + "name": "", + "type": "int256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "getGlobalTransferOperatorStatus", + "outputs": [ + { + "internalType": "bool", + "name": "isAuthorized", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "getInitializationParameters", + "outputs": [ + { + "internalType": "int256[]", + "name": "annualizedAnchorRates", + "type": "int256[]" + }, + { + "internalType": "int256[]", + "name": "proportions", + "type": "int256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "getInterestRateCurve", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "kinkUtilization1", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kinkUtilization2", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kinkRate1", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kinkRate2", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minFeeRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeeRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "feeRatePercent", + "type": "uint256" + } + ], + "internalType": "struct InterestRateParameters[]", + "name": "nextInterestRateCurve", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "kinkUtilization1", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kinkUtilization2", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kinkRate1", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kinkRate2", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minFeeRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeeRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "feeRatePercent", + "type": "uint256" + } + ], + "internalType": "struct InterestRateParameters[]", + "name": "activeInterestRateCurve", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "settlementDate", + "type": "uint256" + } + ], + "name": "getMarket", + "outputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "storageSlot", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + }, + { + "internalType": "int256", + "name": "totalfCash", + "type": "int256" + }, + { + "internalType": "int256", + "name": "totalPrimeCash", + "type": "int256" + }, + { + "internalType": "int256", + "name": "totalLiquidity", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "lastImpliedRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "oracleRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "previousTradeTime", + "type": "uint256" + } + ], + "internalType": "struct MarketParameters", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockTime", + "type": "uint256" + } + ], + "name": "getMarketIndex", + "outputs": [ + { + "internalType": "uint8", + "name": "marketIndex", + "type": "uint8" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "getMaxCurrencyId", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + } + ], + "name": "getNTokenAccount", + "outputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "incentiveAnnualEmissionRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastInitializedTime", + "type": "uint256" + }, + { + "internalType": "bytes5", + "name": "nTokenParameters", + "type": "bytes5" + }, + { + "internalType": "int256", + "name": "cashBalance", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "accumulatedNOTEPerNToken", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastAccumulatedTime", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + } + ], + "name": "getNTokenPortfolio", + "outputs": [ + { + "components": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "assetType", + "type": "uint256" + }, + { + "internalType": "int256", + "name": "notional", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "storageSlot", + "type": "uint256" + }, + { + "internalType": "enum AssetStorageState", + "name": "storageState", + "type": "uint8" + } + ], + "internalType": "struct PortfolioAsset[]", + "name": "liquidityTokens", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "assetType", + "type": "uint256" + }, + { + "internalType": "int256", + "name": "notional", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "storageSlot", + "type": "uint256" + }, + { + "internalType": "enum AssetStorageState", + "name": "storageState", + "type": "uint8" + } + ], + "internalType": "struct PortfolioAsset[]", + "name": "netfCashAssets", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNoteToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getOwnershipStatus", + "outputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "pendingOwner", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + }, + { + "internalType": "int256", + "name": "notional", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "blockTime", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "riskAdjusted", + "type": "bool" + } + ], + "name": "getPresentfCashValue", + "outputs": [ + { + "internalType": "int256", + "name": "presentValue", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "getPrimeCashHoldingsOracle", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "blockTime", + "type": "uint256" + } + ], + "name": "getPrimeFactors", + "outputs": [ + { + "components": [ + { + "internalType": "int256", + "name": "supplyFactor", + "type": "int256" + }, + { + "internalType": "int256", + "name": "debtFactor", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "oracleSupplyRate", + "type": "uint256" + } + ], + "internalType": "struct PrimeRate", + "name": "primeRate", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "lastAccrueTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalPrimeSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalPrimeDebt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "oracleSupplyRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastTotalUnderlyingValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "underlyingScalar", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "supplyScalar", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "debtScalar", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rateOracleTimeWindow", + "type": "uint256" + } + ], + "internalType": "struct PrimeCashFactors", + "name": "factors", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "maxUnderlyingSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalUnderlyingSupply", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "getPrimeFactorsStored", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "lastAccrueTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalPrimeSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalPrimeDebt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "oracleSupplyRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastTotalUnderlyingValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "underlyingScalar", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "supplyScalar", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "debtScalar", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rateOracleTimeWindow", + "type": "uint256" + } + ], + "internalType": "struct PrimeCashFactors", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "getPrimeInterestRate", + "outputs": [ + { + "internalType": "uint256", + "name": "annualDebtRatePreFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "annualDebtRatePostFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "annualSupplyRate", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "getPrimeInterestRateCurve", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "kinkUtilization1", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kinkUtilization2", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kinkRate1", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kinkRate2", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minFeeRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeeRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "feeRatePercent", + "type": "uint256" + } + ], + "internalType": "struct InterestRateParameters", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "fCashBorrow", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "maxBorrowRate", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "blockTime", + "type": "uint256" + } + ], + "name": "getPrincipalFromfCashBorrow", + "outputs": [ + { + "internalType": "uint256", + "name": "borrowAmountUnderlying", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowAmountAsset", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "marketIndex", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "encodedTrade", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "getRateStorage", + "outputs": [ + { + "components": [ + { + "internalType": "contract AggregatorV2V3Interface", + "name": "rateOracle", + "type": "address" + }, + { + "internalType": "uint8", + "name": "rateDecimalPlaces", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "mustInvert", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "buffer", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "haircut", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "liquidationDiscount", + "type": "uint8" + } + ], + "internalType": "struct ETHRateStorage", + "name": "ethRate", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "contract AssetRateAdapter", + "name": "rateOracle", + "type": "address" + }, + { + "internalType": "uint8", + "name": "underlyingDecimalPlaces", + "type": "uint8" + } + ], + "internalType": "struct AssetRateStorage", + "name": "assetRate", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "getRebalancingCooldown", + "outputs": [ + { + "internalType": "uint40", + "name": "", + "type": "uint40" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "holding", + "type": "address" + } + ], + "name": "getRebalancingTarget", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "getReserveBalance", + "outputs": [ + { + "internalType": "int256", + "name": "reserveBalance", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "getReserveBuffer", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + } + ], + "name": "getSecondaryBorrow", + "outputs": [ + { + "internalType": "int256", + "name": "totalDebt", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "getSecondaryIncentiveRewarder", + "outputs": [ + { + "internalType": "address", + "name": "incentiveRewarder", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint40", + "name": "maturity", + "type": "uint40" + } + ], + "name": "getSettlementRate", + "outputs": [ + { + "components": [ + { + "internalType": "int256", + "name": "supplyFactor", + "type": "int256" + }, + { + "internalType": "int256", + "name": "debtFactor", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "oracleSupplyRate", + "type": "uint256" + } + ], + "internalType": "struct PrimeRate", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + } + ], + "name": "getStoredTokenBalances", + "outputs": [ + { + "internalType": "uint256[]", + "name": "balances", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + } + ], + "name": "getTotalfCashDebtOutstanding", + "outputs": [ + { + "internalType": "int256", + "name": "totalfCashDebt", + "type": "int256" + }, + { + "internalType": "int256", + "name": "fCashDebtHeldInSettlementReserve", + "type": "int256" + }, + { + "internalType": "int256", + "name": "primeCashHeldInSettlementReserve", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTreasuryManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "vault", + "type": "address" + } + ], + "name": "getVaultAccount", + "outputs": [ + { + "components": [ + { + "internalType": "int256", + "name": "accountDebtUnderlying", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "vaultShares", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "int256", + "name": "tempCashBalance", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "lastUpdateBlockTime", + "type": "uint256" + } + ], + "internalType": "struct VaultAccount", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "vault", + "type": "address" + } + ], + "name": "getVaultAccountHealthFactors", + "outputs": [ + { + "components": [ + { + "internalType": "int256", + "name": "collateralRatio", + "type": "int256" + }, + { + "internalType": "int256", + "name": "totalDebtOutstandingInPrimary", + "type": "int256" + }, + { + "internalType": "int256", + "name": "vaultShareValueUnderlying", + "type": "int256" + }, + { + "internalType": "int256[3]", + "name": "netDebtOutstanding", + "type": "int256[3]" + } + ], + "internalType": "struct VaultAccountHealthFactors", + "name": "h", + "type": "tuple" + }, + { + "internalType": "int256[3]", + "name": "maxLiquidatorDepositUnderlying", + "type": "int256[3]" + }, + { + "internalType": "uint256[3]", + "name": "vaultSharesToLiquidator", + "type": "uint256[3]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "vault", + "type": "address" + } + ], + "name": "getVaultAccountSecondaryDebt", + "outputs": [ + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + }, + { + "internalType": "int256[2]", + "name": "accountSecondaryDebt", + "type": "int256[2]" + }, + { + "internalType": "int256[2]", + "name": "accountSecondaryCashHeld", + "type": "int256[2]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "vault", + "type": "address" + } + ], + "name": "getVaultAccountWithFeeAccrual", + "outputs": [ + { + "components": [ + { + "internalType": "int256", + "name": "accountDebtUnderlying", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "vaultShares", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "int256", + "name": "tempCashBalance", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "lastUpdateBlockTime", + "type": "uint256" + } + ], + "internalType": "struct VaultAccount", + "name": "", + "type": "tuple" + }, + { + "internalType": "int256", + "name": "accruedPrimeVaultFeeInUnderlying", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vault", + "type": "address" + } + ], + "name": "getVaultConfig", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "internalType": "uint16", + "name": "flags", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "borrowCurrencyId", + "type": "uint16" + }, + { + "internalType": "int256", + "name": "minAccountBorrowSize", + "type": "int256" + }, + { + "internalType": "int256", + "name": "feeRate", + "type": "int256" + }, + { + "internalType": "int256", + "name": "minCollateralRatio", + "type": "int256" + }, + { + "internalType": "int256", + "name": "liquidationRate", + "type": "int256" + }, + { + "internalType": "int256", + "name": "reserveFeeShare", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "maxBorrowMarketIndex", + "type": "uint256" + }, + { + "internalType": "int256", + "name": "maxDeleverageCollateralRatio", + "type": "int256" + }, + { + "internalType": "uint16[2]", + "name": "secondaryBorrowCurrencies", + "type": "uint16[2]" + }, + { + "components": [ + { + "internalType": "int256", + "name": "supplyFactor", + "type": "int256" + }, + { + "internalType": "int256", + "name": "debtFactor", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "oracleSupplyRate", + "type": "uint256" + } + ], + "internalType": "struct PrimeRate", + "name": "primeRate", + "type": "tuple" + }, + { + "internalType": "int256", + "name": "maxRequiredAccountCollateralRatio", + "type": "int256" + }, + { + "internalType": "int256[2]", + "name": "minAccountSecondaryBorrow", + "type": "int256[2]" + }, + { + "internalType": "int256", + "name": "excessCashLiquidationBonus", + "type": "int256" + } + ], + "internalType": "struct VaultConfig", + "name": "vaultConfig", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + } + ], + "name": "getVaultState", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + }, + { + "internalType": "int256", + "name": "totalDebtUnderlying", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "totalVaultShares", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isSettled", + "type": "bool" + } + ], + "internalType": "struct VaultState", + "name": "vaultState", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "int88", + "name": "netCashToAccount", + "type": "int88" + }, + { + "internalType": "uint256", + "name": "marketIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockTime", + "type": "uint256" + } + ], + "name": "getfCashAmountGivenCashAmount", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "borrowedAmountExternal", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "maxBorrowRate", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "blockTime", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "useUnderlying", + "type": "bool" + } + ], + "name": "getfCashBorrowFromPrincipal", + "outputs": [ + { + "internalType": "uint88", + "name": "fCashDebt", + "type": "uint88" + }, + { + "internalType": "uint8", + "name": "marketIndex", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "encodedTrade", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "depositAmountExternal", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "minLendRate", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "blockTime", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "useUnderlying", + "type": "bool" + } + ], + "name": "getfCashLendFromDeposit", + "outputs": [ + { + "internalType": "uint88", + "name": "fCashAmount", + "type": "uint88" + }, + { + "internalType": "uint8", + "name": "marketIndex", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "encodedTrade", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + } + ], + "name": "getfCashNotional", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + }, + { + "internalType": "int256", + "name": "vaultAccountCashBalance", + "type": "int256" + } + ], + "name": "getfCashRequiredToLiquidateCash", + "outputs": [ + { + "internalType": "int256", + "name": "fCashRequired", + "type": "int256" + }, + { + "internalType": "int256", + "name": "discountFactor", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "bool", + "name": "isFirstInit", + "type": "bool" + } + ], + "name": "initializeMarkets", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "liquidateAccount", + "type": "address" + }, + { + "internalType": "uint16", + "name": "localCurrency", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "collateralCurrency", + "type": "uint16" + }, + { + "internalType": "uint128", + "name": "maxCollateralLiquidation", + "type": "uint128" + }, + { + "internalType": "uint96", + "name": "maxNTokenLiquidation", + "type": "uint96" + }, + { + "internalType": "bool", + "name": "withdrawCollateral", + "type": "bool" + }, + { + "internalType": "bool", + "name": "redeemToUnderlying", + "type": "bool" + } + ], + "name": "liquidateCollateralCurrency", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + }, + { + "internalType": "int256", + "name": "", + "type": "int256" + }, + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "internalType": "address", + "name": "liquidator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "excessCashIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "debtIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_depositUnderlyingInternal", + "type": "uint256" + } + ], + "name": "liquidateExcessVaultCash", + "outputs": [ + { + "internalType": "int256", + "name": "cashToLiquidator", + "type": "int256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "liquidateAccount", + "type": "address" + }, + { + "internalType": "uint16", + "name": "localCurrency", + "type": "uint16" + }, + { + "internalType": "uint96", + "name": "maxNTokenLiquidation", + "type": "uint96" + } + ], + "name": "liquidateLocalCurrency", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + }, + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "internalType": "address", + "name": "liquidator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currencyIndex", + "type": "uint256" + }, + { + "internalType": "int256", + "name": "fCashDeposit", + "type": "int256" + } + ], + "name": "liquidateVaultCashBalance", + "outputs": [ + { + "internalType": "int256", + "name": "cashToLiquidator", + "type": "int256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "liquidateAccount", + "type": "address" + }, + { + "internalType": "uint16", + "name": "localCurrency", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "fCashCurrency", + "type": "uint16" + }, + { + "internalType": "uint256[]", + "name": "fCashMaturities", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "maxfCashLiquidateAmounts", + "type": "uint256[]" + } + ], + "name": "liquidatefCashCrossCurrency", + "outputs": [ + { + "internalType": "int256[]", + "name": "", + "type": "int256[]" + }, + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "liquidateAccount", + "type": "address" + }, + { + "internalType": "uint16", + "name": "localCurrency", + "type": "uint16" + }, + { + "internalType": "uint256[]", + "name": "fCashMaturities", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "maxfCashLiquidateAmounts", + "type": "uint256[]" + } + ], + "name": "liquidatefCashLocal", + "outputs": [ + { + "internalType": "int256[]", + "name": "", + "type": "int256[]" + }, + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "internalType": "bool", + "name": "hasTransferFee", + "type": "bool" + }, + { + "internalType": "enum TokenType", + "name": "tokenType", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "decimalPlaces", + "type": "uint8" + }, + { + "internalType": "uint72", + "name": "deprecated_maxCollateralBalance", + "type": "uint72" + } + ], + "internalType": "struct TokenStorage", + "name": "underlyingToken", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "contract AggregatorV2V3Interface", + "name": "rateOracle", + "type": "address" + }, + { + "internalType": "uint8", + "name": "rateDecimalPlaces", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "mustInvert", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "buffer", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "haircut", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "liquidationDiscount", + "type": "uint8" + } + ], + "internalType": "struct ETHRateStorage", + "name": "ethRate", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "kinkUtilization1", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "kinkUtilization2", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "kinkRate1", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "kinkRate2", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "maxRateUnits", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "minFeeRate5BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "maxFeeRate25BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "feeRatePercent", + "type": "uint8" + } + ], + "internalType": "struct InterestRateCurveSettings", + "name": "primeDebtCurve", + "type": "tuple" + }, + { + "internalType": "contract IPrimeCashHoldingsOracle", + "name": "primeCashHoldingsOracle", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowPrimeCashDebt", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "rateOracleTimeWindow5Min", + "type": "uint8" + }, + { + "internalType": "string", + "name": "underlyingName", + "type": "string" + }, + { + "internalType": "string", + "name": "underlyingSymbol", + "type": "string" + } + ], + "name": "listCurrency", + "outputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "nTokenAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "nTokenBalanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "nTokenClaimIncentives", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockTime", + "type": "uint256" + } + ], + "name": "nTokenGetClaimableIncentives", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "nTokenPresentValueAssetDenominated", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "nTokenPresentValueUnderlyingDenominated", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint96", + "name": "tokensToRedeem_", + "type": "uint96" + }, + { + "internalType": "bool", + "name": "sellTokenAssets", + "type": "bool" + }, + { + "internalType": "bool", + "name": "acceptResidualAssets", + "type": "bool" + } + ], + "name": "nTokenRedeem", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "nTokenAddress", + "type": "address" + } + ], + "name": "nTokenTotalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "nTokenTransfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "nTokenTransferAllowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "nTokenTransferApprove", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "nTokenTransferApproveAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "nTokenTransferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "pCashAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "pCashTransfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "pCashTransferAllowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "pCashTransferApprove", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "pCashTransferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "pDebtAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pauseGuardian", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pauseRouter", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16[]", + "name": "currencyId", + "type": "uint16[]" + } + ], + "name": "rebalance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + }, + { + "internalType": "uint256[2]", + "name": "underlyingToRepay", + "type": "uint256[2]" + }, + { + "internalType": "uint32[2]", + "name": "minLendRate", + "type": "uint32[2]" + } + ], + "name": "repaySecondaryCurrencyFromVault", + "outputs": [ + { + "internalType": "int256[2]", + "name": "underlyingDepositExternal", + "type": "int256[2]" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fCashToBorrow", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maturity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "depositAmountExternal", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "minLendRate", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "maxBorrowRate", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "enterVaultData", + "type": "bytes" + } + ], + "name": "rollVaultPosition", + "outputs": [ + { + "internalType": "uint256", + "name": "strategyTokensAdded", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeBatchTransferFrom", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vaultAddress", + "type": "address" + }, + { + "internalType": "uint80", + "name": "maxVaultBorrowCapacity", + "type": "uint80" + } + ], + "name": "setMaxBorrowCapacity", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "maxUnderlyingSupply", + "type": "uint256" + } + ], + "name": "setMaxUnderlyingSupply", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pauseRouter_", + "type": "address" + }, + { + "internalType": "address", + "name": "pauseGuardian_", + "type": "address" + } + ], + "name": "setPauseRouterAndGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint40", + "name": "cooldownTimeInSeconds", + "type": "uint40" + } + ], + "name": "setRebalancingCooldown", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "components": [ + { + "internalType": "address", + "name": "holding", + "type": "address" + }, + { + "internalType": "uint8", + "name": "target", + "type": "uint8" + } + ], + "internalType": "struct NotionalTreasury.RebalancingTargetConfig[]", + "name": "targets", + "type": "tuple[]" + } + ], + "name": "setRebalancingTargets", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "setReserveBuffer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "int256", + "name": "reserveBalance", + "type": "int256" + } + ], + "name": "setReserveCashBalance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "manager", + "type": "address" + } + ], + "name": "setTreasuryManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vaultAddress", + "type": "address" + }, + { + "internalType": "bool", + "name": "disableDeleverage", + "type": "bool" + } + ], + "name": "setVaultDeleverageStatus", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vaultAddress", + "type": "address" + }, + { + "internalType": "bool", + "name": "enable", + "type": "bool" + } + ], + "name": "setVaultPauseStatus", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "settleAccount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "settleSecondaryBorrowForAccount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "vault", + "type": "address" + } + ], + "name": "settleVaultAccount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "signedBalanceOf", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "signedBalanceOfBatch", + "outputs": [ + { + "internalType": "int256[]", + "name": "", + "type": "int256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "signedBalanceOfVaultTokenId", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + } + ], + "name": "sweepCashIntoMarkets", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + }, + { + "internalType": "bool", + "name": "direct", + "type": "bool" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16[]", + "name": "currencies", + "type": "uint16[]" + } + ], + "name": "transferReserveToTreasury", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "updateAuthorizedCallbackContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "maxMarketIndex", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "rateOracleTimeWindow5Min", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "maxDiscountFactor5BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "reserveFeeShare", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "debtBuffer25BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "fCashHaircut25BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "minOracleRate25BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "liquidationfCashHaircut25BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "liquidationDebtBuffer25BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "maxOracleRate25BPS", + "type": "uint8" + } + ], + "internalType": "struct CashGroupSettings", + "name": "cashGroup", + "type": "tuple" + } + ], + "name": "updateCashGroup", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint32[]", + "name": "depositShares", + "type": "uint32[]" + }, + { + "internalType": "uint32[]", + "name": "leverageThresholds", + "type": "uint32[]" + } + ], + "name": "updateDepositParameters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "contract AggregatorV2V3Interface", + "name": "rateOracle", + "type": "address" + }, + { + "internalType": "bool", + "name": "mustInvert", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "buffer", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "haircut", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "liquidationDiscount", + "type": "uint8" + } + ], + "name": "updateETHRate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint32", + "name": "newEmissionRate", + "type": "uint32" + } + ], + "name": "updateIncentiveEmissionRate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint32[]", + "name": "annualizedAnchorRates", + "type": "uint32[]" + }, + { + "internalType": "uint32[]", + "name": "proportions", + "type": "uint32[]" + } + ], + "name": "updateInitializationParameters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint8[]", + "name": "marketIndices", + "type": "uint8[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "kinkUtilization1", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "kinkUtilization2", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "kinkRate1", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "kinkRate2", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "maxRateUnits", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "minFeeRate5BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "maxFeeRate25BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "feeRatePercent", + "type": "uint8" + } + ], + "internalType": "struct InterestRateCurveSettings[]", + "name": "settings", + "type": "tuple[]" + } + ], + "name": "updateInterestRateCurve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "kinkUtilization1", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "kinkUtilization2", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "kinkRate1", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "kinkRate2", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "maxRateUnits", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "minFeeRate5BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "maxFeeRate25BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "feeRatePercent", + "type": "uint8" + } + ], + "internalType": "struct InterestRateCurveSettings", + "name": "primeDebtCurve", + "type": "tuple" + } + ], + "name": "updatePrimeCashCurve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "contract IPrimeCashHoldingsOracle", + "name": "primeCashHoldingsOracle", + "type": "address" + } + ], + "name": "updatePrimeCashHoldingsOracle", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vaultAddress", + "type": "address" + }, + { + "internalType": "uint16", + "name": "secondaryCurrencyId", + "type": "uint16" + }, + { + "internalType": "uint80", + "name": "maxBorrowCapacity", + "type": "uint80" + } + ], + "name": "updateSecondaryBorrowCapacity", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint8", + "name": "residualPurchaseIncentive10BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "pvHaircutPercentage", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "residualPurchaseTimeBufferHours", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "cashWithholdingBuffer10BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "liquidationHaircutPercentage", + "type": "uint8" + } + ], + "name": "updateTokenCollateralParameters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vaultAddress", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint16", + "name": "flags", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "borrowCurrencyId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "minAccountBorrowSize", + "type": "uint256" + }, + { + "internalType": "uint16", + "name": "minCollateralRatioBPS", + "type": "uint16" + }, + { + "internalType": "uint8", + "name": "feeRate5BPS", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "liquidationRate", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "reserveFeeShare", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "maxBorrowMarketIndex", + "type": "uint8" + }, + { + "internalType": "uint16", + "name": "maxDeleverageCollateralRatioBPS", + "type": "uint16" + }, + { + "internalType": "uint16[2]", + "name": "secondaryBorrowCurrencies", + "type": "uint16[2]" + }, + { + "internalType": "uint16", + "name": "maxRequiredAccountCollateralRatioBPS", + "type": "uint16" + }, + { + "internalType": "uint256[2]", + "name": "minAccountSecondaryBorrow", + "type": "uint256[2]" + }, + { + "internalType": "uint8", + "name": "excessCashLiquidationBonus", + "type": "uint8" + } + ], + "internalType": "struct VaultConfigParams", + "name": "vaultConfig", + "type": "tuple" + }, + { + "internalType": "uint80", + "name": "maxPrimaryBorrowCapacity", + "type": "uint80" + } + ], + "name": "updateVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum Deployments.BeaconType", + "name": "proxy", + "type": "uint8" + }, + { + "internalType": "address", + "name": "newBeacon", + "type": "address" + } + ], + "name": "upgradeBeacon", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "currencyId", + "type": "uint16" + }, + { + "internalType": "uint88", + "name": "amountInternalPrecision", + "type": "uint88" + }, + { + "internalType": "bool", + "name": "redeemToUnderlying", + "type": "bool" + } + ], + "name": "withdraw", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/src/apps/notional-finance-v3/contracts/ethers/NotionalFCash.ts b/src/apps/notional-finance-v3/contracts/ethers/NotionalFCash.ts new file mode 100644 index 000000000..36bf237d8 --- /dev/null +++ b/src/apps/notional-finance-v3/contracts/ethers/NotionalFCash.ts @@ -0,0 +1,1215 @@ +/* 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 interface NotionalFCashInterface extends utils.Interface { + functions: { + 'MAX_MINTS_PER_TXN()': FunctionFragment; + 'approve(address,uint256)': FunctionFragment; + 'balanceOf(address,uint256)': FunctionFragment; + 'baseURI()': FunctionFragment; + 'burn(uint256)': FunctionFragment; + 'emergencySetStartingIndexBlock()': FunctionFragment; + 'flipPreSaleState()': FunctionFragment; + 'flipSaleState()': FunctionFragment; + 'getApproved(uint256)': FunctionFragment; + 'isApprovedForAll(address,address)': FunctionFragment; + 'maxTokenSupply()': FunctionFragment; + 'maxTokensPerTicket()': FunctionFragment; + 'mintPrice()': FunctionFragment; + 'mintTOR(uint256)': FunctionFragment; + 'mintUsingTicket(uint256)': FunctionFragment; + 'name()': FunctionFragment; + 'owner()': FunctionFragment; + 'ownerOf(uint256)': FunctionFragment; + 'preSaleIsActive()': FunctionFragment; + 'provenance()': FunctionFragment; + 'renounceOwnership()': FunctionFragment; + 'reserveMint(uint256)': FunctionFragment; + 'reserveMint(uint256,address)': FunctionFragment; + 'safeTransferFrom(address,address,uint256)': FunctionFragment; + 'safeTransferFrom(address,address,uint256,bytes)': FunctionFragment; + 'saleIsActive()': FunctionFragment; + 'setApprovalForAll(address,bool)': FunctionFragment; + 'setBaseURI(string)': FunctionFragment; + 'setMaxTokenSupply(uint256)': FunctionFragment; + 'setMaxTokensPerTicket(uint256)': FunctionFragment; + 'setMintPrice(uint256)': FunctionFragment; + 'setProvenanceHash(string)': FunctionFragment; + 'setStartingIndex()': FunctionFragment; + 'setTicketContractAddress(address)': FunctionFragment; + 'startingIndex()': FunctionFragment; + 'startingIndexBlock()': FunctionFragment; + 'supportsInterface(bytes4)': FunctionFragment; + 'symbol()': FunctionFragment; + 'tokenByIndex(uint256)': FunctionFragment; + 'tokenOfOwnerByIndex(address,uint256)': FunctionFragment; + 'tokenURI(uint256)': FunctionFragment; + 'totalSupply()': FunctionFragment; + 'transferFrom(address,address,uint256)': FunctionFragment; + 'transferOwnership(address)': FunctionFragment; + 'withdraw(uint256)': FunctionFragment; + 'withdrawForGiveaway(uint256,address)': FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | 'MAX_MINTS_PER_TXN' + | 'approve' + | 'balanceOf' + | 'baseURI' + | 'burn' + | 'emergencySetStartingIndexBlock' + | 'flipPreSaleState' + | 'flipSaleState' + | 'getApproved' + | 'isApprovedForAll' + | 'maxTokenSupply' + | 'maxTokensPerTicket' + | 'mintPrice' + | 'mintTOR' + | 'mintUsingTicket' + | 'name' + | 'owner' + | 'ownerOf' + | 'preSaleIsActive' + | 'provenance' + | 'renounceOwnership' + | 'reserveMint(uint256)' + | 'reserveMint(uint256,address)' + | 'safeTransferFrom(address,address,uint256)' + | 'safeTransferFrom(address,address,uint256,bytes)' + | 'saleIsActive' + | 'setApprovalForAll' + | 'setBaseURI' + | 'setMaxTokenSupply' + | 'setMaxTokensPerTicket' + | 'setMintPrice' + | 'setProvenanceHash' + | 'setStartingIndex' + | 'setTicketContractAddress' + | 'startingIndex' + | 'startingIndexBlock' + | 'supportsInterface' + | 'symbol' + | 'tokenByIndex' + | 'tokenOfOwnerByIndex' + | 'tokenURI' + | 'totalSupply' + | 'transferFrom' + | 'transferOwnership' + | 'withdraw' + | 'withdrawForGiveaway', + ): FunctionFragment; + + encodeFunctionData(functionFragment: 'MAX_MINTS_PER_TXN', values?: undefined): string; + encodeFunctionData( + functionFragment: 'approve', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'balanceOf', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'baseURI', values?: undefined): string; + encodeFunctionData(functionFragment: 'burn', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'emergencySetStartingIndexBlock', values?: undefined): string; + encodeFunctionData(functionFragment: 'flipPreSaleState', values?: undefined): string; + encodeFunctionData(functionFragment: 'flipSaleState', values?: undefined): string; + encodeFunctionData(functionFragment: 'getApproved', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'isApprovedForAll', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'maxTokenSupply', values?: undefined): string; + encodeFunctionData(functionFragment: 'maxTokensPerTicket', values?: undefined): string; + encodeFunctionData(functionFragment: 'mintPrice', values?: undefined): string; + encodeFunctionData(functionFragment: 'mintTOR', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'mintUsingTicket', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'name', values?: undefined): string; + encodeFunctionData(functionFragment: 'owner', values?: undefined): string; + encodeFunctionData(functionFragment: 'ownerOf', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'preSaleIsActive', values?: undefined): string; + encodeFunctionData(functionFragment: 'provenance', values?: undefined): string; + encodeFunctionData(functionFragment: 'renounceOwnership', values?: undefined): string; + encodeFunctionData(functionFragment: 'reserveMint(uint256)', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'reserveMint(uint256,address)', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'safeTransferFrom(address,address,uint256)', + values: [PromiseOrValue, PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'safeTransferFrom(address,address,uint256,bytes)', + values: [PromiseOrValue, PromiseOrValue, PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'saleIsActive', values?: undefined): string; + encodeFunctionData( + functionFragment: 'setApprovalForAll', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'setBaseURI', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'setMaxTokenSupply', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'setMaxTokensPerTicket', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'setMintPrice', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'setProvenanceHash', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'setStartingIndex', values?: undefined): string; + encodeFunctionData(functionFragment: 'setTicketContractAddress', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'startingIndex', values?: undefined): string; + encodeFunctionData(functionFragment: 'startingIndexBlock', values?: undefined): string; + encodeFunctionData(functionFragment: 'supportsInterface', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'symbol', values?: undefined): string; + encodeFunctionData(functionFragment: 'tokenByIndex', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'tokenOfOwnerByIndex', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'tokenURI', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'totalSupply', values?: undefined): string; + encodeFunctionData( + functionFragment: 'transferFrom', + values: [PromiseOrValue, PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'transferOwnership', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'withdraw', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'withdrawForGiveaway', + values: [PromiseOrValue, PromiseOrValue], + ): string; + + decodeFunctionResult(functionFragment: 'MAX_MINTS_PER_TXN', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'approve', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'balanceOf', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'baseURI', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'burn', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'emergencySetStartingIndexBlock', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'flipPreSaleState', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'flipSaleState', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getApproved', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'isApprovedForAll', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'maxTokenSupply', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'maxTokensPerTicket', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'mintPrice', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'mintTOR', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'mintUsingTicket', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'name', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'owner', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'ownerOf', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'preSaleIsActive', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'provenance', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'renounceOwnership', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'reserveMint(uint256)', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'reserveMint(uint256,address)', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'safeTransferFrom(address,address,uint256)', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'safeTransferFrom(address,address,uint256,bytes)', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'saleIsActive', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setApprovalForAll', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setBaseURI', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setMaxTokenSupply', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setMaxTokensPerTicket', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setMintPrice', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setProvenanceHash', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setStartingIndex', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setTicketContractAddress', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'startingIndex', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'startingIndexBlock', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'supportsInterface', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'symbol', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'tokenByIndex', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'tokenOfOwnerByIndex', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'tokenURI', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'totalSupply', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'transferFrom', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'transferOwnership', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'withdraw', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'withdrawForGiveaway', data: BytesLike): Result; + + events: { + 'Approval(address,address,uint256)': EventFragment; + 'ApprovalForAll(address,address,bool)': EventFragment; + 'OwnershipTransferred(address,address)': EventFragment; + 'PaymentReleased(address,uint256)': EventFragment; + 'Transfer(address,address,uint256)': EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: 'Approval'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'ApprovalForAll'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'OwnershipTransferred'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'PaymentReleased'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Transfer'): EventFragment; +} + +export interface ApprovalEventObject { + owner: string; + approved: string; + tokenId: BigNumber; +} +export type ApprovalEvent = TypedEvent<[string, string, BigNumber], ApprovalEventObject>; + +export type ApprovalEventFilter = TypedEventFilter; + +export interface ApprovalForAllEventObject { + owner: string; + operator: string; + approved: boolean; +} +export type ApprovalForAllEvent = TypedEvent<[string, string, boolean], ApprovalForAllEventObject>; + +export type ApprovalForAllEventFilter = TypedEventFilter; + +export interface OwnershipTransferredEventObject { + previousOwner: string; + newOwner: string; +} +export type OwnershipTransferredEvent = TypedEvent<[string, string], OwnershipTransferredEventObject>; + +export type OwnershipTransferredEventFilter = TypedEventFilter; + +export interface PaymentReleasedEventObject { + to: string; + amount: BigNumber; +} +export type PaymentReleasedEvent = TypedEvent<[string, BigNumber], PaymentReleasedEventObject>; + +export type PaymentReleasedEventFilter = TypedEventFilter; + +export interface TransferEventObject { + from: string; + to: string; + tokenId: BigNumber; +} +export type TransferEvent = TypedEvent<[string, string, BigNumber], TransferEventObject>; + +export type TransferEventFilter = TypedEventFilter; + +export interface NotionalFCash extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: NotionalFCashInterface; + + 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: { + MAX_MINTS_PER_TXN(overrides?: CallOverrides): Promise<[BigNumber]>; + + approve( + to: PromiseOrValue, + tokenId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + balanceOf( + owner: PromiseOrValue, + tokenId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + baseURI(overrides?: CallOverrides): Promise<[string]>; + + burn( + tokenId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + emergencySetStartingIndexBlock( + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + flipPreSaleState(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + flipSaleState(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + getApproved(tokenId: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + + isApprovedForAll( + owner: PromiseOrValue, + operator: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[boolean]>; + + maxTokenSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + maxTokensPerTicket(overrides?: CallOverrides): Promise<[BigNumber]>; + + mintPrice(overrides?: CallOverrides): Promise<[BigNumber]>; + + mintTOR( + numberOfTokens: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + mintUsingTicket( + numberOfTokens: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + name(overrides?: CallOverrides): Promise<[string]>; + + owner(overrides?: CallOverrides): Promise<[string]>; + + ownerOf(tokenId: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + + preSaleIsActive(overrides?: CallOverrides): Promise<[boolean]>; + + provenance(overrides?: CallOverrides): Promise<[string]>; + + renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + 'reserveMint(uint256)'( + reservedAmount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + 'reserveMint(uint256,address)'( + reservedAmount: PromiseOrValue, + mintAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + 'safeTransferFrom(address,address,uint256)'( + from: PromiseOrValue, + to: PromiseOrValue, + tokenId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + 'safeTransferFrom(address,address,uint256,bytes)'( + from: PromiseOrValue, + to: PromiseOrValue, + tokenId: PromiseOrValue, + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + saleIsActive(overrides?: CallOverrides): Promise<[boolean]>; + + setApprovalForAll( + operator: PromiseOrValue, + approved: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setBaseURI( + newBaseURI: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMaxTokenSupply( + maxTorSupply: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMaxTokensPerTicket( + maxTokensPerMintTicket: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMintPrice( + newPrice: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setProvenanceHash( + provenanceHash: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setStartingIndex(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + setTicketContractAddress( + mintTicketContractAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + startingIndex(overrides?: CallOverrides): Promise<[BigNumber]>; + + startingIndexBlock(overrides?: CallOverrides): Promise<[BigNumber]>; + + supportsInterface(interfaceId: PromiseOrValue, overrides?: CallOverrides): Promise<[boolean]>; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + tokenByIndex(index: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + tokenOfOwnerByIndex( + owner: PromiseOrValue, + index: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + tokenURI(tokenId: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + tokenId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + withdraw( + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + withdrawForGiveaway( + amount: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + }; + + MAX_MINTS_PER_TXN(overrides?: CallOverrides): Promise; + + approve( + to: PromiseOrValue, + tokenId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + balanceOf( + owner: PromiseOrValue, + tokenId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + baseURI(overrides?: CallOverrides): Promise; + + burn( + tokenId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + emergencySetStartingIndexBlock( + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + flipPreSaleState(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + flipSaleState(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + getApproved(tokenId: PromiseOrValue, overrides?: CallOverrides): Promise; + + isApprovedForAll( + owner: PromiseOrValue, + operator: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + maxTokenSupply(overrides?: CallOverrides): Promise; + + maxTokensPerTicket(overrides?: CallOverrides): Promise; + + mintPrice(overrides?: CallOverrides): Promise; + + mintTOR( + numberOfTokens: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + mintUsingTicket( + numberOfTokens: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + name(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + ownerOf(tokenId: PromiseOrValue, overrides?: CallOverrides): Promise; + + preSaleIsActive(overrides?: CallOverrides): Promise; + + provenance(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + 'reserveMint(uint256)'( + reservedAmount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + 'reserveMint(uint256,address)'( + reservedAmount: PromiseOrValue, + mintAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + 'safeTransferFrom(address,address,uint256)'( + from: PromiseOrValue, + to: PromiseOrValue, + tokenId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + 'safeTransferFrom(address,address,uint256,bytes)'( + from: PromiseOrValue, + to: PromiseOrValue, + tokenId: PromiseOrValue, + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + saleIsActive(overrides?: CallOverrides): Promise; + + setApprovalForAll( + operator: PromiseOrValue, + approved: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setBaseURI( + newBaseURI: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMaxTokenSupply( + maxTorSupply: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMaxTokensPerTicket( + maxTokensPerMintTicket: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMintPrice( + newPrice: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setProvenanceHash( + provenanceHash: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setStartingIndex(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + setTicketContractAddress( + mintTicketContractAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + startingIndex(overrides?: CallOverrides): Promise; + + startingIndexBlock(overrides?: CallOverrides): Promise; + + supportsInterface(interfaceId: PromiseOrValue, overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + tokenByIndex(index: PromiseOrValue, overrides?: CallOverrides): Promise; + + tokenOfOwnerByIndex( + owner: PromiseOrValue, + index: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + tokenURI(tokenId: PromiseOrValue, overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + tokenId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + withdraw( + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + withdrawForGiveaway( + amount: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + callStatic: { + MAX_MINTS_PER_TXN(overrides?: CallOverrides): Promise; + + approve( + to: PromiseOrValue, + tokenId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + balanceOf( + owner: PromiseOrValue, + tokenId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + baseURI(overrides?: CallOverrides): Promise; + + burn(tokenId: PromiseOrValue, overrides?: CallOverrides): Promise; + + emergencySetStartingIndexBlock(overrides?: CallOverrides): Promise; + + flipPreSaleState(overrides?: CallOverrides): Promise; + + flipSaleState(overrides?: CallOverrides): Promise; + + getApproved(tokenId: PromiseOrValue, overrides?: CallOverrides): Promise; + + isApprovedForAll( + owner: PromiseOrValue, + operator: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + maxTokenSupply(overrides?: CallOverrides): Promise; + + maxTokensPerTicket(overrides?: CallOverrides): Promise; + + mintPrice(overrides?: CallOverrides): Promise; + + mintTOR(numberOfTokens: PromiseOrValue, overrides?: CallOverrides): Promise; + + mintUsingTicket(numberOfTokens: PromiseOrValue, overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + ownerOf(tokenId: PromiseOrValue, overrides?: CallOverrides): Promise; + + preSaleIsActive(overrides?: CallOverrides): Promise; + + provenance(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: CallOverrides): Promise; + + 'reserveMint(uint256)'(reservedAmount: PromiseOrValue, overrides?: CallOverrides): Promise; + + 'reserveMint(uint256,address)'( + reservedAmount: PromiseOrValue, + mintAddress: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + 'safeTransferFrom(address,address,uint256)'( + from: PromiseOrValue, + to: PromiseOrValue, + tokenId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + 'safeTransferFrom(address,address,uint256,bytes)'( + from: PromiseOrValue, + to: PromiseOrValue, + tokenId: PromiseOrValue, + _data: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + saleIsActive(overrides?: CallOverrides): Promise; + + setApprovalForAll( + operator: PromiseOrValue, + approved: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + setBaseURI(newBaseURI: PromiseOrValue, overrides?: CallOverrides): Promise; + + setMaxTokenSupply(maxTorSupply: PromiseOrValue, overrides?: CallOverrides): Promise; + + setMaxTokensPerTicket( + maxTokensPerMintTicket: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + setMintPrice(newPrice: PromiseOrValue, overrides?: CallOverrides): Promise; + + setProvenanceHash(provenanceHash: PromiseOrValue, overrides?: CallOverrides): Promise; + + setStartingIndex(overrides?: CallOverrides): Promise; + + setTicketContractAddress( + mintTicketContractAddress: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + startingIndex(overrides?: CallOverrides): Promise; + + startingIndexBlock(overrides?: CallOverrides): Promise; + + supportsInterface(interfaceId: PromiseOrValue, overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + tokenByIndex(index: PromiseOrValue, overrides?: CallOverrides): Promise; + + tokenOfOwnerByIndex( + owner: PromiseOrValue, + index: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + tokenURI(tokenId: PromiseOrValue, overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + tokenId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + transferOwnership(newOwner: PromiseOrValue, overrides?: CallOverrides): Promise; + + withdraw(amount: PromiseOrValue, overrides?: CallOverrides): Promise; + + withdrawForGiveaway( + amount: PromiseOrValue, + to: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + }; + + filters: { + 'Approval(address,address,uint256)'( + owner?: PromiseOrValue | null, + approved?: PromiseOrValue | null, + tokenId?: PromiseOrValue | null, + ): ApprovalEventFilter; + Approval( + owner?: PromiseOrValue | null, + approved?: PromiseOrValue | null, + tokenId?: PromiseOrValue | null, + ): ApprovalEventFilter; + + 'ApprovalForAll(address,address,bool)'( + owner?: PromiseOrValue | null, + operator?: PromiseOrValue | null, + approved?: null, + ): ApprovalForAllEventFilter; + ApprovalForAll( + owner?: PromiseOrValue | null, + operator?: PromiseOrValue | null, + approved?: null, + ): ApprovalForAllEventFilter; + + 'OwnershipTransferred(address,address)'( + previousOwner?: PromiseOrValue | null, + newOwner?: PromiseOrValue | null, + ): OwnershipTransferredEventFilter; + OwnershipTransferred( + previousOwner?: PromiseOrValue | null, + newOwner?: PromiseOrValue | null, + ): OwnershipTransferredEventFilter; + + 'PaymentReleased(address,uint256)'(to?: null, amount?: null): PaymentReleasedEventFilter; + PaymentReleased(to?: null, amount?: null): PaymentReleasedEventFilter; + + 'Transfer(address,address,uint256)'( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + tokenId?: PromiseOrValue | null, + ): TransferEventFilter; + Transfer( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + tokenId?: PromiseOrValue | null, + ): TransferEventFilter; + }; + + estimateGas: { + MAX_MINTS_PER_TXN(overrides?: CallOverrides): Promise; + + approve( + to: PromiseOrValue, + tokenId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + balanceOf( + owner: PromiseOrValue, + tokenId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + baseURI(overrides?: CallOverrides): Promise; + + burn( + tokenId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + emergencySetStartingIndexBlock(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + flipPreSaleState(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + flipSaleState(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + getApproved(tokenId: PromiseOrValue, overrides?: CallOverrides): Promise; + + isApprovedForAll( + owner: PromiseOrValue, + operator: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + maxTokenSupply(overrides?: CallOverrides): Promise; + + maxTokensPerTicket(overrides?: CallOverrides): Promise; + + mintPrice(overrides?: CallOverrides): Promise; + + mintTOR( + numberOfTokens: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + mintUsingTicket( + numberOfTokens: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + name(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + ownerOf(tokenId: PromiseOrValue, overrides?: CallOverrides): Promise; + + preSaleIsActive(overrides?: CallOverrides): Promise; + + provenance(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + 'reserveMint(uint256)'( + reservedAmount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + 'reserveMint(uint256,address)'( + reservedAmount: PromiseOrValue, + mintAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + 'safeTransferFrom(address,address,uint256)'( + from: PromiseOrValue, + to: PromiseOrValue, + tokenId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + 'safeTransferFrom(address,address,uint256,bytes)'( + from: PromiseOrValue, + to: PromiseOrValue, + tokenId: PromiseOrValue, + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + saleIsActive(overrides?: CallOverrides): Promise; + + setApprovalForAll( + operator: PromiseOrValue, + approved: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setBaseURI( + newBaseURI: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMaxTokenSupply( + maxTorSupply: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMaxTokensPerTicket( + maxTokensPerMintTicket: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMintPrice( + newPrice: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setProvenanceHash( + provenanceHash: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setStartingIndex(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + setTicketContractAddress( + mintTicketContractAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + startingIndex(overrides?: CallOverrides): Promise; + + startingIndexBlock(overrides?: CallOverrides): Promise; + + supportsInterface(interfaceId: PromiseOrValue, overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + tokenByIndex(index: PromiseOrValue, overrides?: CallOverrides): Promise; + + tokenOfOwnerByIndex( + owner: PromiseOrValue, + index: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + tokenURI(tokenId: PromiseOrValue, overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + tokenId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + withdraw( + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + withdrawForGiveaway( + amount: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + }; + + populateTransaction: { + MAX_MINTS_PER_TXN(overrides?: CallOverrides): Promise; + + approve( + to: PromiseOrValue, + tokenId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + balanceOf( + owner: PromiseOrValue, + tokenId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + baseURI(overrides?: CallOverrides): Promise; + + burn( + tokenId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + emergencySetStartingIndexBlock( + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + flipPreSaleState(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + flipSaleState(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + getApproved(tokenId: PromiseOrValue, overrides?: CallOverrides): Promise; + + isApprovedForAll( + owner: PromiseOrValue, + operator: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + maxTokenSupply(overrides?: CallOverrides): Promise; + + maxTokensPerTicket(overrides?: CallOverrides): Promise; + + mintPrice(overrides?: CallOverrides): Promise; + + mintTOR( + numberOfTokens: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + mintUsingTicket( + numberOfTokens: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + name(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + ownerOf(tokenId: PromiseOrValue, overrides?: CallOverrides): Promise; + + preSaleIsActive(overrides?: CallOverrides): Promise; + + provenance(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + 'reserveMint(uint256)'( + reservedAmount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + 'reserveMint(uint256,address)'( + reservedAmount: PromiseOrValue, + mintAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + 'safeTransferFrom(address,address,uint256)'( + from: PromiseOrValue, + to: PromiseOrValue, + tokenId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + 'safeTransferFrom(address,address,uint256,bytes)'( + from: PromiseOrValue, + to: PromiseOrValue, + tokenId: PromiseOrValue, + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + saleIsActive(overrides?: CallOverrides): Promise; + + setApprovalForAll( + operator: PromiseOrValue, + approved: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setBaseURI( + newBaseURI: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMaxTokenSupply( + maxTorSupply: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMaxTokensPerTicket( + maxTokensPerMintTicket: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMintPrice( + newPrice: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setProvenanceHash( + provenanceHash: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setStartingIndex(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + setTicketContractAddress( + mintTicketContractAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + startingIndex(overrides?: CallOverrides): Promise; + + startingIndexBlock(overrides?: CallOverrides): Promise; + + supportsInterface(interfaceId: PromiseOrValue, overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + tokenByIndex(index: PromiseOrValue, overrides?: CallOverrides): Promise; + + tokenOfOwnerByIndex( + owner: PromiseOrValue, + index: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + tokenURI(tokenId: PromiseOrValue, overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + tokenId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + withdraw( + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + withdrawForGiveaway( + amount: PromiseOrValue, + to: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + }; +} diff --git a/src/apps/notional-finance-v3/contracts/ethers/NotionalPCash.ts b/src/apps/notional-finance-v3/contracts/ethers/NotionalPCash.ts new file mode 100644 index 000000000..234079aa7 --- /dev/null +++ b/src/apps/notional-finance-v3/contracts/ethers/NotionalPCash.ts @@ -0,0 +1,1091 @@ +/* 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 NotionalPCashInterface extends utils.Interface { + functions: { + 'EXCHANGE_RATE_PRECISION()': FunctionFragment; + 'NOTIONAL()': FunctionFragment; + 'allowance(address,address)': FunctionFragment; + 'approve(address,uint256)': FunctionFragment; + 'asset()': FunctionFragment; + 'balanceOf(address)': FunctionFragment; + 'convertToAssets(uint256)': FunctionFragment; + 'convertToShares(uint256)': FunctionFragment; + 'currencyId()': FunctionFragment; + 'decimals()': FunctionFragment; + 'deposit(uint256,address)': FunctionFragment; + 'emitMintOrBurn(address,int256)': FunctionFragment; + 'emitMintTransferBurn(address,address,uint256,uint256)': FunctionFragment; + 'emitTransfer(address,address,uint256)': FunctionFragment; + 'emitfCashTradeTransfers(address,address,int256,uint256)': FunctionFragment; + 'exchangeRate()': FunctionFragment; + 'initialize(uint16,address,string,string)': FunctionFragment; + 'maxDeposit(address)': FunctionFragment; + 'maxMint(address)': FunctionFragment; + 'maxRedeem(address)': FunctionFragment; + 'maxWithdraw(address)': FunctionFragment; + 'mint(uint256,address)': FunctionFragment; + 'name()': FunctionFragment; + 'nativeDecimals()': FunctionFragment; + 'previewDeposit(uint256)': FunctionFragment; + 'previewMint(uint256)': FunctionFragment; + 'previewRedeem(uint256)': FunctionFragment; + 'previewWithdraw(uint256)': FunctionFragment; + 'redeem(uint256,address,address)': FunctionFragment; + 'rename(string,string)': FunctionFragment; + 'symbol()': FunctionFragment; + 'totalAssets()': FunctionFragment; + 'totalSupply()': FunctionFragment; + 'transfer(address,uint256)': FunctionFragment; + 'transferFrom(address,address,uint256)': FunctionFragment; + 'underlying()': FunctionFragment; + 'withdraw(uint256,address,address)': FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | 'EXCHANGE_RATE_PRECISION' + | 'NOTIONAL' + | 'allowance' + | 'approve' + | 'asset' + | 'balanceOf' + | 'convertToAssets' + | 'convertToShares' + | 'currencyId' + | 'decimals' + | 'deposit' + | 'emitMintOrBurn' + | 'emitMintTransferBurn' + | 'emitTransfer' + | 'emitfCashTradeTransfers' + | 'exchangeRate' + | 'initialize' + | 'maxDeposit' + | 'maxMint' + | 'maxRedeem' + | 'maxWithdraw' + | 'mint' + | 'name' + | 'nativeDecimals' + | 'previewDeposit' + | 'previewMint' + | 'previewRedeem' + | 'previewWithdraw' + | 'redeem' + | 'rename' + | 'symbol' + | 'totalAssets' + | 'totalSupply' + | 'transfer' + | 'transferFrom' + | 'underlying' + | 'withdraw', + ): FunctionFragment; + + encodeFunctionData(functionFragment: 'EXCHANGE_RATE_PRECISION', values?: undefined): string; + encodeFunctionData(functionFragment: 'NOTIONAL', values?: undefined): string; + encodeFunctionData(functionFragment: 'allowance', values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'approve', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'asset', values?: undefined): string; + encodeFunctionData(functionFragment: 'balanceOf', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'convertToAssets', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'convertToShares', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'currencyId', values?: undefined): string; + encodeFunctionData(functionFragment: 'decimals', values?: undefined): string; + encodeFunctionData( + functionFragment: 'deposit', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'emitMintOrBurn', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'emitMintTransferBurn', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData( + functionFragment: 'emitTransfer', + values: [PromiseOrValue, PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'emitfCashTradeTransfers', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData(functionFragment: 'exchangeRate', values?: undefined): string; + encodeFunctionData( + functionFragment: 'initialize', + values: [PromiseOrValue, PromiseOrValue, PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'maxDeposit', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'maxMint', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'maxRedeem', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'maxWithdraw', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'mint', values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'name', values?: undefined): string; + encodeFunctionData(functionFragment: 'nativeDecimals', values?: undefined): string; + encodeFunctionData(functionFragment: 'previewDeposit', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'previewMint', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'previewRedeem', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'previewWithdraw', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'redeem', + values: [PromiseOrValue, PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'rename', values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'symbol', values?: undefined): string; + encodeFunctionData(functionFragment: 'totalAssets', 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: 'withdraw', + values: [PromiseOrValue, PromiseOrValue, PromiseOrValue], + ): string; + + decodeFunctionResult(functionFragment: 'EXCHANGE_RATE_PRECISION', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'NOTIONAL', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'allowance', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'approve', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'asset', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'balanceOf', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'convertToAssets', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'convertToShares', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'currencyId', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'decimals', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'deposit', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'emitMintOrBurn', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'emitMintTransferBurn', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'emitTransfer', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'emitfCashTradeTransfers', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'exchangeRate', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'initialize', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'maxDeposit', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'maxMint', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'maxRedeem', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'maxWithdraw', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'mint', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'name', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'nativeDecimals', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'previewDeposit', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'previewMint', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'previewRedeem', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'previewWithdraw', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'redeem', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'rename', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'symbol', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'totalAssets', 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: 'withdraw', data: BytesLike): Result; + + events: { + 'Approval(address,address,uint256)': EventFragment; + 'Deposit(address,address,uint256,uint256)': EventFragment; + 'ProxyRenamed()': EventFragment; + 'Transfer(address,address,uint256)': EventFragment; + 'Withdraw(address,address,address,uint256,uint256)': EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: 'Approval'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Deposit'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'ProxyRenamed'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Transfer'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Withdraw'): EventFragment; +} + +export interface ApprovalEventObject { + owner: string; + spender: string; + value: BigNumber; +} +export type ApprovalEvent = TypedEvent<[string, string, BigNumber], ApprovalEventObject>; + +export type ApprovalEventFilter = TypedEventFilter; + +export interface DepositEventObject { + caller: string; + owner: string; + assets: BigNumber; + shares: BigNumber; +} +export type DepositEvent = TypedEvent<[string, string, BigNumber, BigNumber], DepositEventObject>; + +export type DepositEventFilter = TypedEventFilter; + +export interface ProxyRenamedEventObject {} +export type ProxyRenamedEvent = TypedEvent<[], ProxyRenamedEventObject>; + +export type ProxyRenamedEventFilter = TypedEventFilter; + +export interface TransferEventObject { + from: string; + to: string; + value: BigNumber; +} +export type TransferEvent = TypedEvent<[string, string, BigNumber], TransferEventObject>; + +export type TransferEventFilter = TypedEventFilter; + +export interface WithdrawEventObject { + caller: string; + receiver: string; + owner: string; + assets: BigNumber; + shares: BigNumber; +} +export type WithdrawEvent = TypedEvent<[string, string, string, BigNumber, BigNumber], WithdrawEventObject>; + +export type WithdrawEventFilter = TypedEventFilter; + +export interface NotionalPCash extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: NotionalPCashInterface; + + 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: { + EXCHANGE_RATE_PRECISION(overrides?: CallOverrides): Promise<[BigNumber]>; + + NOTIONAL(overrides?: CallOverrides): Promise<[string]>; + + allowance( + account: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + approve( + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + asset(overrides?: CallOverrides): Promise<[string]>; + + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + convertToAssets( + shares: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber] & { assets: BigNumber }>; + + convertToShares( + assets: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber] & { shares: BigNumber }>; + + currencyId(overrides?: CallOverrides): Promise<[number]>; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + deposit( + assets: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + emitMintOrBurn( + account: PromiseOrValue, + netBalance: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + emitMintTransferBurn( + minter: PromiseOrValue, + burner: PromiseOrValue, + mintAmount: PromiseOrValue, + transferAndBurnAmount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + emitTransfer( + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + emitfCashTradeTransfers( + account: PromiseOrValue, + nToken: PromiseOrValue, + accountToNToken: PromiseOrValue, + cashToReserve: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + exchangeRate(overrides?: CallOverrides): Promise<[BigNumber] & { rate: BigNumber }>; + + initialize( + currencyId_: PromiseOrValue, + underlying_: PromiseOrValue, + underlyingName_: PromiseOrValue, + underlyingSymbol_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + maxDeposit( + arg0: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber] & { maxAssets: BigNumber }>; + + maxMint(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber] & { maxShares: BigNumber }>; + + maxRedeem( + owner: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber] & { maxShares: BigNumber }>; + + maxWithdraw( + owner: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber] & { maxAssets: BigNumber }>; + + mint( + shares: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + name(overrides?: CallOverrides): Promise<[string]>; + + nativeDecimals(overrides?: CallOverrides): Promise<[number]>; + + previewDeposit( + assets: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber] & { shares: BigNumber }>; + + previewMint( + shares: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber] & { assets: BigNumber }>; + + previewRedeem( + shares: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber] & { assets: BigNumber }>; + + previewWithdraw( + assets: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber] & { shares: BigNumber }>; + + redeem( + shares: PromiseOrValue, + receiver: PromiseOrValue, + owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + rename( + underlyingName_: PromiseOrValue, + underlyingSymbol_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + totalAssets(overrides?: CallOverrides): Promise<[BigNumber] & { totalManagedAssets: BigNumber }>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + transferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + underlying(overrides?: CallOverrides): Promise<[string]>; + + withdraw( + assets: PromiseOrValue, + receiver: PromiseOrValue, + owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + }; + + EXCHANGE_RATE_PRECISION(overrides?: CallOverrides): Promise; + + NOTIONAL(overrides?: CallOverrides): Promise; + + allowance( + account: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + approve( + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + asset(overrides?: CallOverrides): Promise; + + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + + convertToAssets(shares: PromiseOrValue, overrides?: CallOverrides): Promise; + + convertToShares(assets: PromiseOrValue, overrides?: CallOverrides): Promise; + + currencyId(overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deposit( + assets: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + emitMintOrBurn( + account: PromiseOrValue, + netBalance: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + emitMintTransferBurn( + minter: PromiseOrValue, + burner: PromiseOrValue, + mintAmount: PromiseOrValue, + transferAndBurnAmount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + emitTransfer( + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + emitfCashTradeTransfers( + account: PromiseOrValue, + nToken: PromiseOrValue, + accountToNToken: PromiseOrValue, + cashToReserve: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + exchangeRate(overrides?: CallOverrides): Promise; + + initialize( + currencyId_: PromiseOrValue, + underlying_: PromiseOrValue, + underlyingName_: PromiseOrValue, + underlyingSymbol_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + maxDeposit(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + + maxMint(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + + maxRedeem(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + + maxWithdraw(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + + mint( + shares: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + name(overrides?: CallOverrides): Promise; + + nativeDecimals(overrides?: CallOverrides): Promise; + + previewDeposit(assets: PromiseOrValue, overrides?: CallOverrides): Promise; + + previewMint(shares: PromiseOrValue, overrides?: CallOverrides): Promise; + + previewRedeem(shares: PromiseOrValue, overrides?: CallOverrides): Promise; + + previewWithdraw(assets: PromiseOrValue, overrides?: CallOverrides): Promise; + + redeem( + shares: PromiseOrValue, + receiver: PromiseOrValue, + owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + rename( + underlyingName_: PromiseOrValue, + underlyingSymbol_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalAssets(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + transferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + underlying(overrides?: CallOverrides): Promise; + + withdraw( + assets: PromiseOrValue, + receiver: PromiseOrValue, + owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + callStatic: { + EXCHANGE_RATE_PRECISION(overrides?: CallOverrides): Promise; + + NOTIONAL(overrides?: CallOverrides): Promise; + + allowance( + account: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + approve( + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + asset(overrides?: CallOverrides): Promise; + + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + + convertToAssets(shares: PromiseOrValue, overrides?: CallOverrides): Promise; + + convertToShares(assets: PromiseOrValue, overrides?: CallOverrides): Promise; + + currencyId(overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deposit( + assets: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + emitMintOrBurn( + account: PromiseOrValue, + netBalance: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + emitMintTransferBurn( + minter: PromiseOrValue, + burner: PromiseOrValue, + mintAmount: PromiseOrValue, + transferAndBurnAmount: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + emitTransfer( + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + emitfCashTradeTransfers( + account: PromiseOrValue, + nToken: PromiseOrValue, + accountToNToken: PromiseOrValue, + cashToReserve: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + exchangeRate(overrides?: CallOverrides): Promise; + + initialize( + currencyId_: PromiseOrValue, + underlying_: PromiseOrValue, + underlyingName_: PromiseOrValue, + underlyingSymbol_: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + maxDeposit(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + + maxMint(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + + maxRedeem(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + + maxWithdraw(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + + mint( + shares: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + name(overrides?: CallOverrides): Promise; + + nativeDecimals(overrides?: CallOverrides): Promise; + + previewDeposit(assets: PromiseOrValue, overrides?: CallOverrides): Promise; + + previewMint(shares: PromiseOrValue, overrides?: CallOverrides): Promise; + + previewRedeem(shares: PromiseOrValue, overrides?: CallOverrides): Promise; + + previewWithdraw(assets: PromiseOrValue, overrides?: CallOverrides): Promise; + + redeem( + shares: PromiseOrValue, + receiver: PromiseOrValue, + owner: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + rename( + underlyingName_: PromiseOrValue, + underlyingSymbol_: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalAssets(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + transferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + underlying(overrides?: CallOverrides): Promise; + + withdraw( + assets: PromiseOrValue, + receiver: PromiseOrValue, + owner: 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; + + 'Deposit(address,address,uint256,uint256)'( + caller?: PromiseOrValue | null, + owner?: PromiseOrValue | null, + assets?: null, + shares?: null, + ): DepositEventFilter; + Deposit( + caller?: PromiseOrValue | null, + owner?: PromiseOrValue | null, + assets?: null, + shares?: null, + ): DepositEventFilter; + + 'ProxyRenamed()'(): ProxyRenamedEventFilter; + ProxyRenamed(): ProxyRenamedEventFilter; + + 'Transfer(address,address,uint256)'( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null, + ): TransferEventFilter; + Transfer( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null, + ): TransferEventFilter; + + 'Withdraw(address,address,address,uint256,uint256)'( + caller?: PromiseOrValue | null, + receiver?: PromiseOrValue | null, + owner?: PromiseOrValue | null, + assets?: null, + shares?: null, + ): WithdrawEventFilter; + Withdraw( + caller?: PromiseOrValue | null, + receiver?: PromiseOrValue | null, + owner?: PromiseOrValue | null, + assets?: null, + shares?: null, + ): WithdrawEventFilter; + }; + + estimateGas: { + EXCHANGE_RATE_PRECISION(overrides?: CallOverrides): Promise; + + NOTIONAL(overrides?: CallOverrides): Promise; + + allowance( + account: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + approve( + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + asset(overrides?: CallOverrides): Promise; + + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + + convertToAssets(shares: PromiseOrValue, overrides?: CallOverrides): Promise; + + convertToShares(assets: PromiseOrValue, overrides?: CallOverrides): Promise; + + currencyId(overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deposit( + assets: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + emitMintOrBurn( + account: PromiseOrValue, + netBalance: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + emitMintTransferBurn( + minter: PromiseOrValue, + burner: PromiseOrValue, + mintAmount: PromiseOrValue, + transferAndBurnAmount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + emitTransfer( + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + emitfCashTradeTransfers( + account: PromiseOrValue, + nToken: PromiseOrValue, + accountToNToken: PromiseOrValue, + cashToReserve: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + exchangeRate(overrides?: CallOverrides): Promise; + + initialize( + currencyId_: PromiseOrValue, + underlying_: PromiseOrValue, + underlyingName_: PromiseOrValue, + underlyingSymbol_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + maxDeposit(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + + maxMint(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + + maxRedeem(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + + maxWithdraw(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + + mint( + shares: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + name(overrides?: CallOverrides): Promise; + + nativeDecimals(overrides?: CallOverrides): Promise; + + previewDeposit(assets: PromiseOrValue, overrides?: CallOverrides): Promise; + + previewMint(shares: PromiseOrValue, overrides?: CallOverrides): Promise; + + previewRedeem(shares: PromiseOrValue, overrides?: CallOverrides): Promise; + + previewWithdraw(assets: PromiseOrValue, overrides?: CallOverrides): Promise; + + redeem( + shares: PromiseOrValue, + receiver: PromiseOrValue, + owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + rename( + underlyingName_: PromiseOrValue, + underlyingSymbol_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalAssets(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + transferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + underlying(overrides?: CallOverrides): Promise; + + withdraw( + assets: PromiseOrValue, + receiver: PromiseOrValue, + owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + }; + + populateTransaction: { + EXCHANGE_RATE_PRECISION(overrides?: CallOverrides): Promise; + + NOTIONAL(overrides?: CallOverrides): Promise; + + allowance( + account: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + approve( + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + asset(overrides?: CallOverrides): Promise; + + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + + convertToAssets(shares: PromiseOrValue, overrides?: CallOverrides): Promise; + + convertToShares(assets: PromiseOrValue, overrides?: CallOverrides): Promise; + + currencyId(overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + deposit( + assets: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + emitMintOrBurn( + account: PromiseOrValue, + netBalance: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + emitMintTransferBurn( + minter: PromiseOrValue, + burner: PromiseOrValue, + mintAmount: PromiseOrValue, + transferAndBurnAmount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + emitTransfer( + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + emitfCashTradeTransfers( + account: PromiseOrValue, + nToken: PromiseOrValue, + accountToNToken: PromiseOrValue, + cashToReserve: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + exchangeRate(overrides?: CallOverrides): Promise; + + initialize( + currencyId_: PromiseOrValue, + underlying_: PromiseOrValue, + underlyingName_: PromiseOrValue, + underlyingSymbol_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + maxDeposit(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + + maxMint(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + + maxRedeem(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + + maxWithdraw(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + + mint( + shares: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + name(overrides?: CallOverrides): Promise; + + nativeDecimals(overrides?: CallOverrides): Promise; + + previewDeposit(assets: PromiseOrValue, overrides?: CallOverrides): Promise; + + previewMint(shares: PromiseOrValue, overrides?: CallOverrides): Promise; + + previewRedeem(shares: PromiseOrValue, overrides?: CallOverrides): Promise; + + previewWithdraw(assets: PromiseOrValue, overrides?: CallOverrides): Promise; + + redeem( + shares: PromiseOrValue, + receiver: PromiseOrValue, + owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + rename( + underlyingName_: PromiseOrValue, + underlyingSymbol_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalAssets(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + transferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + underlying(overrides?: CallOverrides): Promise; + + withdraw( + assets: PromiseOrValue, + receiver: PromiseOrValue, + owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + }; +} diff --git a/src/apps/notional-finance-v3/contracts/ethers/NotionalView.ts b/src/apps/notional-finance-v3/contracts/ethers/NotionalView.ts new file mode 100644 index 000000000..cf439b601 --- /dev/null +++ b/src/apps/notional-finance-v3/contracts/ethers/NotionalView.ts @@ -0,0 +1,8276 @@ +/* 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 type PrimeRateStruct = { + supplyFactor: PromiseOrValue; + debtFactor: PromiseOrValue; + oracleSupplyRate: PromiseOrValue; +}; + +export type PrimeRateStructOutput = [BigNumber, BigNumber, BigNumber] & { + supplyFactor: BigNumber; + debtFactor: BigNumber; + oracleSupplyRate: BigNumber; +}; + +export type PrimeCashFactorsStruct = { + lastAccrueTime: PromiseOrValue; + totalPrimeSupply: PromiseOrValue; + totalPrimeDebt: PromiseOrValue; + oracleSupplyRate: PromiseOrValue; + lastTotalUnderlyingValue: PromiseOrValue; + underlyingScalar: PromiseOrValue; + supplyScalar: PromiseOrValue; + debtScalar: PromiseOrValue; + rateOracleTimeWindow: PromiseOrValue; +}; + +export type PrimeCashFactorsStructOutput = [ + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, +] & { + lastAccrueTime: BigNumber; + totalPrimeSupply: BigNumber; + totalPrimeDebt: BigNumber; + oracleSupplyRate: BigNumber; + lastTotalUnderlyingValue: BigNumber; + underlyingScalar: BigNumber; + supplyScalar: BigNumber; + debtScalar: BigNumber; + rateOracleTimeWindow: BigNumber; +}; + +export type BalanceActionStruct = { + actionType: PromiseOrValue; + currencyId: PromiseOrValue; + depositActionAmount: PromiseOrValue; + withdrawAmountInternalPrecision: PromiseOrValue; + withdrawEntireCashBalance: PromiseOrValue; + redeemToUnderlying: PromiseOrValue; +}; + +export type BalanceActionStructOutput = [number, number, BigNumber, BigNumber, boolean, boolean] & { + actionType: number; + currencyId: number; + depositActionAmount: BigNumber; + withdrawAmountInternalPrecision: BigNumber; + withdrawEntireCashBalance: boolean; + redeemToUnderlying: boolean; +}; + +export type BalanceActionWithTradesStruct = { + actionType: PromiseOrValue; + currencyId: PromiseOrValue; + depositActionAmount: PromiseOrValue; + withdrawAmountInternalPrecision: PromiseOrValue; + withdrawEntireCashBalance: PromiseOrValue; + redeemToUnderlying: PromiseOrValue; + trades: PromiseOrValue[]; +}; + +export type BalanceActionWithTradesStructOutput = [number, number, BigNumber, BigNumber, boolean, boolean, string[]] & { + actionType: number; + currencyId: number; + depositActionAmount: BigNumber; + withdrawAmountInternalPrecision: BigNumber; + withdrawEntireCashBalance: boolean; + redeemToUnderlying: boolean; + trades: string[]; +}; + +export type BatchLendStruct = { + currencyId: PromiseOrValue; + depositUnderlying: PromiseOrValue; + trades: PromiseOrValue[]; +}; + +export type BatchLendStructOutput = [number, boolean, string[]] & { + currencyId: number; + depositUnderlying: boolean; + trades: string[]; +}; + +export type VaultAccountStruct = { + accountDebtUnderlying: PromiseOrValue; + maturity: PromiseOrValue; + vaultShares: PromiseOrValue; + account: PromiseOrValue; + tempCashBalance: PromiseOrValue; + lastUpdateBlockTime: PromiseOrValue; +}; + +export type VaultAccountStructOutput = [BigNumber, BigNumber, BigNumber, string, BigNumber, BigNumber] & { + accountDebtUnderlying: BigNumber; + maturity: BigNumber; + vaultShares: BigNumber; + account: string; + tempCashBalance: BigNumber; + lastUpdateBlockTime: BigNumber; +}; + +export type VaultConfigStruct = { + vault: PromiseOrValue; + flags: PromiseOrValue; + borrowCurrencyId: PromiseOrValue; + minAccountBorrowSize: PromiseOrValue; + feeRate: PromiseOrValue; + minCollateralRatio: PromiseOrValue; + liquidationRate: PromiseOrValue; + reserveFeeShare: PromiseOrValue; + maxBorrowMarketIndex: PromiseOrValue; + maxDeleverageCollateralRatio: PromiseOrValue; + secondaryBorrowCurrencies: [PromiseOrValue, PromiseOrValue]; + primeRate: PrimeRateStruct; + maxRequiredAccountCollateralRatio: PromiseOrValue; + minAccountSecondaryBorrow: [PromiseOrValue, PromiseOrValue]; + excessCashLiquidationBonus: PromiseOrValue; +}; + +export type VaultConfigStructOutput = [ + string, + number, + number, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + [number, number], + PrimeRateStructOutput, + BigNumber, + [BigNumber, BigNumber], + BigNumber, +] & { + vault: string; + flags: number; + borrowCurrencyId: number; + minAccountBorrowSize: BigNumber; + feeRate: BigNumber; + minCollateralRatio: BigNumber; + liquidationRate: BigNumber; + reserveFeeShare: BigNumber; + maxBorrowMarketIndex: BigNumber; + maxDeleverageCollateralRatio: BigNumber; + secondaryBorrowCurrencies: [number, number]; + primeRate: PrimeRateStructOutput; + maxRequiredAccountCollateralRatio: BigNumber; + minAccountSecondaryBorrow: [BigNumber, BigNumber]; + excessCashLiquidationBonus: BigNumber; +}; + +export type VaultStateStruct = { + maturity: PromiseOrValue; + totalDebtUnderlying: PromiseOrValue; + totalVaultShares: PromiseOrValue; + isSettled: PromiseOrValue; +}; + +export type VaultStateStructOutput = [BigNumber, BigNumber, BigNumber, boolean] & { + maturity: BigNumber; + totalDebtUnderlying: BigNumber; + totalVaultShares: BigNumber; + isSettled: boolean; +}; + +export type PortfolioAssetStruct = { + currencyId: PromiseOrValue; + maturity: PromiseOrValue; + assetType: PromiseOrValue; + notional: PromiseOrValue; + storageSlot: PromiseOrValue; + storageState: PromiseOrValue; +}; + +export type PortfolioAssetStructOutput = [number, BigNumber, BigNumber, BigNumber, BigNumber, number] & { + currencyId: number; + maturity: BigNumber; + assetType: BigNumber; + notional: BigNumber; + storageSlot: BigNumber; + storageState: number; +}; + +export type CashGroupSettingsStruct = { + maxMarketIndex: PromiseOrValue; + rateOracleTimeWindow5Min: PromiseOrValue; + maxDiscountFactor5BPS: PromiseOrValue; + reserveFeeShare: PromiseOrValue; + debtBuffer25BPS: PromiseOrValue; + fCashHaircut25BPS: PromiseOrValue; + minOracleRate25BPS: PromiseOrValue; + liquidationfCashHaircut25BPS: PromiseOrValue; + liquidationDebtBuffer25BPS: PromiseOrValue; + maxOracleRate25BPS: PromiseOrValue; +}; + +export type CashGroupSettingsStructOutput = [ + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, +] & { + maxMarketIndex: number; + rateOracleTimeWindow5Min: number; + maxDiscountFactor5BPS: number; + reserveFeeShare: number; + debtBuffer25BPS: number; + fCashHaircut25BPS: number; + minOracleRate25BPS: number; + liquidationfCashHaircut25BPS: number; + liquidationDebtBuffer25BPS: number; + maxOracleRate25BPS: number; +}; + +export type AccountContextStruct = { + nextSettleTime: PromiseOrValue; + hasDebt: PromiseOrValue; + assetArrayLength: PromiseOrValue; + bitmapCurrencyId: PromiseOrValue; + activeCurrencies: PromiseOrValue; + allowPrimeBorrow: PromiseOrValue; +}; + +export type AccountContextStructOutput = [number, string, number, number, string, boolean] & { + nextSettleTime: number; + hasDebt: string; + assetArrayLength: number; + bitmapCurrencyId: number; + activeCurrencies: string; + allowPrimeBorrow: boolean; +}; + +export type AccountBalanceStruct = { + currencyId: PromiseOrValue; + cashBalance: PromiseOrValue; + nTokenBalance: PromiseOrValue; + lastClaimTime: PromiseOrValue; + accountIncentiveDebt: PromiseOrValue; +}; + +export type AccountBalanceStructOutput = [number, BigNumber, BigNumber, BigNumber, BigNumber] & { + currencyId: number; + cashBalance: BigNumber; + nTokenBalance: BigNumber; + lastClaimTime: BigNumber; + accountIncentiveDebt: BigNumber; +}; + +export type MarketParametersStruct = { + storageSlot: PromiseOrValue; + maturity: PromiseOrValue; + totalfCash: PromiseOrValue; + totalPrimeCash: PromiseOrValue; + totalLiquidity: PromiseOrValue; + lastImpliedRate: PromiseOrValue; + oracleRate: PromiseOrValue; + previousTradeTime: PromiseOrValue; +}; + +export type MarketParametersStructOutput = [ + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, +] & { + storageSlot: string; + maturity: BigNumber; + totalfCash: BigNumber; + totalPrimeCash: BigNumber; + totalLiquidity: BigNumber; + lastImpliedRate: BigNumber; + oracleRate: BigNumber; + previousTradeTime: BigNumber; +}; + +export type Deprecated_AssetRateParametersStruct = { + rateOracle: PromiseOrValue; + rate: PromiseOrValue; + underlyingDecimals: PromiseOrValue; +}; + +export type Deprecated_AssetRateParametersStructOutput = [string, BigNumber, BigNumber] & { + rateOracle: string; + rate: BigNumber; + underlyingDecimals: BigNumber; +}; + +export type TokenStruct = { + tokenAddress: PromiseOrValue; + hasTransferFee: PromiseOrValue; + decimals: PromiseOrValue; + tokenType: PromiseOrValue; + deprecated_maxCollateralBalance: PromiseOrValue; +}; + +export type TokenStructOutput = [string, boolean, BigNumber, number, BigNumber] & { + tokenAddress: string; + hasTransferFee: boolean; + decimals: BigNumber; + tokenType: number; + deprecated_maxCollateralBalance: BigNumber; +}; + +export type ETHRateStruct = { + rateDecimals: PromiseOrValue; + rate: PromiseOrValue; + buffer: PromiseOrValue; + haircut: PromiseOrValue; + liquidationDiscount: PromiseOrValue; +}; + +export type ETHRateStructOutput = [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { + rateDecimals: BigNumber; + rate: BigNumber; + buffer: BigNumber; + haircut: BigNumber; + liquidationDiscount: BigNumber; +}; + +export type InterestRateParametersStruct = { + kinkUtilization1: PromiseOrValue; + kinkUtilization2: PromiseOrValue; + kinkRate1: PromiseOrValue; + kinkRate2: PromiseOrValue; + maxRate: PromiseOrValue; + minFeeRate: PromiseOrValue; + maxFeeRate: PromiseOrValue; + feeRatePercent: PromiseOrValue; +}; + +export type InterestRateParametersStructOutput = [ + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, +] & { + kinkUtilization1: BigNumber; + kinkUtilization2: BigNumber; + kinkRate1: BigNumber; + kinkRate2: BigNumber; + maxRate: BigNumber; + minFeeRate: BigNumber; + maxFeeRate: BigNumber; + feeRatePercent: BigNumber; +}; + +export type ETHRateStorageStruct = { + rateOracle: PromiseOrValue; + rateDecimalPlaces: PromiseOrValue; + mustInvert: PromiseOrValue; + buffer: PromiseOrValue; + haircut: PromiseOrValue; + liquidationDiscount: PromiseOrValue; +}; + +export type ETHRateStorageStructOutput = [string, number, boolean, number, number, number] & { + rateOracle: string; + rateDecimalPlaces: number; + mustInvert: boolean; + buffer: number; + haircut: number; + liquidationDiscount: number; +}; + +export type AssetRateStorageStruct = { + rateOracle: PromiseOrValue; + underlyingDecimalPlaces: PromiseOrValue; +}; + +export type AssetRateStorageStructOutput = [string, number] & { + rateOracle: string; + underlyingDecimalPlaces: number; +}; + +export type VaultAccountHealthFactorsStruct = { + collateralRatio: PromiseOrValue; + totalDebtOutstandingInPrimary: PromiseOrValue; + vaultShareValueUnderlying: PromiseOrValue; + netDebtOutstanding: [PromiseOrValue, PromiseOrValue, PromiseOrValue]; +}; + +export type VaultAccountHealthFactorsStructOutput = [ + BigNumber, + BigNumber, + BigNumber, + [BigNumber, BigNumber, BigNumber], +] & { + collateralRatio: BigNumber; + totalDebtOutstandingInPrimary: BigNumber; + vaultShareValueUnderlying: BigNumber; + netDebtOutstanding: [BigNumber, BigNumber, BigNumber]; +}; + +export type TokenStorageStruct = { + tokenAddress: PromiseOrValue; + hasTransferFee: PromiseOrValue; + tokenType: PromiseOrValue; + decimalPlaces: PromiseOrValue; + deprecated_maxCollateralBalance: PromiseOrValue; +}; + +export type TokenStorageStructOutput = [string, boolean, number, number, BigNumber] & { + tokenAddress: string; + hasTransferFee: boolean; + tokenType: number; + decimalPlaces: number; + deprecated_maxCollateralBalance: BigNumber; +}; + +export type InterestRateCurveSettingsStruct = { + kinkUtilization1: PromiseOrValue; + kinkUtilization2: PromiseOrValue; + kinkRate1: PromiseOrValue; + kinkRate2: PromiseOrValue; + maxRateUnits: PromiseOrValue; + minFeeRate5BPS: PromiseOrValue; + maxFeeRate25BPS: PromiseOrValue; + feeRatePercent: PromiseOrValue; +}; + +export type InterestRateCurveSettingsStructOutput = [number, number, number, number, number, number, number, number] & { + kinkUtilization1: number; + kinkUtilization2: number; + kinkRate1: number; + kinkRate2: number; + maxRateUnits: number; + minFeeRate5BPS: number; + maxFeeRate25BPS: number; + feeRatePercent: number; +}; + +export type VaultConfigParamsStruct = { + flags: PromiseOrValue; + borrowCurrencyId: PromiseOrValue; + minAccountBorrowSize: PromiseOrValue; + minCollateralRatioBPS: PromiseOrValue; + feeRate5BPS: PromiseOrValue; + liquidationRate: PromiseOrValue; + reserveFeeShare: PromiseOrValue; + maxBorrowMarketIndex: PromiseOrValue; + maxDeleverageCollateralRatioBPS: PromiseOrValue; + secondaryBorrowCurrencies: [PromiseOrValue, PromiseOrValue]; + maxRequiredAccountCollateralRatioBPS: PromiseOrValue; + minAccountSecondaryBorrow: [PromiseOrValue, PromiseOrValue]; + excessCashLiquidationBonus: PromiseOrValue; +}; + +export type VaultConfigParamsStructOutput = [ + number, + number, + BigNumber, + number, + number, + number, + number, + number, + number, + [number, number], + number, + [BigNumber, BigNumber], + number, +] & { + flags: number; + borrowCurrencyId: number; + minAccountBorrowSize: BigNumber; + minCollateralRatioBPS: number; + feeRate5BPS: number; + liquidationRate: number; + reserveFeeShare: number; + maxBorrowMarketIndex: number; + maxDeleverageCollateralRatioBPS: number; + secondaryBorrowCurrencies: [number, number]; + maxRequiredAccountCollateralRatioBPS: number; + minAccountSecondaryBorrow: [BigNumber, BigNumber]; + excessCashLiquidationBonus: number; +}; + +export declare namespace NotionalTreasury { + export type RebalancingTargetConfigStruct = { + holding: PromiseOrValue; + target: PromiseOrValue; + }; + + export type RebalancingTargetConfigStructOutput = [string, number] & { + holding: string; + target: number; + }; +} + +export interface NotionalViewInterface extends utils.Interface { + functions: { + 'accruePrimeInterest(uint16)': FunctionFragment; + 'balanceOf(address,uint256)': FunctionFragment; + 'balanceOfBatch(address[],uint256[])': FunctionFragment; + 'batchBalanceAction(address,(uint8,uint16,uint256,uint256,bool,bool)[])': FunctionFragment; + 'batchBalanceAndTradeAction(address,(uint8,uint16,uint256,uint256,bool,bool,bytes32[])[])': FunctionFragment; + 'batchBalanceAndTradeActionWithCallback(address,(uint8,uint16,uint256,uint256,bool,bool,bytes32[])[],bytes)': FunctionFragment; + 'batchLend(address,(uint16,bool,bytes32[])[])': FunctionFragment; + 'borrowSecondaryCurrencyToVault(address,uint256,uint256[2],uint32[2],uint32[2])': FunctionFragment; + 'calculateCollateralCurrencyLiquidation(address,uint16,uint16,uint128,uint96)': FunctionFragment; + 'calculateDepositAmountInDeleverage(uint256,(int256,uint256,uint256,address,int256,uint256),(address,uint16,uint16,int256,int256,int256,int256,int256,uint256,int256,uint16[2],(int256,int256,uint256),int256,int256[2],int256),(uint256,int256,uint256,bool),int256)': FunctionFragment; + 'calculateLocalCurrencyLiquidation(address,uint16,uint96)': FunctionFragment; + 'calculateNTokensToMint(uint16,uint88)': FunctionFragment; + 'calculatefCashCrossCurrencyLiquidation(address,uint16,uint16,uint256[],uint256[])': FunctionFragment; + 'calculatefCashLocalLiquidation(address,uint16,uint256[],uint256[])': FunctionFragment; + 'checkVaultAccountCollateralRatio(address,address)': FunctionFragment; + 'claimCOMPAndTransfer(address[])': FunctionFragment; + 'claimOwnership()': FunctionFragment; + 'convertCashBalanceToExternal(uint16,int256,bool)': FunctionFragment; + 'convertNTokenToUnderlying(uint16,int256)': FunctionFragment; + 'convertSettledfCash(uint16,uint256,int256,uint256)': FunctionFragment; + 'convertUnderlyingToPrimeCash(uint16,int256)': FunctionFragment; + 'decodeERC1155Id(uint256)': FunctionFragment; + 'decodeToAssets(uint256[],uint256[])': FunctionFragment; + 'deleverageAccount(address,address,address,uint16,int256)': FunctionFragment; + 'depositAssetToken(address,uint16,uint256)': FunctionFragment; + 'depositUnderlyingToken(address,uint16,uint256)': FunctionFragment; + 'enableBitmapCurrency(uint16)': FunctionFragment; + 'enableCashGroup(uint16,(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8),string,string)': FunctionFragment; + 'enablePrimeBorrow(bool)': FunctionFragment; + 'enablePrimeDebt(uint16,string,string)': FunctionFragment; + 'encode(uint16,uint256,uint256,address,bool)': FunctionFragment; + 'encodeToId(uint16,uint40,uint8)': FunctionFragment; + 'enterVault(address,address,uint256,uint256,uint256,uint32,bytes)': FunctionFragment; + 'exitVault(address,address,address,uint256,uint256,uint32,bytes)': FunctionFragment; + 'getAccount(address)': FunctionFragment; + 'getAccountBalance(uint16,address)': FunctionFragment; + 'getAccountContext(address)': FunctionFragment; + 'getAccountPortfolio(address)': FunctionFragment; + 'getAccountPrimeDebtBalance(uint16,address)': FunctionFragment; + 'getActiveMarkets(uint16)': FunctionFragment; + 'getActiveMarketsAtBlockTime(uint16,uint32)': FunctionFragment; + 'getAssetsBitmap(address,uint16)': FunctionFragment; + 'getAuthorizedCallbackContractStatus(address)': FunctionFragment; + 'getBalanceOfPrimeCash(uint16,address)': FunctionFragment; + 'getBorrowCapacity(address,uint16)': FunctionFragment; + 'getCashAmountGivenfCashAmount(uint16,int88,uint256,uint256)': FunctionFragment; + 'getCashGroup(uint16)': FunctionFragment; + 'getCashGroupAndAssetRate(uint16)': FunctionFragment; + 'getCurrency(uint16)': FunctionFragment; + 'getCurrencyAndRates(uint16)': FunctionFragment; + 'getCurrencyId(address)': FunctionFragment; + 'getDepositFromfCashLend(uint16,uint256,uint256,uint32,uint256)': FunctionFragment; + 'getDepositParameters(uint16)': FunctionFragment; + 'getFreeCollateral(address)': FunctionFragment; + 'getGlobalTransferOperatorStatus(address)': FunctionFragment; + 'getImplementation()': FunctionFragment; + 'getInitializationParameters(uint16)': FunctionFragment; + 'getInterestRateCurve(uint16)': FunctionFragment; + 'getMarket(uint16,uint256,uint256)': FunctionFragment; + 'getMarketIndex(uint256,uint256)': FunctionFragment; + 'getMaxCurrencyId()': FunctionFragment; + 'getNTokenAccount(address)': FunctionFragment; + 'getNTokenPortfolio(address)': FunctionFragment; + 'getNoteToken()': FunctionFragment; + 'getOwnershipStatus()': FunctionFragment; + 'getPresentfCashValue(uint16,uint256,int256,uint256,bool)': FunctionFragment; + 'getPrimeCashHoldingsOracle(uint16)': FunctionFragment; + 'getPrimeFactors(uint16,uint256)': FunctionFragment; + 'getPrimeFactorsStored(uint16)': FunctionFragment; + 'getPrimeInterestRate(uint16)': FunctionFragment; + 'getPrimeInterestRateCurve(uint16)': FunctionFragment; + 'getPrincipalFromfCashBorrow(uint16,uint256,uint256,uint32,uint256)': FunctionFragment; + 'getRateStorage(uint16)': FunctionFragment; + 'getRebalancingCooldown(uint16)': FunctionFragment; + 'getRebalancingTarget(uint16,address)': FunctionFragment; + 'getReserveBalance(uint16)': FunctionFragment; + 'getReserveBuffer(uint16)': FunctionFragment; + 'getSecondaryBorrow(address,uint16,uint256)': FunctionFragment; + 'getSecondaryIncentiveRewarder(uint16)': FunctionFragment; + 'getSettlementRate(uint16,uint40)': FunctionFragment; + 'getStoredTokenBalances(address[])': FunctionFragment; + 'getTotalfCashDebtOutstanding(uint16,uint256)': FunctionFragment; + 'getTreasuryManager()': FunctionFragment; + 'getVaultAccount(address,address)': FunctionFragment; + 'getVaultAccountHealthFactors(address,address)': FunctionFragment; + 'getVaultAccountSecondaryDebt(address,address)': FunctionFragment; + 'getVaultAccountWithFeeAccrual(address,address)': FunctionFragment; + 'getVaultConfig(address)': FunctionFragment; + 'getVaultState(address,uint256)': FunctionFragment; + 'getfCashAmountGivenCashAmount(uint16,int88,uint256,uint256)': FunctionFragment; + 'getfCashBorrowFromPrincipal(uint16,uint256,uint256,uint32,uint256,bool)': FunctionFragment; + 'getfCashLendFromDeposit(uint16,uint256,uint256,uint32,uint256,bool)': FunctionFragment; + 'getfCashNotional(address,uint16,uint256)': FunctionFragment; + 'getfCashRequiredToLiquidateCash(uint16,uint256,int256)': FunctionFragment; + 'initializeMarkets(uint16,bool)': FunctionFragment; + 'isApprovedForAll(address,address)': FunctionFragment; + 'liquidateCollateralCurrency(address,uint16,uint16,uint128,uint96,bool,bool)': FunctionFragment; + 'liquidateExcessVaultCash(address,address,address,uint256,uint256,uint256)': FunctionFragment; + 'liquidateLocalCurrency(address,uint16,uint96)': FunctionFragment; + 'liquidateVaultCashBalance(address,address,address,uint256,int256)': FunctionFragment; + 'liquidatefCashCrossCurrency(address,uint16,uint16,uint256[],uint256[])': FunctionFragment; + 'liquidatefCashLocal(address,uint16,uint256[],uint256[])': FunctionFragment; + 'listCurrency((address,bool,uint8,uint8,uint72),(address,uint8,bool,uint8,uint8,uint8),(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8),address,bool,uint8,string,string)': FunctionFragment; + 'nTokenAddress(uint16)': FunctionFragment; + 'nTokenBalanceOf(uint16,address)': FunctionFragment; + 'nTokenClaimIncentives()': FunctionFragment; + 'nTokenGetClaimableIncentives(address,uint256)': FunctionFragment; + 'nTokenPresentValueAssetDenominated(uint16)': FunctionFragment; + 'nTokenPresentValueUnderlyingDenominated(uint16)': FunctionFragment; + 'nTokenRedeem(address,uint16,uint96,bool,bool)': FunctionFragment; + 'nTokenTotalSupply(address)': FunctionFragment; + 'nTokenTransfer(uint16,address,address,uint256)': FunctionFragment; + 'nTokenTransferAllowance(uint16,address,address)': FunctionFragment; + 'nTokenTransferApprove(uint16,address,address,uint256)': FunctionFragment; + 'nTokenTransferApproveAll(address,uint256)': FunctionFragment; + 'nTokenTransferFrom(uint16,address,address,address,uint256)': FunctionFragment; + 'owner()': FunctionFragment; + 'pCashAddress(uint16)': FunctionFragment; + 'pCashTransfer(uint16,address,address,uint256)': FunctionFragment; + 'pCashTransferAllowance(uint16,address,address)': FunctionFragment; + 'pCashTransferApprove(uint16,address,address,uint256)': FunctionFragment; + 'pCashTransferFrom(uint16,address,address,address,uint256)': FunctionFragment; + 'pDebtAddress(uint16)': FunctionFragment; + 'pauseGuardian()': FunctionFragment; + 'pauseRouter()': FunctionFragment; + 'rebalance(uint16[])': FunctionFragment; + 'repaySecondaryCurrencyFromVault(address,uint256,uint256[2],uint32[2])': FunctionFragment; + 'rollVaultPosition(address,address,uint256,uint256,uint256,uint32,uint32,bytes)': FunctionFragment; + 'safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)': FunctionFragment; + 'safeTransferFrom(address,address,uint256,uint256,bytes)': FunctionFragment; + 'setApprovalForAll(address,bool)': FunctionFragment; + 'setMaxBorrowCapacity(address,uint80)': FunctionFragment; + 'setMaxUnderlyingSupply(uint16,uint256)': FunctionFragment; + 'setPauseRouterAndGuardian(address,address)': FunctionFragment; + 'setRebalancingCooldown(uint16,uint40)': FunctionFragment; + 'setRebalancingTargets(uint16,(address,uint8)[])': FunctionFragment; + 'setReserveBuffer(uint16,uint256)': FunctionFragment; + 'setReserveCashBalance(uint16,int256)': FunctionFragment; + 'setTreasuryManager(address)': FunctionFragment; + 'setVaultDeleverageStatus(address,bool)': FunctionFragment; + 'setVaultPauseStatus(address,bool)': FunctionFragment; + 'settleAccount(address)': FunctionFragment; + 'settleSecondaryBorrowForAccount(address,address)': FunctionFragment; + 'settleVaultAccount(address,address)': FunctionFragment; + 'signedBalanceOf(address,uint256)': FunctionFragment; + 'signedBalanceOfBatch(address[],uint256[])': FunctionFragment; + 'signedBalanceOfVaultTokenId(address,uint256)': FunctionFragment; + 'supportsInterface(bytes4)': FunctionFragment; + 'sweepCashIntoMarkets(uint16)': FunctionFragment; + 'transferOwnership(address,bool)': FunctionFragment; + 'transferReserveToTreasury(uint16[])': FunctionFragment; + 'updateAuthorizedCallbackContract(address,bool)': FunctionFragment; + 'updateCashGroup(uint16,(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8))': FunctionFragment; + 'updateDepositParameters(uint16,uint32[],uint32[])': FunctionFragment; + 'updateETHRate(uint16,address,bool,uint8,uint8,uint8)': FunctionFragment; + 'updateIncentiveEmissionRate(uint16,uint32)': FunctionFragment; + 'updateInitializationParameters(uint16,uint32[],uint32[])': FunctionFragment; + 'updateInterestRateCurve(uint16,uint8[],(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8)[])': FunctionFragment; + 'updatePrimeCashCurve(uint16,(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8))': FunctionFragment; + 'updatePrimeCashHoldingsOracle(uint16,address)': FunctionFragment; + 'updateSecondaryBorrowCapacity(address,uint16,uint80)': FunctionFragment; + 'updateTokenCollateralParameters(uint16,uint8,uint8,uint8,uint8,uint8)': FunctionFragment; + 'updateVault(address,(uint16,uint16,uint256,uint16,uint8,uint8,uint8,uint8,uint16,uint16[2],uint16,uint256[2],uint8),uint80)': FunctionFragment; + 'upgradeBeacon(uint8,address)': FunctionFragment; + 'upgradeTo(address)': FunctionFragment; + 'upgradeToAndCall(address,bytes)': FunctionFragment; + 'withdraw(uint16,uint88,bool)': FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | 'accruePrimeInterest' + | 'balanceOf' + | 'balanceOfBatch' + | 'batchBalanceAction' + | 'batchBalanceAndTradeAction' + | 'batchBalanceAndTradeActionWithCallback' + | 'batchLend' + | 'borrowSecondaryCurrencyToVault' + | 'calculateCollateralCurrencyLiquidation' + | 'calculateDepositAmountInDeleverage' + | 'calculateLocalCurrencyLiquidation' + | 'calculateNTokensToMint' + | 'calculatefCashCrossCurrencyLiquidation' + | 'calculatefCashLocalLiquidation' + | 'checkVaultAccountCollateralRatio' + | 'claimCOMPAndTransfer' + | 'claimOwnership' + | 'convertCashBalanceToExternal' + | 'convertNTokenToUnderlying' + | 'convertSettledfCash' + | 'convertUnderlyingToPrimeCash' + | 'decodeERC1155Id' + | 'decodeToAssets' + | 'deleverageAccount' + | 'depositAssetToken' + | 'depositUnderlyingToken' + | 'enableBitmapCurrency' + | 'enableCashGroup' + | 'enablePrimeBorrow' + | 'enablePrimeDebt' + | 'encode' + | 'encodeToId' + | 'enterVault' + | 'exitVault' + | 'getAccount' + | 'getAccountBalance' + | 'getAccountContext' + | 'getAccountPortfolio' + | 'getAccountPrimeDebtBalance' + | 'getActiveMarkets' + | 'getActiveMarketsAtBlockTime' + | 'getAssetsBitmap' + | 'getAuthorizedCallbackContractStatus' + | 'getBalanceOfPrimeCash' + | 'getBorrowCapacity' + | 'getCashAmountGivenfCashAmount' + | 'getCashGroup' + | 'getCashGroupAndAssetRate' + | 'getCurrency' + | 'getCurrencyAndRates' + | 'getCurrencyId' + | 'getDepositFromfCashLend' + | 'getDepositParameters' + | 'getFreeCollateral' + | 'getGlobalTransferOperatorStatus' + | 'getImplementation' + | 'getInitializationParameters' + | 'getInterestRateCurve' + | 'getMarket' + | 'getMarketIndex' + | 'getMaxCurrencyId' + | 'getNTokenAccount' + | 'getNTokenPortfolio' + | 'getNoteToken' + | 'getOwnershipStatus' + | 'getPresentfCashValue' + | 'getPrimeCashHoldingsOracle' + | 'getPrimeFactors' + | 'getPrimeFactorsStored' + | 'getPrimeInterestRate' + | 'getPrimeInterestRateCurve' + | 'getPrincipalFromfCashBorrow' + | 'getRateStorage' + | 'getRebalancingCooldown' + | 'getRebalancingTarget' + | 'getReserveBalance' + | 'getReserveBuffer' + | 'getSecondaryBorrow' + | 'getSecondaryIncentiveRewarder' + | 'getSettlementRate' + | 'getStoredTokenBalances' + | 'getTotalfCashDebtOutstanding' + | 'getTreasuryManager' + | 'getVaultAccount' + | 'getVaultAccountHealthFactors' + | 'getVaultAccountSecondaryDebt' + | 'getVaultAccountWithFeeAccrual' + | 'getVaultConfig' + | 'getVaultState' + | 'getfCashAmountGivenCashAmount' + | 'getfCashBorrowFromPrincipal' + | 'getfCashLendFromDeposit' + | 'getfCashNotional' + | 'getfCashRequiredToLiquidateCash' + | 'initializeMarkets' + | 'isApprovedForAll' + | 'liquidateCollateralCurrency' + | 'liquidateExcessVaultCash' + | 'liquidateLocalCurrency' + | 'liquidateVaultCashBalance' + | 'liquidatefCashCrossCurrency' + | 'liquidatefCashLocal' + | 'listCurrency' + | 'nTokenAddress' + | 'nTokenBalanceOf' + | 'nTokenClaimIncentives' + | 'nTokenGetClaimableIncentives' + | 'nTokenPresentValueAssetDenominated' + | 'nTokenPresentValueUnderlyingDenominated' + | 'nTokenRedeem' + | 'nTokenTotalSupply' + | 'nTokenTransfer' + | 'nTokenTransferAllowance' + | 'nTokenTransferApprove' + | 'nTokenTransferApproveAll' + | 'nTokenTransferFrom' + | 'owner' + | 'pCashAddress' + | 'pCashTransfer' + | 'pCashTransferAllowance' + | 'pCashTransferApprove' + | 'pCashTransferFrom' + | 'pDebtAddress' + | 'pauseGuardian' + | 'pauseRouter' + | 'rebalance' + | 'repaySecondaryCurrencyFromVault' + | 'rollVaultPosition' + | 'safeBatchTransferFrom' + | 'safeTransferFrom' + | 'setApprovalForAll' + | 'setMaxBorrowCapacity' + | 'setMaxUnderlyingSupply' + | 'setPauseRouterAndGuardian' + | 'setRebalancingCooldown' + | 'setRebalancingTargets' + | 'setReserveBuffer' + | 'setReserveCashBalance' + | 'setTreasuryManager' + | 'setVaultDeleverageStatus' + | 'setVaultPauseStatus' + | 'settleAccount' + | 'settleSecondaryBorrowForAccount' + | 'settleVaultAccount' + | 'signedBalanceOf' + | 'signedBalanceOfBatch' + | 'signedBalanceOfVaultTokenId' + | 'supportsInterface' + | 'sweepCashIntoMarkets' + | 'transferOwnership' + | 'transferReserveToTreasury' + | 'updateAuthorizedCallbackContract' + | 'updateCashGroup' + | 'updateDepositParameters' + | 'updateETHRate' + | 'updateIncentiveEmissionRate' + | 'updateInitializationParameters' + | 'updateInterestRateCurve' + | 'updatePrimeCashCurve' + | 'updatePrimeCashHoldingsOracle' + | 'updateSecondaryBorrowCapacity' + | 'updateTokenCollateralParameters' + | 'updateVault' + | 'upgradeBeacon' + | 'upgradeTo' + | 'upgradeToAndCall' + | 'withdraw', + ): FunctionFragment; + + encodeFunctionData(functionFragment: 'accruePrimeInterest', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'balanceOf', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'balanceOfBatch', + values: [PromiseOrValue[], PromiseOrValue[]], + ): string; + encodeFunctionData( + functionFragment: 'batchBalanceAction', + values: [PromiseOrValue, BalanceActionStruct[]], + ): string; + encodeFunctionData( + functionFragment: 'batchBalanceAndTradeAction', + values: [PromiseOrValue, BalanceActionWithTradesStruct[]], + ): string; + encodeFunctionData( + functionFragment: 'batchBalanceAndTradeActionWithCallback', + values: [PromiseOrValue, BalanceActionWithTradesStruct[], PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'batchLend', values: [PromiseOrValue, BatchLendStruct[]]): string; + encodeFunctionData( + functionFragment: 'borrowSecondaryCurrencyToVault', + values: [ + PromiseOrValue, + PromiseOrValue, + [PromiseOrValue, PromiseOrValue], + [PromiseOrValue, PromiseOrValue], + [PromiseOrValue, PromiseOrValue], + ], + ): string; + encodeFunctionData( + functionFragment: 'calculateCollateralCurrencyLiquidation', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData( + functionFragment: 'calculateDepositAmountInDeleverage', + values: [ + PromiseOrValue, + VaultAccountStruct, + VaultConfigStruct, + VaultStateStruct, + PromiseOrValue, + ], + ): string; + encodeFunctionData( + functionFragment: 'calculateLocalCurrencyLiquidation', + values: [PromiseOrValue, PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'calculateNTokensToMint', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'calculatefCashCrossCurrencyLiquidation', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue[], + ], + ): string; + encodeFunctionData( + functionFragment: 'calculatefCashLocalLiquidation', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue[], + ], + ): string; + encodeFunctionData( + functionFragment: 'checkVaultAccountCollateralRatio', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'claimCOMPAndTransfer', values: [PromiseOrValue[]]): string; + encodeFunctionData(functionFragment: 'claimOwnership', values?: undefined): string; + encodeFunctionData( + functionFragment: 'convertCashBalanceToExternal', + values: [PromiseOrValue, PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'convertNTokenToUnderlying', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'convertSettledfCash', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData( + functionFragment: 'convertUnderlyingToPrimeCash', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'decodeERC1155Id', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'decodeToAssets', + values: [PromiseOrValue[], PromiseOrValue[]], + ): string; + encodeFunctionData( + functionFragment: 'deleverageAccount', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData( + functionFragment: 'depositAssetToken', + values: [PromiseOrValue, PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'depositUnderlyingToken', + values: [PromiseOrValue, PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'enableBitmapCurrency', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'enableCashGroup', + values: [PromiseOrValue, CashGroupSettingsStruct, PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'enablePrimeBorrow', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'enablePrimeDebt', + values: [PromiseOrValue, PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'encode', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData( + functionFragment: 'encodeToId', + values: [PromiseOrValue, PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'enterVault', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData( + functionFragment: 'exitVault', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData(functionFragment: 'getAccount', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'getAccountBalance', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'getAccountContext', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'getAccountPortfolio', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'getAccountPrimeDebtBalance', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'getActiveMarkets', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'getActiveMarketsAtBlockTime', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'getAssetsBitmap', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'getAuthorizedCallbackContractStatus', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'getBalanceOfPrimeCash', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'getBorrowCapacity', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'getCashAmountGivenfCashAmount', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData(functionFragment: 'getCashGroup', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'getCashGroupAndAssetRate', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'getCurrency', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'getCurrencyAndRates', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'getCurrencyId', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'getDepositFromfCashLend', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData(functionFragment: 'getDepositParameters', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'getFreeCollateral', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'getGlobalTransferOperatorStatus', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'getImplementation', values?: undefined): string; + encodeFunctionData(functionFragment: 'getInitializationParameters', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'getInterestRateCurve', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'getMarket', + values: [PromiseOrValue, PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'getMarketIndex', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'getMaxCurrencyId', values?: undefined): string; + encodeFunctionData(functionFragment: 'getNTokenAccount', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'getNTokenPortfolio', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'getNoteToken', values?: undefined): string; + encodeFunctionData(functionFragment: 'getOwnershipStatus', values?: undefined): string; + encodeFunctionData( + functionFragment: 'getPresentfCashValue', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData(functionFragment: 'getPrimeCashHoldingsOracle', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'getPrimeFactors', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'getPrimeFactorsStored', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'getPrimeInterestRate', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'getPrimeInterestRateCurve', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'getPrincipalFromfCashBorrow', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData(functionFragment: 'getRateStorage', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'getRebalancingCooldown', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'getRebalancingTarget', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'getReserveBalance', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'getReserveBuffer', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'getSecondaryBorrow', + values: [PromiseOrValue, PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'getSecondaryIncentiveRewarder', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'getSettlementRate', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'getStoredTokenBalances', values: [PromiseOrValue[]]): string; + encodeFunctionData( + functionFragment: 'getTotalfCashDebtOutstanding', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'getTreasuryManager', values?: undefined): string; + encodeFunctionData( + functionFragment: 'getVaultAccount', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'getVaultAccountHealthFactors', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'getVaultAccountSecondaryDebt', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'getVaultAccountWithFeeAccrual', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'getVaultConfig', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'getVaultState', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'getfCashAmountGivenCashAmount', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData( + functionFragment: 'getfCashBorrowFromPrincipal', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData( + functionFragment: 'getfCashLendFromDeposit', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData( + functionFragment: 'getfCashNotional', + values: [PromiseOrValue, PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'getfCashRequiredToLiquidateCash', + values: [PromiseOrValue, PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'initializeMarkets', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'isApprovedForAll', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'liquidateCollateralCurrency', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData( + functionFragment: 'liquidateExcessVaultCash', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData( + functionFragment: 'liquidateLocalCurrency', + values: [PromiseOrValue, PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'liquidateVaultCashBalance', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData( + functionFragment: 'liquidatefCashCrossCurrency', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue[], + ], + ): string; + encodeFunctionData( + functionFragment: 'liquidatefCashLocal', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue[], + ], + ): string; + encodeFunctionData( + functionFragment: 'listCurrency', + values: [ + TokenStorageStruct, + ETHRateStorageStruct, + InterestRateCurveSettingsStruct, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData(functionFragment: 'nTokenAddress', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'nTokenBalanceOf', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'nTokenClaimIncentives', values?: undefined): string; + encodeFunctionData( + functionFragment: 'nTokenGetClaimableIncentives', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'nTokenPresentValueAssetDenominated', + values: [PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'nTokenPresentValueUnderlyingDenominated', + values: [PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'nTokenRedeem', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData(functionFragment: 'nTokenTotalSupply', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'nTokenTransfer', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData( + functionFragment: 'nTokenTransferAllowance', + values: [PromiseOrValue, PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'nTokenTransferApprove', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData( + functionFragment: 'nTokenTransferApproveAll', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'nTokenTransferFrom', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData(functionFragment: 'owner', values?: undefined): string; + encodeFunctionData(functionFragment: 'pCashAddress', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'pCashTransfer', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData( + functionFragment: 'pCashTransferAllowance', + values: [PromiseOrValue, PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'pCashTransferApprove', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData( + functionFragment: 'pCashTransferFrom', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData(functionFragment: 'pDebtAddress', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'pauseGuardian', values?: undefined): string; + encodeFunctionData(functionFragment: 'pauseRouter', values?: undefined): string; + encodeFunctionData(functionFragment: 'rebalance', values: [PromiseOrValue[]]): string; + encodeFunctionData( + functionFragment: 'repaySecondaryCurrencyFromVault', + values: [ + PromiseOrValue, + PromiseOrValue, + [PromiseOrValue, PromiseOrValue], + [PromiseOrValue, PromiseOrValue], + ], + ): string; + encodeFunctionData( + functionFragment: 'rollVaultPosition', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + 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: 'setMaxBorrowCapacity', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'setMaxUnderlyingSupply', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'setPauseRouterAndGuardian', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'setRebalancingCooldown', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'setRebalancingTargets', + values: [PromiseOrValue, NotionalTreasury.RebalancingTargetConfigStruct[]], + ): string; + encodeFunctionData( + functionFragment: 'setReserveBuffer', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'setReserveCashBalance', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'setTreasuryManager', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'setVaultDeleverageStatus', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'setVaultPauseStatus', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'settleAccount', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'settleSecondaryBorrowForAccount', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'settleVaultAccount', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'signedBalanceOf', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'signedBalanceOfBatch', + values: [PromiseOrValue[], PromiseOrValue[]], + ): string; + encodeFunctionData( + functionFragment: 'signedBalanceOfVaultTokenId', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'supportsInterface', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'sweepCashIntoMarkets', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'transferOwnership', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'transferReserveToTreasury', values: [PromiseOrValue[]]): string; + encodeFunctionData( + functionFragment: 'updateAuthorizedCallbackContract', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'updateCashGroup', + values: [PromiseOrValue, CashGroupSettingsStruct], + ): string; + encodeFunctionData( + functionFragment: 'updateDepositParameters', + values: [PromiseOrValue, PromiseOrValue[], PromiseOrValue[]], + ): string; + encodeFunctionData( + functionFragment: 'updateETHRate', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData( + functionFragment: 'updateIncentiveEmissionRate', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'updateInitializationParameters', + values: [PromiseOrValue, PromiseOrValue[], PromiseOrValue[]], + ): string; + encodeFunctionData( + functionFragment: 'updateInterestRateCurve', + values: [PromiseOrValue, PromiseOrValue[], InterestRateCurveSettingsStruct[]], + ): string; + encodeFunctionData( + functionFragment: 'updatePrimeCashCurve', + values: [PromiseOrValue, InterestRateCurveSettingsStruct], + ): string; + encodeFunctionData( + functionFragment: 'updatePrimeCashHoldingsOracle', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'updateSecondaryBorrowCapacity', + values: [PromiseOrValue, PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'updateTokenCollateralParameters', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData( + functionFragment: 'updateVault', + values: [PromiseOrValue, VaultConfigParamsStruct, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'upgradeBeacon', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'upgradeTo', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'upgradeToAndCall', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'withdraw', + values: [PromiseOrValue, PromiseOrValue, PromiseOrValue], + ): string; + + decodeFunctionResult(functionFragment: 'accruePrimeInterest', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'balanceOf', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'balanceOfBatch', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'batchBalanceAction', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'batchBalanceAndTradeAction', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'batchBalanceAndTradeActionWithCallback', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'batchLend', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'borrowSecondaryCurrencyToVault', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'calculateCollateralCurrencyLiquidation', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'calculateDepositAmountInDeleverage', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'calculateLocalCurrencyLiquidation', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'calculateNTokensToMint', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'calculatefCashCrossCurrencyLiquidation', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'calculatefCashLocalLiquidation', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'checkVaultAccountCollateralRatio', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'claimCOMPAndTransfer', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'claimOwnership', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'convertCashBalanceToExternal', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'convertNTokenToUnderlying', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'convertSettledfCash', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'convertUnderlyingToPrimeCash', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'decodeERC1155Id', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'decodeToAssets', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'deleverageAccount', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'depositAssetToken', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'depositUnderlyingToken', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'enableBitmapCurrency', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'enableCashGroup', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'enablePrimeBorrow', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'enablePrimeDebt', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'encode', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'encodeToId', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'enterVault', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'exitVault', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getAccount', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getAccountBalance', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getAccountContext', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getAccountPortfolio', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getAccountPrimeDebtBalance', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getActiveMarkets', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getActiveMarketsAtBlockTime', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getAssetsBitmap', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getAuthorizedCallbackContractStatus', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getBalanceOfPrimeCash', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getBorrowCapacity', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getCashAmountGivenfCashAmount', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getCashGroup', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getCashGroupAndAssetRate', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getCurrency', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getCurrencyAndRates', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getCurrencyId', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getDepositFromfCashLend', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getDepositParameters', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getFreeCollateral', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getGlobalTransferOperatorStatus', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getImplementation', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getInitializationParameters', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getInterestRateCurve', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getMarket', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getMarketIndex', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getMaxCurrencyId', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getNTokenAccount', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getNTokenPortfolio', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getNoteToken', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getOwnershipStatus', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getPresentfCashValue', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getPrimeCashHoldingsOracle', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getPrimeFactors', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getPrimeFactorsStored', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getPrimeInterestRate', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getPrimeInterestRateCurve', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getPrincipalFromfCashBorrow', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getRateStorage', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getRebalancingCooldown', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getRebalancingTarget', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getReserveBalance', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getReserveBuffer', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getSecondaryBorrow', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getSecondaryIncentiveRewarder', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getSettlementRate', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getStoredTokenBalances', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getTotalfCashDebtOutstanding', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getTreasuryManager', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getVaultAccount', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getVaultAccountHealthFactors', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getVaultAccountSecondaryDebt', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getVaultAccountWithFeeAccrual', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getVaultConfig', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getVaultState', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getfCashAmountGivenCashAmount', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getfCashBorrowFromPrincipal', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getfCashLendFromDeposit', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getfCashNotional', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getfCashRequiredToLiquidateCash', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'initializeMarkets', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'isApprovedForAll', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'liquidateCollateralCurrency', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'liquidateExcessVaultCash', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'liquidateLocalCurrency', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'liquidateVaultCashBalance', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'liquidatefCashCrossCurrency', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'liquidatefCashLocal', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'listCurrency', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'nTokenAddress', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'nTokenBalanceOf', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'nTokenClaimIncentives', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'nTokenGetClaimableIncentives', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'nTokenPresentValueAssetDenominated', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'nTokenPresentValueUnderlyingDenominated', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'nTokenRedeem', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'nTokenTotalSupply', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'nTokenTransfer', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'nTokenTransferAllowance', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'nTokenTransferApprove', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'nTokenTransferApproveAll', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'nTokenTransferFrom', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'owner', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'pCashAddress', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'pCashTransfer', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'pCashTransferAllowance', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'pCashTransferApprove', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'pCashTransferFrom', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'pDebtAddress', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'pauseGuardian', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'pauseRouter', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'rebalance', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'repaySecondaryCurrencyFromVault', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'rollVaultPosition', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'safeBatchTransferFrom', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'safeTransferFrom', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setApprovalForAll', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setMaxBorrowCapacity', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setMaxUnderlyingSupply', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setPauseRouterAndGuardian', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setRebalancingCooldown', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setRebalancingTargets', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setReserveBuffer', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setReserveCashBalance', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setTreasuryManager', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setVaultDeleverageStatus', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setVaultPauseStatus', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'settleAccount', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'settleSecondaryBorrowForAccount', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'settleVaultAccount', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'signedBalanceOf', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'signedBalanceOfBatch', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'signedBalanceOfVaultTokenId', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'supportsInterface', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'sweepCashIntoMarkets', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'transferOwnership', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'transferReserveToTreasury', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'updateAuthorizedCallbackContract', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'updateCashGroup', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'updateDepositParameters', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'updateETHRate', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'updateIncentiveEmissionRate', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'updateInitializationParameters', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'updateInterestRateCurve', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'updatePrimeCashCurve', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'updatePrimeCashHoldingsOracle', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'updateSecondaryBorrowCapacity', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'updateTokenCollateralParameters', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'updateVault', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'upgradeBeacon', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'upgradeTo', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'upgradeToAndCall', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'withdraw', data: BytesLike): Result; + + events: { + 'AccountContextUpdate(address)': EventFragment; + 'AccountSettled(address)': EventFragment; + 'Approval(address,address,uint256)': EventFragment; + 'ApprovalForAll(address,address,bool)': EventFragment; + 'CurrencyRebalanced(uint16,uint256,uint256)': EventFragment; + 'DeployNToken(uint16,address)': EventFragment; + 'ExcessReserveBalanceHarvested(uint16,int256)': EventFragment; + 'IncentivesMigrated(uint16,uint256,uint256,uint256)': EventFragment; + 'LiquidateCollateralCurrency(address,address,uint16,uint16,int256,int256,int256)': EventFragment; + 'LiquidateLocalCurrency(address,address,uint16,int256)': EventFragment; + 'LiquidatefCashEvent(address,address,uint16,uint16,int256,uint256[],int256[])': EventFragment; + 'ListCurrency(uint16)': EventFragment; + 'MarketsInitialized(uint16)': EventFragment; + 'OwnershipTransferred(address,address)': EventFragment; + 'PauseRouterAndGuardianUpdated(address,address)': EventFragment; + 'PrimeCashCurveChanged(uint16)': EventFragment; + 'PrimeCashHoldingsOracleUpdated(uint16,address)': EventFragment; + 'PrimeCashInterestAccrued(uint16,uint256,uint256,uint256)': EventFragment; + 'PrimeProxyDeployed(uint16,address,bool)': EventFragment; + 'RebalancingCooldownUpdated(uint16,uint40)': EventFragment; + 'RebalancingTargetsUpdated(uint16,tuple[])': EventFragment; + 'ReserveBalanceUpdated(uint16,int256)': EventFragment; + 'ReserveBufferUpdated(uint16,uint256)': EventFragment; + 'SetPrimeSettlementRate(uint256,uint256,int256,int256)': EventFragment; + 'SweepCashIntoMarkets(uint16,int256)': EventFragment; + 'TokenMigrated(uint16)': EventFragment; + 'Transfer(address,address,uint256)': EventFragment; + 'TransferBatch(address,address,address,uint256[],uint256[])': EventFragment; + 'TransferSingle(address,address,address,uint256,uint256)': EventFragment; + 'TreasuryManagerChanged(address,address)': EventFragment; + 'URI(string,uint256)': EventFragment; + 'UpdateAssetRate(uint16)': EventFragment; + 'UpdateAuthorizedCallbackContract(address,bool)': EventFragment; + 'UpdateCashGroup(uint16)': EventFragment; + 'UpdateDepositParameters(uint16)': EventFragment; + 'UpdateETHRate(uint16)': EventFragment; + 'UpdateGlobalTransferOperator(address,bool)': EventFragment; + 'UpdateIncentiveEmissionRate(uint16,uint32)': EventFragment; + 'UpdateInitializationParameters(uint16)': EventFragment; + 'UpdateInterestRateCurve(uint16,uint8)': EventFragment; + 'UpdateMaxUnderlyingSupply(uint16,uint256)': EventFragment; + 'UpdateSecondaryIncentiveRewarder(uint16,address)': EventFragment; + 'UpdateTokenCollateralParameters(uint16)': EventFragment; + 'VaultAccountCashLiquidation(address,address,address,uint16,int256,int256)': EventFragment; + 'VaultBorrowCapacityChange(address,uint16,uint256)': EventFragment; + 'VaultDeleverageAccount(address,address,uint16,uint256,int256)': EventFragment; + 'VaultDeleverageStatus(address,bool)': EventFragment; + 'VaultLiquidatorProfit(address,address,address,uint256,bool)': EventFragment; + 'VaultPauseStatus(address,bool)': EventFragment; + 'VaultSecondaryTransaction(address,address,uint16,uint256,int256,int256)': EventFragment; + 'VaultUpdateSecondaryBorrowCapacity(address,uint16,uint80)': EventFragment; + 'VaultUpdated(address,bool,uint80)': EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: 'AccountContextUpdate'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'AccountSettled'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Approval'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'ApprovalForAll'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'CurrencyRebalanced'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'DeployNToken'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'ExcessReserveBalanceHarvested'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'IncentivesMigrated'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'LiquidateCollateralCurrency'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'LiquidateLocalCurrency'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'LiquidatefCashEvent'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'ListCurrency'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'MarketsInitialized'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'OwnershipTransferred'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'PauseRouterAndGuardianUpdated'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'PrimeCashCurveChanged'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'PrimeCashHoldingsOracleUpdated'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'PrimeCashInterestAccrued'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'PrimeProxyDeployed'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'RebalancingCooldownUpdated'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'RebalancingTargetsUpdated'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'ReserveBalanceUpdated'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'ReserveBufferUpdated'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'SetPrimeSettlementRate'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'SweepCashIntoMarkets'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'TokenMigrated'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Transfer'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'TransferBatch'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'TransferSingle'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'TreasuryManagerChanged'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'URI'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'UpdateAssetRate'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'UpdateAuthorizedCallbackContract'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'UpdateCashGroup'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'UpdateDepositParameters'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'UpdateETHRate'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'UpdateGlobalTransferOperator'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'UpdateIncentiveEmissionRate'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'UpdateInitializationParameters'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'UpdateInterestRateCurve'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'UpdateMaxUnderlyingSupply'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'UpdateSecondaryIncentiveRewarder'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'UpdateTokenCollateralParameters'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'VaultAccountCashLiquidation'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'VaultBorrowCapacityChange'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'VaultDeleverageAccount'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'VaultDeleverageStatus'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'VaultLiquidatorProfit'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'VaultPauseStatus'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'VaultSecondaryTransaction'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'VaultUpdateSecondaryBorrowCapacity'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'VaultUpdated'): EventFragment; +} + +export interface AccountContextUpdateEventObject { + account: string; +} +export type AccountContextUpdateEvent = TypedEvent<[string], AccountContextUpdateEventObject>; + +export type AccountContextUpdateEventFilter = TypedEventFilter; + +export interface AccountSettledEventObject { + account: string; +} +export type AccountSettledEvent = TypedEvent<[string], AccountSettledEventObject>; + +export type AccountSettledEventFilter = TypedEventFilter; + +export interface ApprovalEventObject { + owner: string; + spender: string; + amount: BigNumber; +} +export type ApprovalEvent = TypedEvent<[string, string, BigNumber], ApprovalEventObject>; + +export type ApprovalEventFilter = TypedEventFilter; + +export interface ApprovalForAllEventObject { + account: string; + operator: string; + approved: boolean; +} +export type ApprovalForAllEvent = TypedEvent<[string, string, boolean], ApprovalForAllEventObject>; + +export type ApprovalForAllEventFilter = TypedEventFilter; + +export interface CurrencyRebalancedEventObject { + currencyId: number; + supplyFactor: BigNumber; + annualizedInterestRate: BigNumber; +} +export type CurrencyRebalancedEvent = TypedEvent<[number, BigNumber, BigNumber], CurrencyRebalancedEventObject>; + +export type CurrencyRebalancedEventFilter = TypedEventFilter; + +export interface DeployNTokenEventObject { + currencyId: number; + nTokenAddress: string; +} +export type DeployNTokenEvent = TypedEvent<[number, string], DeployNTokenEventObject>; + +export type DeployNTokenEventFilter = TypedEventFilter; + +export interface ExcessReserveBalanceHarvestedEventObject { + currencyId: number; + harvestAmount: BigNumber; +} +export type ExcessReserveBalanceHarvestedEvent = TypedEvent< + [number, BigNumber], + ExcessReserveBalanceHarvestedEventObject +>; + +export type ExcessReserveBalanceHarvestedEventFilter = TypedEventFilter; + +export interface IncentivesMigratedEventObject { + currencyId: number; + migrationEmissionRate: BigNumber; + finalIntegralTotalSupply: BigNumber; + migrationTime: BigNumber; +} +export type IncentivesMigratedEvent = TypedEvent< + [number, BigNumber, BigNumber, BigNumber], + IncentivesMigratedEventObject +>; + +export type IncentivesMigratedEventFilter = TypedEventFilter; + +export interface LiquidateCollateralCurrencyEventObject { + liquidated: string; + liquidator: string; + localCurrencyId: number; + collateralCurrencyId: number; + netLocalFromLiquidator: BigNumber; + netCollateralTransfer: BigNumber; + netNTokenTransfer: BigNumber; +} +export type LiquidateCollateralCurrencyEvent = TypedEvent< + [string, string, number, number, BigNumber, BigNumber, BigNumber], + LiquidateCollateralCurrencyEventObject +>; + +export type LiquidateCollateralCurrencyEventFilter = TypedEventFilter; + +export interface LiquidateLocalCurrencyEventObject { + liquidated: string; + liquidator: string; + localCurrencyId: number; + netLocalFromLiquidator: BigNumber; +} +export type LiquidateLocalCurrencyEvent = TypedEvent< + [string, string, number, BigNumber], + LiquidateLocalCurrencyEventObject +>; + +export type LiquidateLocalCurrencyEventFilter = TypedEventFilter; + +export interface LiquidatefCashEventEventObject { + liquidated: string; + liquidator: string; + localCurrencyId: number; + fCashCurrency: number; + netLocalFromLiquidator: BigNumber; + fCashMaturities: BigNumber[]; + fCashNotionalTransfer: BigNumber[]; +} +export type LiquidatefCashEventEvent = TypedEvent< + [string, string, number, number, BigNumber, BigNumber[], BigNumber[]], + LiquidatefCashEventEventObject +>; + +export type LiquidatefCashEventEventFilter = TypedEventFilter; + +export interface ListCurrencyEventObject { + newCurrencyId: number; +} +export type ListCurrencyEvent = TypedEvent<[number], ListCurrencyEventObject>; + +export type ListCurrencyEventFilter = TypedEventFilter; + +export interface MarketsInitializedEventObject { + currencyId: number; +} +export type MarketsInitializedEvent = TypedEvent<[number], MarketsInitializedEventObject>; + +export type MarketsInitializedEventFilter = TypedEventFilter; + +export interface OwnershipTransferredEventObject { + previousOwner: string; + newOwner: string; +} +export type OwnershipTransferredEvent = TypedEvent<[string, string], OwnershipTransferredEventObject>; + +export type OwnershipTransferredEventFilter = TypedEventFilter; + +export interface PauseRouterAndGuardianUpdatedEventObject { + pauseRouter: string; + pauseGuardian: string; +} +export type PauseRouterAndGuardianUpdatedEvent = TypedEvent<[string, string], PauseRouterAndGuardianUpdatedEventObject>; + +export type PauseRouterAndGuardianUpdatedEventFilter = TypedEventFilter; + +export interface PrimeCashCurveChangedEventObject { + currencyId: number; +} +export type PrimeCashCurveChangedEvent = TypedEvent<[number], PrimeCashCurveChangedEventObject>; + +export type PrimeCashCurveChangedEventFilter = TypedEventFilter; + +export interface PrimeCashHoldingsOracleUpdatedEventObject { + currencyId: number; + oracle: string; +} +export type PrimeCashHoldingsOracleUpdatedEvent = TypedEvent< + [number, string], + PrimeCashHoldingsOracleUpdatedEventObject +>; + +export type PrimeCashHoldingsOracleUpdatedEventFilter = TypedEventFilter; + +export interface PrimeCashInterestAccruedEventObject { + currencyId: number; + underlyingScalar: BigNumber; + supplyScalar: BigNumber; + debtScalar: BigNumber; +} +export type PrimeCashInterestAccruedEvent = TypedEvent< + [number, BigNumber, BigNumber, BigNumber], + PrimeCashInterestAccruedEventObject +>; + +export type PrimeCashInterestAccruedEventFilter = TypedEventFilter; + +export interface PrimeProxyDeployedEventObject { + currencyId: number; + proxy: string; + isCashProxy: boolean; +} +export type PrimeProxyDeployedEvent = TypedEvent<[number, string, boolean], PrimeProxyDeployedEventObject>; + +export type PrimeProxyDeployedEventFilter = TypedEventFilter; + +export interface RebalancingCooldownUpdatedEventObject { + currencyId: number; + cooldownTimeInSeconds: number; +} +export type RebalancingCooldownUpdatedEvent = TypedEvent<[number, number], RebalancingCooldownUpdatedEventObject>; + +export type RebalancingCooldownUpdatedEventFilter = TypedEventFilter; + +export interface RebalancingTargetsUpdatedEventObject { + currencyId: number; + targets: NotionalTreasury.RebalancingTargetConfigStructOutput[]; +} +export type RebalancingTargetsUpdatedEvent = TypedEvent< + [number, NotionalTreasury.RebalancingTargetConfigStructOutput[]], + RebalancingTargetsUpdatedEventObject +>; + +export type RebalancingTargetsUpdatedEventFilter = TypedEventFilter; + +export interface ReserveBalanceUpdatedEventObject { + currencyId: number; + newBalance: BigNumber; +} +export type ReserveBalanceUpdatedEvent = TypedEvent<[number, BigNumber], ReserveBalanceUpdatedEventObject>; + +export type ReserveBalanceUpdatedEventFilter = TypedEventFilter; + +export interface ReserveBufferUpdatedEventObject { + currencyId: number; + bufferAmount: BigNumber; +} +export type ReserveBufferUpdatedEvent = TypedEvent<[number, BigNumber], ReserveBufferUpdatedEventObject>; + +export type ReserveBufferUpdatedEventFilter = TypedEventFilter; + +export interface SetPrimeSettlementRateEventObject { + currencyId: BigNumber; + maturity: BigNumber; + supplyFactor: BigNumber; + debtFactor: BigNumber; +} +export type SetPrimeSettlementRateEvent = TypedEvent< + [BigNumber, BigNumber, BigNumber, BigNumber], + SetPrimeSettlementRateEventObject +>; + +export type SetPrimeSettlementRateEventFilter = TypedEventFilter; + +export interface SweepCashIntoMarketsEventObject { + currencyId: number; + cashIntoMarkets: BigNumber; +} +export type SweepCashIntoMarketsEvent = TypedEvent<[number, BigNumber], SweepCashIntoMarketsEventObject>; + +export type SweepCashIntoMarketsEventFilter = TypedEventFilter; + +export interface TokenMigratedEventObject { + currencyId: number; +} +export type TokenMigratedEvent = TypedEvent<[number], TokenMigratedEventObject>; + +export type TokenMigratedEventFilter = TypedEventFilter; + +export interface TransferEventObject { + from: string; + to: string; + amount: BigNumber; +} +export type TransferEvent = TypedEvent<[string, string, BigNumber], TransferEventObject>; + +export type TransferEventFilter = TypedEventFilter; + +export interface TransferBatchEventObject { + operator: string; + from: string; + to: string; + ids: BigNumber[]; + values: 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; + value: BigNumber; +} +export type TransferSingleEvent = TypedEvent<[string, string, string, BigNumber, BigNumber], TransferSingleEventObject>; + +export type TransferSingleEventFilter = TypedEventFilter; + +export interface TreasuryManagerChangedEventObject { + previousManager: string; + newManager: string; +} +export type TreasuryManagerChangedEvent = TypedEvent<[string, string], TreasuryManagerChangedEventObject>; + +export type TreasuryManagerChangedEventFilter = TypedEventFilter; + +export interface URIEventObject { + value: string; + id: BigNumber; +} +export type URIEvent = TypedEvent<[string, BigNumber], URIEventObject>; + +export type URIEventFilter = TypedEventFilter; + +export interface UpdateAssetRateEventObject { + currencyId: number; +} +export type UpdateAssetRateEvent = TypedEvent<[number], UpdateAssetRateEventObject>; + +export type UpdateAssetRateEventFilter = TypedEventFilter; + +export interface UpdateAuthorizedCallbackContractEventObject { + operator: string; + approved: boolean; +} +export type UpdateAuthorizedCallbackContractEvent = TypedEvent< + [string, boolean], + UpdateAuthorizedCallbackContractEventObject +>; + +export type UpdateAuthorizedCallbackContractEventFilter = TypedEventFilter; + +export interface UpdateCashGroupEventObject { + currencyId: number; +} +export type UpdateCashGroupEvent = TypedEvent<[number], UpdateCashGroupEventObject>; + +export type UpdateCashGroupEventFilter = TypedEventFilter; + +export interface UpdateDepositParametersEventObject { + currencyId: number; +} +export type UpdateDepositParametersEvent = TypedEvent<[number], UpdateDepositParametersEventObject>; + +export type UpdateDepositParametersEventFilter = TypedEventFilter; + +export interface UpdateETHRateEventObject { + currencyId: number; +} +export type UpdateETHRateEvent = TypedEvent<[number], UpdateETHRateEventObject>; + +export type UpdateETHRateEventFilter = TypedEventFilter; + +export interface UpdateGlobalTransferOperatorEventObject { + operator: string; + approved: boolean; +} +export type UpdateGlobalTransferOperatorEvent = TypedEvent<[string, boolean], UpdateGlobalTransferOperatorEventObject>; + +export type UpdateGlobalTransferOperatorEventFilter = TypedEventFilter; + +export interface UpdateIncentiveEmissionRateEventObject { + currencyId: number; + newEmissionRate: number; +} +export type UpdateIncentiveEmissionRateEvent = TypedEvent<[number, number], UpdateIncentiveEmissionRateEventObject>; + +export type UpdateIncentiveEmissionRateEventFilter = TypedEventFilter; + +export interface UpdateInitializationParametersEventObject { + currencyId: number; +} +export type UpdateInitializationParametersEvent = TypedEvent<[number], UpdateInitializationParametersEventObject>; + +export type UpdateInitializationParametersEventFilter = TypedEventFilter; + +export interface UpdateInterestRateCurveEventObject { + currencyId: number; + marketIndex: number; +} +export type UpdateInterestRateCurveEvent = TypedEvent<[number, number], UpdateInterestRateCurveEventObject>; + +export type UpdateInterestRateCurveEventFilter = TypedEventFilter; + +export interface UpdateMaxUnderlyingSupplyEventObject { + currencyId: number; + maxUnderlyingSupply: BigNumber; +} +export type UpdateMaxUnderlyingSupplyEvent = TypedEvent<[number, BigNumber], UpdateMaxUnderlyingSupplyEventObject>; + +export type UpdateMaxUnderlyingSupplyEventFilter = TypedEventFilter; + +export interface UpdateSecondaryIncentiveRewarderEventObject { + currencyId: number; + rewarder: string; +} +export type UpdateSecondaryIncentiveRewarderEvent = TypedEvent< + [number, string], + UpdateSecondaryIncentiveRewarderEventObject +>; + +export type UpdateSecondaryIncentiveRewarderEventFilter = TypedEventFilter; + +export interface UpdateTokenCollateralParametersEventObject { + currencyId: number; +} +export type UpdateTokenCollateralParametersEvent = TypedEvent<[number], UpdateTokenCollateralParametersEventObject>; + +export type UpdateTokenCollateralParametersEventFilter = TypedEventFilter; + +export interface VaultAccountCashLiquidationEventObject { + vault: string; + account: string; + liquidator: string; + currencyId: number; + fCashDeposit: BigNumber; + cashToLiquidator: BigNumber; +} +export type VaultAccountCashLiquidationEvent = TypedEvent< + [string, string, string, number, BigNumber, BigNumber], + VaultAccountCashLiquidationEventObject +>; + +export type VaultAccountCashLiquidationEventFilter = TypedEventFilter; + +export interface VaultBorrowCapacityChangeEventObject { + vault: string; + currencyId: number; + totalUsedBorrowCapacity: BigNumber; +} +export type VaultBorrowCapacityChangeEvent = TypedEvent< + [string, number, BigNumber], + VaultBorrowCapacityChangeEventObject +>; + +export type VaultBorrowCapacityChangeEventFilter = TypedEventFilter; + +export interface VaultDeleverageAccountEventObject { + vault: string; + account: string; + currencyId: number; + vaultSharesToLiquidator: BigNumber; + depositAmountPrimeCash: BigNumber; +} +export type VaultDeleverageAccountEvent = TypedEvent< + [string, string, number, BigNumber, BigNumber], + VaultDeleverageAccountEventObject +>; + +export type VaultDeleverageAccountEventFilter = TypedEventFilter; + +export interface VaultDeleverageStatusEventObject { + vaultAddress: string; + disableDeleverage: boolean; +} +export type VaultDeleverageStatusEvent = TypedEvent<[string, boolean], VaultDeleverageStatusEventObject>; + +export type VaultDeleverageStatusEventFilter = TypedEventFilter; + +export interface VaultLiquidatorProfitEventObject { + vault: string; + account: string; + liquidator: string; + vaultSharesToLiquidator: BigNumber; + transferSharesToLiquidator: boolean; +} +export type VaultLiquidatorProfitEvent = TypedEvent< + [string, string, string, BigNumber, boolean], + VaultLiquidatorProfitEventObject +>; + +export type VaultLiquidatorProfitEventFilter = TypedEventFilter; + +export interface VaultPauseStatusEventObject { + vault: string; + enabled: boolean; +} +export type VaultPauseStatusEvent = TypedEvent<[string, boolean], VaultPauseStatusEventObject>; + +export type VaultPauseStatusEventFilter = TypedEventFilter; + +export interface VaultSecondaryTransactionEventObject { + vault: string; + account: string; + currencyId: number; + maturity: BigNumber; + netUnderlyingDebt: BigNumber; + netPrimeSupply: BigNumber; +} +export type VaultSecondaryTransactionEvent = TypedEvent< + [string, string, number, BigNumber, BigNumber, BigNumber], + VaultSecondaryTransactionEventObject +>; + +export type VaultSecondaryTransactionEventFilter = TypedEventFilter; + +export interface VaultUpdateSecondaryBorrowCapacityEventObject { + vault: string; + currencyId: number; + maxSecondaryBorrowCapacity: BigNumber; +} +export type VaultUpdateSecondaryBorrowCapacityEvent = TypedEvent< + [string, number, BigNumber], + VaultUpdateSecondaryBorrowCapacityEventObject +>; + +export type VaultUpdateSecondaryBorrowCapacityEventFilter = TypedEventFilter; + +export interface VaultUpdatedEventObject { + vault: string; + enabled: boolean; + maxPrimaryBorrowCapacity: BigNumber; +} +export type VaultUpdatedEvent = TypedEvent<[string, boolean, BigNumber], VaultUpdatedEventObject>; + +export type VaultUpdatedEventFilter = TypedEventFilter; + +export interface NotionalView extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: NotionalViewInterface; + + 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: { + accruePrimeInterest( + currencyId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + balanceOf( + account: PromiseOrValue, + id: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + balanceOfBatch( + accounts: PromiseOrValue[], + ids: PromiseOrValue[], + overrides?: CallOverrides, + ): Promise<[BigNumber[]]>; + + batchBalanceAction( + account: PromiseOrValue, + actions: BalanceActionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + batchBalanceAndTradeAction( + account: PromiseOrValue, + actions: BalanceActionWithTradesStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + batchBalanceAndTradeActionWithCallback( + account: PromiseOrValue, + actions: BalanceActionWithTradesStruct[], + callbackData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + batchLend( + account: PromiseOrValue, + actions: BatchLendStruct[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + borrowSecondaryCurrencyToVault( + account: PromiseOrValue, + maturity: PromiseOrValue, + underlyingToBorrow: [PromiseOrValue, PromiseOrValue], + maxBorrowRate: [PromiseOrValue, PromiseOrValue], + minRollLendRate: [PromiseOrValue, PromiseOrValue], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + calculateCollateralCurrencyLiquidation( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + collateralCurrency: PromiseOrValue, + maxCollateralLiquidation: PromiseOrValue, + maxNTokenLiquidation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + calculateDepositAmountInDeleverage( + currencyIndex: PromiseOrValue, + vaultAccount: VaultAccountStruct, + vaultConfig: VaultConfigStruct, + vaultState: VaultStateStruct, + depositUnderlyingInternal: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + calculateLocalCurrencyLiquidation( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + maxNTokenLiquidation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + calculateNTokensToMint( + currencyId: PromiseOrValue, + amountToDepositExternalPrecision: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + calculatefCashCrossCurrencyLiquidation( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + fCashCurrency: PromiseOrValue, + fCashMaturities: PromiseOrValue[], + maxfCashLiquidateAmounts: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + calculatefCashLocalLiquidation( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + fCashMaturities: PromiseOrValue[], + maxfCashLiquidateAmounts: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + checkVaultAccountCollateralRatio( + vault: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + claimCOMPAndTransfer( + ctokens: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + claimOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + convertCashBalanceToExternal( + currencyId: PromiseOrValue, + cashBalanceInternal: PromiseOrValue, + useUnderlying: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + convertNTokenToUnderlying( + currencyId: PromiseOrValue, + nTokenBalance: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + convertSettledfCash( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + fCashBalance: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber] & { signedPrimeSupplyValue: BigNumber }>; + + convertUnderlyingToPrimeCash( + currencyId: PromiseOrValue, + underlyingExternal: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + decodeERC1155Id( + id: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [number, BigNumber, BigNumber, string, boolean] & { + currencyId: number; + maturity: BigNumber; + assetType: BigNumber; + vaultAddress: string; + isfCashDebt: boolean; + } + >; + + decodeToAssets( + ids: PromiseOrValue[], + amounts: PromiseOrValue[], + overrides?: CallOverrides, + ): Promise<[PortfolioAssetStructOutput[]]>; + + deleverageAccount( + account: PromiseOrValue, + vault: PromiseOrValue, + liquidator: PromiseOrValue, + currencyIndex: PromiseOrValue, + depositUnderlyingInternal: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + depositAssetToken( + account: PromiseOrValue, + currencyId: PromiseOrValue, + amountExternalPrecision: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + depositUnderlyingToken( + account: PromiseOrValue, + currencyId: PromiseOrValue, + amountExternalPrecision: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + enableBitmapCurrency( + currencyId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + enableCashGroup( + currencyId: PromiseOrValue, + cashGroup: CashGroupSettingsStruct, + underlyingName: PromiseOrValue, + underlyingSymbol: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + enablePrimeBorrow( + allowPrimeBorrow: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + enablePrimeDebt( + currencyId: PromiseOrValue, + underlyingName: PromiseOrValue, + underlyingSymbol: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + encode( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + assetType: PromiseOrValue, + vaultAddress: PromiseOrValue, + isfCashDebt: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + encodeToId( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + assetType: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber] & { id: BigNumber }>; + + enterVault( + account: PromiseOrValue, + vault: PromiseOrValue, + depositAmountExternal: PromiseOrValue, + maturity: PromiseOrValue, + fCash: PromiseOrValue, + maxBorrowRate: PromiseOrValue, + vaultData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + exitVault( + account: PromiseOrValue, + vault: PromiseOrValue, + receiver: PromiseOrValue, + vaultSharesToRedeem: PromiseOrValue, + fCashToLend: PromiseOrValue, + minLendRate: PromiseOrValue, + exitVaultData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + getAccount( + account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [AccountContextStructOutput, AccountBalanceStructOutput[], PortfolioAssetStructOutput[]] & { + accountContext: AccountContextStructOutput; + accountBalances: AccountBalanceStructOutput[]; + portfolio: PortfolioAssetStructOutput[]; + } + >; + + getAccountBalance( + currencyId: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + cashBalance: BigNumber; + nTokenBalance: BigNumber; + lastClaimTime: BigNumber; + } + >; + + getAccountContext( + account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[AccountContextStructOutput]>; + + getAccountPortfolio( + account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[PortfolioAssetStructOutput[]]>; + + getAccountPrimeDebtBalance( + currencyId: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber] & { debtBalance: BigNumber }>; + + getActiveMarkets( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[MarketParametersStructOutput[]]>; + + getActiveMarketsAtBlockTime( + currencyId: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[MarketParametersStructOutput[]]>; + + getAssetsBitmap( + account: PromiseOrValue, + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[string]>; + + getAuthorizedCallbackContractStatus( + callback: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[boolean] & { isAuthorized: boolean }>; + + getBalanceOfPrimeCash( + currencyId: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber] & { cashBalance: BigNumber }>; + + getBorrowCapacity( + vault: PromiseOrValue, + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + currentPrimeDebtUnderlying: BigNumber; + totalfCashDebt: BigNumber; + maxBorrowCapacity: BigNumber; + } + >; + + getCashAmountGivenfCashAmount( + currencyId: PromiseOrValue, + fCashAmount: PromiseOrValue, + marketIndex: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber, BigNumber]>; + + getCashGroup( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[CashGroupSettingsStructOutput]>; + + getCashGroupAndAssetRate( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [CashGroupSettingsStructOutput, Deprecated_AssetRateParametersStructOutput] & { + cashGroup: CashGroupSettingsStructOutput; + assetRate: Deprecated_AssetRateParametersStructOutput; + } + >; + + getCurrency( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [TokenStructOutput, TokenStructOutput] & { + assetToken: TokenStructOutput; + underlyingToken: TokenStructOutput; + } + >; + + getCurrencyAndRates( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [TokenStructOutput, TokenStructOutput, ETHRateStructOutput, Deprecated_AssetRateParametersStructOutput] & { + assetToken: TokenStructOutput; + underlyingToken: TokenStructOutput; + ethRate: ETHRateStructOutput; + assetRate: Deprecated_AssetRateParametersStructOutput; + } + >; + + getCurrencyId( + tokenAddress: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[number] & { currencyId: number }>; + + getDepositFromfCashLend( + currencyId: PromiseOrValue, + fCashAmount: PromiseOrValue, + maturity: PromiseOrValue, + minLendRate: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber, number, string] & { + depositAmountUnderlying: BigNumber; + depositAmountAsset: BigNumber; + marketIndex: number; + encodedTrade: string; + } + >; + + getDepositParameters( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber[], BigNumber[]] & { + depositShares: BigNumber[]; + leverageThresholds: BigNumber[]; + } + >; + + getFreeCollateral(account: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber, BigNumber[]]>; + + getGlobalTransferOperatorStatus( + operator: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[boolean] & { isAuthorized: boolean }>; + + getImplementation(overrides?: CallOverrides): Promise<[string]>; + + getInitializationParameters( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber[], BigNumber[]] & { + annualizedAnchorRates: BigNumber[]; + proportions: BigNumber[]; + } + >; + + getInterestRateCurve( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [InterestRateParametersStructOutput[], InterestRateParametersStructOutput[]] & { + nextInterestRateCurve: InterestRateParametersStructOutput[]; + activeInterestRateCurve: InterestRateParametersStructOutput[]; + } + >; + + getMarket( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + settlementDate: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[MarketParametersStructOutput]>; + + getMarketIndex( + maturity: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[number] & { marketIndex: number }>; + + getMaxCurrencyId(overrides?: CallOverrides): Promise<[number]>; + + getNTokenAccount( + tokenAddress: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [number, BigNumber, BigNumber, BigNumber, string, BigNumber, BigNumber, BigNumber] & { + currencyId: number; + totalSupply: BigNumber; + incentiveAnnualEmissionRate: BigNumber; + lastInitializedTime: BigNumber; + nTokenParameters: string; + cashBalance: BigNumber; + accumulatedNOTEPerNToken: BigNumber; + lastAccumulatedTime: BigNumber; + } + >; + + getNTokenPortfolio( + tokenAddress: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [PortfolioAssetStructOutput[], PortfolioAssetStructOutput[]] & { + liquidityTokens: PortfolioAssetStructOutput[]; + netfCashAssets: PortfolioAssetStructOutput[]; + } + >; + + getNoteToken(overrides?: CallOverrides): Promise<[string]>; + + getOwnershipStatus(overrides?: CallOverrides): Promise<[string, string] & { owner: string; pendingOwner: string }>; + + getPresentfCashValue( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + notional: PromiseOrValue, + blockTime: PromiseOrValue, + riskAdjusted: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber] & { presentValue: BigNumber }>; + + getPrimeCashHoldingsOracle(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + + getPrimeFactors( + currencyId: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [PrimeRateStructOutput, PrimeCashFactorsStructOutput, BigNumber, BigNumber] & { + primeRate: PrimeRateStructOutput; + factors: PrimeCashFactorsStructOutput; + maxUnderlyingSupply: BigNumber; + totalUnderlyingSupply: BigNumber; + } + >; + + getPrimeFactorsStored( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[PrimeCashFactorsStructOutput]>; + + getPrimeInterestRate( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + annualDebtRatePreFee: BigNumber; + annualDebtRatePostFee: BigNumber; + annualSupplyRate: BigNumber; + } + >; + + getPrimeInterestRateCurve( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[InterestRateParametersStructOutput]>; + + getPrincipalFromfCashBorrow( + currencyId: PromiseOrValue, + fCashBorrow: PromiseOrValue, + maturity: PromiseOrValue, + maxBorrowRate: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber, number, string] & { + borrowAmountUnderlying: BigNumber; + borrowAmountAsset: BigNumber; + marketIndex: number; + encodedTrade: string; + } + >; + + getRateStorage( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [ETHRateStorageStructOutput, AssetRateStorageStructOutput] & { + ethRate: ETHRateStorageStructOutput; + assetRate: AssetRateStorageStructOutput; + } + >; + + getRebalancingCooldown(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise<[number]>; + + getRebalancingTarget( + currencyId: PromiseOrValue, + holding: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[number]>; + + getReserveBalance( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber] & { reserveBalance: BigNumber }>; + + getReserveBuffer(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + getSecondaryBorrow( + vault: PromiseOrValue, + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber] & { totalDebt: BigNumber }>; + + getSecondaryIncentiveRewarder( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[string] & { incentiveRewarder: string }>; + + getSettlementRate( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[PrimeRateStructOutput]>; + + getStoredTokenBalances( + tokens: PromiseOrValue[], + overrides?: CallOverrides, + ): Promise<[BigNumber[]] & { balances: BigNumber[] }>; + + getTotalfCashDebtOutstanding( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + totalfCashDebt: BigNumber; + fCashDebtHeldInSettlementReserve: BigNumber; + primeCashHeldInSettlementReserve: BigNumber; + } + >; + + getTreasuryManager(overrides?: CallOverrides): Promise<[string]>; + + getVaultAccount( + account: PromiseOrValue, + vault: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[VaultAccountStructOutput]>; + + getVaultAccountHealthFactors( + account: PromiseOrValue, + vault: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [VaultAccountHealthFactorsStructOutput, [BigNumber, BigNumber, BigNumber], [BigNumber, BigNumber, BigNumber]] & { + h: VaultAccountHealthFactorsStructOutput; + maxLiquidatorDepositUnderlying: [BigNumber, BigNumber, BigNumber]; + vaultSharesToLiquidator: [BigNumber, BigNumber, BigNumber]; + } + >; + + getVaultAccountSecondaryDebt( + account: PromiseOrValue, + vault: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, [BigNumber, BigNumber], [BigNumber, BigNumber]] & { + maturity: BigNumber; + accountSecondaryDebt: [BigNumber, BigNumber]; + accountSecondaryCashHeld: [BigNumber, BigNumber]; + } + >; + + getVaultAccountWithFeeAccrual( + account: PromiseOrValue, + vault: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [VaultAccountStructOutput, BigNumber] & { + accruedPrimeVaultFeeInUnderlying: BigNumber; + } + >; + + getVaultConfig( + vault: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[VaultConfigStructOutput] & { vaultConfig: VaultConfigStructOutput }>; + + getVaultState( + vault: PromiseOrValue, + maturity: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[VaultStateStructOutput] & { vaultState: VaultStateStructOutput }>; + + getfCashAmountGivenCashAmount( + currencyId: PromiseOrValue, + netCashToAccount: PromiseOrValue, + marketIndex: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + getfCashBorrowFromPrincipal( + currencyId: PromiseOrValue, + borrowedAmountExternal: PromiseOrValue, + maturity: PromiseOrValue, + maxBorrowRate: PromiseOrValue, + blockTime: PromiseOrValue, + useUnderlying: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, number, string] & { + fCashDebt: BigNumber; + marketIndex: number; + encodedTrade: string; + } + >; + + getfCashLendFromDeposit( + currencyId: PromiseOrValue, + depositAmountExternal: PromiseOrValue, + maturity: PromiseOrValue, + minLendRate: PromiseOrValue, + blockTime: PromiseOrValue, + useUnderlying: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, number, string] & { + fCashAmount: BigNumber; + marketIndex: number; + encodedTrade: string; + } + >; + + getfCashNotional( + account: PromiseOrValue, + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + getfCashRequiredToLiquidateCash( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + vaultAccountCashBalance: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber] & { + fCashRequired: BigNumber; + discountFactor: BigNumber; + } + >; + + initializeMarkets( + currencyId: PromiseOrValue, + isFirstInit: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + isApprovedForAll( + account: PromiseOrValue, + operator: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[boolean]>; + + liquidateCollateralCurrency( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + collateralCurrency: PromiseOrValue, + maxCollateralLiquidation: PromiseOrValue, + maxNTokenLiquidation: PromiseOrValue, + withdrawCollateral: PromiseOrValue, + redeemToUnderlying: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + liquidateExcessVaultCash( + account: PromiseOrValue, + vault: PromiseOrValue, + liquidator: PromiseOrValue, + excessCashIndex: PromiseOrValue, + debtIndex: PromiseOrValue, + _depositUnderlyingInternal: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + liquidateLocalCurrency( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + maxNTokenLiquidation: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + liquidateVaultCashBalance( + account: PromiseOrValue, + vault: PromiseOrValue, + liquidator: PromiseOrValue, + currencyIndex: PromiseOrValue, + fCashDeposit: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + liquidatefCashCrossCurrency( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + fCashCurrency: PromiseOrValue, + fCashMaturities: PromiseOrValue[], + maxfCashLiquidateAmounts: PromiseOrValue[], + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + liquidatefCashLocal( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + fCashMaturities: PromiseOrValue[], + maxfCashLiquidateAmounts: PromiseOrValue[], + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + listCurrency( + underlyingToken: TokenStorageStruct, + ethRate: ETHRateStorageStruct, + primeDebtCurve: InterestRateCurveSettingsStruct, + primeCashHoldingsOracle: PromiseOrValue, + allowPrimeCashDebt: PromiseOrValue, + rateOracleTimeWindow5Min: PromiseOrValue, + underlyingName: PromiseOrValue, + underlyingSymbol: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + nTokenAddress(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + + nTokenBalanceOf( + currencyId: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + nTokenClaimIncentives(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + nTokenGetClaimableIncentives( + account: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + nTokenPresentValueAssetDenominated( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + nTokenPresentValueUnderlyingDenominated( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + nTokenRedeem( + redeemer: PromiseOrValue, + currencyId: PromiseOrValue, + tokensToRedeem_: PromiseOrValue, + sellTokenAssets: PromiseOrValue, + acceptResidualAssets: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + nTokenTotalSupply(nTokenAddress: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + nTokenTransfer( + currencyId: PromiseOrValue, + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + nTokenTransferAllowance( + currencyId: PromiseOrValue, + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + nTokenTransferApprove( + currencyId: PromiseOrValue, + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + nTokenTransferApproveAll( + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + nTokenTransferFrom( + currencyId: PromiseOrValue, + spender: PromiseOrValue, + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + owner(overrides?: CallOverrides): Promise<[string]>; + + pCashAddress(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + + pCashTransfer( + currencyId: PromiseOrValue, + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + pCashTransferAllowance( + currencyId: PromiseOrValue, + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + pCashTransferApprove( + currencyId: PromiseOrValue, + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + pCashTransferFrom( + currencyId: PromiseOrValue, + spender: PromiseOrValue, + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + pDebtAddress(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + + pauseGuardian(overrides?: CallOverrides): Promise<[string]>; + + pauseRouter(overrides?: CallOverrides): Promise<[string]>; + + rebalance( + currencyId: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + repaySecondaryCurrencyFromVault( + account: PromiseOrValue, + maturity: PromiseOrValue, + underlyingToRepay: [PromiseOrValue, PromiseOrValue], + minLendRate: [PromiseOrValue, PromiseOrValue], + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + rollVaultPosition( + account: PromiseOrValue, + vault: PromiseOrValue, + fCashToBorrow: PromiseOrValue, + maturity: PromiseOrValue, + depositAmountExternal: PromiseOrValue, + minLendRate: PromiseOrValue, + maxBorrowRate: PromiseOrValue, + enterVaultData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + safeBatchTransferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + ids: PromiseOrValue[], + amounts: PromiseOrValue[], + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + safeTransferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + id: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + setApprovalForAll( + operator: PromiseOrValue, + approved: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMaxBorrowCapacity( + vaultAddress: PromiseOrValue, + maxVaultBorrowCapacity: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMaxUnderlyingSupply( + currencyId: PromiseOrValue, + maxUnderlyingSupply: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setPauseRouterAndGuardian( + pauseRouter_: PromiseOrValue, + pauseGuardian_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setRebalancingCooldown( + currencyId: PromiseOrValue, + cooldownTimeInSeconds: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setRebalancingTargets( + currencyId: PromiseOrValue, + targets: NotionalTreasury.RebalancingTargetConfigStruct[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setReserveBuffer( + currencyId: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setReserveCashBalance( + currencyId: PromiseOrValue, + reserveBalance: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setTreasuryManager( + manager: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setVaultDeleverageStatus( + vaultAddress: PromiseOrValue, + disableDeleverage: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setVaultPauseStatus( + vaultAddress: PromiseOrValue, + enable: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + settleAccount( + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + settleSecondaryBorrowForAccount( + vault: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + settleVaultAccount( + account: PromiseOrValue, + vault: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + signedBalanceOf( + account: PromiseOrValue, + id: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + signedBalanceOfBatch( + accounts: PromiseOrValue[], + ids: PromiseOrValue[], + overrides?: CallOverrides, + ): Promise<[BigNumber[]]>; + + signedBalanceOfVaultTokenId( + account: PromiseOrValue, + id: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + supportsInterface(interfaceId: PromiseOrValue, overrides?: CallOverrides): Promise<[boolean]>; + + sweepCashIntoMarkets( + currencyId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + direct: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + transferReserveToTreasury( + currencies: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateAuthorizedCallbackContract( + operator: PromiseOrValue, + approved: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateCashGroup( + currencyId: PromiseOrValue, + cashGroup: CashGroupSettingsStruct, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateDepositParameters( + currencyId: PromiseOrValue, + depositShares: PromiseOrValue[], + leverageThresholds: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateETHRate( + currencyId: PromiseOrValue, + rateOracle: PromiseOrValue, + mustInvert: PromiseOrValue, + buffer: PromiseOrValue, + haircut: PromiseOrValue, + liquidationDiscount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateIncentiveEmissionRate( + currencyId: PromiseOrValue, + newEmissionRate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateInitializationParameters( + currencyId: PromiseOrValue, + annualizedAnchorRates: PromiseOrValue[], + proportions: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateInterestRateCurve( + currencyId: PromiseOrValue, + marketIndices: PromiseOrValue[], + settings: InterestRateCurveSettingsStruct[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updatePrimeCashCurve( + currencyId: PromiseOrValue, + primeDebtCurve: InterestRateCurveSettingsStruct, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updatePrimeCashHoldingsOracle( + currencyId: PromiseOrValue, + primeCashHoldingsOracle: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateSecondaryBorrowCapacity( + vaultAddress: PromiseOrValue, + secondaryCurrencyId: PromiseOrValue, + maxBorrowCapacity: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateTokenCollateralParameters( + currencyId: PromiseOrValue, + residualPurchaseIncentive10BPS: PromiseOrValue, + pvHaircutPercentage: PromiseOrValue, + residualPurchaseTimeBufferHours: PromiseOrValue, + cashWithholdingBuffer10BPS: PromiseOrValue, + liquidationHaircutPercentage: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateVault( + vaultAddress: PromiseOrValue, + vaultConfig: VaultConfigParamsStruct, + maxPrimaryBorrowCapacity: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + upgradeBeacon( + proxy: PromiseOrValue, + newBeacon: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + withdraw( + currencyId: PromiseOrValue, + amountInternalPrecision: PromiseOrValue, + redeemToUnderlying: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + }; + + accruePrimeInterest( + currencyId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + balanceOf( + account: PromiseOrValue, + id: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + balanceOfBatch( + accounts: PromiseOrValue[], + ids: PromiseOrValue[], + overrides?: CallOverrides, + ): Promise; + + batchBalanceAction( + account: PromiseOrValue, + actions: BalanceActionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + batchBalanceAndTradeAction( + account: PromiseOrValue, + actions: BalanceActionWithTradesStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + batchBalanceAndTradeActionWithCallback( + account: PromiseOrValue, + actions: BalanceActionWithTradesStruct[], + callbackData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + batchLend( + account: PromiseOrValue, + actions: BatchLendStruct[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + borrowSecondaryCurrencyToVault( + account: PromiseOrValue, + maturity: PromiseOrValue, + underlyingToBorrow: [PromiseOrValue, PromiseOrValue], + maxBorrowRate: [PromiseOrValue, PromiseOrValue], + minRollLendRate: [PromiseOrValue, PromiseOrValue], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + calculateCollateralCurrencyLiquidation( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + collateralCurrency: PromiseOrValue, + maxCollateralLiquidation: PromiseOrValue, + maxNTokenLiquidation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + calculateDepositAmountInDeleverage( + currencyIndex: PromiseOrValue, + vaultAccount: VaultAccountStruct, + vaultConfig: VaultConfigStruct, + vaultState: VaultStateStruct, + depositUnderlyingInternal: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + calculateLocalCurrencyLiquidation( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + maxNTokenLiquidation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + calculateNTokensToMint( + currencyId: PromiseOrValue, + amountToDepositExternalPrecision: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + calculatefCashCrossCurrencyLiquidation( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + fCashCurrency: PromiseOrValue, + fCashMaturities: PromiseOrValue[], + maxfCashLiquidateAmounts: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + calculatefCashLocalLiquidation( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + fCashMaturities: PromiseOrValue[], + maxfCashLiquidateAmounts: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + checkVaultAccountCollateralRatio( + vault: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + claimCOMPAndTransfer( + ctokens: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + claimOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + convertCashBalanceToExternal( + currencyId: PromiseOrValue, + cashBalanceInternal: PromiseOrValue, + useUnderlying: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + convertNTokenToUnderlying( + currencyId: PromiseOrValue, + nTokenBalance: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + convertSettledfCash( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + fCashBalance: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + convertUnderlyingToPrimeCash( + currencyId: PromiseOrValue, + underlyingExternal: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + decodeERC1155Id( + id: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [number, BigNumber, BigNumber, string, boolean] & { + currencyId: number; + maturity: BigNumber; + assetType: BigNumber; + vaultAddress: string; + isfCashDebt: boolean; + } + >; + + decodeToAssets( + ids: PromiseOrValue[], + amounts: PromiseOrValue[], + overrides?: CallOverrides, + ): Promise; + + deleverageAccount( + account: PromiseOrValue, + vault: PromiseOrValue, + liquidator: PromiseOrValue, + currencyIndex: PromiseOrValue, + depositUnderlyingInternal: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + depositAssetToken( + account: PromiseOrValue, + currencyId: PromiseOrValue, + amountExternalPrecision: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + depositUnderlyingToken( + account: PromiseOrValue, + currencyId: PromiseOrValue, + amountExternalPrecision: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + enableBitmapCurrency( + currencyId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + enableCashGroup( + currencyId: PromiseOrValue, + cashGroup: CashGroupSettingsStruct, + underlyingName: PromiseOrValue, + underlyingSymbol: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + enablePrimeBorrow( + allowPrimeBorrow: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + enablePrimeDebt( + currencyId: PromiseOrValue, + underlyingName: PromiseOrValue, + underlyingSymbol: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + encode( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + assetType: PromiseOrValue, + vaultAddress: PromiseOrValue, + isfCashDebt: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + encodeToId( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + assetType: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + enterVault( + account: PromiseOrValue, + vault: PromiseOrValue, + depositAmountExternal: PromiseOrValue, + maturity: PromiseOrValue, + fCash: PromiseOrValue, + maxBorrowRate: PromiseOrValue, + vaultData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + exitVault( + account: PromiseOrValue, + vault: PromiseOrValue, + receiver: PromiseOrValue, + vaultSharesToRedeem: PromiseOrValue, + fCashToLend: PromiseOrValue, + minLendRate: PromiseOrValue, + exitVaultData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + getAccount( + account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [AccountContextStructOutput, AccountBalanceStructOutput[], PortfolioAssetStructOutput[]] & { + accountContext: AccountContextStructOutput; + accountBalances: AccountBalanceStructOutput[]; + portfolio: PortfolioAssetStructOutput[]; + } + >; + + getAccountBalance( + currencyId: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + cashBalance: BigNumber; + nTokenBalance: BigNumber; + lastClaimTime: BigNumber; + } + >; + + getAccountContext(account: PromiseOrValue, overrides?: CallOverrides): Promise; + + getAccountPortfolio( + account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getAccountPrimeDebtBalance( + currencyId: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getActiveMarkets( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getActiveMarketsAtBlockTime( + currencyId: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getAssetsBitmap( + account: PromiseOrValue, + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getAuthorizedCallbackContractStatus(callback: PromiseOrValue, overrides?: CallOverrides): Promise; + + getBalanceOfPrimeCash( + currencyId: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getBorrowCapacity( + vault: PromiseOrValue, + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + currentPrimeDebtUnderlying: BigNumber; + totalfCashDebt: BigNumber; + maxBorrowCapacity: BigNumber; + } + >; + + getCashAmountGivenfCashAmount( + currencyId: PromiseOrValue, + fCashAmount: PromiseOrValue, + marketIndex: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber, BigNumber]>; + + getCashGroup( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getCashGroupAndAssetRate( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [CashGroupSettingsStructOutput, Deprecated_AssetRateParametersStructOutput] & { + cashGroup: CashGroupSettingsStructOutput; + assetRate: Deprecated_AssetRateParametersStructOutput; + } + >; + + getCurrency( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [TokenStructOutput, TokenStructOutput] & { + assetToken: TokenStructOutput; + underlyingToken: TokenStructOutput; + } + >; + + getCurrencyAndRates( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [TokenStructOutput, TokenStructOutput, ETHRateStructOutput, Deprecated_AssetRateParametersStructOutput] & { + assetToken: TokenStructOutput; + underlyingToken: TokenStructOutput; + ethRate: ETHRateStructOutput; + assetRate: Deprecated_AssetRateParametersStructOutput; + } + >; + + getCurrencyId(tokenAddress: PromiseOrValue, overrides?: CallOverrides): Promise; + + getDepositFromfCashLend( + currencyId: PromiseOrValue, + fCashAmount: PromiseOrValue, + maturity: PromiseOrValue, + minLendRate: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber, number, string] & { + depositAmountUnderlying: BigNumber; + depositAmountAsset: BigNumber; + marketIndex: number; + encodedTrade: string; + } + >; + + getDepositParameters( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber[], BigNumber[]] & { + depositShares: BigNumber[]; + leverageThresholds: BigNumber[]; + } + >; + + getFreeCollateral(account: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber, BigNumber[]]>; + + getGlobalTransferOperatorStatus(operator: PromiseOrValue, overrides?: CallOverrides): Promise; + + getImplementation(overrides?: CallOverrides): Promise; + + getInitializationParameters( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber[], BigNumber[]] & { + annualizedAnchorRates: BigNumber[]; + proportions: BigNumber[]; + } + >; + + getInterestRateCurve( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [InterestRateParametersStructOutput[], InterestRateParametersStructOutput[]] & { + nextInterestRateCurve: InterestRateParametersStructOutput[]; + activeInterestRateCurve: InterestRateParametersStructOutput[]; + } + >; + + getMarket( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + settlementDate: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getMarketIndex( + maturity: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getMaxCurrencyId(overrides?: CallOverrides): Promise; + + getNTokenAccount( + tokenAddress: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [number, BigNumber, BigNumber, BigNumber, string, BigNumber, BigNumber, BigNumber] & { + currencyId: number; + totalSupply: BigNumber; + incentiveAnnualEmissionRate: BigNumber; + lastInitializedTime: BigNumber; + nTokenParameters: string; + cashBalance: BigNumber; + accumulatedNOTEPerNToken: BigNumber; + lastAccumulatedTime: BigNumber; + } + >; + + getNTokenPortfolio( + tokenAddress: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [PortfolioAssetStructOutput[], PortfolioAssetStructOutput[]] & { + liquidityTokens: PortfolioAssetStructOutput[]; + netfCashAssets: PortfolioAssetStructOutput[]; + } + >; + + getNoteToken(overrides?: CallOverrides): Promise; + + getOwnershipStatus(overrides?: CallOverrides): Promise<[string, string] & { owner: string; pendingOwner: string }>; + + getPresentfCashValue( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + notional: PromiseOrValue, + blockTime: PromiseOrValue, + riskAdjusted: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getPrimeCashHoldingsOracle(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + getPrimeFactors( + currencyId: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [PrimeRateStructOutput, PrimeCashFactorsStructOutput, BigNumber, BigNumber] & { + primeRate: PrimeRateStructOutput; + factors: PrimeCashFactorsStructOutput; + maxUnderlyingSupply: BigNumber; + totalUnderlyingSupply: BigNumber; + } + >; + + getPrimeFactorsStored( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getPrimeInterestRate( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + annualDebtRatePreFee: BigNumber; + annualDebtRatePostFee: BigNumber; + annualSupplyRate: BigNumber; + } + >; + + getPrimeInterestRateCurve( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getPrincipalFromfCashBorrow( + currencyId: PromiseOrValue, + fCashBorrow: PromiseOrValue, + maturity: PromiseOrValue, + maxBorrowRate: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber, number, string] & { + borrowAmountUnderlying: BigNumber; + borrowAmountAsset: BigNumber; + marketIndex: number; + encodedTrade: string; + } + >; + + getRateStorage( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [ETHRateStorageStructOutput, AssetRateStorageStructOutput] & { + ethRate: ETHRateStorageStructOutput; + assetRate: AssetRateStorageStructOutput; + } + >; + + getRebalancingCooldown(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + getRebalancingTarget( + currencyId: PromiseOrValue, + holding: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getReserveBalance(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + getReserveBuffer(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + getSecondaryBorrow( + vault: PromiseOrValue, + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getSecondaryIncentiveRewarder(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + getSettlementRate( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getStoredTokenBalances(tokens: PromiseOrValue[], overrides?: CallOverrides): Promise; + + getTotalfCashDebtOutstanding( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + totalfCashDebt: BigNumber; + fCashDebtHeldInSettlementReserve: BigNumber; + primeCashHeldInSettlementReserve: BigNumber; + } + >; + + getTreasuryManager(overrides?: CallOverrides): Promise; + + getVaultAccount( + account: PromiseOrValue, + vault: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getVaultAccountHealthFactors( + account: PromiseOrValue, + vault: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [VaultAccountHealthFactorsStructOutput, [BigNumber, BigNumber, BigNumber], [BigNumber, BigNumber, BigNumber]] & { + h: VaultAccountHealthFactorsStructOutput; + maxLiquidatorDepositUnderlying: [BigNumber, BigNumber, BigNumber]; + vaultSharesToLiquidator: [BigNumber, BigNumber, BigNumber]; + } + >; + + getVaultAccountSecondaryDebt( + account: PromiseOrValue, + vault: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, [BigNumber, BigNumber], [BigNumber, BigNumber]] & { + maturity: BigNumber; + accountSecondaryDebt: [BigNumber, BigNumber]; + accountSecondaryCashHeld: [BigNumber, BigNumber]; + } + >; + + getVaultAccountWithFeeAccrual( + account: PromiseOrValue, + vault: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [VaultAccountStructOutput, BigNumber] & { + accruedPrimeVaultFeeInUnderlying: BigNumber; + } + >; + + getVaultConfig(vault: PromiseOrValue, overrides?: CallOverrides): Promise; + + getVaultState( + vault: PromiseOrValue, + maturity: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getfCashAmountGivenCashAmount( + currencyId: PromiseOrValue, + netCashToAccount: PromiseOrValue, + marketIndex: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getfCashBorrowFromPrincipal( + currencyId: PromiseOrValue, + borrowedAmountExternal: PromiseOrValue, + maturity: PromiseOrValue, + maxBorrowRate: PromiseOrValue, + blockTime: PromiseOrValue, + useUnderlying: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, number, string] & { + fCashDebt: BigNumber; + marketIndex: number; + encodedTrade: string; + } + >; + + getfCashLendFromDeposit( + currencyId: PromiseOrValue, + depositAmountExternal: PromiseOrValue, + maturity: PromiseOrValue, + minLendRate: PromiseOrValue, + blockTime: PromiseOrValue, + useUnderlying: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, number, string] & { + fCashAmount: BigNumber; + marketIndex: number; + encodedTrade: string; + } + >; + + getfCashNotional( + account: PromiseOrValue, + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getfCashRequiredToLiquidateCash( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + vaultAccountCashBalance: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber] & { + fCashRequired: BigNumber; + discountFactor: BigNumber; + } + >; + + initializeMarkets( + currencyId: PromiseOrValue, + isFirstInit: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + isApprovedForAll( + account: PromiseOrValue, + operator: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + liquidateCollateralCurrency( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + collateralCurrency: PromiseOrValue, + maxCollateralLiquidation: PromiseOrValue, + maxNTokenLiquidation: PromiseOrValue, + withdrawCollateral: PromiseOrValue, + redeemToUnderlying: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + liquidateExcessVaultCash( + account: PromiseOrValue, + vault: PromiseOrValue, + liquidator: PromiseOrValue, + excessCashIndex: PromiseOrValue, + debtIndex: PromiseOrValue, + _depositUnderlyingInternal: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + liquidateLocalCurrency( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + maxNTokenLiquidation: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + liquidateVaultCashBalance( + account: PromiseOrValue, + vault: PromiseOrValue, + liquidator: PromiseOrValue, + currencyIndex: PromiseOrValue, + fCashDeposit: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + liquidatefCashCrossCurrency( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + fCashCurrency: PromiseOrValue, + fCashMaturities: PromiseOrValue[], + maxfCashLiquidateAmounts: PromiseOrValue[], + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + liquidatefCashLocal( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + fCashMaturities: PromiseOrValue[], + maxfCashLiquidateAmounts: PromiseOrValue[], + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + listCurrency( + underlyingToken: TokenStorageStruct, + ethRate: ETHRateStorageStruct, + primeDebtCurve: InterestRateCurveSettingsStruct, + primeCashHoldingsOracle: PromiseOrValue, + allowPrimeCashDebt: PromiseOrValue, + rateOracleTimeWindow5Min: PromiseOrValue, + underlyingName: PromiseOrValue, + underlyingSymbol: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + nTokenAddress(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + nTokenBalanceOf( + currencyId: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + nTokenClaimIncentives(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + nTokenGetClaimableIncentives( + account: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + nTokenPresentValueAssetDenominated( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + nTokenPresentValueUnderlyingDenominated( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + nTokenRedeem( + redeemer: PromiseOrValue, + currencyId: PromiseOrValue, + tokensToRedeem_: PromiseOrValue, + sellTokenAssets: PromiseOrValue, + acceptResidualAssets: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + nTokenTotalSupply(nTokenAddress: PromiseOrValue, overrides?: CallOverrides): Promise; + + nTokenTransfer( + currencyId: PromiseOrValue, + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + nTokenTransferAllowance( + currencyId: PromiseOrValue, + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + nTokenTransferApprove( + currencyId: PromiseOrValue, + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + nTokenTransferApproveAll( + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + nTokenTransferFrom( + currencyId: PromiseOrValue, + spender: PromiseOrValue, + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + pCashAddress(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + pCashTransfer( + currencyId: PromiseOrValue, + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + pCashTransferAllowance( + currencyId: PromiseOrValue, + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + pCashTransferApprove( + currencyId: PromiseOrValue, + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + pCashTransferFrom( + currencyId: PromiseOrValue, + spender: PromiseOrValue, + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + pDebtAddress(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + pauseGuardian(overrides?: CallOverrides): Promise; + + pauseRouter(overrides?: CallOverrides): Promise; + + rebalance( + currencyId: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + repaySecondaryCurrencyFromVault( + account: PromiseOrValue, + maturity: PromiseOrValue, + underlyingToRepay: [PromiseOrValue, PromiseOrValue], + minLendRate: [PromiseOrValue, PromiseOrValue], + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + rollVaultPosition( + account: PromiseOrValue, + vault: PromiseOrValue, + fCashToBorrow: PromiseOrValue, + maturity: PromiseOrValue, + depositAmountExternal: PromiseOrValue, + minLendRate: PromiseOrValue, + maxBorrowRate: PromiseOrValue, + enterVaultData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + safeBatchTransferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + ids: PromiseOrValue[], + amounts: PromiseOrValue[], + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + safeTransferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + id: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + setApprovalForAll( + operator: PromiseOrValue, + approved: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMaxBorrowCapacity( + vaultAddress: PromiseOrValue, + maxVaultBorrowCapacity: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMaxUnderlyingSupply( + currencyId: PromiseOrValue, + maxUnderlyingSupply: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setPauseRouterAndGuardian( + pauseRouter_: PromiseOrValue, + pauseGuardian_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setRebalancingCooldown( + currencyId: PromiseOrValue, + cooldownTimeInSeconds: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setRebalancingTargets( + currencyId: PromiseOrValue, + targets: NotionalTreasury.RebalancingTargetConfigStruct[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setReserveBuffer( + currencyId: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setReserveCashBalance( + currencyId: PromiseOrValue, + reserveBalance: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setTreasuryManager( + manager: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setVaultDeleverageStatus( + vaultAddress: PromiseOrValue, + disableDeleverage: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setVaultPauseStatus( + vaultAddress: PromiseOrValue, + enable: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + settleAccount( + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + settleSecondaryBorrowForAccount( + vault: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + settleVaultAccount( + account: PromiseOrValue, + vault: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + signedBalanceOf( + account: PromiseOrValue, + id: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + signedBalanceOfBatch( + accounts: PromiseOrValue[], + ids: PromiseOrValue[], + overrides?: CallOverrides, + ): Promise; + + signedBalanceOfVaultTokenId( + account: PromiseOrValue, + id: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + supportsInterface(interfaceId: PromiseOrValue, overrides?: CallOverrides): Promise; + + sweepCashIntoMarkets( + currencyId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + direct: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + transferReserveToTreasury( + currencies: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateAuthorizedCallbackContract( + operator: PromiseOrValue, + approved: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateCashGroup( + currencyId: PromiseOrValue, + cashGroup: CashGroupSettingsStruct, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateDepositParameters( + currencyId: PromiseOrValue, + depositShares: PromiseOrValue[], + leverageThresholds: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateETHRate( + currencyId: PromiseOrValue, + rateOracle: PromiseOrValue, + mustInvert: PromiseOrValue, + buffer: PromiseOrValue, + haircut: PromiseOrValue, + liquidationDiscount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateIncentiveEmissionRate( + currencyId: PromiseOrValue, + newEmissionRate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateInitializationParameters( + currencyId: PromiseOrValue, + annualizedAnchorRates: PromiseOrValue[], + proportions: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateInterestRateCurve( + currencyId: PromiseOrValue, + marketIndices: PromiseOrValue[], + settings: InterestRateCurveSettingsStruct[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updatePrimeCashCurve( + currencyId: PromiseOrValue, + primeDebtCurve: InterestRateCurveSettingsStruct, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updatePrimeCashHoldingsOracle( + currencyId: PromiseOrValue, + primeCashHoldingsOracle: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateSecondaryBorrowCapacity( + vaultAddress: PromiseOrValue, + secondaryCurrencyId: PromiseOrValue, + maxBorrowCapacity: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateTokenCollateralParameters( + currencyId: PromiseOrValue, + residualPurchaseIncentive10BPS: PromiseOrValue, + pvHaircutPercentage: PromiseOrValue, + residualPurchaseTimeBufferHours: PromiseOrValue, + cashWithholdingBuffer10BPS: PromiseOrValue, + liquidationHaircutPercentage: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateVault( + vaultAddress: PromiseOrValue, + vaultConfig: VaultConfigParamsStruct, + maxPrimaryBorrowCapacity: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + upgradeBeacon( + proxy: PromiseOrValue, + newBeacon: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + withdraw( + currencyId: PromiseOrValue, + amountInternalPrecision: PromiseOrValue, + redeemToUnderlying: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + callStatic: { + accruePrimeInterest( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [PrimeRateStructOutput, PrimeCashFactorsStructOutput] & { + pr: PrimeRateStructOutput; + } + >; + + balanceOf( + account: PromiseOrValue, + id: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + balanceOfBatch( + accounts: PromiseOrValue[], + ids: PromiseOrValue[], + overrides?: CallOverrides, + ): Promise; + + batchBalanceAction( + account: PromiseOrValue, + actions: BalanceActionStruct[], + overrides?: CallOverrides, + ): Promise; + + batchBalanceAndTradeAction( + account: PromiseOrValue, + actions: BalanceActionWithTradesStruct[], + overrides?: CallOverrides, + ): Promise; + + batchBalanceAndTradeActionWithCallback( + account: PromiseOrValue, + actions: BalanceActionWithTradesStruct[], + callbackData: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + batchLend(account: PromiseOrValue, actions: BatchLendStruct[], overrides?: CallOverrides): Promise; + + borrowSecondaryCurrencyToVault( + account: PromiseOrValue, + maturity: PromiseOrValue, + underlyingToBorrow: [PromiseOrValue, PromiseOrValue], + maxBorrowRate: [PromiseOrValue, PromiseOrValue], + minRollLendRate: [PromiseOrValue, PromiseOrValue], + overrides?: CallOverrides, + ): Promise<[BigNumber, BigNumber]>; + + calculateCollateralCurrencyLiquidation( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + collateralCurrency: PromiseOrValue, + maxCollateralLiquidation: PromiseOrValue, + maxNTokenLiquidation: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber, BigNumber, BigNumber]>; + + calculateDepositAmountInDeleverage( + currencyIndex: PromiseOrValue, + vaultAccount: VaultAccountStruct, + vaultConfig: VaultConfigStruct, + vaultState: VaultStateStruct, + depositUnderlyingInternal: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber, PrimeRateStructOutput] & { + depositInternal: BigNumber; + vaultSharesToLiquidator: BigNumber; + } + >; + + calculateLocalCurrencyLiquidation( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + maxNTokenLiquidation: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber, BigNumber]>; + + calculateNTokensToMint( + currencyId: PromiseOrValue, + amountToDepositExternalPrecision: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + calculatefCashCrossCurrencyLiquidation( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + fCashCurrency: PromiseOrValue, + fCashMaturities: PromiseOrValue[], + maxfCashLiquidateAmounts: PromiseOrValue[], + overrides?: CallOverrides, + ): Promise<[BigNumber[], BigNumber]>; + + calculatefCashLocalLiquidation( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + fCashMaturities: PromiseOrValue[], + maxfCashLiquidateAmounts: PromiseOrValue[], + overrides?: CallOverrides, + ): Promise<[BigNumber[], BigNumber]>; + + checkVaultAccountCollateralRatio( + vault: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + claimCOMPAndTransfer(ctokens: PromiseOrValue[], overrides?: CallOverrides): Promise; + + claimOwnership(overrides?: CallOverrides): Promise; + + convertCashBalanceToExternal( + currencyId: PromiseOrValue, + cashBalanceInternal: PromiseOrValue, + useUnderlying: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + convertNTokenToUnderlying( + currencyId: PromiseOrValue, + nTokenBalance: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + convertSettledfCash( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + fCashBalance: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + convertUnderlyingToPrimeCash( + currencyId: PromiseOrValue, + underlyingExternal: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + decodeERC1155Id( + id: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [number, BigNumber, BigNumber, string, boolean] & { + currencyId: number; + maturity: BigNumber; + assetType: BigNumber; + vaultAddress: string; + isfCashDebt: boolean; + } + >; + + decodeToAssets( + ids: PromiseOrValue[], + amounts: PromiseOrValue[], + overrides?: CallOverrides, + ): Promise; + + deleverageAccount( + account: PromiseOrValue, + vault: PromiseOrValue, + liquidator: PromiseOrValue, + currencyIndex: PromiseOrValue, + depositUnderlyingInternal: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber] & { + vaultSharesFromLiquidation: BigNumber; + depositAmountPrimeCash: BigNumber; + } + >; + + depositAssetToken( + account: PromiseOrValue, + currencyId: PromiseOrValue, + amountExternalPrecision: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + depositUnderlyingToken( + account: PromiseOrValue, + currencyId: PromiseOrValue, + amountExternalPrecision: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + enableBitmapCurrency(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + enableCashGroup( + currencyId: PromiseOrValue, + cashGroup: CashGroupSettingsStruct, + underlyingName: PromiseOrValue, + underlyingSymbol: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + enablePrimeBorrow(allowPrimeBorrow: PromiseOrValue, overrides?: CallOverrides): Promise; + + enablePrimeDebt( + currencyId: PromiseOrValue, + underlyingName: PromiseOrValue, + underlyingSymbol: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + encode( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + assetType: PromiseOrValue, + vaultAddress: PromiseOrValue, + isfCashDebt: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + encodeToId( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + assetType: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + enterVault( + account: PromiseOrValue, + vault: PromiseOrValue, + depositAmountExternal: PromiseOrValue, + maturity: PromiseOrValue, + fCash: PromiseOrValue, + maxBorrowRate: PromiseOrValue, + vaultData: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + exitVault( + account: PromiseOrValue, + vault: PromiseOrValue, + receiver: PromiseOrValue, + vaultSharesToRedeem: PromiseOrValue, + fCashToLend: PromiseOrValue, + minLendRate: PromiseOrValue, + exitVaultData: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getAccount( + account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [AccountContextStructOutput, AccountBalanceStructOutput[], PortfolioAssetStructOutput[]] & { + accountContext: AccountContextStructOutput; + accountBalances: AccountBalanceStructOutput[]; + portfolio: PortfolioAssetStructOutput[]; + } + >; + + getAccountBalance( + currencyId: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + cashBalance: BigNumber; + nTokenBalance: BigNumber; + lastClaimTime: BigNumber; + } + >; + + getAccountContext(account: PromiseOrValue, overrides?: CallOverrides): Promise; + + getAccountPortfolio( + account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getAccountPrimeDebtBalance( + currencyId: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getActiveMarkets( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getActiveMarketsAtBlockTime( + currencyId: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getAssetsBitmap( + account: PromiseOrValue, + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getAuthorizedCallbackContractStatus(callback: PromiseOrValue, overrides?: CallOverrides): Promise; + + getBalanceOfPrimeCash( + currencyId: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getBorrowCapacity( + vault: PromiseOrValue, + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + currentPrimeDebtUnderlying: BigNumber; + totalfCashDebt: BigNumber; + maxBorrowCapacity: BigNumber; + } + >; + + getCashAmountGivenfCashAmount( + currencyId: PromiseOrValue, + fCashAmount: PromiseOrValue, + marketIndex: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber, BigNumber]>; + + getCashGroup( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getCashGroupAndAssetRate( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [CashGroupSettingsStructOutput, Deprecated_AssetRateParametersStructOutput] & { + cashGroup: CashGroupSettingsStructOutput; + assetRate: Deprecated_AssetRateParametersStructOutput; + } + >; + + getCurrency( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [TokenStructOutput, TokenStructOutput] & { + assetToken: TokenStructOutput; + underlyingToken: TokenStructOutput; + } + >; + + getCurrencyAndRates( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [TokenStructOutput, TokenStructOutput, ETHRateStructOutput, Deprecated_AssetRateParametersStructOutput] & { + assetToken: TokenStructOutput; + underlyingToken: TokenStructOutput; + ethRate: ETHRateStructOutput; + assetRate: Deprecated_AssetRateParametersStructOutput; + } + >; + + getCurrencyId(tokenAddress: PromiseOrValue, overrides?: CallOverrides): Promise; + + getDepositFromfCashLend( + currencyId: PromiseOrValue, + fCashAmount: PromiseOrValue, + maturity: PromiseOrValue, + minLendRate: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber, number, string] & { + depositAmountUnderlying: BigNumber; + depositAmountAsset: BigNumber; + marketIndex: number; + encodedTrade: string; + } + >; + + getDepositParameters( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber[], BigNumber[]] & { + depositShares: BigNumber[]; + leverageThresholds: BigNumber[]; + } + >; + + getFreeCollateral(account: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber, BigNumber[]]>; + + getGlobalTransferOperatorStatus(operator: PromiseOrValue, overrides?: CallOverrides): Promise; + + getImplementation(overrides?: CallOverrides): Promise; + + getInitializationParameters( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber[], BigNumber[]] & { + annualizedAnchorRates: BigNumber[]; + proportions: BigNumber[]; + } + >; + + getInterestRateCurve( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [InterestRateParametersStructOutput[], InterestRateParametersStructOutput[]] & { + nextInterestRateCurve: InterestRateParametersStructOutput[]; + activeInterestRateCurve: InterestRateParametersStructOutput[]; + } + >; + + getMarket( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + settlementDate: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getMarketIndex( + maturity: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getMaxCurrencyId(overrides?: CallOverrides): Promise; + + getNTokenAccount( + tokenAddress: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [number, BigNumber, BigNumber, BigNumber, string, BigNumber, BigNumber, BigNumber] & { + currencyId: number; + totalSupply: BigNumber; + incentiveAnnualEmissionRate: BigNumber; + lastInitializedTime: BigNumber; + nTokenParameters: string; + cashBalance: BigNumber; + accumulatedNOTEPerNToken: BigNumber; + lastAccumulatedTime: BigNumber; + } + >; + + getNTokenPortfolio( + tokenAddress: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [PortfolioAssetStructOutput[], PortfolioAssetStructOutput[]] & { + liquidityTokens: PortfolioAssetStructOutput[]; + netfCashAssets: PortfolioAssetStructOutput[]; + } + >; + + getNoteToken(overrides?: CallOverrides): Promise; + + getOwnershipStatus(overrides?: CallOverrides): Promise<[string, string] & { owner: string; pendingOwner: string }>; + + getPresentfCashValue( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + notional: PromiseOrValue, + blockTime: PromiseOrValue, + riskAdjusted: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getPrimeCashHoldingsOracle(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + getPrimeFactors( + currencyId: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [PrimeRateStructOutput, PrimeCashFactorsStructOutput, BigNumber, BigNumber] & { + primeRate: PrimeRateStructOutput; + factors: PrimeCashFactorsStructOutput; + maxUnderlyingSupply: BigNumber; + totalUnderlyingSupply: BigNumber; + } + >; + + getPrimeFactorsStored( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getPrimeInterestRate( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + annualDebtRatePreFee: BigNumber; + annualDebtRatePostFee: BigNumber; + annualSupplyRate: BigNumber; + } + >; + + getPrimeInterestRateCurve( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getPrincipalFromfCashBorrow( + currencyId: PromiseOrValue, + fCashBorrow: PromiseOrValue, + maturity: PromiseOrValue, + maxBorrowRate: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber, number, string] & { + borrowAmountUnderlying: BigNumber; + borrowAmountAsset: BigNumber; + marketIndex: number; + encodedTrade: string; + } + >; + + getRateStorage( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [ETHRateStorageStructOutput, AssetRateStorageStructOutput] & { + ethRate: ETHRateStorageStructOutput; + assetRate: AssetRateStorageStructOutput; + } + >; + + getRebalancingCooldown(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + getRebalancingTarget( + currencyId: PromiseOrValue, + holding: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getReserveBalance(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + getReserveBuffer(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + getSecondaryBorrow( + vault: PromiseOrValue, + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getSecondaryIncentiveRewarder(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + getSettlementRate( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getStoredTokenBalances(tokens: PromiseOrValue[], overrides?: CallOverrides): Promise; + + getTotalfCashDebtOutstanding( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + totalfCashDebt: BigNumber; + fCashDebtHeldInSettlementReserve: BigNumber; + primeCashHeldInSettlementReserve: BigNumber; + } + >; + + getTreasuryManager(overrides?: CallOverrides): Promise; + + getVaultAccount( + account: PromiseOrValue, + vault: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getVaultAccountHealthFactors( + account: PromiseOrValue, + vault: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [VaultAccountHealthFactorsStructOutput, [BigNumber, BigNumber, BigNumber], [BigNumber, BigNumber, BigNumber]] & { + h: VaultAccountHealthFactorsStructOutput; + maxLiquidatorDepositUnderlying: [BigNumber, BigNumber, BigNumber]; + vaultSharesToLiquidator: [BigNumber, BigNumber, BigNumber]; + } + >; + + getVaultAccountSecondaryDebt( + account: PromiseOrValue, + vault: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, [BigNumber, BigNumber], [BigNumber, BigNumber]] & { + maturity: BigNumber; + accountSecondaryDebt: [BigNumber, BigNumber]; + accountSecondaryCashHeld: [BigNumber, BigNumber]; + } + >; + + getVaultAccountWithFeeAccrual( + account: PromiseOrValue, + vault: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [VaultAccountStructOutput, BigNumber] & { + accruedPrimeVaultFeeInUnderlying: BigNumber; + } + >; + + getVaultConfig(vault: PromiseOrValue, overrides?: CallOverrides): Promise; + + getVaultState( + vault: PromiseOrValue, + maturity: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getfCashAmountGivenCashAmount( + currencyId: PromiseOrValue, + netCashToAccount: PromiseOrValue, + marketIndex: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getfCashBorrowFromPrincipal( + currencyId: PromiseOrValue, + borrowedAmountExternal: PromiseOrValue, + maturity: PromiseOrValue, + maxBorrowRate: PromiseOrValue, + blockTime: PromiseOrValue, + useUnderlying: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, number, string] & { + fCashDebt: BigNumber; + marketIndex: number; + encodedTrade: string; + } + >; + + getfCashLendFromDeposit( + currencyId: PromiseOrValue, + depositAmountExternal: PromiseOrValue, + maturity: PromiseOrValue, + minLendRate: PromiseOrValue, + blockTime: PromiseOrValue, + useUnderlying: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, number, string] & { + fCashAmount: BigNumber; + marketIndex: number; + encodedTrade: string; + } + >; + + getfCashNotional( + account: PromiseOrValue, + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getfCashRequiredToLiquidateCash( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + vaultAccountCashBalance: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber] & { + fCashRequired: BigNumber; + discountFactor: BigNumber; + } + >; + + initializeMarkets( + currencyId: PromiseOrValue, + isFirstInit: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + isApprovedForAll( + account: PromiseOrValue, + operator: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + liquidateCollateralCurrency( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + collateralCurrency: PromiseOrValue, + maxCollateralLiquidation: PromiseOrValue, + maxNTokenLiquidation: PromiseOrValue, + withdrawCollateral: PromiseOrValue, + redeemToUnderlying: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber, BigNumber, BigNumber]>; + + liquidateExcessVaultCash( + account: PromiseOrValue, + vault: PromiseOrValue, + liquidator: PromiseOrValue, + excessCashIndex: PromiseOrValue, + debtIndex: PromiseOrValue, + _depositUnderlyingInternal: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + liquidateLocalCurrency( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + maxNTokenLiquidation: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber, BigNumber]>; + + liquidateVaultCashBalance( + account: PromiseOrValue, + vault: PromiseOrValue, + liquidator: PromiseOrValue, + currencyIndex: PromiseOrValue, + fCashDeposit: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + liquidatefCashCrossCurrency( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + fCashCurrency: PromiseOrValue, + fCashMaturities: PromiseOrValue[], + maxfCashLiquidateAmounts: PromiseOrValue[], + overrides?: CallOverrides, + ): Promise<[BigNumber[], BigNumber]>; + + liquidatefCashLocal( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + fCashMaturities: PromiseOrValue[], + maxfCashLiquidateAmounts: PromiseOrValue[], + overrides?: CallOverrides, + ): Promise<[BigNumber[], BigNumber]>; + + listCurrency( + underlyingToken: TokenStorageStruct, + ethRate: ETHRateStorageStruct, + primeDebtCurve: InterestRateCurveSettingsStruct, + primeCashHoldingsOracle: PromiseOrValue, + allowPrimeCashDebt: PromiseOrValue, + rateOracleTimeWindow5Min: PromiseOrValue, + underlyingName: PromiseOrValue, + underlyingSymbol: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + nTokenAddress(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + nTokenBalanceOf( + currencyId: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + nTokenClaimIncentives(overrides?: CallOverrides): Promise; + + nTokenGetClaimableIncentives( + account: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + nTokenPresentValueAssetDenominated( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + nTokenPresentValueUnderlyingDenominated( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + nTokenRedeem( + redeemer: PromiseOrValue, + currencyId: PromiseOrValue, + tokensToRedeem_: PromiseOrValue, + sellTokenAssets: PromiseOrValue, + acceptResidualAssets: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + nTokenTotalSupply(nTokenAddress: PromiseOrValue, overrides?: CallOverrides): Promise; + + nTokenTransfer( + currencyId: PromiseOrValue, + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + nTokenTransferAllowance( + currencyId: PromiseOrValue, + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + nTokenTransferApprove( + currencyId: PromiseOrValue, + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + nTokenTransferApproveAll( + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + nTokenTransferFrom( + currencyId: PromiseOrValue, + spender: PromiseOrValue, + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + pCashAddress(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + pCashTransfer( + currencyId: PromiseOrValue, + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + pCashTransferAllowance( + currencyId: PromiseOrValue, + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + pCashTransferApprove( + currencyId: PromiseOrValue, + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + pCashTransferFrom( + currencyId: PromiseOrValue, + spender: PromiseOrValue, + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + pDebtAddress(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + pauseGuardian(overrides?: CallOverrides): Promise; + + pauseRouter(overrides?: CallOverrides): Promise; + + rebalance(currencyId: PromiseOrValue[], overrides?: CallOverrides): Promise; + + repaySecondaryCurrencyFromVault( + account: PromiseOrValue, + maturity: PromiseOrValue, + underlyingToRepay: [PromiseOrValue, PromiseOrValue], + minLendRate: [PromiseOrValue, PromiseOrValue], + overrides?: CallOverrides, + ): Promise<[BigNumber, BigNumber]>; + + rollVaultPosition( + account: PromiseOrValue, + vault: PromiseOrValue, + fCashToBorrow: PromiseOrValue, + maturity: PromiseOrValue, + depositAmountExternal: PromiseOrValue, + minLendRate: PromiseOrValue, + maxBorrowRate: PromiseOrValue, + enterVaultData: 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; + + setMaxBorrowCapacity( + vaultAddress: PromiseOrValue, + maxVaultBorrowCapacity: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + setMaxUnderlyingSupply( + currencyId: PromiseOrValue, + maxUnderlyingSupply: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + setPauseRouterAndGuardian( + pauseRouter_: PromiseOrValue, + pauseGuardian_: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + setRebalancingCooldown( + currencyId: PromiseOrValue, + cooldownTimeInSeconds: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + setRebalancingTargets( + currencyId: PromiseOrValue, + targets: NotionalTreasury.RebalancingTargetConfigStruct[], + overrides?: CallOverrides, + ): Promise; + + setReserveBuffer( + currencyId: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + setReserveCashBalance( + currencyId: PromiseOrValue, + reserveBalance: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + setTreasuryManager(manager: PromiseOrValue, overrides?: CallOverrides): Promise; + + setVaultDeleverageStatus( + vaultAddress: PromiseOrValue, + disableDeleverage: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + setVaultPauseStatus( + vaultAddress: PromiseOrValue, + enable: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + settleAccount(account: PromiseOrValue, overrides?: CallOverrides): Promise; + + settleSecondaryBorrowForAccount( + vault: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + settleVaultAccount( + account: PromiseOrValue, + vault: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + signedBalanceOf( + account: PromiseOrValue, + id: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + signedBalanceOfBatch( + accounts: PromiseOrValue[], + ids: PromiseOrValue[], + overrides?: CallOverrides, + ): Promise; + + signedBalanceOfVaultTokenId( + account: PromiseOrValue, + id: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + supportsInterface(interfaceId: PromiseOrValue, overrides?: CallOverrides): Promise; + + sweepCashIntoMarkets(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + direct: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + transferReserveToTreasury( + currencies: PromiseOrValue[], + overrides?: CallOverrides, + ): Promise; + + updateAuthorizedCallbackContract( + operator: PromiseOrValue, + approved: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + updateCashGroup( + currencyId: PromiseOrValue, + cashGroup: CashGroupSettingsStruct, + overrides?: CallOverrides, + ): Promise; + + updateDepositParameters( + currencyId: PromiseOrValue, + depositShares: PromiseOrValue[], + leverageThresholds: PromiseOrValue[], + overrides?: CallOverrides, + ): Promise; + + updateETHRate( + currencyId: PromiseOrValue, + rateOracle: PromiseOrValue, + mustInvert: PromiseOrValue, + buffer: PromiseOrValue, + haircut: PromiseOrValue, + liquidationDiscount: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + updateIncentiveEmissionRate( + currencyId: PromiseOrValue, + newEmissionRate: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + updateInitializationParameters( + currencyId: PromiseOrValue, + annualizedAnchorRates: PromiseOrValue[], + proportions: PromiseOrValue[], + overrides?: CallOverrides, + ): Promise; + + updateInterestRateCurve( + currencyId: PromiseOrValue, + marketIndices: PromiseOrValue[], + settings: InterestRateCurveSettingsStruct[], + overrides?: CallOverrides, + ): Promise; + + updatePrimeCashCurve( + currencyId: PromiseOrValue, + primeDebtCurve: InterestRateCurveSettingsStruct, + overrides?: CallOverrides, + ): Promise; + + updatePrimeCashHoldingsOracle( + currencyId: PromiseOrValue, + primeCashHoldingsOracle: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + updateSecondaryBorrowCapacity( + vaultAddress: PromiseOrValue, + secondaryCurrencyId: PromiseOrValue, + maxBorrowCapacity: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + updateTokenCollateralParameters( + currencyId: PromiseOrValue, + residualPurchaseIncentive10BPS: PromiseOrValue, + pvHaircutPercentage: PromiseOrValue, + residualPurchaseTimeBufferHours: PromiseOrValue, + cashWithholdingBuffer10BPS: PromiseOrValue, + liquidationHaircutPercentage: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + updateVault( + vaultAddress: PromiseOrValue, + vaultConfig: VaultConfigParamsStruct, + maxPrimaryBorrowCapacity: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + upgradeBeacon( + proxy: PromiseOrValue, + newBeacon: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + upgradeTo(newImplementation: PromiseOrValue, overrides?: CallOverrides): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + withdraw( + currencyId: PromiseOrValue, + amountInternalPrecision: PromiseOrValue, + redeemToUnderlying: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + }; + + filters: { + 'AccountContextUpdate(address)'(account?: PromiseOrValue | null): AccountContextUpdateEventFilter; + AccountContextUpdate(account?: PromiseOrValue | null): AccountContextUpdateEventFilter; + + 'AccountSettled(address)'(account?: PromiseOrValue | null): AccountSettledEventFilter; + AccountSettled(account?: PromiseOrValue | null): AccountSettledEventFilter; + + 'Approval(address,address,uint256)'( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + amount?: null, + ): ApprovalEventFilter; + Approval( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + amount?: null, + ): ApprovalEventFilter; + + 'ApprovalForAll(address,address,bool)'( + account?: PromiseOrValue | null, + operator?: PromiseOrValue | null, + approved?: null, + ): ApprovalForAllEventFilter; + ApprovalForAll( + account?: PromiseOrValue | null, + operator?: PromiseOrValue | null, + approved?: null, + ): ApprovalForAllEventFilter; + + 'CurrencyRebalanced(uint16,uint256,uint256)'( + currencyId?: null, + supplyFactor?: null, + annualizedInterestRate?: null, + ): CurrencyRebalancedEventFilter; + CurrencyRebalanced( + currencyId?: null, + supplyFactor?: null, + annualizedInterestRate?: null, + ): CurrencyRebalancedEventFilter; + + 'DeployNToken(uint16,address)'(currencyId?: null, nTokenAddress?: null): DeployNTokenEventFilter; + DeployNToken(currencyId?: null, nTokenAddress?: null): DeployNTokenEventFilter; + + 'ExcessReserveBalanceHarvested(uint16,int256)'( + currencyId?: PromiseOrValue | null, + harvestAmount?: null, + ): ExcessReserveBalanceHarvestedEventFilter; + ExcessReserveBalanceHarvested( + currencyId?: PromiseOrValue | null, + harvestAmount?: null, + ): ExcessReserveBalanceHarvestedEventFilter; + + 'IncentivesMigrated(uint16,uint256,uint256,uint256)'( + currencyId?: null, + migrationEmissionRate?: null, + finalIntegralTotalSupply?: null, + migrationTime?: null, + ): IncentivesMigratedEventFilter; + IncentivesMigrated( + currencyId?: null, + migrationEmissionRate?: null, + finalIntegralTotalSupply?: null, + migrationTime?: null, + ): IncentivesMigratedEventFilter; + + 'LiquidateCollateralCurrency(address,address,uint16,uint16,int256,int256,int256)'( + liquidated?: PromiseOrValue | null, + liquidator?: PromiseOrValue | null, + localCurrencyId?: null, + collateralCurrencyId?: null, + netLocalFromLiquidator?: null, + netCollateralTransfer?: null, + netNTokenTransfer?: null, + ): LiquidateCollateralCurrencyEventFilter; + LiquidateCollateralCurrency( + liquidated?: PromiseOrValue | null, + liquidator?: PromiseOrValue | null, + localCurrencyId?: null, + collateralCurrencyId?: null, + netLocalFromLiquidator?: null, + netCollateralTransfer?: null, + netNTokenTransfer?: null, + ): LiquidateCollateralCurrencyEventFilter; + + 'LiquidateLocalCurrency(address,address,uint16,int256)'( + liquidated?: PromiseOrValue | null, + liquidator?: PromiseOrValue | null, + localCurrencyId?: null, + netLocalFromLiquidator?: null, + ): LiquidateLocalCurrencyEventFilter; + LiquidateLocalCurrency( + liquidated?: PromiseOrValue | null, + liquidator?: PromiseOrValue | null, + localCurrencyId?: null, + netLocalFromLiquidator?: null, + ): LiquidateLocalCurrencyEventFilter; + + 'LiquidatefCashEvent(address,address,uint16,uint16,int256,uint256[],int256[])'( + liquidated?: PromiseOrValue | null, + liquidator?: PromiseOrValue | null, + localCurrencyId?: null, + fCashCurrency?: null, + netLocalFromLiquidator?: null, + fCashMaturities?: null, + fCashNotionalTransfer?: null, + ): LiquidatefCashEventEventFilter; + LiquidatefCashEvent( + liquidated?: PromiseOrValue | null, + liquidator?: PromiseOrValue | null, + localCurrencyId?: null, + fCashCurrency?: null, + netLocalFromLiquidator?: null, + fCashMaturities?: null, + fCashNotionalTransfer?: null, + ): LiquidatefCashEventEventFilter; + + 'ListCurrency(uint16)'(newCurrencyId?: null): ListCurrencyEventFilter; + ListCurrency(newCurrencyId?: null): ListCurrencyEventFilter; + + 'MarketsInitialized(uint16)'(currencyId?: null): MarketsInitializedEventFilter; + MarketsInitialized(currencyId?: null): MarketsInitializedEventFilter; + + 'OwnershipTransferred(address,address)'( + previousOwner?: PromiseOrValue | null, + newOwner?: PromiseOrValue | null, + ): OwnershipTransferredEventFilter; + OwnershipTransferred( + previousOwner?: PromiseOrValue | null, + newOwner?: PromiseOrValue | null, + ): OwnershipTransferredEventFilter; + + 'PauseRouterAndGuardianUpdated(address,address)'( + pauseRouter?: PromiseOrValue | null, + pauseGuardian?: PromiseOrValue | null, + ): PauseRouterAndGuardianUpdatedEventFilter; + PauseRouterAndGuardianUpdated( + pauseRouter?: PromiseOrValue | null, + pauseGuardian?: PromiseOrValue | null, + ): PauseRouterAndGuardianUpdatedEventFilter; + + 'PrimeCashCurveChanged(uint16)'(currencyId?: PromiseOrValue | null): PrimeCashCurveChangedEventFilter; + PrimeCashCurveChanged(currencyId?: PromiseOrValue | null): PrimeCashCurveChangedEventFilter; + + 'PrimeCashHoldingsOracleUpdated(uint16,address)'( + currencyId?: PromiseOrValue | null, + oracle?: null, + ): PrimeCashHoldingsOracleUpdatedEventFilter; + PrimeCashHoldingsOracleUpdated( + currencyId?: PromiseOrValue | null, + oracle?: null, + ): PrimeCashHoldingsOracleUpdatedEventFilter; + + 'PrimeCashInterestAccrued(uint16,uint256,uint256,uint256)'( + currencyId?: PromiseOrValue | null, + underlyingScalar?: null, + supplyScalar?: null, + debtScalar?: null, + ): PrimeCashInterestAccruedEventFilter; + PrimeCashInterestAccrued( + currencyId?: PromiseOrValue | null, + underlyingScalar?: null, + supplyScalar?: null, + debtScalar?: null, + ): PrimeCashInterestAccruedEventFilter; + + 'PrimeProxyDeployed(uint16,address,bool)'( + currencyId?: PromiseOrValue | null, + proxy?: null, + isCashProxy?: null, + ): PrimeProxyDeployedEventFilter; + PrimeProxyDeployed( + currencyId?: PromiseOrValue | null, + proxy?: null, + isCashProxy?: null, + ): PrimeProxyDeployedEventFilter; + + 'RebalancingCooldownUpdated(uint16,uint40)'( + currencyId?: null, + cooldownTimeInSeconds?: null, + ): RebalancingCooldownUpdatedEventFilter; + RebalancingCooldownUpdated(currencyId?: null, cooldownTimeInSeconds?: null): RebalancingCooldownUpdatedEventFilter; + + 'RebalancingTargetsUpdated(uint16,tuple[])'( + currencyId?: null, + targets?: null, + ): RebalancingTargetsUpdatedEventFilter; + RebalancingTargetsUpdated(currencyId?: null, targets?: null): RebalancingTargetsUpdatedEventFilter; + + 'ReserveBalanceUpdated(uint16,int256)'( + currencyId?: PromiseOrValue | null, + newBalance?: null, + ): ReserveBalanceUpdatedEventFilter; + ReserveBalanceUpdated( + currencyId?: PromiseOrValue | null, + newBalance?: null, + ): ReserveBalanceUpdatedEventFilter; + + 'ReserveBufferUpdated(uint16,uint256)'(currencyId?: null, bufferAmount?: null): ReserveBufferUpdatedEventFilter; + ReserveBufferUpdated(currencyId?: null, bufferAmount?: null): ReserveBufferUpdatedEventFilter; + + 'SetPrimeSettlementRate(uint256,uint256,int256,int256)'( + currencyId?: PromiseOrValue | null, + maturity?: PromiseOrValue | null, + supplyFactor?: null, + debtFactor?: null, + ): SetPrimeSettlementRateEventFilter; + SetPrimeSettlementRate( + currencyId?: PromiseOrValue | null, + maturity?: PromiseOrValue | null, + supplyFactor?: null, + debtFactor?: null, + ): SetPrimeSettlementRateEventFilter; + + 'SweepCashIntoMarkets(uint16,int256)'(currencyId?: null, cashIntoMarkets?: null): SweepCashIntoMarketsEventFilter; + SweepCashIntoMarkets(currencyId?: null, cashIntoMarkets?: null): SweepCashIntoMarketsEventFilter; + + 'TokenMigrated(uint16)'(currencyId?: null): TokenMigratedEventFilter; + TokenMigrated(currencyId?: null): TokenMigratedEventFilter; + + 'Transfer(address,address,uint256)'( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null, + ): TransferEventFilter; + Transfer( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + amount?: null, + ): TransferEventFilter; + + 'TransferBatch(address,address,address,uint256[],uint256[])'( + operator?: PromiseOrValue | null, + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + ids?: null, + values?: null, + ): TransferBatchEventFilter; + TransferBatch( + operator?: PromiseOrValue | null, + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + ids?: null, + values?: null, + ): TransferBatchEventFilter; + + 'TransferSingle(address,address,address,uint256,uint256)'( + operator?: PromiseOrValue | null, + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + id?: null, + value?: null, + ): TransferSingleEventFilter; + TransferSingle( + operator?: PromiseOrValue | null, + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + id?: null, + value?: null, + ): TransferSingleEventFilter; + + 'TreasuryManagerChanged(address,address)'( + previousManager?: PromiseOrValue | null, + newManager?: PromiseOrValue | null, + ): TreasuryManagerChangedEventFilter; + TreasuryManagerChanged( + previousManager?: PromiseOrValue | null, + newManager?: PromiseOrValue | null, + ): TreasuryManagerChangedEventFilter; + + 'URI(string,uint256)'(value?: null, id?: PromiseOrValue | null): URIEventFilter; + URI(value?: null, id?: PromiseOrValue | null): URIEventFilter; + + 'UpdateAssetRate(uint16)'(currencyId?: null): UpdateAssetRateEventFilter; + UpdateAssetRate(currencyId?: null): UpdateAssetRateEventFilter; + + 'UpdateAuthorizedCallbackContract(address,bool)'( + operator?: null, + approved?: null, + ): UpdateAuthorizedCallbackContractEventFilter; + UpdateAuthorizedCallbackContract(operator?: null, approved?: null): UpdateAuthorizedCallbackContractEventFilter; + + 'UpdateCashGroup(uint16)'(currencyId?: null): UpdateCashGroupEventFilter; + UpdateCashGroup(currencyId?: null): UpdateCashGroupEventFilter; + + 'UpdateDepositParameters(uint16)'(currencyId?: null): UpdateDepositParametersEventFilter; + UpdateDepositParameters(currencyId?: null): UpdateDepositParametersEventFilter; + + 'UpdateETHRate(uint16)'(currencyId?: null): UpdateETHRateEventFilter; + UpdateETHRate(currencyId?: null): UpdateETHRateEventFilter; + + 'UpdateGlobalTransferOperator(address,bool)'( + operator?: null, + approved?: null, + ): UpdateGlobalTransferOperatorEventFilter; + UpdateGlobalTransferOperator(operator?: null, approved?: null): UpdateGlobalTransferOperatorEventFilter; + + 'UpdateIncentiveEmissionRate(uint16,uint32)'( + currencyId?: null, + newEmissionRate?: null, + ): UpdateIncentiveEmissionRateEventFilter; + UpdateIncentiveEmissionRate(currencyId?: null, newEmissionRate?: null): UpdateIncentiveEmissionRateEventFilter; + + 'UpdateInitializationParameters(uint16)'(currencyId?: null): UpdateInitializationParametersEventFilter; + UpdateInitializationParameters(currencyId?: null): UpdateInitializationParametersEventFilter; + + 'UpdateInterestRateCurve(uint16,uint8)'( + currencyId?: PromiseOrValue | null, + marketIndex?: PromiseOrValue | null, + ): UpdateInterestRateCurveEventFilter; + UpdateInterestRateCurve( + currencyId?: PromiseOrValue | null, + marketIndex?: PromiseOrValue | null, + ): UpdateInterestRateCurveEventFilter; + + 'UpdateMaxUnderlyingSupply(uint16,uint256)'( + currencyId?: PromiseOrValue | null, + maxUnderlyingSupply?: null, + ): UpdateMaxUnderlyingSupplyEventFilter; + UpdateMaxUnderlyingSupply( + currencyId?: PromiseOrValue | null, + maxUnderlyingSupply?: null, + ): UpdateMaxUnderlyingSupplyEventFilter; + + 'UpdateSecondaryIncentiveRewarder(uint16,address)'( + currencyId?: PromiseOrValue | null, + rewarder?: null, + ): UpdateSecondaryIncentiveRewarderEventFilter; + UpdateSecondaryIncentiveRewarder( + currencyId?: PromiseOrValue | null, + rewarder?: null, + ): UpdateSecondaryIncentiveRewarderEventFilter; + + 'UpdateTokenCollateralParameters(uint16)'(currencyId?: null): UpdateTokenCollateralParametersEventFilter; + UpdateTokenCollateralParameters(currencyId?: null): UpdateTokenCollateralParametersEventFilter; + + 'VaultAccountCashLiquidation(address,address,address,uint16,int256,int256)'( + vault?: PromiseOrValue | null, + account?: PromiseOrValue | null, + liquidator?: PromiseOrValue | null, + currencyId?: null, + fCashDeposit?: null, + cashToLiquidator?: null, + ): VaultAccountCashLiquidationEventFilter; + VaultAccountCashLiquidation( + vault?: PromiseOrValue | null, + account?: PromiseOrValue | null, + liquidator?: PromiseOrValue | null, + currencyId?: null, + fCashDeposit?: null, + cashToLiquidator?: null, + ): VaultAccountCashLiquidationEventFilter; + + 'VaultBorrowCapacityChange(address,uint16,uint256)'( + vault?: PromiseOrValue | null, + currencyId?: PromiseOrValue | null, + totalUsedBorrowCapacity?: null, + ): VaultBorrowCapacityChangeEventFilter; + VaultBorrowCapacityChange( + vault?: PromiseOrValue | null, + currencyId?: PromiseOrValue | null, + totalUsedBorrowCapacity?: null, + ): VaultBorrowCapacityChangeEventFilter; + + 'VaultDeleverageAccount(address,address,uint16,uint256,int256)'( + vault?: PromiseOrValue | null, + account?: PromiseOrValue | null, + currencyId?: null, + vaultSharesToLiquidator?: null, + depositAmountPrimeCash?: null, + ): VaultDeleverageAccountEventFilter; + VaultDeleverageAccount( + vault?: PromiseOrValue | null, + account?: PromiseOrValue | null, + currencyId?: null, + vaultSharesToLiquidator?: null, + depositAmountPrimeCash?: null, + ): VaultDeleverageAccountEventFilter; + + 'VaultDeleverageStatus(address,bool)'( + vaultAddress?: PromiseOrValue | null, + disableDeleverage?: null, + ): VaultDeleverageStatusEventFilter; + VaultDeleverageStatus( + vaultAddress?: PromiseOrValue | null, + disableDeleverage?: null, + ): VaultDeleverageStatusEventFilter; + + 'VaultLiquidatorProfit(address,address,address,uint256,bool)'( + vault?: PromiseOrValue | null, + account?: PromiseOrValue | null, + liquidator?: PromiseOrValue | null, + vaultSharesToLiquidator?: null, + transferSharesToLiquidator?: null, + ): VaultLiquidatorProfitEventFilter; + VaultLiquidatorProfit( + vault?: PromiseOrValue | null, + account?: PromiseOrValue | null, + liquidator?: PromiseOrValue | null, + vaultSharesToLiquidator?: null, + transferSharesToLiquidator?: null, + ): VaultLiquidatorProfitEventFilter; + + 'VaultPauseStatus(address,bool)'( + vault?: PromiseOrValue | null, + enabled?: null, + ): VaultPauseStatusEventFilter; + VaultPauseStatus(vault?: PromiseOrValue | null, enabled?: null): VaultPauseStatusEventFilter; + + 'VaultSecondaryTransaction(address,address,uint16,uint256,int256,int256)'( + vault?: PromiseOrValue | null, + account?: PromiseOrValue | null, + currencyId?: PromiseOrValue | null, + maturity?: null, + netUnderlyingDebt?: null, + netPrimeSupply?: null, + ): VaultSecondaryTransactionEventFilter; + VaultSecondaryTransaction( + vault?: PromiseOrValue | null, + account?: PromiseOrValue | null, + currencyId?: PromiseOrValue | null, + maturity?: null, + netUnderlyingDebt?: null, + netPrimeSupply?: null, + ): VaultSecondaryTransactionEventFilter; + + 'VaultUpdateSecondaryBorrowCapacity(address,uint16,uint80)'( + vault?: PromiseOrValue | null, + currencyId?: PromiseOrValue | null, + maxSecondaryBorrowCapacity?: null, + ): VaultUpdateSecondaryBorrowCapacityEventFilter; + VaultUpdateSecondaryBorrowCapacity( + vault?: PromiseOrValue | null, + currencyId?: PromiseOrValue | null, + maxSecondaryBorrowCapacity?: null, + ): VaultUpdateSecondaryBorrowCapacityEventFilter; + + 'VaultUpdated(address,bool,uint80)'( + vault?: PromiseOrValue | null, + enabled?: null, + maxPrimaryBorrowCapacity?: null, + ): VaultUpdatedEventFilter; + VaultUpdated( + vault?: PromiseOrValue | null, + enabled?: null, + maxPrimaryBorrowCapacity?: null, + ): VaultUpdatedEventFilter; + }; + + estimateGas: { + accruePrimeInterest( + currencyId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + balanceOf( + account: PromiseOrValue, + id: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + balanceOfBatch( + accounts: PromiseOrValue[], + ids: PromiseOrValue[], + overrides?: CallOverrides, + ): Promise; + + batchBalanceAction( + account: PromiseOrValue, + actions: BalanceActionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + batchBalanceAndTradeAction( + account: PromiseOrValue, + actions: BalanceActionWithTradesStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + batchBalanceAndTradeActionWithCallback( + account: PromiseOrValue, + actions: BalanceActionWithTradesStruct[], + callbackData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + batchLend( + account: PromiseOrValue, + actions: BatchLendStruct[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + borrowSecondaryCurrencyToVault( + account: PromiseOrValue, + maturity: PromiseOrValue, + underlyingToBorrow: [PromiseOrValue, PromiseOrValue], + maxBorrowRate: [PromiseOrValue, PromiseOrValue], + minRollLendRate: [PromiseOrValue, PromiseOrValue], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + calculateCollateralCurrencyLiquidation( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + collateralCurrency: PromiseOrValue, + maxCollateralLiquidation: PromiseOrValue, + maxNTokenLiquidation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + calculateDepositAmountInDeleverage( + currencyIndex: PromiseOrValue, + vaultAccount: VaultAccountStruct, + vaultConfig: VaultConfigStruct, + vaultState: VaultStateStruct, + depositUnderlyingInternal: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + calculateLocalCurrencyLiquidation( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + maxNTokenLiquidation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + calculateNTokensToMint( + currencyId: PromiseOrValue, + amountToDepositExternalPrecision: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + calculatefCashCrossCurrencyLiquidation( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + fCashCurrency: PromiseOrValue, + fCashMaturities: PromiseOrValue[], + maxfCashLiquidateAmounts: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + calculatefCashLocalLiquidation( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + fCashMaturities: PromiseOrValue[], + maxfCashLiquidateAmounts: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + checkVaultAccountCollateralRatio( + vault: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + claimCOMPAndTransfer( + ctokens: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + claimOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + convertCashBalanceToExternal( + currencyId: PromiseOrValue, + cashBalanceInternal: PromiseOrValue, + useUnderlying: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + convertNTokenToUnderlying( + currencyId: PromiseOrValue, + nTokenBalance: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + convertSettledfCash( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + fCashBalance: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + convertUnderlyingToPrimeCash( + currencyId: PromiseOrValue, + underlyingExternal: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + decodeERC1155Id(id: PromiseOrValue, overrides?: CallOverrides): Promise; + + decodeToAssets( + ids: PromiseOrValue[], + amounts: PromiseOrValue[], + overrides?: CallOverrides, + ): Promise; + + deleverageAccount( + account: PromiseOrValue, + vault: PromiseOrValue, + liquidator: PromiseOrValue, + currencyIndex: PromiseOrValue, + depositUnderlyingInternal: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + depositAssetToken( + account: PromiseOrValue, + currencyId: PromiseOrValue, + amountExternalPrecision: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + depositUnderlyingToken( + account: PromiseOrValue, + currencyId: PromiseOrValue, + amountExternalPrecision: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + enableBitmapCurrency( + currencyId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + enableCashGroup( + currencyId: PromiseOrValue, + cashGroup: CashGroupSettingsStruct, + underlyingName: PromiseOrValue, + underlyingSymbol: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + enablePrimeBorrow( + allowPrimeBorrow: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + enablePrimeDebt( + currencyId: PromiseOrValue, + underlyingName: PromiseOrValue, + underlyingSymbol: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + encode( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + assetType: PromiseOrValue, + vaultAddress: PromiseOrValue, + isfCashDebt: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + encodeToId( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + assetType: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + enterVault( + account: PromiseOrValue, + vault: PromiseOrValue, + depositAmountExternal: PromiseOrValue, + maturity: PromiseOrValue, + fCash: PromiseOrValue, + maxBorrowRate: PromiseOrValue, + vaultData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + exitVault( + account: PromiseOrValue, + vault: PromiseOrValue, + receiver: PromiseOrValue, + vaultSharesToRedeem: PromiseOrValue, + fCashToLend: PromiseOrValue, + minLendRate: PromiseOrValue, + exitVaultData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + getAccount(account: PromiseOrValue, overrides?: CallOverrides): Promise; + + getAccountBalance( + currencyId: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getAccountContext(account: PromiseOrValue, overrides?: CallOverrides): Promise; + + getAccountPortfolio(account: PromiseOrValue, overrides?: CallOverrides): Promise; + + getAccountPrimeDebtBalance( + currencyId: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getActiveMarkets(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + getActiveMarketsAtBlockTime( + currencyId: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getAssetsBitmap( + account: PromiseOrValue, + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getAuthorizedCallbackContractStatus( + callback: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getBalanceOfPrimeCash( + currencyId: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getBorrowCapacity( + vault: PromiseOrValue, + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getCashAmountGivenfCashAmount( + currencyId: PromiseOrValue, + fCashAmount: PromiseOrValue, + marketIndex: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getCashGroup(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + getCashGroupAndAssetRate(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + getCurrency(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + getCurrencyAndRates(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + getCurrencyId(tokenAddress: PromiseOrValue, overrides?: CallOverrides): Promise; + + getDepositFromfCashLend( + currencyId: PromiseOrValue, + fCashAmount: PromiseOrValue, + maturity: PromiseOrValue, + minLendRate: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getDepositParameters(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + getFreeCollateral(account: PromiseOrValue, overrides?: CallOverrides): Promise; + + getGlobalTransferOperatorStatus(operator: PromiseOrValue, overrides?: CallOverrides): Promise; + + getImplementation(overrides?: CallOverrides): Promise; + + getInitializationParameters( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getInterestRateCurve(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + getMarket( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + settlementDate: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getMarketIndex( + maturity: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getMaxCurrencyId(overrides?: CallOverrides): Promise; + + getNTokenAccount(tokenAddress: PromiseOrValue, overrides?: CallOverrides): Promise; + + getNTokenPortfolio(tokenAddress: PromiseOrValue, overrides?: CallOverrides): Promise; + + getNoteToken(overrides?: CallOverrides): Promise; + + getOwnershipStatus(overrides?: CallOverrides): Promise; + + getPresentfCashValue( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + notional: PromiseOrValue, + blockTime: PromiseOrValue, + riskAdjusted: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getPrimeCashHoldingsOracle(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + getPrimeFactors( + currencyId: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getPrimeFactorsStored(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + getPrimeInterestRate(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + getPrimeInterestRateCurve(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + getPrincipalFromfCashBorrow( + currencyId: PromiseOrValue, + fCashBorrow: PromiseOrValue, + maturity: PromiseOrValue, + maxBorrowRate: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getRateStorage(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + getRebalancingCooldown(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + getRebalancingTarget( + currencyId: PromiseOrValue, + holding: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getReserveBalance(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + getReserveBuffer(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + getSecondaryBorrow( + vault: PromiseOrValue, + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getSecondaryIncentiveRewarder( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getSettlementRate( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getStoredTokenBalances(tokens: PromiseOrValue[], overrides?: CallOverrides): Promise; + + getTotalfCashDebtOutstanding( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getTreasuryManager(overrides?: CallOverrides): Promise; + + getVaultAccount( + account: PromiseOrValue, + vault: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getVaultAccountHealthFactors( + account: PromiseOrValue, + vault: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getVaultAccountSecondaryDebt( + account: PromiseOrValue, + vault: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getVaultAccountWithFeeAccrual( + account: PromiseOrValue, + vault: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getVaultConfig(vault: PromiseOrValue, overrides?: CallOverrides): Promise; + + getVaultState( + vault: PromiseOrValue, + maturity: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getfCashAmountGivenCashAmount( + currencyId: PromiseOrValue, + netCashToAccount: PromiseOrValue, + marketIndex: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getfCashBorrowFromPrincipal( + currencyId: PromiseOrValue, + borrowedAmountExternal: PromiseOrValue, + maturity: PromiseOrValue, + maxBorrowRate: PromiseOrValue, + blockTime: PromiseOrValue, + useUnderlying: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getfCashLendFromDeposit( + currencyId: PromiseOrValue, + depositAmountExternal: PromiseOrValue, + maturity: PromiseOrValue, + minLendRate: PromiseOrValue, + blockTime: PromiseOrValue, + useUnderlying: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getfCashNotional( + account: PromiseOrValue, + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getfCashRequiredToLiquidateCash( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + vaultAccountCashBalance: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + initializeMarkets( + currencyId: PromiseOrValue, + isFirstInit: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + isApprovedForAll( + account: PromiseOrValue, + operator: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + liquidateCollateralCurrency( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + collateralCurrency: PromiseOrValue, + maxCollateralLiquidation: PromiseOrValue, + maxNTokenLiquidation: PromiseOrValue, + withdrawCollateral: PromiseOrValue, + redeemToUnderlying: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + liquidateExcessVaultCash( + account: PromiseOrValue, + vault: PromiseOrValue, + liquidator: PromiseOrValue, + excessCashIndex: PromiseOrValue, + debtIndex: PromiseOrValue, + _depositUnderlyingInternal: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + liquidateLocalCurrency( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + maxNTokenLiquidation: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + liquidateVaultCashBalance( + account: PromiseOrValue, + vault: PromiseOrValue, + liquidator: PromiseOrValue, + currencyIndex: PromiseOrValue, + fCashDeposit: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + liquidatefCashCrossCurrency( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + fCashCurrency: PromiseOrValue, + fCashMaturities: PromiseOrValue[], + maxfCashLiquidateAmounts: PromiseOrValue[], + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + liquidatefCashLocal( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + fCashMaturities: PromiseOrValue[], + maxfCashLiquidateAmounts: PromiseOrValue[], + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + listCurrency( + underlyingToken: TokenStorageStruct, + ethRate: ETHRateStorageStruct, + primeDebtCurve: InterestRateCurveSettingsStruct, + primeCashHoldingsOracle: PromiseOrValue, + allowPrimeCashDebt: PromiseOrValue, + rateOracleTimeWindow5Min: PromiseOrValue, + underlyingName: PromiseOrValue, + underlyingSymbol: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + nTokenAddress(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + nTokenBalanceOf( + currencyId: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + nTokenClaimIncentives(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + nTokenGetClaimableIncentives( + account: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + nTokenPresentValueAssetDenominated( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + nTokenPresentValueUnderlyingDenominated( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + nTokenRedeem( + redeemer: PromiseOrValue, + currencyId: PromiseOrValue, + tokensToRedeem_: PromiseOrValue, + sellTokenAssets: PromiseOrValue, + acceptResidualAssets: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + nTokenTotalSupply(nTokenAddress: PromiseOrValue, overrides?: CallOverrides): Promise; + + nTokenTransfer( + currencyId: PromiseOrValue, + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + nTokenTransferAllowance( + currencyId: PromiseOrValue, + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + nTokenTransferApprove( + currencyId: PromiseOrValue, + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + nTokenTransferApproveAll( + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + nTokenTransferFrom( + currencyId: PromiseOrValue, + spender: PromiseOrValue, + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + pCashAddress(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + pCashTransfer( + currencyId: PromiseOrValue, + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + pCashTransferAllowance( + currencyId: PromiseOrValue, + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + pCashTransferApprove( + currencyId: PromiseOrValue, + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + pCashTransferFrom( + currencyId: PromiseOrValue, + spender: PromiseOrValue, + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + pDebtAddress(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + pauseGuardian(overrides?: CallOverrides): Promise; + + pauseRouter(overrides?: CallOverrides): Promise; + + rebalance( + currencyId: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + repaySecondaryCurrencyFromVault( + account: PromiseOrValue, + maturity: PromiseOrValue, + underlyingToRepay: [PromiseOrValue, PromiseOrValue], + minLendRate: [PromiseOrValue, PromiseOrValue], + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + rollVaultPosition( + account: PromiseOrValue, + vault: PromiseOrValue, + fCashToBorrow: PromiseOrValue, + maturity: PromiseOrValue, + depositAmountExternal: PromiseOrValue, + minLendRate: PromiseOrValue, + maxBorrowRate: PromiseOrValue, + enterVaultData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + safeBatchTransferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + ids: PromiseOrValue[], + amounts: PromiseOrValue[], + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + safeTransferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + id: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + setApprovalForAll( + operator: PromiseOrValue, + approved: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMaxBorrowCapacity( + vaultAddress: PromiseOrValue, + maxVaultBorrowCapacity: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMaxUnderlyingSupply( + currencyId: PromiseOrValue, + maxUnderlyingSupply: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setPauseRouterAndGuardian( + pauseRouter_: PromiseOrValue, + pauseGuardian_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setRebalancingCooldown( + currencyId: PromiseOrValue, + cooldownTimeInSeconds: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setRebalancingTargets( + currencyId: PromiseOrValue, + targets: NotionalTreasury.RebalancingTargetConfigStruct[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setReserveBuffer( + currencyId: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setReserveCashBalance( + currencyId: PromiseOrValue, + reserveBalance: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setTreasuryManager( + manager: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setVaultDeleverageStatus( + vaultAddress: PromiseOrValue, + disableDeleverage: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setVaultPauseStatus( + vaultAddress: PromiseOrValue, + enable: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + settleAccount( + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + settleSecondaryBorrowForAccount( + vault: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + settleVaultAccount( + account: PromiseOrValue, + vault: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + signedBalanceOf( + account: PromiseOrValue, + id: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + signedBalanceOfBatch( + accounts: PromiseOrValue[], + ids: PromiseOrValue[], + overrides?: CallOverrides, + ): Promise; + + signedBalanceOfVaultTokenId( + account: PromiseOrValue, + id: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + supportsInterface(interfaceId: PromiseOrValue, overrides?: CallOverrides): Promise; + + sweepCashIntoMarkets( + currencyId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + direct: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + transferReserveToTreasury( + currencies: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateAuthorizedCallbackContract( + operator: PromiseOrValue, + approved: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateCashGroup( + currencyId: PromiseOrValue, + cashGroup: CashGroupSettingsStruct, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateDepositParameters( + currencyId: PromiseOrValue, + depositShares: PromiseOrValue[], + leverageThresholds: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateETHRate( + currencyId: PromiseOrValue, + rateOracle: PromiseOrValue, + mustInvert: PromiseOrValue, + buffer: PromiseOrValue, + haircut: PromiseOrValue, + liquidationDiscount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateIncentiveEmissionRate( + currencyId: PromiseOrValue, + newEmissionRate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateInitializationParameters( + currencyId: PromiseOrValue, + annualizedAnchorRates: PromiseOrValue[], + proportions: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateInterestRateCurve( + currencyId: PromiseOrValue, + marketIndices: PromiseOrValue[], + settings: InterestRateCurveSettingsStruct[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updatePrimeCashCurve( + currencyId: PromiseOrValue, + primeDebtCurve: InterestRateCurveSettingsStruct, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updatePrimeCashHoldingsOracle( + currencyId: PromiseOrValue, + primeCashHoldingsOracle: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateSecondaryBorrowCapacity( + vaultAddress: PromiseOrValue, + secondaryCurrencyId: PromiseOrValue, + maxBorrowCapacity: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateTokenCollateralParameters( + currencyId: PromiseOrValue, + residualPurchaseIncentive10BPS: PromiseOrValue, + pvHaircutPercentage: PromiseOrValue, + residualPurchaseTimeBufferHours: PromiseOrValue, + cashWithholdingBuffer10BPS: PromiseOrValue, + liquidationHaircutPercentage: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateVault( + vaultAddress: PromiseOrValue, + vaultConfig: VaultConfigParamsStruct, + maxPrimaryBorrowCapacity: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + upgradeBeacon( + proxy: PromiseOrValue, + newBeacon: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + withdraw( + currencyId: PromiseOrValue, + amountInternalPrecision: PromiseOrValue, + redeemToUnderlying: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + }; + + populateTransaction: { + accruePrimeInterest( + currencyId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + balanceOf( + account: PromiseOrValue, + id: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + balanceOfBatch( + accounts: PromiseOrValue[], + ids: PromiseOrValue[], + overrides?: CallOverrides, + ): Promise; + + batchBalanceAction( + account: PromiseOrValue, + actions: BalanceActionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + batchBalanceAndTradeAction( + account: PromiseOrValue, + actions: BalanceActionWithTradesStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + batchBalanceAndTradeActionWithCallback( + account: PromiseOrValue, + actions: BalanceActionWithTradesStruct[], + callbackData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + batchLend( + account: PromiseOrValue, + actions: BatchLendStruct[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + borrowSecondaryCurrencyToVault( + account: PromiseOrValue, + maturity: PromiseOrValue, + underlyingToBorrow: [PromiseOrValue, PromiseOrValue], + maxBorrowRate: [PromiseOrValue, PromiseOrValue], + minRollLendRate: [PromiseOrValue, PromiseOrValue], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + calculateCollateralCurrencyLiquidation( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + collateralCurrency: PromiseOrValue, + maxCollateralLiquidation: PromiseOrValue, + maxNTokenLiquidation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + calculateDepositAmountInDeleverage( + currencyIndex: PromiseOrValue, + vaultAccount: VaultAccountStruct, + vaultConfig: VaultConfigStruct, + vaultState: VaultStateStruct, + depositUnderlyingInternal: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + calculateLocalCurrencyLiquidation( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + maxNTokenLiquidation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + calculateNTokensToMint( + currencyId: PromiseOrValue, + amountToDepositExternalPrecision: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + calculatefCashCrossCurrencyLiquidation( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + fCashCurrency: PromiseOrValue, + fCashMaturities: PromiseOrValue[], + maxfCashLiquidateAmounts: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + calculatefCashLocalLiquidation( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + fCashMaturities: PromiseOrValue[], + maxfCashLiquidateAmounts: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + checkVaultAccountCollateralRatio( + vault: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + claimCOMPAndTransfer( + ctokens: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + claimOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + convertCashBalanceToExternal( + currencyId: PromiseOrValue, + cashBalanceInternal: PromiseOrValue, + useUnderlying: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + convertNTokenToUnderlying( + currencyId: PromiseOrValue, + nTokenBalance: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + convertSettledfCash( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + fCashBalance: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + convertUnderlyingToPrimeCash( + currencyId: PromiseOrValue, + underlyingExternal: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + decodeERC1155Id(id: PromiseOrValue, overrides?: CallOverrides): Promise; + + decodeToAssets( + ids: PromiseOrValue[], + amounts: PromiseOrValue[], + overrides?: CallOverrides, + ): Promise; + + deleverageAccount( + account: PromiseOrValue, + vault: PromiseOrValue, + liquidator: PromiseOrValue, + currencyIndex: PromiseOrValue, + depositUnderlyingInternal: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + depositAssetToken( + account: PromiseOrValue, + currencyId: PromiseOrValue, + amountExternalPrecision: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + depositUnderlyingToken( + account: PromiseOrValue, + currencyId: PromiseOrValue, + amountExternalPrecision: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + enableBitmapCurrency( + currencyId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + enableCashGroup( + currencyId: PromiseOrValue, + cashGroup: CashGroupSettingsStruct, + underlyingName: PromiseOrValue, + underlyingSymbol: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + enablePrimeBorrow( + allowPrimeBorrow: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + enablePrimeDebt( + currencyId: PromiseOrValue, + underlyingName: PromiseOrValue, + underlyingSymbol: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + encode( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + assetType: PromiseOrValue, + vaultAddress: PromiseOrValue, + isfCashDebt: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + encodeToId( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + assetType: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + enterVault( + account: PromiseOrValue, + vault: PromiseOrValue, + depositAmountExternal: PromiseOrValue, + maturity: PromiseOrValue, + fCash: PromiseOrValue, + maxBorrowRate: PromiseOrValue, + vaultData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + exitVault( + account: PromiseOrValue, + vault: PromiseOrValue, + receiver: PromiseOrValue, + vaultSharesToRedeem: PromiseOrValue, + fCashToLend: PromiseOrValue, + minLendRate: PromiseOrValue, + exitVaultData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + getAccount(account: PromiseOrValue, overrides?: CallOverrides): Promise; + + getAccountBalance( + currencyId: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getAccountContext(account: PromiseOrValue, overrides?: CallOverrides): Promise; + + getAccountPortfolio(account: PromiseOrValue, overrides?: CallOverrides): Promise; + + getAccountPrimeDebtBalance( + currencyId: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getActiveMarkets( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getActiveMarketsAtBlockTime( + currencyId: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getAssetsBitmap( + account: PromiseOrValue, + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getAuthorizedCallbackContractStatus( + callback: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getBalanceOfPrimeCash( + currencyId: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getBorrowCapacity( + vault: PromiseOrValue, + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getCashAmountGivenfCashAmount( + currencyId: PromiseOrValue, + fCashAmount: PromiseOrValue, + marketIndex: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getCashGroup(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + getCashGroupAndAssetRate( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getCurrency(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + getCurrencyAndRates( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getCurrencyId(tokenAddress: PromiseOrValue, overrides?: CallOverrides): Promise; + + getDepositFromfCashLend( + currencyId: PromiseOrValue, + fCashAmount: PromiseOrValue, + maturity: PromiseOrValue, + minLendRate: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getDepositParameters( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getFreeCollateral(account: PromiseOrValue, overrides?: CallOverrides): Promise; + + getGlobalTransferOperatorStatus( + operator: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getImplementation(overrides?: CallOverrides): Promise; + + getInitializationParameters( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getInterestRateCurve( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getMarket( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + settlementDate: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getMarketIndex( + maturity: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getMaxCurrencyId(overrides?: CallOverrides): Promise; + + getNTokenAccount(tokenAddress: PromiseOrValue, overrides?: CallOverrides): Promise; + + getNTokenPortfolio(tokenAddress: PromiseOrValue, overrides?: CallOverrides): Promise; + + getNoteToken(overrides?: CallOverrides): Promise; + + getOwnershipStatus(overrides?: CallOverrides): Promise; + + getPresentfCashValue( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + notional: PromiseOrValue, + blockTime: PromiseOrValue, + riskAdjusted: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getPrimeCashHoldingsOracle( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getPrimeFactors( + currencyId: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getPrimeFactorsStored( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getPrimeInterestRate( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getPrimeInterestRateCurve( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getPrincipalFromfCashBorrow( + currencyId: PromiseOrValue, + fCashBorrow: PromiseOrValue, + maturity: PromiseOrValue, + maxBorrowRate: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getRateStorage(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + getRebalancingCooldown( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getRebalancingTarget( + currencyId: PromiseOrValue, + holding: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getReserveBalance( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getReserveBuffer( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getSecondaryBorrow( + vault: PromiseOrValue, + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getSecondaryIncentiveRewarder( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getSettlementRate( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getStoredTokenBalances(tokens: PromiseOrValue[], overrides?: CallOverrides): Promise; + + getTotalfCashDebtOutstanding( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getTreasuryManager(overrides?: CallOverrides): Promise; + + getVaultAccount( + account: PromiseOrValue, + vault: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getVaultAccountHealthFactors( + account: PromiseOrValue, + vault: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getVaultAccountSecondaryDebt( + account: PromiseOrValue, + vault: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getVaultAccountWithFeeAccrual( + account: PromiseOrValue, + vault: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getVaultConfig(vault: PromiseOrValue, overrides?: CallOverrides): Promise; + + getVaultState( + vault: PromiseOrValue, + maturity: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getfCashAmountGivenCashAmount( + currencyId: PromiseOrValue, + netCashToAccount: PromiseOrValue, + marketIndex: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getfCashBorrowFromPrincipal( + currencyId: PromiseOrValue, + borrowedAmountExternal: PromiseOrValue, + maturity: PromiseOrValue, + maxBorrowRate: PromiseOrValue, + blockTime: PromiseOrValue, + useUnderlying: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getfCashLendFromDeposit( + currencyId: PromiseOrValue, + depositAmountExternal: PromiseOrValue, + maturity: PromiseOrValue, + minLendRate: PromiseOrValue, + blockTime: PromiseOrValue, + useUnderlying: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getfCashNotional( + account: PromiseOrValue, + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getfCashRequiredToLiquidateCash( + currencyId: PromiseOrValue, + maturity: PromiseOrValue, + vaultAccountCashBalance: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + initializeMarkets( + currencyId: PromiseOrValue, + isFirstInit: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + isApprovedForAll( + account: PromiseOrValue, + operator: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + liquidateCollateralCurrency( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + collateralCurrency: PromiseOrValue, + maxCollateralLiquidation: PromiseOrValue, + maxNTokenLiquidation: PromiseOrValue, + withdrawCollateral: PromiseOrValue, + redeemToUnderlying: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + liquidateExcessVaultCash( + account: PromiseOrValue, + vault: PromiseOrValue, + liquidator: PromiseOrValue, + excessCashIndex: PromiseOrValue, + debtIndex: PromiseOrValue, + _depositUnderlyingInternal: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + liquidateLocalCurrency( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + maxNTokenLiquidation: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + liquidateVaultCashBalance( + account: PromiseOrValue, + vault: PromiseOrValue, + liquidator: PromiseOrValue, + currencyIndex: PromiseOrValue, + fCashDeposit: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + liquidatefCashCrossCurrency( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + fCashCurrency: PromiseOrValue, + fCashMaturities: PromiseOrValue[], + maxfCashLiquidateAmounts: PromiseOrValue[], + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + liquidatefCashLocal( + liquidateAccount: PromiseOrValue, + localCurrency: PromiseOrValue, + fCashMaturities: PromiseOrValue[], + maxfCashLiquidateAmounts: PromiseOrValue[], + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + listCurrency( + underlyingToken: TokenStorageStruct, + ethRate: ETHRateStorageStruct, + primeDebtCurve: InterestRateCurveSettingsStruct, + primeCashHoldingsOracle: PromiseOrValue, + allowPrimeCashDebt: PromiseOrValue, + rateOracleTimeWindow5Min: PromiseOrValue, + underlyingName: PromiseOrValue, + underlyingSymbol: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + nTokenAddress(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + nTokenBalanceOf( + currencyId: PromiseOrValue, + account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + nTokenClaimIncentives(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + nTokenGetClaimableIncentives( + account: PromiseOrValue, + blockTime: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + nTokenPresentValueAssetDenominated( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + nTokenPresentValueUnderlyingDenominated( + currencyId: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + nTokenRedeem( + redeemer: PromiseOrValue, + currencyId: PromiseOrValue, + tokensToRedeem_: PromiseOrValue, + sellTokenAssets: PromiseOrValue, + acceptResidualAssets: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + nTokenTotalSupply(nTokenAddress: PromiseOrValue, overrides?: CallOverrides): Promise; + + nTokenTransfer( + currencyId: PromiseOrValue, + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + nTokenTransferAllowance( + currencyId: PromiseOrValue, + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + nTokenTransferApprove( + currencyId: PromiseOrValue, + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + nTokenTransferApproveAll( + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + nTokenTransferFrom( + currencyId: PromiseOrValue, + spender: PromiseOrValue, + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + pCashAddress(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + pCashTransfer( + currencyId: PromiseOrValue, + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + pCashTransferAllowance( + currencyId: PromiseOrValue, + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + pCashTransferApprove( + currencyId: PromiseOrValue, + owner: PromiseOrValue, + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + pCashTransferFrom( + currencyId: PromiseOrValue, + spender: PromiseOrValue, + from: PromiseOrValue, + to: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + pDebtAddress(currencyId: PromiseOrValue, overrides?: CallOverrides): Promise; + + pauseGuardian(overrides?: CallOverrides): Promise; + + pauseRouter(overrides?: CallOverrides): Promise; + + rebalance( + currencyId: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + repaySecondaryCurrencyFromVault( + account: PromiseOrValue, + maturity: PromiseOrValue, + underlyingToRepay: [PromiseOrValue, PromiseOrValue], + minLendRate: [PromiseOrValue, PromiseOrValue], + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + rollVaultPosition( + account: PromiseOrValue, + vault: PromiseOrValue, + fCashToBorrow: PromiseOrValue, + maturity: PromiseOrValue, + depositAmountExternal: PromiseOrValue, + minLendRate: PromiseOrValue, + maxBorrowRate: PromiseOrValue, + enterVaultData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + safeBatchTransferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + ids: PromiseOrValue[], + amounts: PromiseOrValue[], + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + safeTransferFrom( + from: PromiseOrValue, + to: PromiseOrValue, + id: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + setApprovalForAll( + operator: PromiseOrValue, + approved: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMaxBorrowCapacity( + vaultAddress: PromiseOrValue, + maxVaultBorrowCapacity: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMaxUnderlyingSupply( + currencyId: PromiseOrValue, + maxUnderlyingSupply: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setPauseRouterAndGuardian( + pauseRouter_: PromiseOrValue, + pauseGuardian_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setRebalancingCooldown( + currencyId: PromiseOrValue, + cooldownTimeInSeconds: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setRebalancingTargets( + currencyId: PromiseOrValue, + targets: NotionalTreasury.RebalancingTargetConfigStruct[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setReserveBuffer( + currencyId: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setReserveCashBalance( + currencyId: PromiseOrValue, + reserveBalance: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setTreasuryManager( + manager: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setVaultDeleverageStatus( + vaultAddress: PromiseOrValue, + disableDeleverage: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setVaultPauseStatus( + vaultAddress: PromiseOrValue, + enable: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + settleAccount( + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + settleSecondaryBorrowForAccount( + vault: PromiseOrValue, + account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + settleVaultAccount( + account: PromiseOrValue, + vault: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + signedBalanceOf( + account: PromiseOrValue, + id: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + signedBalanceOfBatch( + accounts: PromiseOrValue[], + ids: PromiseOrValue[], + overrides?: CallOverrides, + ): Promise; + + signedBalanceOfVaultTokenId( + account: PromiseOrValue, + id: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + supportsInterface(interfaceId: PromiseOrValue, overrides?: CallOverrides): Promise; + + sweepCashIntoMarkets( + currencyId: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + direct: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + transferReserveToTreasury( + currencies: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateAuthorizedCallbackContract( + operator: PromiseOrValue, + approved: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateCashGroup( + currencyId: PromiseOrValue, + cashGroup: CashGroupSettingsStruct, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateDepositParameters( + currencyId: PromiseOrValue, + depositShares: PromiseOrValue[], + leverageThresholds: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateETHRate( + currencyId: PromiseOrValue, + rateOracle: PromiseOrValue, + mustInvert: PromiseOrValue, + buffer: PromiseOrValue, + haircut: PromiseOrValue, + liquidationDiscount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateIncentiveEmissionRate( + currencyId: PromiseOrValue, + newEmissionRate: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateInitializationParameters( + currencyId: PromiseOrValue, + annualizedAnchorRates: PromiseOrValue[], + proportions: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateInterestRateCurve( + currencyId: PromiseOrValue, + marketIndices: PromiseOrValue[], + settings: InterestRateCurveSettingsStruct[], + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updatePrimeCashCurve( + currencyId: PromiseOrValue, + primeDebtCurve: InterestRateCurveSettingsStruct, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updatePrimeCashHoldingsOracle( + currencyId: PromiseOrValue, + primeCashHoldingsOracle: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateSecondaryBorrowCapacity( + vaultAddress: PromiseOrValue, + secondaryCurrencyId: PromiseOrValue, + maxBorrowCapacity: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateTokenCollateralParameters( + currencyId: PromiseOrValue, + residualPurchaseIncentive10BPS: PromiseOrValue, + pvHaircutPercentage: PromiseOrValue, + residualPurchaseTimeBufferHours: PromiseOrValue, + cashWithholdingBuffer10BPS: PromiseOrValue, + liquidationHaircutPercentage: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + updateVault( + vaultAddress: PromiseOrValue, + vaultConfig: VaultConfigParamsStruct, + maxPrimaryBorrowCapacity: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + upgradeBeacon( + proxy: PromiseOrValue, + newBeacon: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + withdraw( + currencyId: PromiseOrValue, + amountInternalPrecision: PromiseOrValue, + redeemToUnderlying: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + }; +} diff --git a/src/apps/notional-finance-v3/contracts/ethers/common.ts b/src/apps/notional-finance-v3/contracts/ethers/common.ts new file mode 100644 index 000000000..35f31be99 --- /dev/null +++ b/src/apps/notional-finance-v3/contracts/ethers/common.ts @@ -0,0 +1,32 @@ +/* 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 = 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 ? C : never; + +export type GetARGsTypeFromFactory = F extends MinEthersFactory ? Parameters : never; + +export type PromiseOrValue = T | Promise; diff --git a/src/apps/notional-finance-v3/contracts/ethers/factories/NotionalFCash__factory.ts b/src/apps/notional-finance-v3/contracts/ethers/factories/NotionalFCash__factory.ts new file mode 100644 index 000000000..9219eeb9e --- /dev/null +++ b/src/apps/notional-finance-v3/contracts/ethers/factories/NotionalFCash__factory.ts @@ -0,0 +1,845 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from 'ethers'; +import type { Provider } from '@ethersproject/providers'; +import type { NotionalFCash, NotionalFCashInterface } from '../NotionalFCash'; + +const _abi = [ + { + inputs: [ + { + internalType: 'string', + name: 'name', + type: 'string', + }, + { + internalType: 'string', + name: 'symbol', + type: 'string', + }, + { + internalType: 'uint256', + name: 'maxTorSupply', + type: 'uint256', + }, + { + internalType: 'address', + name: 'mintTicketContractAddress', + type: 'address', + }, + ], + stateMutability: 'nonpayable', + type: 'constructor', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'approved', + type: 'address', + }, + { + indexed: true, + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'Approval', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'operator', + type: 'address', + }, + { + indexed: false, + internalType: 'bool', + name: 'approved', + type: 'bool', + }, + ], + name: 'ApprovalForAll', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'previousOwner', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'newOwner', + type: 'address', + }, + ], + name: 'OwnershipTransferred', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'to', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'PaymentReleased', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'from', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'to', + type: 'address', + }, + { + indexed: true, + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'Transfer', + type: 'event', + }, + { + inputs: [], + name: 'MAX_MINTS_PER_TXN', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'approve', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'balanceOf', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'baseURI', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'burn', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'emergencySetStartingIndexBlock', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'flipPreSaleState', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'flipSaleState', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'getApproved', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + internalType: 'address', + name: 'operator', + type: 'address', + }, + ], + name: 'isApprovedForAll', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'maxTokenSupply', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'maxTokensPerTicket', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'mintPrice', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'numberOfTokens', + type: 'uint256', + }, + ], + name: 'mintTOR', + outputs: [], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'numberOfTokens', + type: 'uint256', + }, + ], + name: 'mintUsingTicket', + outputs: [], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [], + name: 'name', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'owner', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'ownerOf', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'preSaleIsActive', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'provenance', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'renounceOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'reservedAmount', + type: 'uint256', + }, + ], + name: 'reserveMint', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'reservedAmount', + type: 'uint256', + }, + { + internalType: 'address', + name: 'mintAddress', + type: 'address', + }, + ], + name: 'reserveMint', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'from', + type: 'address', + }, + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'safeTransferFrom', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'from', + type: 'address', + }, + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + { + internalType: 'bytes', + name: '_data', + type: 'bytes', + }, + ], + name: 'safeTransferFrom', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'saleIsActive', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'operator', + type: 'address', + }, + { + internalType: 'bool', + name: 'approved', + type: 'bool', + }, + ], + name: 'setApprovalForAll', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'string', + name: 'newBaseURI', + type: 'string', + }, + ], + name: 'setBaseURI', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'maxTorSupply', + type: 'uint256', + }, + ], + name: 'setMaxTokenSupply', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'maxTokensPerMintTicket', + type: 'uint256', + }, + ], + name: 'setMaxTokensPerTicket', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'newPrice', + type: 'uint256', + }, + ], + name: 'setMintPrice', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'string', + name: 'provenanceHash', + type: 'string', + }, + ], + name: 'setProvenanceHash', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'setStartingIndex', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'mintTicketContractAddress', + type: 'address', + }, + ], + name: 'setTicketContractAddress', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'startingIndex', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'startingIndexBlock', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes4', + name: 'interfaceId', + type: 'bytes4', + }, + ], + name: 'supportsInterface', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'symbol', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'index', + type: 'uint256', + }, + ], + name: 'tokenByIndex', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + internalType: 'uint256', + name: 'index', + type: 'uint256', + }, + ], + name: 'tokenOfOwnerByIndex', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'tokenURI', + 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: 'from', + type: 'address', + }, + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'transferFrom', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newOwner', + type: 'address', + }, + ], + name: 'transferOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'withdraw', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + { + internalType: 'address payable', + name: 'to', + type: 'address', + }, + ], + name: 'withdrawForGiveaway', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, +]; + +export class NotionalFCash__factory { + static readonly abi = _abi; + static createInterface(): NotionalFCashInterface { + return new utils.Interface(_abi) as NotionalFCashInterface; + } + static connect(address: string, signerOrProvider: Signer | Provider): NotionalFCash { + return new Contract(address, _abi, signerOrProvider) as NotionalFCash; + } +} diff --git a/src/apps/notional-finance-v3/contracts/ethers/factories/NotionalPCash__factory.ts b/src/apps/notional-finance-v3/contracts/ethers/factories/NotionalPCash__factory.ts new file mode 100644 index 000000000..bce20da02 --- /dev/null +++ b/src/apps/notional-finance-v3/contracts/ethers/factories/NotionalPCash__factory.ts @@ -0,0 +1,870 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from 'ethers'; +import type { Provider } from '@ethersproject/providers'; +import type { NotionalPCash, NotionalPCashInterface } from '../NotionalPCash'; + +const _abi = [ + { + inputs: [ + { + internalType: 'contract NotionalProxy', + name: 'notional_', + 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: true, + internalType: 'address', + name: 'caller', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'assets', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'shares', + type: 'uint256', + }, + ], + name: 'Deposit', + type: 'event', + }, + { + anonymous: false, + inputs: [], + name: 'ProxyRenamed', + 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: true, + internalType: 'address', + name: 'caller', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'receiver', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'assets', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'shares', + type: 'uint256', + }, + ], + name: 'Withdraw', + type: 'event', + }, + { + inputs: [], + name: 'EXCHANGE_RATE_PRECISION', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'NOTIONAL', + outputs: [ + { + internalType: 'contract NotionalProxy', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + 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: 'amount', + type: 'uint256', + }, + ], + name: 'approve', + outputs: [ + { + internalType: 'bool', + name: 'ret', + type: 'bool', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'asset', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'balanceOf', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'shares', + type: 'uint256', + }, + ], + name: 'convertToAssets', + outputs: [ + { + internalType: 'uint256', + name: 'assets', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'assets', + type: 'uint256', + }, + ], + name: 'convertToShares', + outputs: [ + { + internalType: 'uint256', + name: 'shares', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'currencyId', + outputs: [ + { + internalType: 'uint16', + name: '', + type: 'uint16', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'decimals', + outputs: [ + { + internalType: 'uint8', + name: '', + type: 'uint8', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'assets', + type: 'uint256', + }, + { + internalType: 'address', + name: 'receiver', + type: 'address', + }, + ], + name: 'deposit', + outputs: [ + { + internalType: 'uint256', + name: 'shares', + type: 'uint256', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'int256', + name: 'netBalance', + type: 'int256', + }, + ], + name: 'emitMintOrBurn', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'minter', + type: 'address', + }, + { + internalType: 'address', + name: 'burner', + type: 'address', + }, + { + internalType: 'uint256', + name: 'mintAmount', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'transferAndBurnAmount', + type: 'uint256', + }, + ], + name: 'emitMintTransferBurn', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'from', + type: 'address', + }, + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'emitTransfer', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'address', + name: 'nToken', + type: 'address', + }, + { + internalType: 'int256', + name: 'accountToNToken', + type: 'int256', + }, + { + internalType: 'uint256', + name: 'cashToReserve', + type: 'uint256', + }, + ], + name: 'emitfCashTradeTransfers', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'exchangeRate', + outputs: [ + { + internalType: 'uint256', + name: 'rate', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId_', + type: 'uint16', + }, + { + internalType: 'address', + name: 'underlying_', + type: 'address', + }, + { + internalType: 'string', + name: 'underlyingName_', + type: 'string', + }, + { + internalType: 'string', + name: 'underlyingSymbol_', + type: 'string', + }, + ], + name: 'initialize', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'maxDeposit', + outputs: [ + { + internalType: 'uint256', + name: 'maxAssets', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'maxMint', + outputs: [ + { + internalType: 'uint256', + name: 'maxShares', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + ], + name: 'maxRedeem', + outputs: [ + { + internalType: 'uint256', + name: 'maxShares', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + ], + name: 'maxWithdraw', + outputs: [ + { + internalType: 'uint256', + name: 'maxAssets', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'shares', + type: 'uint256', + }, + { + internalType: 'address', + name: 'receiver', + type: 'address', + }, + ], + name: 'mint', + outputs: [ + { + internalType: 'uint256', + name: 'assets', + type: 'uint256', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'name', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'nativeDecimals', + outputs: [ + { + internalType: 'uint8', + name: '', + type: 'uint8', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'assets', + type: 'uint256', + }, + ], + name: 'previewDeposit', + outputs: [ + { + internalType: 'uint256', + name: 'shares', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'shares', + type: 'uint256', + }, + ], + name: 'previewMint', + outputs: [ + { + internalType: 'uint256', + name: 'assets', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'shares', + type: 'uint256', + }, + ], + name: 'previewRedeem', + outputs: [ + { + internalType: 'uint256', + name: 'assets', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'assets', + type: 'uint256', + }, + ], + name: 'previewWithdraw', + outputs: [ + { + internalType: 'uint256', + name: 'shares', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'shares', + type: 'uint256', + }, + { + internalType: 'address', + name: 'receiver', + type: 'address', + }, + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + ], + name: 'redeem', + outputs: [ + { + internalType: 'uint256', + name: 'assets', + type: 'uint256', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'string', + name: 'underlyingName_', + type: 'string', + }, + { + internalType: 'string', + name: 'underlyingSymbol_', + type: 'string', + }, + ], + name: 'rename', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'symbol', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'totalAssets', + outputs: [ + { + internalType: 'uint256', + name: 'totalManagedAssets', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'totalSupply', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'transfer', + outputs: [ + { + internalType: 'bool', + name: 'ret', + type: 'bool', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'from', + type: 'address', + }, + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'transferFrom', + outputs: [ + { + internalType: 'bool', + name: 'ret', + type: 'bool', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'underlying', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'assets', + type: 'uint256', + }, + { + internalType: 'address', + name: 'receiver', + type: 'address', + }, + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + ], + name: 'withdraw', + outputs: [ + { + internalType: 'uint256', + name: 'shares', + type: 'uint256', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, +]; + +export class NotionalPCash__factory { + static readonly abi = _abi; + static createInterface(): NotionalPCashInterface { + return new utils.Interface(_abi) as NotionalPCashInterface; + } + static connect(address: string, signerOrProvider: Signer | Provider): NotionalPCash { + return new Contract(address, _abi, signerOrProvider) as NotionalPCash; + } +} diff --git a/src/apps/notional-finance-v3/contracts/ethers/factories/NotionalView__factory.ts b/src/apps/notional-finance-v3/contracts/ethers/factories/NotionalView__factory.ts new file mode 100644 index 000000000..426c788a1 --- /dev/null +++ b/src/apps/notional-finance-v3/contracts/ethers/factories/NotionalView__factory.ts @@ -0,0 +1,7512 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from 'ethers'; +import type { Provider } from '@ethersproject/providers'; +import type { NotionalView, NotionalViewInterface } from '../NotionalView'; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'AccountContextUpdate', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'AccountSettled', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'spender', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'Approval', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'account', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'operator', + type: 'address', + }, + { + indexed: false, + internalType: 'bool', + name: 'approved', + type: 'bool', + }, + ], + name: 'ApprovalForAll', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + indexed: false, + internalType: 'uint256', + name: 'supplyFactor', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'annualizedInterestRate', + type: 'uint256', + }, + ], + name: 'CurrencyRebalanced', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + indexed: false, + internalType: 'address', + name: 'nTokenAddress', + type: 'address', + }, + ], + name: 'DeployNToken', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + indexed: false, + internalType: 'int256', + name: 'harvestAmount', + type: 'int256', + }, + ], + name: 'ExcessReserveBalanceHarvested', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + indexed: false, + internalType: 'uint256', + name: 'migrationEmissionRate', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'finalIntegralTotalSupply', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'migrationTime', + type: 'uint256', + }, + ], + name: 'IncentivesMigrated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'liquidated', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'liquidator', + type: 'address', + }, + { + indexed: false, + internalType: 'uint16', + name: 'localCurrencyId', + type: 'uint16', + }, + { + indexed: false, + internalType: 'uint16', + name: 'collateralCurrencyId', + type: 'uint16', + }, + { + indexed: false, + internalType: 'int256', + name: 'netLocalFromLiquidator', + type: 'int256', + }, + { + indexed: false, + internalType: 'int256', + name: 'netCollateralTransfer', + type: 'int256', + }, + { + indexed: false, + internalType: 'int256', + name: 'netNTokenTransfer', + type: 'int256', + }, + ], + name: 'LiquidateCollateralCurrency', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'liquidated', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'liquidator', + type: 'address', + }, + { + indexed: false, + internalType: 'uint16', + name: 'localCurrencyId', + type: 'uint16', + }, + { + indexed: false, + internalType: 'int256', + name: 'netLocalFromLiquidator', + type: 'int256', + }, + ], + name: 'LiquidateLocalCurrency', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'liquidated', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'liquidator', + type: 'address', + }, + { + indexed: false, + internalType: 'uint16', + name: 'localCurrencyId', + type: 'uint16', + }, + { + indexed: false, + internalType: 'uint16', + name: 'fCashCurrency', + type: 'uint16', + }, + { + indexed: false, + internalType: 'int256', + name: 'netLocalFromLiquidator', + type: 'int256', + }, + { + indexed: false, + internalType: 'uint256[]', + name: 'fCashMaturities', + type: 'uint256[]', + }, + { + indexed: false, + internalType: 'int256[]', + name: 'fCashNotionalTransfer', + type: 'int256[]', + }, + ], + name: 'LiquidatefCashEvent', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint16', + name: 'newCurrencyId', + type: 'uint16', + }, + ], + name: 'ListCurrency', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'MarketsInitialized', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'previousOwner', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'newOwner', + type: 'address', + }, + ], + name: 'OwnershipTransferred', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'pauseRouter', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'pauseGuardian', + type: 'address', + }, + ], + name: 'PauseRouterAndGuardianUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'PrimeCashCurveChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + indexed: false, + internalType: 'address', + name: 'oracle', + type: 'address', + }, + ], + name: 'PrimeCashHoldingsOracleUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + indexed: false, + internalType: 'uint256', + name: 'underlyingScalar', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'supplyScalar', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'debtScalar', + type: 'uint256', + }, + ], + name: 'PrimeCashInterestAccrued', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + indexed: false, + internalType: 'address', + name: 'proxy', + type: 'address', + }, + { + indexed: false, + internalType: 'bool', + name: 'isCashProxy', + type: 'bool', + }, + ], + name: 'PrimeProxyDeployed', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + indexed: false, + internalType: 'uint40', + name: 'cooldownTimeInSeconds', + type: 'uint40', + }, + ], + name: 'RebalancingCooldownUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + components: [ + { + internalType: 'address', + name: 'holding', + type: 'address', + }, + { + internalType: 'uint8', + name: 'target', + type: 'uint8', + }, + ], + indexed: false, + internalType: 'struct NotionalTreasury.RebalancingTargetConfig[]', + name: 'targets', + type: 'tuple[]', + }, + ], + name: 'RebalancingTargetsUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + indexed: false, + internalType: 'int256', + name: 'newBalance', + type: 'int256', + }, + ], + name: 'ReserveBalanceUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + indexed: false, + internalType: 'uint256', + name: 'bufferAmount', + type: 'uint256', + }, + ], + name: 'ReserveBufferUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'uint256', + name: 'currencyId', + type: 'uint256', + }, + { + indexed: true, + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + { + indexed: false, + internalType: 'int256', + name: 'supplyFactor', + type: 'int256', + }, + { + indexed: false, + internalType: 'int256', + name: 'debtFactor', + type: 'int256', + }, + ], + name: 'SetPrimeSettlementRate', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + indexed: false, + internalType: 'int256', + name: 'cashIntoMarkets', + type: 'int256', + }, + ], + name: 'SweepCashIntoMarkets', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'TokenMigrated', + 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: 'amount', + type: 'uint256', + }, + ], + name: 'Transfer', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'operator', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'from', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'to', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256[]', + name: 'ids', + type: 'uint256[]', + }, + { + indexed: false, + internalType: 'uint256[]', + name: 'values', + type: 'uint256[]', + }, + ], + name: 'TransferBatch', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'operator', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'from', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'to', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'value', + type: 'uint256', + }, + ], + name: 'TransferSingle', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'previousManager', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'newManager', + type: 'address', + }, + ], + name: 'TreasuryManagerChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'string', + name: 'value', + type: 'string', + }, + { + indexed: true, + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + ], + name: 'URI', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'UpdateAssetRate', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'operator', + type: 'address', + }, + { + indexed: false, + internalType: 'bool', + name: 'approved', + type: 'bool', + }, + ], + name: 'UpdateAuthorizedCallbackContract', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'UpdateCashGroup', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'UpdateDepositParameters', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'UpdateETHRate', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'operator', + type: 'address', + }, + { + indexed: false, + internalType: 'bool', + name: 'approved', + type: 'bool', + }, + ], + name: 'UpdateGlobalTransferOperator', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + indexed: false, + internalType: 'uint32', + name: 'newEmissionRate', + type: 'uint32', + }, + ], + name: 'UpdateIncentiveEmissionRate', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'UpdateInitializationParameters', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + indexed: true, + internalType: 'uint8', + name: 'marketIndex', + type: 'uint8', + }, + ], + name: 'UpdateInterestRateCurve', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + indexed: false, + internalType: 'uint256', + name: 'maxUnderlyingSupply', + type: 'uint256', + }, + ], + name: 'UpdateMaxUnderlyingSupply', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + indexed: false, + internalType: 'address', + name: 'rewarder', + type: 'address', + }, + ], + name: 'UpdateSecondaryIncentiveRewarder', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'UpdateTokenCollateralParameters', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'vault', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'account', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'liquidator', + type: 'address', + }, + { + indexed: false, + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + indexed: false, + internalType: 'int256', + name: 'fCashDeposit', + type: 'int256', + }, + { + indexed: false, + internalType: 'int256', + name: 'cashToLiquidator', + type: 'int256', + }, + ], + name: 'VaultAccountCashLiquidation', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'vault', + type: 'address', + }, + { + indexed: true, + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + indexed: false, + internalType: 'uint256', + name: 'totalUsedBorrowCapacity', + type: 'uint256', + }, + ], + name: 'VaultBorrowCapacityChange', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'vault', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'account', + type: 'address', + }, + { + indexed: false, + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + indexed: false, + internalType: 'uint256', + name: 'vaultSharesToLiquidator', + type: 'uint256', + }, + { + indexed: false, + internalType: 'int256', + name: 'depositAmountPrimeCash', + type: 'int256', + }, + ], + name: 'VaultDeleverageAccount', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'vaultAddress', + type: 'address', + }, + { + indexed: false, + internalType: 'bool', + name: 'disableDeleverage', + type: 'bool', + }, + ], + name: 'VaultDeleverageStatus', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'vault', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'account', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'liquidator', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'vaultSharesToLiquidator', + type: 'uint256', + }, + { + indexed: false, + internalType: 'bool', + name: 'transferSharesToLiquidator', + type: 'bool', + }, + ], + name: 'VaultLiquidatorProfit', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'vault', + type: 'address', + }, + { + indexed: false, + internalType: 'bool', + name: 'enabled', + type: 'bool', + }, + ], + name: 'VaultPauseStatus', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'vault', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'account', + type: 'address', + }, + { + indexed: true, + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + indexed: false, + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + { + indexed: false, + internalType: 'int256', + name: 'netUnderlyingDebt', + type: 'int256', + }, + { + indexed: false, + internalType: 'int256', + name: 'netPrimeSupply', + type: 'int256', + }, + ], + name: 'VaultSecondaryTransaction', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'vault', + type: 'address', + }, + { + indexed: true, + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + indexed: false, + internalType: 'uint80', + name: 'maxSecondaryBorrowCapacity', + type: 'uint80', + }, + ], + name: 'VaultUpdateSecondaryBorrowCapacity', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'vault', + type: 'address', + }, + { + indexed: false, + internalType: 'bool', + name: 'enabled', + type: 'bool', + }, + { + indexed: false, + internalType: 'uint80', + name: 'maxPrimaryBorrowCapacity', + type: 'uint80', + }, + ], + name: 'VaultUpdated', + type: 'event', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'accruePrimeInterest', + outputs: [ + { + components: [ + { + internalType: 'int256', + name: 'supplyFactor', + type: 'int256', + }, + { + internalType: 'int256', + name: 'debtFactor', + type: 'int256', + }, + { + internalType: 'uint256', + name: 'oracleSupplyRate', + type: 'uint256', + }, + ], + internalType: 'struct PrimeRate', + name: 'pr', + type: 'tuple', + }, + { + components: [ + { + internalType: 'uint256', + name: 'lastAccrueTime', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'totalPrimeSupply', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'totalPrimeDebt', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'oracleSupplyRate', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'lastTotalUnderlyingValue', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'underlyingScalar', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'supplyScalar', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'debtScalar', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'rateOracleTimeWindow', + type: 'uint256', + }, + ], + internalType: 'struct PrimeCashFactors', + name: '', + type: 'tuple', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + ], + name: 'balanceOf', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address[]', + name: 'accounts', + type: 'address[]', + }, + { + internalType: 'uint256[]', + name: 'ids', + type: 'uint256[]', + }, + ], + name: 'balanceOfBatch', + outputs: [ + { + internalType: 'uint256[]', + name: '', + type: 'uint256[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + components: [ + { + internalType: 'enum DepositActionType', + name: 'actionType', + type: 'uint8', + }, + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint256', + name: 'depositActionAmount', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'withdrawAmountInternalPrecision', + type: 'uint256', + }, + { + internalType: 'bool', + name: 'withdrawEntireCashBalance', + type: 'bool', + }, + { + internalType: 'bool', + name: 'redeemToUnderlying', + type: 'bool', + }, + ], + internalType: 'struct BalanceAction[]', + name: 'actions', + type: 'tuple[]', + }, + ], + name: 'batchBalanceAction', + outputs: [], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + components: [ + { + internalType: 'enum DepositActionType', + name: 'actionType', + type: 'uint8', + }, + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint256', + name: 'depositActionAmount', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'withdrawAmountInternalPrecision', + type: 'uint256', + }, + { + internalType: 'bool', + name: 'withdrawEntireCashBalance', + type: 'bool', + }, + { + internalType: 'bool', + name: 'redeemToUnderlying', + type: 'bool', + }, + { + internalType: 'bytes32[]', + name: 'trades', + type: 'bytes32[]', + }, + ], + internalType: 'struct BalanceActionWithTrades[]', + name: 'actions', + type: 'tuple[]', + }, + ], + name: 'batchBalanceAndTradeAction', + outputs: [], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + components: [ + { + internalType: 'enum DepositActionType', + name: 'actionType', + type: 'uint8', + }, + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint256', + name: 'depositActionAmount', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'withdrawAmountInternalPrecision', + type: 'uint256', + }, + { + internalType: 'bool', + name: 'withdrawEntireCashBalance', + type: 'bool', + }, + { + internalType: 'bool', + name: 'redeemToUnderlying', + type: 'bool', + }, + { + internalType: 'bytes32[]', + name: 'trades', + type: 'bytes32[]', + }, + ], + internalType: 'struct BalanceActionWithTrades[]', + name: 'actions', + type: 'tuple[]', + }, + { + internalType: 'bytes', + name: 'callbackData', + type: 'bytes', + }, + ], + name: 'batchBalanceAndTradeActionWithCallback', + outputs: [], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + components: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'bool', + name: 'depositUnderlying', + type: 'bool', + }, + { + internalType: 'bytes32[]', + name: 'trades', + type: 'bytes32[]', + }, + ], + internalType: 'struct BatchLend[]', + name: 'actions', + type: 'tuple[]', + }, + ], + name: 'batchLend', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + { + internalType: 'uint256[2]', + name: 'underlyingToBorrow', + type: 'uint256[2]', + }, + { + internalType: 'uint32[2]', + name: 'maxBorrowRate', + type: 'uint32[2]', + }, + { + internalType: 'uint32[2]', + name: 'minRollLendRate', + type: 'uint32[2]', + }, + ], + name: 'borrowSecondaryCurrencyToVault', + outputs: [ + { + internalType: 'int256[2]', + name: 'underlyingTokensTransferred', + type: 'int256[2]', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'liquidateAccount', + type: 'address', + }, + { + internalType: 'uint16', + name: 'localCurrency', + type: 'uint16', + }, + { + internalType: 'uint16', + name: 'collateralCurrency', + type: 'uint16', + }, + { + internalType: 'uint128', + name: 'maxCollateralLiquidation', + type: 'uint128', + }, + { + internalType: 'uint96', + name: 'maxNTokenLiquidation', + type: 'uint96', + }, + ], + name: 'calculateCollateralCurrencyLiquidation', + outputs: [ + { + internalType: 'int256', + name: '', + type: 'int256', + }, + { + internalType: 'int256', + name: '', + type: 'int256', + }, + { + internalType: 'int256', + name: '', + type: 'int256', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'currencyIndex', + type: 'uint256', + }, + { + components: [ + { + internalType: 'int256', + name: 'accountDebtUnderlying', + type: 'int256', + }, + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'vaultShares', + type: 'uint256', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'int256', + name: 'tempCashBalance', + type: 'int256', + }, + { + internalType: 'uint256', + name: 'lastUpdateBlockTime', + type: 'uint256', + }, + ], + internalType: 'struct VaultAccount', + name: 'vaultAccount', + type: 'tuple', + }, + { + components: [ + { + internalType: 'address', + name: 'vault', + type: 'address', + }, + { + internalType: 'uint16', + name: 'flags', + type: 'uint16', + }, + { + internalType: 'uint16', + name: 'borrowCurrencyId', + type: 'uint16', + }, + { + internalType: 'int256', + name: 'minAccountBorrowSize', + type: 'int256', + }, + { + internalType: 'int256', + name: 'feeRate', + type: 'int256', + }, + { + internalType: 'int256', + name: 'minCollateralRatio', + type: 'int256', + }, + { + internalType: 'int256', + name: 'liquidationRate', + type: 'int256', + }, + { + internalType: 'int256', + name: 'reserveFeeShare', + type: 'int256', + }, + { + internalType: 'uint256', + name: 'maxBorrowMarketIndex', + type: 'uint256', + }, + { + internalType: 'int256', + name: 'maxDeleverageCollateralRatio', + type: 'int256', + }, + { + internalType: 'uint16[2]', + name: 'secondaryBorrowCurrencies', + type: 'uint16[2]', + }, + { + components: [ + { + internalType: 'int256', + name: 'supplyFactor', + type: 'int256', + }, + { + internalType: 'int256', + name: 'debtFactor', + type: 'int256', + }, + { + internalType: 'uint256', + name: 'oracleSupplyRate', + type: 'uint256', + }, + ], + internalType: 'struct PrimeRate', + name: 'primeRate', + type: 'tuple', + }, + { + internalType: 'int256', + name: 'maxRequiredAccountCollateralRatio', + type: 'int256', + }, + { + internalType: 'int256[2]', + name: 'minAccountSecondaryBorrow', + type: 'int256[2]', + }, + { + internalType: 'int256', + name: 'excessCashLiquidationBonus', + type: 'int256', + }, + ], + internalType: 'struct VaultConfig', + name: 'vaultConfig', + type: 'tuple', + }, + { + components: [ + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + { + internalType: 'int256', + name: 'totalDebtUnderlying', + type: 'int256', + }, + { + internalType: 'uint256', + name: 'totalVaultShares', + type: 'uint256', + }, + { + internalType: 'bool', + name: 'isSettled', + type: 'bool', + }, + ], + internalType: 'struct VaultState', + name: 'vaultState', + type: 'tuple', + }, + { + internalType: 'int256', + name: 'depositUnderlyingInternal', + type: 'int256', + }, + ], + name: 'calculateDepositAmountInDeleverage', + outputs: [ + { + internalType: 'int256', + name: 'depositInternal', + type: 'int256', + }, + { + internalType: 'uint256', + name: 'vaultSharesToLiquidator', + type: 'uint256', + }, + { + components: [ + { + internalType: 'int256', + name: 'supplyFactor', + type: 'int256', + }, + { + internalType: 'int256', + name: 'debtFactor', + type: 'int256', + }, + { + internalType: 'uint256', + name: 'oracleSupplyRate', + type: 'uint256', + }, + ], + internalType: 'struct PrimeRate', + name: '', + type: 'tuple', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'liquidateAccount', + type: 'address', + }, + { + internalType: 'uint16', + name: 'localCurrency', + type: 'uint16', + }, + { + internalType: 'uint96', + name: 'maxNTokenLiquidation', + type: 'uint96', + }, + ], + name: 'calculateLocalCurrencyLiquidation', + outputs: [ + { + internalType: 'int256', + name: '', + type: 'int256', + }, + { + internalType: 'int256', + name: '', + type: 'int256', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint88', + name: 'amountToDepositExternalPrecision', + type: 'uint88', + }, + ], + name: 'calculateNTokensToMint', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'liquidateAccount', + type: 'address', + }, + { + internalType: 'uint16', + name: 'localCurrency', + type: 'uint16', + }, + { + internalType: 'uint16', + name: 'fCashCurrency', + type: 'uint16', + }, + { + internalType: 'uint256[]', + name: 'fCashMaturities', + type: 'uint256[]', + }, + { + internalType: 'uint256[]', + name: 'maxfCashLiquidateAmounts', + type: 'uint256[]', + }, + ], + name: 'calculatefCashCrossCurrencyLiquidation', + outputs: [ + { + internalType: 'int256[]', + name: '', + type: 'int256[]', + }, + { + internalType: 'int256', + name: '', + type: 'int256', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'liquidateAccount', + type: 'address', + }, + { + internalType: 'uint16', + name: 'localCurrency', + type: 'uint16', + }, + { + internalType: 'uint256[]', + name: 'fCashMaturities', + type: 'uint256[]', + }, + { + internalType: 'uint256[]', + name: 'maxfCashLiquidateAmounts', + type: 'uint256[]', + }, + ], + name: 'calculatefCashLocalLiquidation', + outputs: [ + { + internalType: 'int256[]', + name: '', + type: 'int256[]', + }, + { + internalType: 'int256', + name: '', + type: 'int256', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'vault', + type: 'address', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'checkVaultAccountCollateralRatio', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address[]', + name: 'ctokens', + type: 'address[]', + }, + ], + name: 'claimCOMPAndTransfer', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'claimOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'int256', + name: 'cashBalanceInternal', + type: 'int256', + }, + { + internalType: 'bool', + name: 'useUnderlying', + type: 'bool', + }, + ], + name: 'convertCashBalanceToExternal', + outputs: [ + { + internalType: 'int256', + name: '', + type: 'int256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'int256', + name: 'nTokenBalance', + type: 'int256', + }, + ], + name: 'convertNTokenToUnderlying', + outputs: [ + { + internalType: 'int256', + name: '', + type: 'int256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + { + internalType: 'int256', + name: 'fCashBalance', + type: 'int256', + }, + { + internalType: 'uint256', + name: 'blockTime', + type: 'uint256', + }, + ], + name: 'convertSettledfCash', + outputs: [ + { + internalType: 'int256', + name: 'signedPrimeSupplyValue', + type: 'int256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'int256', + name: 'underlyingExternal', + type: 'int256', + }, + ], + name: 'convertUnderlyingToPrimeCash', + outputs: [ + { + internalType: 'int256', + name: '', + type: 'int256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + ], + name: 'decodeERC1155Id', + outputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'assetType', + type: 'uint256', + }, + { + internalType: 'address', + name: 'vaultAddress', + type: 'address', + }, + { + internalType: 'bool', + name: 'isfCashDebt', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256[]', + name: 'ids', + type: 'uint256[]', + }, + { + internalType: 'uint256[]', + name: 'amounts', + type: 'uint256[]', + }, + ], + name: 'decodeToAssets', + outputs: [ + { + components: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'assetType', + type: 'uint256', + }, + { + internalType: 'int256', + name: 'notional', + type: 'int256', + }, + { + internalType: 'uint256', + name: 'storageSlot', + type: 'uint256', + }, + { + internalType: 'enum AssetStorageState', + name: 'storageState', + type: 'uint8', + }, + ], + internalType: 'struct PortfolioAsset[]', + name: '', + type: 'tuple[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'address', + name: 'vault', + type: 'address', + }, + { + internalType: 'address', + name: 'liquidator', + type: 'address', + }, + { + internalType: 'uint16', + name: 'currencyIndex', + type: 'uint16', + }, + { + internalType: 'int256', + name: 'depositUnderlyingInternal', + type: 'int256', + }, + ], + name: 'deleverageAccount', + outputs: [ + { + internalType: 'uint256', + name: 'vaultSharesFromLiquidation', + type: 'uint256', + }, + { + internalType: 'int256', + name: 'depositAmountPrimeCash', + type: 'int256', + }, + ], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint256', + name: 'amountExternalPrecision', + type: 'uint256', + }, + ], + name: 'depositAssetToken', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint256', + name: 'amountExternalPrecision', + type: 'uint256', + }, + ], + name: 'depositUnderlyingToken', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'enableBitmapCurrency', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + components: [ + { + internalType: 'uint8', + name: 'maxMarketIndex', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'rateOracleTimeWindow5Min', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'maxDiscountFactor5BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'reserveFeeShare', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'debtBuffer25BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'fCashHaircut25BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'minOracleRate25BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'liquidationfCashHaircut25BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'liquidationDebtBuffer25BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'maxOracleRate25BPS', + type: 'uint8', + }, + ], + internalType: 'struct CashGroupSettings', + name: 'cashGroup', + type: 'tuple', + }, + { + internalType: 'string', + name: 'underlyingName', + type: 'string', + }, + { + internalType: 'string', + name: 'underlyingSymbol', + type: 'string', + }, + ], + name: 'enableCashGroup', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bool', + name: 'allowPrimeBorrow', + type: 'bool', + }, + ], + name: 'enablePrimeBorrow', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'string', + name: 'underlyingName', + type: 'string', + }, + { + internalType: 'string', + name: 'underlyingSymbol', + type: 'string', + }, + ], + name: 'enablePrimeDebt', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'assetType', + type: 'uint256', + }, + { + internalType: 'address', + name: 'vaultAddress', + type: 'address', + }, + { + internalType: 'bool', + name: 'isfCashDebt', + type: 'bool', + }, + ], + name: 'encode', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint40', + name: 'maturity', + type: 'uint40', + }, + { + internalType: 'uint8', + name: 'assetType', + type: 'uint8', + }, + ], + name: 'encodeToId', + outputs: [ + { + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + ], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'address', + name: 'vault', + type: 'address', + }, + { + internalType: 'uint256', + name: 'depositAmountExternal', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'fCash', + type: 'uint256', + }, + { + internalType: 'uint32', + name: 'maxBorrowRate', + type: 'uint32', + }, + { + internalType: 'bytes', + name: 'vaultData', + type: 'bytes', + }, + ], + name: 'enterVault', + outputs: [ + { + internalType: 'uint256', + name: 'strategyTokensAdded', + type: 'uint256', + }, + ], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'address', + name: 'vault', + type: 'address', + }, + { + internalType: 'address', + name: 'receiver', + type: 'address', + }, + { + internalType: 'uint256', + name: 'vaultSharesToRedeem', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'fCashToLend', + type: 'uint256', + }, + { + internalType: 'uint32', + name: 'minLendRate', + type: 'uint32', + }, + { + internalType: 'bytes', + name: 'exitVaultData', + type: 'bytes', + }, + ], + name: 'exitVault', + outputs: [ + { + internalType: 'uint256', + name: 'underlyingToReceiver', + type: 'uint256', + }, + ], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'getAccount', + outputs: [ + { + components: [ + { + internalType: 'uint40', + name: 'nextSettleTime', + type: 'uint40', + }, + { + internalType: 'bytes1', + name: 'hasDebt', + type: 'bytes1', + }, + { + internalType: 'uint8', + name: 'assetArrayLength', + type: 'uint8', + }, + { + internalType: 'uint16', + name: 'bitmapCurrencyId', + type: 'uint16', + }, + { + internalType: 'bytes18', + name: 'activeCurrencies', + type: 'bytes18', + }, + { + internalType: 'bool', + name: 'allowPrimeBorrow', + type: 'bool', + }, + ], + internalType: 'struct AccountContext', + name: 'accountContext', + type: 'tuple', + }, + { + components: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'int256', + name: 'cashBalance', + type: 'int256', + }, + { + internalType: 'int256', + name: 'nTokenBalance', + type: 'int256', + }, + { + internalType: 'uint256', + name: 'lastClaimTime', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'accountIncentiveDebt', + type: 'uint256', + }, + ], + internalType: 'struct AccountBalance[]', + name: 'accountBalances', + type: 'tuple[]', + }, + { + components: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'assetType', + type: 'uint256', + }, + { + internalType: 'int256', + name: 'notional', + type: 'int256', + }, + { + internalType: 'uint256', + name: 'storageSlot', + type: 'uint256', + }, + { + internalType: 'enum AssetStorageState', + name: 'storageState', + type: 'uint8', + }, + ], + internalType: 'struct PortfolioAsset[]', + name: 'portfolio', + type: 'tuple[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'getAccountBalance', + outputs: [ + { + internalType: 'int256', + name: 'cashBalance', + type: 'int256', + }, + { + internalType: 'int256', + name: 'nTokenBalance', + type: 'int256', + }, + { + internalType: 'uint256', + name: 'lastClaimTime', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'getAccountContext', + outputs: [ + { + components: [ + { + internalType: 'uint40', + name: 'nextSettleTime', + type: 'uint40', + }, + { + internalType: 'bytes1', + name: 'hasDebt', + type: 'bytes1', + }, + { + internalType: 'uint8', + name: 'assetArrayLength', + type: 'uint8', + }, + { + internalType: 'uint16', + name: 'bitmapCurrencyId', + type: 'uint16', + }, + { + internalType: 'bytes18', + name: 'activeCurrencies', + type: 'bytes18', + }, + { + internalType: 'bool', + name: 'allowPrimeBorrow', + type: 'bool', + }, + ], + internalType: 'struct AccountContext', + name: '', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'getAccountPortfolio', + outputs: [ + { + components: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'assetType', + type: 'uint256', + }, + { + internalType: 'int256', + name: 'notional', + type: 'int256', + }, + { + internalType: 'uint256', + name: 'storageSlot', + type: 'uint256', + }, + { + internalType: 'enum AssetStorageState', + name: 'storageState', + type: 'uint8', + }, + ], + internalType: 'struct PortfolioAsset[]', + name: '', + type: 'tuple[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'getAccountPrimeDebtBalance', + outputs: [ + { + internalType: 'int256', + name: 'debtBalance', + type: 'int256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'getActiveMarkets', + outputs: [ + { + components: [ + { + internalType: 'bytes32', + name: 'storageSlot', + type: 'bytes32', + }, + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + { + internalType: 'int256', + name: 'totalfCash', + type: 'int256', + }, + { + internalType: 'int256', + name: 'totalPrimeCash', + type: 'int256', + }, + { + internalType: 'int256', + name: 'totalLiquidity', + type: 'int256', + }, + { + internalType: 'uint256', + name: 'lastImpliedRate', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'oracleRate', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'previousTradeTime', + type: 'uint256', + }, + ], + internalType: 'struct MarketParameters[]', + name: '', + type: 'tuple[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint32', + name: 'blockTime', + type: 'uint32', + }, + ], + name: 'getActiveMarketsAtBlockTime', + outputs: [ + { + components: [ + { + internalType: 'bytes32', + name: 'storageSlot', + type: 'bytes32', + }, + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + { + internalType: 'int256', + name: 'totalfCash', + type: 'int256', + }, + { + internalType: 'int256', + name: 'totalPrimeCash', + type: 'int256', + }, + { + internalType: 'int256', + name: 'totalLiquidity', + type: 'int256', + }, + { + internalType: 'uint256', + name: 'lastImpliedRate', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'oracleRate', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'previousTradeTime', + type: 'uint256', + }, + ], + internalType: 'struct MarketParameters[]', + name: '', + type: 'tuple[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'getAssetsBitmap', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'callback', + type: 'address', + }, + ], + name: 'getAuthorizedCallbackContractStatus', + outputs: [ + { + internalType: 'bool', + name: 'isAuthorized', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'getBalanceOfPrimeCash', + outputs: [ + { + internalType: 'int256', + name: 'cashBalance', + type: 'int256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'vault', + type: 'address', + }, + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'getBorrowCapacity', + outputs: [ + { + internalType: 'uint256', + name: 'currentPrimeDebtUnderlying', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'totalfCashDebt', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'maxBorrowCapacity', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'int88', + name: 'fCashAmount', + type: 'int88', + }, + { + internalType: 'uint256', + name: 'marketIndex', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'blockTime', + type: 'uint256', + }, + ], + name: 'getCashAmountGivenfCashAmount', + outputs: [ + { + internalType: 'int256', + name: '', + type: 'int256', + }, + { + internalType: 'int256', + name: '', + type: 'int256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'getCashGroup', + outputs: [ + { + components: [ + { + internalType: 'uint8', + name: 'maxMarketIndex', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'rateOracleTimeWindow5Min', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'maxDiscountFactor5BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'reserveFeeShare', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'debtBuffer25BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'fCashHaircut25BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'minOracleRate25BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'liquidationfCashHaircut25BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'liquidationDebtBuffer25BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'maxOracleRate25BPS', + type: 'uint8', + }, + ], + internalType: 'struct CashGroupSettings', + name: '', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'getCashGroupAndAssetRate', + outputs: [ + { + components: [ + { + internalType: 'uint8', + name: 'maxMarketIndex', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'rateOracleTimeWindow5Min', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'maxDiscountFactor5BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'reserveFeeShare', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'debtBuffer25BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'fCashHaircut25BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'minOracleRate25BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'liquidationfCashHaircut25BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'liquidationDebtBuffer25BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'maxOracleRate25BPS', + type: 'uint8', + }, + ], + internalType: 'struct CashGroupSettings', + name: 'cashGroup', + type: 'tuple', + }, + { + components: [ + { + internalType: 'contract AssetRateAdapter', + name: 'rateOracle', + type: 'address', + }, + { + internalType: 'int256', + name: 'rate', + type: 'int256', + }, + { + internalType: 'int256', + name: 'underlyingDecimals', + type: 'int256', + }, + ], + internalType: 'struct Deprecated_AssetRateParameters', + name: 'assetRate', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'getCurrency', + outputs: [ + { + components: [ + { + internalType: 'address', + name: 'tokenAddress', + type: 'address', + }, + { + internalType: 'bool', + name: 'hasTransferFee', + type: 'bool', + }, + { + internalType: 'int256', + name: 'decimals', + type: 'int256', + }, + { + internalType: 'enum TokenType', + name: 'tokenType', + type: 'uint8', + }, + { + internalType: 'uint256', + name: 'deprecated_maxCollateralBalance', + type: 'uint256', + }, + ], + internalType: 'struct Token', + name: 'assetToken', + type: 'tuple', + }, + { + components: [ + { + internalType: 'address', + name: 'tokenAddress', + type: 'address', + }, + { + internalType: 'bool', + name: 'hasTransferFee', + type: 'bool', + }, + { + internalType: 'int256', + name: 'decimals', + type: 'int256', + }, + { + internalType: 'enum TokenType', + name: 'tokenType', + type: 'uint8', + }, + { + internalType: 'uint256', + name: 'deprecated_maxCollateralBalance', + type: 'uint256', + }, + ], + internalType: 'struct Token', + name: 'underlyingToken', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'getCurrencyAndRates', + outputs: [ + { + components: [ + { + internalType: 'address', + name: 'tokenAddress', + type: 'address', + }, + { + internalType: 'bool', + name: 'hasTransferFee', + type: 'bool', + }, + { + internalType: 'int256', + name: 'decimals', + type: 'int256', + }, + { + internalType: 'enum TokenType', + name: 'tokenType', + type: 'uint8', + }, + { + internalType: 'uint256', + name: 'deprecated_maxCollateralBalance', + type: 'uint256', + }, + ], + internalType: 'struct Token', + name: 'assetToken', + type: 'tuple', + }, + { + components: [ + { + internalType: 'address', + name: 'tokenAddress', + type: 'address', + }, + { + internalType: 'bool', + name: 'hasTransferFee', + type: 'bool', + }, + { + internalType: 'int256', + name: 'decimals', + type: 'int256', + }, + { + internalType: 'enum TokenType', + name: 'tokenType', + type: 'uint8', + }, + { + internalType: 'uint256', + name: 'deprecated_maxCollateralBalance', + type: 'uint256', + }, + ], + internalType: 'struct Token', + name: 'underlyingToken', + type: 'tuple', + }, + { + components: [ + { + internalType: 'int256', + name: 'rateDecimals', + type: 'int256', + }, + { + internalType: 'int256', + name: 'rate', + type: 'int256', + }, + { + internalType: 'int256', + name: 'buffer', + type: 'int256', + }, + { + internalType: 'int256', + name: 'haircut', + type: 'int256', + }, + { + internalType: 'int256', + name: 'liquidationDiscount', + type: 'int256', + }, + ], + internalType: 'struct ETHRate', + name: 'ethRate', + type: 'tuple', + }, + { + components: [ + { + internalType: 'contract AssetRateAdapter', + name: 'rateOracle', + type: 'address', + }, + { + internalType: 'int256', + name: 'rate', + type: 'int256', + }, + { + internalType: 'int256', + name: 'underlyingDecimals', + type: 'int256', + }, + ], + internalType: 'struct Deprecated_AssetRateParameters', + name: 'assetRate', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'tokenAddress', + type: 'address', + }, + ], + name: 'getCurrencyId', + outputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint256', + name: 'fCashAmount', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + { + internalType: 'uint32', + name: 'minLendRate', + type: 'uint32', + }, + { + internalType: 'uint256', + name: 'blockTime', + type: 'uint256', + }, + ], + name: 'getDepositFromfCashLend', + outputs: [ + { + internalType: 'uint256', + name: 'depositAmountUnderlying', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'depositAmountAsset', + type: 'uint256', + }, + { + internalType: 'uint8', + name: 'marketIndex', + type: 'uint8', + }, + { + internalType: 'bytes32', + name: 'encodedTrade', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'getDepositParameters', + outputs: [ + { + internalType: 'int256[]', + name: 'depositShares', + type: 'int256[]', + }, + { + internalType: 'int256[]', + name: 'leverageThresholds', + type: 'int256[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'getFreeCollateral', + outputs: [ + { + internalType: 'int256', + name: '', + type: 'int256', + }, + { + internalType: 'int256[]', + name: '', + type: 'int256[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'operator', + type: 'address', + }, + ], + name: 'getGlobalTransferOperatorStatus', + outputs: [ + { + internalType: 'bool', + name: 'isAuthorized', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'getImplementation', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'getInitializationParameters', + outputs: [ + { + internalType: 'int256[]', + name: 'annualizedAnchorRates', + type: 'int256[]', + }, + { + internalType: 'int256[]', + name: 'proportions', + type: 'int256[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'getInterestRateCurve', + outputs: [ + { + components: [ + { + internalType: 'uint256', + name: 'kinkUtilization1', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'kinkUtilization2', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'kinkRate1', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'kinkRate2', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'maxRate', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'minFeeRate', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'maxFeeRate', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'feeRatePercent', + type: 'uint256', + }, + ], + internalType: 'struct InterestRateParameters[]', + name: 'nextInterestRateCurve', + type: 'tuple[]', + }, + { + components: [ + { + internalType: 'uint256', + name: 'kinkUtilization1', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'kinkUtilization2', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'kinkRate1', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'kinkRate2', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'maxRate', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'minFeeRate', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'maxFeeRate', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'feeRatePercent', + type: 'uint256', + }, + ], + internalType: 'struct InterestRateParameters[]', + name: 'activeInterestRateCurve', + type: 'tuple[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'settlementDate', + type: 'uint256', + }, + ], + name: 'getMarket', + outputs: [ + { + components: [ + { + internalType: 'bytes32', + name: 'storageSlot', + type: 'bytes32', + }, + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + { + internalType: 'int256', + name: 'totalfCash', + type: 'int256', + }, + { + internalType: 'int256', + name: 'totalPrimeCash', + type: 'int256', + }, + { + internalType: 'int256', + name: 'totalLiquidity', + type: 'int256', + }, + { + internalType: 'uint256', + name: 'lastImpliedRate', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'oracleRate', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'previousTradeTime', + type: 'uint256', + }, + ], + internalType: 'struct MarketParameters', + name: '', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'blockTime', + type: 'uint256', + }, + ], + name: 'getMarketIndex', + outputs: [ + { + internalType: 'uint8', + name: 'marketIndex', + type: 'uint8', + }, + ], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [], + name: 'getMaxCurrencyId', + outputs: [ + { + internalType: 'uint16', + name: '', + type: 'uint16', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'tokenAddress', + type: 'address', + }, + ], + name: 'getNTokenAccount', + outputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint256', + name: 'totalSupply', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'incentiveAnnualEmissionRate', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'lastInitializedTime', + type: 'uint256', + }, + { + internalType: 'bytes5', + name: 'nTokenParameters', + type: 'bytes5', + }, + { + internalType: 'int256', + name: 'cashBalance', + type: 'int256', + }, + { + internalType: 'uint256', + name: 'accumulatedNOTEPerNToken', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'lastAccumulatedTime', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'tokenAddress', + type: 'address', + }, + ], + name: 'getNTokenPortfolio', + outputs: [ + { + components: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'assetType', + type: 'uint256', + }, + { + internalType: 'int256', + name: 'notional', + type: 'int256', + }, + { + internalType: 'uint256', + name: 'storageSlot', + type: 'uint256', + }, + { + internalType: 'enum AssetStorageState', + name: 'storageState', + type: 'uint8', + }, + ], + internalType: 'struct PortfolioAsset[]', + name: 'liquidityTokens', + type: 'tuple[]', + }, + { + components: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'assetType', + type: 'uint256', + }, + { + internalType: 'int256', + name: 'notional', + type: 'int256', + }, + { + internalType: 'uint256', + name: 'storageSlot', + type: 'uint256', + }, + { + internalType: 'enum AssetStorageState', + name: 'storageState', + type: 'uint8', + }, + ], + internalType: 'struct PortfolioAsset[]', + name: 'netfCashAssets', + type: 'tuple[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'getNoteToken', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'getOwnershipStatus', + outputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + internalType: 'address', + name: 'pendingOwner', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + { + internalType: 'int256', + name: 'notional', + type: 'int256', + }, + { + internalType: 'uint256', + name: 'blockTime', + type: 'uint256', + }, + { + internalType: 'bool', + name: 'riskAdjusted', + type: 'bool', + }, + ], + name: 'getPresentfCashValue', + outputs: [ + { + internalType: 'int256', + name: 'presentValue', + type: 'int256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'getPrimeCashHoldingsOracle', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint256', + name: 'blockTime', + type: 'uint256', + }, + ], + name: 'getPrimeFactors', + outputs: [ + { + components: [ + { + internalType: 'int256', + name: 'supplyFactor', + type: 'int256', + }, + { + internalType: 'int256', + name: 'debtFactor', + type: 'int256', + }, + { + internalType: 'uint256', + name: 'oracleSupplyRate', + type: 'uint256', + }, + ], + internalType: 'struct PrimeRate', + name: 'primeRate', + type: 'tuple', + }, + { + components: [ + { + internalType: 'uint256', + name: 'lastAccrueTime', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'totalPrimeSupply', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'totalPrimeDebt', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'oracleSupplyRate', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'lastTotalUnderlyingValue', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'underlyingScalar', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'supplyScalar', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'debtScalar', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'rateOracleTimeWindow', + type: 'uint256', + }, + ], + internalType: 'struct PrimeCashFactors', + name: 'factors', + type: 'tuple', + }, + { + internalType: 'uint256', + name: 'maxUnderlyingSupply', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'totalUnderlyingSupply', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'getPrimeFactorsStored', + outputs: [ + { + components: [ + { + internalType: 'uint256', + name: 'lastAccrueTime', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'totalPrimeSupply', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'totalPrimeDebt', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'oracleSupplyRate', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'lastTotalUnderlyingValue', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'underlyingScalar', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'supplyScalar', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'debtScalar', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'rateOracleTimeWindow', + type: 'uint256', + }, + ], + internalType: 'struct PrimeCashFactors', + name: '', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'getPrimeInterestRate', + outputs: [ + { + internalType: 'uint256', + name: 'annualDebtRatePreFee', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'annualDebtRatePostFee', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'annualSupplyRate', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'getPrimeInterestRateCurve', + outputs: [ + { + components: [ + { + internalType: 'uint256', + name: 'kinkUtilization1', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'kinkUtilization2', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'kinkRate1', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'kinkRate2', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'maxRate', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'minFeeRate', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'maxFeeRate', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'feeRatePercent', + type: 'uint256', + }, + ], + internalType: 'struct InterestRateParameters', + name: '', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint256', + name: 'fCashBorrow', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + { + internalType: 'uint32', + name: 'maxBorrowRate', + type: 'uint32', + }, + { + internalType: 'uint256', + name: 'blockTime', + type: 'uint256', + }, + ], + name: 'getPrincipalFromfCashBorrow', + outputs: [ + { + internalType: 'uint256', + name: 'borrowAmountUnderlying', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'borrowAmountAsset', + type: 'uint256', + }, + { + internalType: 'uint8', + name: 'marketIndex', + type: 'uint8', + }, + { + internalType: 'bytes32', + name: 'encodedTrade', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'getRateStorage', + outputs: [ + { + components: [ + { + internalType: 'contract AggregatorV2V3Interface', + name: 'rateOracle', + type: 'address', + }, + { + internalType: 'uint8', + name: 'rateDecimalPlaces', + type: 'uint8', + }, + { + internalType: 'bool', + name: 'mustInvert', + type: 'bool', + }, + { + internalType: 'uint8', + name: 'buffer', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'haircut', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'liquidationDiscount', + type: 'uint8', + }, + ], + internalType: 'struct ETHRateStorage', + name: 'ethRate', + type: 'tuple', + }, + { + components: [ + { + internalType: 'contract AssetRateAdapter', + name: 'rateOracle', + type: 'address', + }, + { + internalType: 'uint8', + name: 'underlyingDecimalPlaces', + type: 'uint8', + }, + ], + internalType: 'struct AssetRateStorage', + name: 'assetRate', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'getRebalancingCooldown', + outputs: [ + { + internalType: 'uint40', + name: '', + type: 'uint40', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'address', + name: 'holding', + type: 'address', + }, + ], + name: 'getRebalancingTarget', + outputs: [ + { + internalType: 'uint8', + name: '', + type: 'uint8', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'getReserveBalance', + outputs: [ + { + internalType: 'int256', + name: 'reserveBalance', + type: 'int256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'getReserveBuffer', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'vault', + type: 'address', + }, + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + ], + name: 'getSecondaryBorrow', + outputs: [ + { + internalType: 'int256', + name: 'totalDebt', + type: 'int256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'getSecondaryIncentiveRewarder', + outputs: [ + { + internalType: 'address', + name: 'incentiveRewarder', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint40', + name: 'maturity', + type: 'uint40', + }, + ], + name: 'getSettlementRate', + outputs: [ + { + components: [ + { + internalType: 'int256', + name: 'supplyFactor', + type: 'int256', + }, + { + internalType: 'int256', + name: 'debtFactor', + type: 'int256', + }, + { + internalType: 'uint256', + name: 'oracleSupplyRate', + type: 'uint256', + }, + ], + internalType: 'struct PrimeRate', + name: '', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address[]', + name: 'tokens', + type: 'address[]', + }, + ], + name: 'getStoredTokenBalances', + outputs: [ + { + internalType: 'uint256[]', + name: 'balances', + type: 'uint256[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + ], + name: 'getTotalfCashDebtOutstanding', + outputs: [ + { + internalType: 'int256', + name: 'totalfCashDebt', + type: 'int256', + }, + { + internalType: 'int256', + name: 'fCashDebtHeldInSettlementReserve', + type: 'int256', + }, + { + internalType: 'int256', + name: 'primeCashHeldInSettlementReserve', + type: 'int256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'getTreasuryManager', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'address', + name: 'vault', + type: 'address', + }, + ], + name: 'getVaultAccount', + outputs: [ + { + components: [ + { + internalType: 'int256', + name: 'accountDebtUnderlying', + type: 'int256', + }, + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'vaultShares', + type: 'uint256', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'int256', + name: 'tempCashBalance', + type: 'int256', + }, + { + internalType: 'uint256', + name: 'lastUpdateBlockTime', + type: 'uint256', + }, + ], + internalType: 'struct VaultAccount', + name: '', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'address', + name: 'vault', + type: 'address', + }, + ], + name: 'getVaultAccountHealthFactors', + outputs: [ + { + components: [ + { + internalType: 'int256', + name: 'collateralRatio', + type: 'int256', + }, + { + internalType: 'int256', + name: 'totalDebtOutstandingInPrimary', + type: 'int256', + }, + { + internalType: 'int256', + name: 'vaultShareValueUnderlying', + type: 'int256', + }, + { + internalType: 'int256[3]', + name: 'netDebtOutstanding', + type: 'int256[3]', + }, + ], + internalType: 'struct VaultAccountHealthFactors', + name: 'h', + type: 'tuple', + }, + { + internalType: 'int256[3]', + name: 'maxLiquidatorDepositUnderlying', + type: 'int256[3]', + }, + { + internalType: 'uint256[3]', + name: 'vaultSharesToLiquidator', + type: 'uint256[3]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'address', + name: 'vault', + type: 'address', + }, + ], + name: 'getVaultAccountSecondaryDebt', + outputs: [ + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + { + internalType: 'int256[2]', + name: 'accountSecondaryDebt', + type: 'int256[2]', + }, + { + internalType: 'int256[2]', + name: 'accountSecondaryCashHeld', + type: 'int256[2]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'address', + name: 'vault', + type: 'address', + }, + ], + name: 'getVaultAccountWithFeeAccrual', + outputs: [ + { + components: [ + { + internalType: 'int256', + name: 'accountDebtUnderlying', + type: 'int256', + }, + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'vaultShares', + type: 'uint256', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'int256', + name: 'tempCashBalance', + type: 'int256', + }, + { + internalType: 'uint256', + name: 'lastUpdateBlockTime', + type: 'uint256', + }, + ], + internalType: 'struct VaultAccount', + name: '', + type: 'tuple', + }, + { + internalType: 'int256', + name: 'accruedPrimeVaultFeeInUnderlying', + type: 'int256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'vault', + type: 'address', + }, + ], + name: 'getVaultConfig', + outputs: [ + { + components: [ + { + internalType: 'address', + name: 'vault', + type: 'address', + }, + { + internalType: 'uint16', + name: 'flags', + type: 'uint16', + }, + { + internalType: 'uint16', + name: 'borrowCurrencyId', + type: 'uint16', + }, + { + internalType: 'int256', + name: 'minAccountBorrowSize', + type: 'int256', + }, + { + internalType: 'int256', + name: 'feeRate', + type: 'int256', + }, + { + internalType: 'int256', + name: 'minCollateralRatio', + type: 'int256', + }, + { + internalType: 'int256', + name: 'liquidationRate', + type: 'int256', + }, + { + internalType: 'int256', + name: 'reserveFeeShare', + type: 'int256', + }, + { + internalType: 'uint256', + name: 'maxBorrowMarketIndex', + type: 'uint256', + }, + { + internalType: 'int256', + name: 'maxDeleverageCollateralRatio', + type: 'int256', + }, + { + internalType: 'uint16[2]', + name: 'secondaryBorrowCurrencies', + type: 'uint16[2]', + }, + { + components: [ + { + internalType: 'int256', + name: 'supplyFactor', + type: 'int256', + }, + { + internalType: 'int256', + name: 'debtFactor', + type: 'int256', + }, + { + internalType: 'uint256', + name: 'oracleSupplyRate', + type: 'uint256', + }, + ], + internalType: 'struct PrimeRate', + name: 'primeRate', + type: 'tuple', + }, + { + internalType: 'int256', + name: 'maxRequiredAccountCollateralRatio', + type: 'int256', + }, + { + internalType: 'int256[2]', + name: 'minAccountSecondaryBorrow', + type: 'int256[2]', + }, + { + internalType: 'int256', + name: 'excessCashLiquidationBonus', + type: 'int256', + }, + ], + internalType: 'struct VaultConfig', + name: 'vaultConfig', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'vault', + type: 'address', + }, + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + ], + name: 'getVaultState', + outputs: [ + { + components: [ + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + { + internalType: 'int256', + name: 'totalDebtUnderlying', + type: 'int256', + }, + { + internalType: 'uint256', + name: 'totalVaultShares', + type: 'uint256', + }, + { + internalType: 'bool', + name: 'isSettled', + type: 'bool', + }, + ], + internalType: 'struct VaultState', + name: 'vaultState', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'int88', + name: 'netCashToAccount', + type: 'int88', + }, + { + internalType: 'uint256', + name: 'marketIndex', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'blockTime', + type: 'uint256', + }, + ], + name: 'getfCashAmountGivenCashAmount', + outputs: [ + { + internalType: 'int256', + name: '', + type: 'int256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint256', + name: 'borrowedAmountExternal', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + { + internalType: 'uint32', + name: 'maxBorrowRate', + type: 'uint32', + }, + { + internalType: 'uint256', + name: 'blockTime', + type: 'uint256', + }, + { + internalType: 'bool', + name: 'useUnderlying', + type: 'bool', + }, + ], + name: 'getfCashBorrowFromPrincipal', + outputs: [ + { + internalType: 'uint88', + name: 'fCashDebt', + type: 'uint88', + }, + { + internalType: 'uint8', + name: 'marketIndex', + type: 'uint8', + }, + { + internalType: 'bytes32', + name: 'encodedTrade', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint256', + name: 'depositAmountExternal', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + { + internalType: 'uint32', + name: 'minLendRate', + type: 'uint32', + }, + { + internalType: 'uint256', + name: 'blockTime', + type: 'uint256', + }, + { + internalType: 'bool', + name: 'useUnderlying', + type: 'bool', + }, + ], + name: 'getfCashLendFromDeposit', + outputs: [ + { + internalType: 'uint88', + name: 'fCashAmount', + type: 'uint88', + }, + { + internalType: 'uint8', + name: 'marketIndex', + type: 'uint8', + }, + { + internalType: 'bytes32', + name: 'encodedTrade', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + ], + name: 'getfCashNotional', + outputs: [ + { + internalType: 'int256', + name: '', + type: 'int256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + { + internalType: 'int256', + name: 'vaultAccountCashBalance', + type: 'int256', + }, + ], + name: 'getfCashRequiredToLiquidateCash', + outputs: [ + { + internalType: 'int256', + name: 'fCashRequired', + type: 'int256', + }, + { + internalType: 'int256', + name: 'discountFactor', + type: 'int256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'bool', + name: 'isFirstInit', + type: 'bool', + }, + ], + name: 'initializeMarkets', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'address', + name: 'operator', + type: 'address', + }, + ], + name: 'isApprovedForAll', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'liquidateAccount', + type: 'address', + }, + { + internalType: 'uint16', + name: 'localCurrency', + type: 'uint16', + }, + { + internalType: 'uint16', + name: 'collateralCurrency', + type: 'uint16', + }, + { + internalType: 'uint128', + name: 'maxCollateralLiquidation', + type: 'uint128', + }, + { + internalType: 'uint96', + name: 'maxNTokenLiquidation', + type: 'uint96', + }, + { + internalType: 'bool', + name: 'withdrawCollateral', + type: 'bool', + }, + { + internalType: 'bool', + name: 'redeemToUnderlying', + type: 'bool', + }, + ], + name: 'liquidateCollateralCurrency', + outputs: [ + { + internalType: 'int256', + name: '', + type: 'int256', + }, + { + internalType: 'int256', + name: '', + type: 'int256', + }, + { + internalType: 'int256', + name: '', + type: 'int256', + }, + ], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'address', + name: 'vault', + type: 'address', + }, + { + internalType: 'address', + name: 'liquidator', + type: 'address', + }, + { + internalType: 'uint256', + name: 'excessCashIndex', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'debtIndex', + type: 'uint256', + }, + { + internalType: 'uint256', + name: '_depositUnderlyingInternal', + type: 'uint256', + }, + ], + name: 'liquidateExcessVaultCash', + outputs: [ + { + internalType: 'int256', + name: 'cashToLiquidator', + type: 'int256', + }, + ], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'liquidateAccount', + type: 'address', + }, + { + internalType: 'uint16', + name: 'localCurrency', + type: 'uint16', + }, + { + internalType: 'uint96', + name: 'maxNTokenLiquidation', + type: 'uint96', + }, + ], + name: 'liquidateLocalCurrency', + outputs: [ + { + internalType: 'int256', + name: '', + type: 'int256', + }, + { + internalType: 'int256', + name: '', + type: 'int256', + }, + ], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'address', + name: 'vault', + type: 'address', + }, + { + internalType: 'address', + name: 'liquidator', + type: 'address', + }, + { + internalType: 'uint256', + name: 'currencyIndex', + type: 'uint256', + }, + { + internalType: 'int256', + name: 'fCashDeposit', + type: 'int256', + }, + ], + name: 'liquidateVaultCashBalance', + outputs: [ + { + internalType: 'int256', + name: 'cashToLiquidator', + type: 'int256', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'liquidateAccount', + type: 'address', + }, + { + internalType: 'uint16', + name: 'localCurrency', + type: 'uint16', + }, + { + internalType: 'uint16', + name: 'fCashCurrency', + type: 'uint16', + }, + { + internalType: 'uint256[]', + name: 'fCashMaturities', + type: 'uint256[]', + }, + { + internalType: 'uint256[]', + name: 'maxfCashLiquidateAmounts', + type: 'uint256[]', + }, + ], + name: 'liquidatefCashCrossCurrency', + outputs: [ + { + internalType: 'int256[]', + name: '', + type: 'int256[]', + }, + { + internalType: 'int256', + name: '', + type: 'int256', + }, + ], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'liquidateAccount', + type: 'address', + }, + { + internalType: 'uint16', + name: 'localCurrency', + type: 'uint16', + }, + { + internalType: 'uint256[]', + name: 'fCashMaturities', + type: 'uint256[]', + }, + { + internalType: 'uint256[]', + name: 'maxfCashLiquidateAmounts', + type: 'uint256[]', + }, + ], + name: 'liquidatefCashLocal', + outputs: [ + { + internalType: 'int256[]', + name: '', + type: 'int256[]', + }, + { + internalType: 'int256', + name: '', + type: 'int256', + }, + ], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [ + { + components: [ + { + internalType: 'address', + name: 'tokenAddress', + type: 'address', + }, + { + internalType: 'bool', + name: 'hasTransferFee', + type: 'bool', + }, + { + internalType: 'enum TokenType', + name: 'tokenType', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'decimalPlaces', + type: 'uint8', + }, + { + internalType: 'uint72', + name: 'deprecated_maxCollateralBalance', + type: 'uint72', + }, + ], + internalType: 'struct TokenStorage', + name: 'underlyingToken', + type: 'tuple', + }, + { + components: [ + { + internalType: 'contract AggregatorV2V3Interface', + name: 'rateOracle', + type: 'address', + }, + { + internalType: 'uint8', + name: 'rateDecimalPlaces', + type: 'uint8', + }, + { + internalType: 'bool', + name: 'mustInvert', + type: 'bool', + }, + { + internalType: 'uint8', + name: 'buffer', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'haircut', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'liquidationDiscount', + type: 'uint8', + }, + ], + internalType: 'struct ETHRateStorage', + name: 'ethRate', + type: 'tuple', + }, + { + components: [ + { + internalType: 'uint8', + name: 'kinkUtilization1', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'kinkUtilization2', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'kinkRate1', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'kinkRate2', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'maxRateUnits', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'minFeeRate5BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'maxFeeRate25BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'feeRatePercent', + type: 'uint8', + }, + ], + internalType: 'struct InterestRateCurveSettings', + name: 'primeDebtCurve', + type: 'tuple', + }, + { + internalType: 'contract IPrimeCashHoldingsOracle', + name: 'primeCashHoldingsOracle', + type: 'address', + }, + { + internalType: 'bool', + name: 'allowPrimeCashDebt', + type: 'bool', + }, + { + internalType: 'uint8', + name: 'rateOracleTimeWindow5Min', + type: 'uint8', + }, + { + internalType: 'string', + name: 'underlyingName', + type: 'string', + }, + { + internalType: 'string', + name: 'underlyingSymbol', + type: 'string', + }, + ], + name: 'listCurrency', + outputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'nTokenAddress', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'nTokenBalanceOf', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'nTokenClaimIncentives', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'uint256', + name: 'blockTime', + type: 'uint256', + }, + ], + name: 'nTokenGetClaimableIncentives', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'nTokenPresentValueAssetDenominated', + outputs: [ + { + internalType: 'int256', + name: '', + type: 'int256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'nTokenPresentValueUnderlyingDenominated', + outputs: [ + { + internalType: 'int256', + name: '', + type: 'int256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'redeemer', + type: 'address', + }, + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint96', + name: 'tokensToRedeem_', + type: 'uint96', + }, + { + internalType: 'bool', + name: 'sellTokenAssets', + type: 'bool', + }, + { + internalType: 'bool', + name: 'acceptResidualAssets', + type: 'bool', + }, + ], + name: 'nTokenRedeem', + outputs: [ + { + internalType: 'int256', + name: '', + type: 'int256', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'nTokenAddress', + type: 'address', + }, + ], + name: 'nTokenTotalSupply', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'address', + name: 'from', + type: 'address', + }, + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'nTokenTransfer', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + internalType: 'address', + name: 'spender', + type: 'address', + }, + ], + name: 'nTokenTransferAllowance', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + internalType: 'address', + name: 'spender', + type: 'address', + }, + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'nTokenTransferApprove', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'spender', + type: 'address', + }, + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'nTokenTransferApproveAll', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'address', + name: 'spender', + type: 'address', + }, + { + internalType: 'address', + name: 'from', + type: 'address', + }, + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'nTokenTransferFrom', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'owner', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'pCashAddress', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'address', + name: 'from', + type: 'address', + }, + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'pCashTransfer', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + internalType: 'address', + name: 'spender', + type: 'address', + }, + ], + name: 'pCashTransferAllowance', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + internalType: 'address', + name: 'spender', + type: 'address', + }, + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'pCashTransferApprove', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'address', + name: 'spender', + type: 'address', + }, + { + internalType: 'address', + name: 'from', + type: 'address', + }, + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'pCashTransferFrom', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'pDebtAddress', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'pauseGuardian', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'pauseRouter', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16[]', + name: 'currencyId', + type: 'uint16[]', + }, + ], + name: 'rebalance', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + { + internalType: 'uint256[2]', + name: 'underlyingToRepay', + type: 'uint256[2]', + }, + { + internalType: 'uint32[2]', + name: 'minLendRate', + type: 'uint32[2]', + }, + ], + name: 'repaySecondaryCurrencyFromVault', + outputs: [ + { + internalType: 'int256[2]', + name: 'underlyingDepositExternal', + type: 'int256[2]', + }, + ], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'address', + name: 'vault', + type: 'address', + }, + { + internalType: 'uint256', + name: 'fCashToBorrow', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'maturity', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'depositAmountExternal', + type: 'uint256', + }, + { + internalType: 'uint32', + name: 'minLendRate', + type: 'uint32', + }, + { + internalType: 'uint32', + name: 'maxBorrowRate', + type: 'uint32', + }, + { + internalType: 'bytes', + name: 'enterVaultData', + type: 'bytes', + }, + ], + name: 'rollVaultPosition', + outputs: [ + { + internalType: 'uint256', + name: 'strategyTokensAdded', + type: 'uint256', + }, + ], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'from', + type: 'address', + }, + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256[]', + name: 'ids', + type: 'uint256[]', + }, + { + internalType: 'uint256[]', + name: 'amounts', + type: 'uint256[]', + }, + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + ], + name: 'safeBatchTransferFrom', + outputs: [], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'from', + type: 'address', + }, + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + ], + name: 'safeTransferFrom', + outputs: [], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'operator', + type: 'address', + }, + { + internalType: 'bool', + name: 'approved', + type: 'bool', + }, + ], + name: 'setApprovalForAll', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'vaultAddress', + type: 'address', + }, + { + internalType: 'uint80', + name: 'maxVaultBorrowCapacity', + type: 'uint80', + }, + ], + name: 'setMaxBorrowCapacity', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint256', + name: 'maxUnderlyingSupply', + type: 'uint256', + }, + ], + name: 'setMaxUnderlyingSupply', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'pauseRouter_', + type: 'address', + }, + { + internalType: 'address', + name: 'pauseGuardian_', + type: 'address', + }, + ], + name: 'setPauseRouterAndGuardian', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint40', + name: 'cooldownTimeInSeconds', + type: 'uint40', + }, + ], + name: 'setRebalancingCooldown', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + components: [ + { + internalType: 'address', + name: 'holding', + type: 'address', + }, + { + internalType: 'uint8', + name: 'target', + type: 'uint8', + }, + ], + internalType: 'struct NotionalTreasury.RebalancingTargetConfig[]', + name: 'targets', + type: 'tuple[]', + }, + ], + name: 'setRebalancingTargets', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'setReserveBuffer', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'int256', + name: 'reserveBalance', + type: 'int256', + }, + ], + name: 'setReserveCashBalance', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'manager', + type: 'address', + }, + ], + name: 'setTreasuryManager', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'vaultAddress', + type: 'address', + }, + { + internalType: 'bool', + name: 'disableDeleverage', + type: 'bool', + }, + ], + name: 'setVaultDeleverageStatus', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'vaultAddress', + type: 'address', + }, + { + internalType: 'bool', + name: 'enable', + type: 'bool', + }, + ], + name: 'setVaultPauseStatus', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'settleAccount', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'vault', + type: 'address', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'settleSecondaryBorrowForAccount', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'address', + name: 'vault', + type: 'address', + }, + ], + name: 'settleVaultAccount', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + ], + name: 'signedBalanceOf', + outputs: [ + { + internalType: 'int256', + name: '', + type: 'int256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address[]', + name: 'accounts', + type: 'address[]', + }, + { + internalType: 'uint256[]', + name: 'ids', + type: 'uint256[]', + }, + ], + name: 'signedBalanceOfBatch', + outputs: [ + { + internalType: 'int256[]', + name: '', + type: 'int256[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + ], + name: 'signedBalanceOfVaultTokenId', + outputs: [ + { + internalType: 'int256', + name: '', + type: 'int256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes4', + name: 'interfaceId', + type: 'bytes4', + }, + ], + name: 'supportsInterface', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + ], + name: 'sweepCashIntoMarkets', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newOwner', + type: 'address', + }, + { + internalType: 'bool', + name: 'direct', + type: 'bool', + }, + ], + name: 'transferOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16[]', + name: 'currencies', + type: 'uint16[]', + }, + ], + name: 'transferReserveToTreasury', + outputs: [ + { + internalType: 'uint256[]', + name: '', + type: 'uint256[]', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'operator', + type: 'address', + }, + { + internalType: 'bool', + name: 'approved', + type: 'bool', + }, + ], + name: 'updateAuthorizedCallbackContract', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + components: [ + { + internalType: 'uint8', + name: 'maxMarketIndex', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'rateOracleTimeWindow5Min', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'maxDiscountFactor5BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'reserveFeeShare', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'debtBuffer25BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'fCashHaircut25BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'minOracleRate25BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'liquidationfCashHaircut25BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'liquidationDebtBuffer25BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'maxOracleRate25BPS', + type: 'uint8', + }, + ], + internalType: 'struct CashGroupSettings', + name: 'cashGroup', + type: 'tuple', + }, + ], + name: 'updateCashGroup', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint32[]', + name: 'depositShares', + type: 'uint32[]', + }, + { + internalType: 'uint32[]', + name: 'leverageThresholds', + type: 'uint32[]', + }, + ], + name: 'updateDepositParameters', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'contract AggregatorV2V3Interface', + name: 'rateOracle', + type: 'address', + }, + { + internalType: 'bool', + name: 'mustInvert', + type: 'bool', + }, + { + internalType: 'uint8', + name: 'buffer', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'haircut', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'liquidationDiscount', + type: 'uint8', + }, + ], + name: 'updateETHRate', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint32', + name: 'newEmissionRate', + type: 'uint32', + }, + ], + name: 'updateIncentiveEmissionRate', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint32[]', + name: 'annualizedAnchorRates', + type: 'uint32[]', + }, + { + internalType: 'uint32[]', + name: 'proportions', + type: 'uint32[]', + }, + ], + name: 'updateInitializationParameters', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint8[]', + name: 'marketIndices', + type: 'uint8[]', + }, + { + components: [ + { + internalType: 'uint8', + name: 'kinkUtilization1', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'kinkUtilization2', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'kinkRate1', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'kinkRate2', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'maxRateUnits', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'minFeeRate5BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'maxFeeRate25BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'feeRatePercent', + type: 'uint8', + }, + ], + internalType: 'struct InterestRateCurveSettings[]', + name: 'settings', + type: 'tuple[]', + }, + ], + name: 'updateInterestRateCurve', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + components: [ + { + internalType: 'uint8', + name: 'kinkUtilization1', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'kinkUtilization2', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'kinkRate1', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'kinkRate2', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'maxRateUnits', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'minFeeRate5BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'maxFeeRate25BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'feeRatePercent', + type: 'uint8', + }, + ], + internalType: 'struct InterestRateCurveSettings', + name: 'primeDebtCurve', + type: 'tuple', + }, + ], + name: 'updatePrimeCashCurve', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'contract IPrimeCashHoldingsOracle', + name: 'primeCashHoldingsOracle', + type: 'address', + }, + ], + name: 'updatePrimeCashHoldingsOracle', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'vaultAddress', + type: 'address', + }, + { + internalType: 'uint16', + name: 'secondaryCurrencyId', + type: 'uint16', + }, + { + internalType: 'uint80', + name: 'maxBorrowCapacity', + type: 'uint80', + }, + ], + name: 'updateSecondaryBorrowCapacity', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint8', + name: 'residualPurchaseIncentive10BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'pvHaircutPercentage', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'residualPurchaseTimeBufferHours', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'cashWithholdingBuffer10BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'liquidationHaircutPercentage', + type: 'uint8', + }, + ], + name: 'updateTokenCollateralParameters', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'vaultAddress', + type: 'address', + }, + { + components: [ + { + internalType: 'uint16', + name: 'flags', + type: 'uint16', + }, + { + internalType: 'uint16', + name: 'borrowCurrencyId', + type: 'uint16', + }, + { + internalType: 'uint256', + name: 'minAccountBorrowSize', + type: 'uint256', + }, + { + internalType: 'uint16', + name: 'minCollateralRatioBPS', + type: 'uint16', + }, + { + internalType: 'uint8', + name: 'feeRate5BPS', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'liquidationRate', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'reserveFeeShare', + type: 'uint8', + }, + { + internalType: 'uint8', + name: 'maxBorrowMarketIndex', + type: 'uint8', + }, + { + internalType: 'uint16', + name: 'maxDeleverageCollateralRatioBPS', + type: 'uint16', + }, + { + internalType: 'uint16[2]', + name: 'secondaryBorrowCurrencies', + type: 'uint16[2]', + }, + { + internalType: 'uint16', + name: 'maxRequiredAccountCollateralRatioBPS', + type: 'uint16', + }, + { + internalType: 'uint256[2]', + name: 'minAccountSecondaryBorrow', + type: 'uint256[2]', + }, + { + internalType: 'uint8', + name: 'excessCashLiquidationBonus', + type: 'uint8', + }, + ], + internalType: 'struct VaultConfigParams', + name: 'vaultConfig', + type: 'tuple', + }, + { + internalType: 'uint80', + name: 'maxPrimaryBorrowCapacity', + type: 'uint80', + }, + ], + name: 'updateVault', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'enum Deployments.BeaconType', + name: 'proxy', + type: 'uint8', + }, + { + internalType: 'address', + name: 'newBeacon', + type: 'address', + }, + ], + name: 'upgradeBeacon', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newImplementation', + type: 'address', + }, + ], + name: 'upgradeTo', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newImplementation', + type: 'address', + }, + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + ], + name: 'upgradeToAndCall', + outputs: [], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'currencyId', + type: 'uint16', + }, + { + internalType: 'uint88', + name: 'amountInternalPrecision', + type: 'uint88', + }, + { + internalType: 'bool', + name: 'redeemToUnderlying', + type: 'bool', + }, + ], + name: 'withdraw', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, +]; + +export class NotionalView__factory { + static readonly abi = _abi; + static createInterface(): NotionalViewInterface { + return new utils.Interface(_abi) as NotionalViewInterface; + } + static connect(address: string, signerOrProvider: Signer | Provider): NotionalView { + return new Contract(address, _abi, signerOrProvider) as NotionalView; + } +} diff --git a/src/apps/notional-finance-v3/contracts/ethers/factories/index.ts b/src/apps/notional-finance-v3/contracts/ethers/factories/index.ts new file mode 100644 index 000000000..1a7e28bee --- /dev/null +++ b/src/apps/notional-finance-v3/contracts/ethers/factories/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { NotionalFCash__factory } from './NotionalFCash__factory'; +export { NotionalPCash__factory } from './NotionalPCash__factory'; +export { NotionalView__factory } from './NotionalView__factory'; diff --git a/src/apps/notional-finance-v3/contracts/ethers/index.ts b/src/apps/notional-finance-v3/contracts/ethers/index.ts new file mode 100644 index 000000000..1351064f0 --- /dev/null +++ b/src/apps/notional-finance-v3/contracts/ethers/index.ts @@ -0,0 +1,10 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { NotionalFCash } from './NotionalFCash'; +export type { NotionalPCash } from './NotionalPCash'; +export type { NotionalView } from './NotionalView'; +export * as factories from './factories'; +export { NotionalFCash__factory } from './factories/NotionalFCash__factory'; +export { NotionalPCash__factory } from './factories/NotionalPCash__factory'; +export { NotionalView__factory } from './factories/NotionalView__factory'; diff --git a/src/apps/notional-finance-v3/contracts/index.ts b/src/apps/notional-finance-v3/contracts/index.ts new file mode 100644 index 000000000..423274ab7 --- /dev/null +++ b/src/apps/notional-finance-v3/contracts/index.ts @@ -0,0 +1,31 @@ +import { Injectable, Inject } from '@nestjs/common'; + +import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; +import { ContractFactory } from '~contract/contracts'; +import { Network } from '~types/network.interface'; + +import { NotionalFCash__factory, NotionalPCash__factory, NotionalView__factory } from './ethers'; + +// eslint-disable-next-line +type ContractOpts = { address: string; network: Network }; + +@Injectable() +export class NotionalFinanceV3ContractFactory extends ContractFactory { + constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) { + super((network: Network) => appToolkit.getNetworkProvider(network)); + } + + notionalFCash({ address, network }: ContractOpts) { + return NotionalFCash__factory.connect(address, this.appToolkit.getNetworkProvider(network)); + } + notionalPCash({ address, network }: ContractOpts) { + return NotionalPCash__factory.connect(address, this.appToolkit.getNetworkProvider(network)); + } + notionalView({ address, network }: ContractOpts) { + return NotionalView__factory.connect(address, this.appToolkit.getNetworkProvider(network)); + } +} + +export type { NotionalFCash } from './ethers'; +export type { NotionalPCash } from './ethers'; +export type { NotionalView } from './ethers'; diff --git a/src/apps/notional-finance-v3/notional-finance-v3.module.ts b/src/apps/notional-finance-v3/notional-finance-v3.module.ts new file mode 100644 index 000000000..acf8265eb --- /dev/null +++ b/src/apps/notional-finance-v3/notional-finance-v3.module.ts @@ -0,0 +1,25 @@ +import { Module } from '@nestjs/common'; + +import { AbstractApp } from '~app/app.dynamic-module'; + +import { EthereumNotionalFinanceV3BorrowContractPositionFetcher } from './arbitrum/notional-finance-v3.borrow.contract-position-fetcher'; +import { ArbitrumNotionalFinanceV3FCashTokenFetcher } from './arbitrum/notional-finance-v3.f-cash.token-fetcher'; +import { ArbitrumNotionalFinanceV3NTokenTokenFetcher } from './arbitrum/notional-finance-v3.n-token.token-fetcher'; +import { ArbitrumNotionalFinanceV3PCashTokenFetcher } from './arbitrum/notional-finance-v3.p-cash.token-fetcher'; +import { ArbitrumNotionalFinanceV3PDebtTokenFetcher } from './arbitrum/notional-finance-v3.p-debt.token-fetcher'; +import { ArbitrumNotionalFinanceV3SupplyContractPositionFetcher } from './arbitrum/notional-finance-v3.supply.contract-position-fetcher'; +import { NotionalFinanceV3ContractFactory } from './contracts'; + +@Module({ + providers: [ + NotionalFinanceV3ContractFactory, + // Arbitrum + ArbitrumNotionalFinanceV3PCashTokenFetcher, + ArbitrumNotionalFinanceV3PDebtTokenFetcher, + ArbitrumNotionalFinanceV3NTokenTokenFetcher, + ArbitrumNotionalFinanceV3FCashTokenFetcher, + ArbitrumNotionalFinanceV3SupplyContractPositionFetcher, + EthereumNotionalFinanceV3BorrowContractPositionFetcher, + ], +}) +export class NotionalFinanceV3AppModule extends AbstractApp() {}