From 9031af9893c501b55b09486248e9222f022c5790 Mon Sep 17 00:00:00 2001 From: Will Robertson Date: Sat, 30 Sep 2023 06:09:16 +0000 Subject: [PATCH] (feat) Gravita: Make vessel positions a token pair Use AdminContract to fetch collateral types instead of hardcoding Separate each token (plus GRAI) into their own position definitions --- ...ravita.vessel.contract-position-fetcher.ts | 7 - ...ravita.vessel.contract-position-fetcher.ts | 133 +- .../contracts/abis/admin-contract.json | 1297 ++++++++++++++ .../contracts/abis/borrower-operations.json | 802 +++++++++ .../gravita/contracts/abis/price-feed.json | 620 +++++++ .../gravita/contracts/ethers/AdminContract.ts | 1550 +++++++++++++++++ .../contracts/ethers/BorrowerOperations.ts | 1089 ++++++++++++ .../gravita/contracts/ethers/PriceFeed.ts | 769 ++++++++ .../factories/AdminContract__factory.ts | 1315 ++++++++++++++ .../factories/BorrowerOperations__factory.ts | 820 +++++++++ .../ethers/factories/PriceFeed__factory.ts | 638 +++++++ .../contracts/ethers/factories/index.ts | 3 + src/apps/gravita/contracts/ethers/index.ts | 6 + src/apps/gravita/contracts/index.ts | 20 +- ...ravita.vessel.contract-position-fetcher.ts | 9 - 15 files changed, 8980 insertions(+), 98 deletions(-) create mode 100644 src/apps/gravita/contracts/abis/admin-contract.json create mode 100644 src/apps/gravita/contracts/abis/borrower-operations.json create mode 100644 src/apps/gravita/contracts/abis/price-feed.json create mode 100644 src/apps/gravita/contracts/ethers/AdminContract.ts create mode 100644 src/apps/gravita/contracts/ethers/BorrowerOperations.ts create mode 100644 src/apps/gravita/contracts/ethers/PriceFeed.ts create mode 100644 src/apps/gravita/contracts/ethers/factories/AdminContract__factory.ts create mode 100644 src/apps/gravita/contracts/ethers/factories/BorrowerOperations__factory.ts create mode 100644 src/apps/gravita/contracts/ethers/factories/PriceFeed__factory.ts diff --git a/src/apps/gravita/arbitrum/gravita.vessel.contract-position-fetcher.ts b/src/apps/gravita/arbitrum/gravita.vessel.contract-position-fetcher.ts index 3a48e64da..cca5cd366 100644 --- a/src/apps/gravita/arbitrum/gravita.vessel.contract-position-fetcher.ts +++ b/src/apps/gravita/arbitrum/gravita.vessel.contract-position-fetcher.ts @@ -4,12 +4,5 @@ import { GravitaVesselContractPositionFetcher } from '../common/gravita.vessel.c @PositionTemplate() export class ArbitrumGravitaVesselContractPositionFetcher extends GravitaVesselContractPositionFetcher { - vesselManagerAddress = '0x6adaa3eba85c77e8566b73aefb4c2f39df4046ca'; borrowerOperationsAddress = '0x89f1eccf2644902344db02788a790551bb070351'; - collateralTokenAddresses = [ - '0x5979d7b546e38e414f7e9822514be443a4800529', // wstETH - '0x82af49447d8a07e3bd95bd0d56f35241523fbab1', // WETH - '0x8ffdf2de812095b1d19cb146e4c004587c0a0692', // LUSD - '0xec70dcb4a1efa46b8f2d97c310c9c4790ba5ffa8', // rETH - ]; } diff --git a/src/apps/gravita/common/gravita.vessel.contract-position-fetcher.ts b/src/apps/gravita/common/gravita.vessel.contract-position-fetcher.ts index 15a89245b..bf84228bc 100644 --- a/src/apps/gravita/common/gravita.vessel.contract-position-fetcher.ts +++ b/src/apps/gravita/common/gravita.vessel.contract-position-fetcher.ts @@ -1,24 +1,26 @@ import { Inject } from '@nestjs/common'; -import { BigNumber } from 'ethers'; -import { sumBy } from 'lodash'; import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { drillBalance } from '~app-toolkit/helpers/drill-balance.helper'; +import { getLabelFromToken } from '~app-toolkit/helpers/presentation/image.present'; import { MetaType } from '~position/position.interface'; +import { isSupplied } from '~position/position.utils'; import { ContractPositionTemplatePositionFetcher } from '~position/template/contract-position.template.position-fetcher'; import { - DefaultContractPositionDefinition, + GetDefinitionsParams, GetTokenDefinitionsParams, UnderlyingTokenDefinition, } from '~position/template/contract-position.template.types'; -import { GravitaContractFactory, VesselManager } from '../contracts'; +import { AdminContract, BorrowerOperations, GravitaContractFactory, PriceFeed, VesselManager } from '../contracts'; -export abstract class GravitaVesselContractPositionFetcher extends ContractPositionTemplatePositionFetcher { +export type GravitaVesselDefinition = { + address: string; + collateralAddress: string; +}; + +export abstract class GravitaVesselContractPositionFetcher extends ContractPositionTemplatePositionFetcher { groupLabel = 'Vessel'; - abstract vesselManagerAddress: string; abstract borrowerOperationsAddress: string; - abstract collateralTokenAddresses: string[]; constructor( @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, @@ -27,98 +29,67 @@ export abstract class GravitaVesselContractPositionFetcher extends ContractPosit super(appToolkit); } - getContract(address: string): VesselManager { - return this.gravitaContractFactory.vesselManager({ address, network: this.network }); + // Using BorrowerOperations, rather than VesselManager + // As per https://studio.zapper.fi/docs/concepts/contract-positions#what-address-should-i-use-for-a-contractposition + getContract(address: string): BorrowerOperations { + return this.gravitaContractFactory.borrowerOperations({ address, network: this.network }); } - // Using BorrowerOperations, rather than VesselManager - per https://studio.zapper.fi/docs/concepts/contract-positions#what-address-should-i-use-for-a-contractposition - async getDefinitions(): Promise { - return [{ address: this.borrowerOperationsAddress }]; + getVesselManager(address: string): VesselManager { + return this.gravitaContractFactory.vesselManager({ address, network: this.network }); } - async _getDebtToken(contract: VesselManager): Promise { - return { - metaType: MetaType.BORROWED, - address: await contract.debtToken(), - network: this.network, - }; + getAdminContract(address: string): AdminContract { + return this.gravitaContractFactory.adminContract({ address, network: this.network }); } - async _getCollateralTokens(): Promise { - return this.collateralTokenAddresses.map(collateralAddress => ({ - metaType: MetaType.SUPPLIED, - address: collateralAddress, - network: this.network, - })); + getPriceFeed(address: string): PriceFeed { + return this.gravitaContractFactory.priceFeed({ address, network: this.network }); } - async getPositionsForBalances() { - const defaultContractPositions = await this.appToolkit.getAppContractPositions({ - appId: this.appId, + async getDefinitions({ multicall }: GetDefinitionsParams): Promise { + const contract = this.gravitaContractFactory.borrowerOperations({ + address: this.borrowerOperationsAddress, network: this.network, - groupIds: [this.groupId], }); + const adminContractAddress = await multicall.wrap(contract).adminContract(); + const adminContract = this.getAdminContract(adminContractAddress); + const allCollaterals = await multicall.wrap(adminContract).getValidCollateral(); + return allCollaterals.map(collateralAddress => ({ address: this.borrowerOperationsAddress, collateralAddress })); + } - return this.collateralTokenAddresses.map(collateralToken => { - return { - ...defaultContractPositions[0], - collateralToken, - }; - }); + async _getDebtToken(contract: BorrowerOperations): Promise { + return { + metaType: MetaType.BORROWED, + address: await contract.debtToken(), + network: this.network, + }; } async getTokenDefinitions({ contract, - }: GetTokenDefinitionsParams): Promise { + definition, + }: GetTokenDefinitionsParams): Promise { const debtToken = await this._getDebtToken(contract); - const collateralTokens = await this._getCollateralTokens(); - return [debtToken, ...collateralTokens]; - } - - async getLabel(): Promise { - // async getLabel({ contractPosition }): Promise { - // FIXME: Can't label the Vessel with collateral type, because getLabel is called before getPositionsForBalances, - // and so collateralToken class variable isn't available yet. - // const collateralToken = contractPosition.tokens.find(t => t.address === contractPosition.collateralToken)!; - // return `${getLabelFromToken(collateralToken)} Vessel`; - return 'Gravita Vessel'; + const collateralToken = { + metaType: MetaType.SUPPLIED, + address: definition.collateralAddress, + network: this.network, + }; + return [debtToken, collateralToken]; } - async getBalances(_address: string) { - const multicall = this.appToolkit.getMulticall(this.network); - const address = await this.getAccountAddress(_address); - - const contractPositions = await this.getPositionsForBalances(); - const filteredPositions = await this.filterPositionsForAddress(address, contractPositions); - - const contract = multicall.wrap(this.getContract(this.vesselManagerAddress)); - const balances = await Promise.all( - filteredPositions.map(async contractPosition => { - const balancesRaw = await this.getTokenBalancesPerPosition({ address, contractPosition, contract }); - const allTokens = contractPosition.tokens.map((cp, idx) => - drillBalance(cp, balancesRaw[idx]?.toString() ?? '0', { isDebt: cp.metaType === MetaType.BORROWED }), - ); - - const tokens = allTokens.filter(v => Math.abs(v.balanceUSD) > 0.01); - const balanceUSD = sumBy(tokens, t => t.balanceUSD); - - const balance = { ...contractPosition, tokens, balanceUSD }; - return balance; - }), - ); - - return balances; + async getLabel({ contractPosition }): Promise { + const collateralToken = contractPosition.tokens.find(isSupplied)!; + return `${getLabelFromToken(collateralToken)} Vessel`; } - getTokenBalancesPerPosition({ address, contractPosition, contract }) { - return Promise.all( - contractPosition.tokens.map(token => { - if (token.metaType == MetaType.BORROWED) - return contract.getVesselDebt(contractPosition.collateralToken, address); - else if (token.address == contractPosition.collateralToken) - return contract.getVesselColl(contractPosition.collateralToken, address); - else return BigNumber.from(0); - }), - ); + async getTokenBalancesPerPosition({ address, contractPosition, contract }) { + const vesselManager = this.getVesselManager(await contract.vesselManager()); + const collateral = contractPosition.tokens.find(isSupplied)!; + return Promise.all([ + vesselManager.getVesselDebt(collateral.address, address), + vesselManager.getVesselColl(collateral.address, address), + ]); } } diff --git a/src/apps/gravita/contracts/abis/admin-contract.json b/src/apps/gravita/contracts/abis/admin-contract.json new file mode 100644 index 000000000..828f46a82 --- /dev/null +++ b/src/apps/gravita/contracts/abis/admin-contract.json @@ -0,0 +1,1297 @@ +[ + { + "inputs": [], + "name": "AdminContract__CollateralAlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "AdminContract__OnlyOwner", + "type": "error" + }, + { + "inputs": [], + "name": "AdminContract__OnlyTimelock", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "parameter", + "type": "string" + }, + { + "internalType": "uint256", + "name": "valueEntered", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxValue", + "type": "uint256" + } + ], + "name": "SafeCheckError", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldBorrowingFee", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBorrowingFee", + "type": "uint256" + } + ], + "name": "BorrowingFeeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldCCR", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newCCR", + "type": "uint256" + } + ], + "name": "CCRChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_collateral", + "type": "address" + } + ], + "name": "CollateralAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldMCR", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMCR", + "type": "uint256" + } + ], + "name": "MCRChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldMinNet", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMinNet", + "type": "uint256" + } + ], + "name": "MinNetDebtChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldMintCap", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMintCap", + "type": "uint256" + } + ], + "name": "MintCapChanged", + "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": "uint256", + "name": "oldPercentDiv", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newPercentDiv", + "type": "uint256" + } + ], + "name": "PercentDivisorChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_collateral", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_blockTimestamp", + "type": "uint256" + } + ], + "name": "RedemptionBlockTimestampChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldRedemptionFeeFloor", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newRedemptionFeeFloor", + "type": "uint256" + } + ], + "name": "RedemptionFeeFloorChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "BORROWING_FEE_DEFAULT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CCR_DEFAULT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DECIMAL_PRECISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MCR_DEFAULT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINT_CAP_DEFAULT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIN_NET_DEBT_DEFAULT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NAME", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PERCENT_DIVISOR_DEFAULT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "REDEMPTION_BLOCK_TIMESTAMP_DEFAULT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "REDEMPTION_FEE_FLOOR_DEFAULT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_100pct", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "activePool", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_collateral", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_debtTokenGasCompensation", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_decimals", + "type": "uint256" + } + ], + "name": "addNewCollateral", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "adminContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "authorizeUpgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "borrowerOperations", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "collSurplusPool", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "communityIssuance", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "debtToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "defaultPool", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeCollector", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gasPoolAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_collateral", + "type": "address" + } + ], + "name": "getBorrowingFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_collateral", + "type": "address" + } + ], + "name": "getCcr", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_collateral", + "type": "address" + } + ], + "name": "getDebtTokenGasCompensation", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_collateral", + "type": "address" + } + ], + "name": "getDecimals", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_collateral", + "type": "address" + } + ], + "name": "getIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_colls", + "type": "address[]" + } + ], + "name": "getIndices", + "outputs": [ + { + "internalType": "uint256[]", + "name": "indices", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_collateral", + "type": "address" + } + ], + "name": "getIsActive", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_collateral", + "type": "address" + } + ], + "name": "getMcr", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_collateral", + "type": "address" + } + ], + "name": "getMinNetDebt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_collateral", + "type": "address" + } + ], + "name": "getMintCap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_collateral", + "type": "address" + } + ], + "name": "getPercentDivisor", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_collateral", + "type": "address" + } + ], + "name": "getRedemptionBlockTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_collateral", + "type": "address" + } + ], + "name": "getRedemptionFeeFloor", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_asset", + "type": "address" + } + ], + "name": "getTotalAssetDebt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getValidCollateral", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "grvtStaking", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isSetupInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "priceFeed", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_collateral", + "type": "address" + }, + { + "internalType": "uint256", + "name": "borrowingFee", + "type": "uint256" + } + ], + "name": "setBorrowingFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_collateral", + "type": "address" + }, + { + "internalType": "uint256", + "name": "newCCR", + "type": "uint256" + } + ], + "name": "setCCR", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_collateral", + "type": "address" + }, + { + "internalType": "uint256", + "name": "borrowingFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ccr", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mcr", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minNetDebt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mintCap", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "percentDivisor", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "redemptionFeeFloor", + "type": "uint256" + } + ], + "name": "setCollateralParameters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_collateral", + "type": "address" + }, + { + "internalType": "bool", + "name": "_active", + "type": "bool" + } + ], + "name": "setIsActive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_collateral", + "type": "address" + }, + { + "internalType": "uint256", + "name": "newMCR", + "type": "uint256" + } + ], + "name": "setMCR", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_collateral", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minNetDebt", + "type": "uint256" + } + ], + "name": "setMinNetDebt", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_collateral", + "type": "address" + }, + { + "internalType": "uint256", + "name": "mintCap", + "type": "uint256" + } + ], + "name": "setMintCap", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_collateral", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percentDivisor", + "type": "uint256" + } + ], + "name": "setPercentDivisor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_collateral", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_blockTimestamp", + "type": "uint256" + } + ], + "name": "setRedemptionBlockTimestamp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_collateral", + "type": "address" + }, + { + "internalType": "uint256", + "name": "redemptionFeeFloor", + "type": "uint256" + } + ], + "name": "setRedemptionFeeFloor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "setSetupIsInitialized", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sortedVessels", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "stabilityPool", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "timelockAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "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": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "validCollateral", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vesselManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vesselManagerOperations", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/src/apps/gravita/contracts/abis/borrower-operations.json b/src/apps/gravita/contracts/abis/borrower-operations.json new file mode 100644 index 000000000..c486e0580 --- /dev/null +++ b/src/apps/gravita/contracts/abis/borrower-operations.json @@ -0,0 +1,802 @@ +[ + { + "inputs": [], + "name": "EthUnsupportedError", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAmountError", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_asset", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_borrower", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_feeAmount", + "type": "uint256" + } + ], + "name": "BorrowingFeePaid", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "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": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_asset", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_borrower", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "arrayIndex", + "type": "uint256" + } + ], + "name": "VesselCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_asset", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_borrower", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_debt", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_coll", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "stake", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "enum IBorrowerOperations.BorrowerOperation", + "name": "operation", + "type": "uint8" + } + ], + "name": "VesselUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "DECIMAL_PRECISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NAME", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "activePool", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_assetSent", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_upperHint", + "type": "address" + }, + { + "internalType": "address", + "name": "_lowerHint", + "type": "address" + } + ], + "name": "addColl", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_assetSent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_collWithdrawal", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_debtTokenChange", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_isDebtIncrease", + "type": "bool" + }, + { + "internalType": "address", + "name": "_upperHint", + "type": "address" + }, + { + "internalType": "address", + "name": "_lowerHint", + "type": "address" + } + ], + "name": "adjustVessel", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "adminContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "authorizeUpgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "borrowerOperations", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_asset", + "type": "address" + } + ], + "name": "claimCollateral", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_asset", + "type": "address" + } + ], + "name": "closeVessel", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "collSurplusPool", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "communityIssuance", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "debtToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "defaultPool", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeCollector", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gasPoolAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_debt", + "type": "uint256" + } + ], + "name": "getCompositeDebt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_asset", + "type": "address" + } + ], + "name": "getEntireSystemColl", + "outputs": [ + { + "internalType": "uint256", + "name": "entireSystemColl", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_asset", + "type": "address" + } + ], + "name": "getEntireSystemDebt", + "outputs": [ + { + "internalType": "uint256", + "name": "entireSystemDebt", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "grvtStaking", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_assetAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_debtTokenAmount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_upperHint", + "type": "address" + }, + { + "internalType": "address", + "name": "_lowerHint", + "type": "address" + } + ], + "name": "openVessel", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "priceFeed", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_debtTokenAmount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_upperHint", + "type": "address" + }, + { + "internalType": "address", + "name": "_lowerHint", + "type": "address" + } + ], + "name": "repayDebtTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sortedVessels", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "stabilityPool", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "timelockAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "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": [], + "name": "vesselManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vesselManagerOperations", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_collWithdrawal", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_upperHint", + "type": "address" + }, + { + "internalType": "address", + "name": "_lowerHint", + "type": "address" + } + ], + "name": "withdrawColl", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_debtTokenAmount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_upperHint", + "type": "address" + }, + { + "internalType": "address", + "name": "_lowerHint", + "type": "address" + } + ], + "name": "withdrawDebtTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/src/apps/gravita/contracts/abis/price-feed.json b/src/apps/gravita/contracts/abis/price-feed.json new file mode 100644 index 000000000..0ba5cd2f1 --- /dev/null +++ b/src/apps/gravita/contracts/abis/price-feed.json @@ -0,0 +1,620 @@ +[ + { + "inputs": [], + "name": "PriceFeed__ExistingOracleRequired", + "type": "error" + }, + { + "inputs": [], + "name": "PriceFeed__InvalidDecimalsError", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "PriceFeed__InvalidOracleResponseError", + "type": "error" + }, + { + "inputs": [], + "name": "PriceFeed__TimelockOnlyError", + "type": "error" + }, + { + "inputs": [], + "name": "PriceFeed__UnknownAssetError", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "oracleAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isEthIndexed", + "type": "bool" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isFallback", + "type": "bool" + } + ], + "name": "NewOracleRegistered", + "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": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "NAME", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "TARGET_DIGITS", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "activePool", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "adminContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "authorizeUpgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "borrowerOperations", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "collSurplusPool", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "communityIssuance", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "debtToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "defaultPool", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "fallbacks", + "outputs": [ + { + "internalType": "address", + "name": "oracleAddress", + "type": "address" + }, + { + "internalType": "enum IPriceFeed.ProviderType", + "name": "providerType", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "timeoutSeconds", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "decimals", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isEthIndexed", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeCollector", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + } + ], + "name": "fetchPrice", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gasPoolAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "grvtStaking", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "oracles", + "outputs": [ + { + "internalType": "address", + "name": "oracleAddress", + "type": "address" + }, + { + "internalType": "enum IPriceFeed.ProviderType", + "name": "providerType", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "timeoutSeconds", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "decimals", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isEthIndexed", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "priceFeed", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_oracle", + "type": "address" + }, + { + "internalType": "enum IPriceFeed.ProviderType", + "name": "_type", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "_timeoutSeconds", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_isEthIndexed", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_isFallback", + "type": "bool" + } + ], + "name": "setOracle", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sortedVessels", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "stabilityPool", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "timelockAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "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": [], + "name": "vesselManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vesselManagerOperations", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/src/apps/gravita/contracts/ethers/AdminContract.ts b/src/apps/gravita/contracts/ethers/AdminContract.ts new file mode 100644 index 000000000..2bdabe9c2 --- /dev/null +++ b/src/apps/gravita/contracts/ethers/AdminContract.ts @@ -0,0 +1,1550 @@ +/* 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 AdminContractInterface extends utils.Interface { + functions: { + 'BORROWING_FEE_DEFAULT()': FunctionFragment; + 'CCR_DEFAULT()': FunctionFragment; + 'DECIMAL_PRECISION()': FunctionFragment; + 'MCR_DEFAULT()': FunctionFragment; + 'MINT_CAP_DEFAULT()': FunctionFragment; + 'MIN_NET_DEBT_DEFAULT()': FunctionFragment; + 'NAME()': FunctionFragment; + 'PERCENT_DIVISOR_DEFAULT()': FunctionFragment; + 'REDEMPTION_BLOCK_TIMESTAMP_DEFAULT()': FunctionFragment; + 'REDEMPTION_FEE_FLOOR_DEFAULT()': FunctionFragment; + '_100pct()': FunctionFragment; + 'activePool()': FunctionFragment; + 'addNewCollateral(address,uint256,uint256)': FunctionFragment; + 'adminContract()': FunctionFragment; + 'authorizeUpgrade(address)': FunctionFragment; + 'borrowerOperations()': FunctionFragment; + 'collSurplusPool()': FunctionFragment; + 'communityIssuance()': FunctionFragment; + 'debtToken()': FunctionFragment; + 'defaultPool()': FunctionFragment; + 'feeCollector()': FunctionFragment; + 'gasPoolAddress()': FunctionFragment; + 'getBorrowingFee(address)': FunctionFragment; + 'getCcr(address)': FunctionFragment; + 'getDebtTokenGasCompensation(address)': FunctionFragment; + 'getDecimals(address)': FunctionFragment; + 'getIndex(address)': FunctionFragment; + 'getIndices(address[])': FunctionFragment; + 'getIsActive(address)': FunctionFragment; + 'getMcr(address)': FunctionFragment; + 'getMinNetDebt(address)': FunctionFragment; + 'getMintCap(address)': FunctionFragment; + 'getPercentDivisor(address)': FunctionFragment; + 'getRedemptionBlockTimestamp(address)': FunctionFragment; + 'getRedemptionFeeFloor(address)': FunctionFragment; + 'getTotalAssetDebt(address)': FunctionFragment; + 'getValidCollateral()': FunctionFragment; + 'grvtStaking()': FunctionFragment; + 'initialize()': FunctionFragment; + 'isSetupInitialized()': FunctionFragment; + 'owner()': FunctionFragment; + 'priceFeed()': FunctionFragment; + 'proxiableUUID()': FunctionFragment; + 'renounceOwnership()': FunctionFragment; + 'setBorrowingFee(address,uint256)': FunctionFragment; + 'setCCR(address,uint256)': FunctionFragment; + 'setCollateralParameters(address,uint256,uint256,uint256,uint256,uint256,uint256,uint256)': FunctionFragment; + 'setIsActive(address,bool)': FunctionFragment; + 'setMCR(address,uint256)': FunctionFragment; + 'setMinNetDebt(address,uint256)': FunctionFragment; + 'setMintCap(address,uint256)': FunctionFragment; + 'setPercentDivisor(address,uint256)': FunctionFragment; + 'setRedemptionBlockTimestamp(address,uint256)': FunctionFragment; + 'setRedemptionFeeFloor(address,uint256)': FunctionFragment; + 'setSetupIsInitialized()': FunctionFragment; + 'sortedVessels()': FunctionFragment; + 'stabilityPool()': FunctionFragment; + 'timelockAddress()': FunctionFragment; + 'transferOwnership(address)': FunctionFragment; + 'treasuryAddress()': FunctionFragment; + 'upgradeTo(address)': FunctionFragment; + 'upgradeToAndCall(address,bytes)': FunctionFragment; + 'validCollateral(uint256)': FunctionFragment; + 'vesselManager()': FunctionFragment; + 'vesselManagerOperations()': FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | 'BORROWING_FEE_DEFAULT' + | 'CCR_DEFAULT' + | 'DECIMAL_PRECISION' + | 'MCR_DEFAULT' + | 'MINT_CAP_DEFAULT' + | 'MIN_NET_DEBT_DEFAULT' + | 'NAME' + | 'PERCENT_DIVISOR_DEFAULT' + | 'REDEMPTION_BLOCK_TIMESTAMP_DEFAULT' + | 'REDEMPTION_FEE_FLOOR_DEFAULT' + | '_100pct' + | 'activePool' + | 'addNewCollateral' + | 'adminContract' + | 'authorizeUpgrade' + | 'borrowerOperations' + | 'collSurplusPool' + | 'communityIssuance' + | 'debtToken' + | 'defaultPool' + | 'feeCollector' + | 'gasPoolAddress' + | 'getBorrowingFee' + | 'getCcr' + | 'getDebtTokenGasCompensation' + | 'getDecimals' + | 'getIndex' + | 'getIndices' + | 'getIsActive' + | 'getMcr' + | 'getMinNetDebt' + | 'getMintCap' + | 'getPercentDivisor' + | 'getRedemptionBlockTimestamp' + | 'getRedemptionFeeFloor' + | 'getTotalAssetDebt' + | 'getValidCollateral' + | 'grvtStaking' + | 'initialize' + | 'isSetupInitialized' + | 'owner' + | 'priceFeed' + | 'proxiableUUID' + | 'renounceOwnership' + | 'setBorrowingFee' + | 'setCCR' + | 'setCollateralParameters' + | 'setIsActive' + | 'setMCR' + | 'setMinNetDebt' + | 'setMintCap' + | 'setPercentDivisor' + | 'setRedemptionBlockTimestamp' + | 'setRedemptionFeeFloor' + | 'setSetupIsInitialized' + | 'sortedVessels' + | 'stabilityPool' + | 'timelockAddress' + | 'transferOwnership' + | 'treasuryAddress' + | 'upgradeTo' + | 'upgradeToAndCall' + | 'validCollateral' + | 'vesselManager' + | 'vesselManagerOperations', + ): FunctionFragment; + + encodeFunctionData(functionFragment: 'BORROWING_FEE_DEFAULT', values?: undefined): string; + encodeFunctionData(functionFragment: 'CCR_DEFAULT', values?: undefined): string; + encodeFunctionData(functionFragment: 'DECIMAL_PRECISION', values?: undefined): string; + encodeFunctionData(functionFragment: 'MCR_DEFAULT', values?: undefined): string; + encodeFunctionData(functionFragment: 'MINT_CAP_DEFAULT', values?: undefined): string; + encodeFunctionData(functionFragment: 'MIN_NET_DEBT_DEFAULT', values?: undefined): string; + encodeFunctionData(functionFragment: 'NAME', values?: undefined): string; + encodeFunctionData(functionFragment: 'PERCENT_DIVISOR_DEFAULT', values?: undefined): string; + encodeFunctionData(functionFragment: 'REDEMPTION_BLOCK_TIMESTAMP_DEFAULT', values?: undefined): string; + encodeFunctionData(functionFragment: 'REDEMPTION_FEE_FLOOR_DEFAULT', values?: undefined): string; + encodeFunctionData(functionFragment: '_100pct', values?: undefined): string; + encodeFunctionData(functionFragment: 'activePool', values?: undefined): string; + encodeFunctionData( + functionFragment: 'addNewCollateral', + values: [PromiseOrValue, PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'adminContract', values?: undefined): string; + encodeFunctionData(functionFragment: 'authorizeUpgrade', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'borrowerOperations', values?: undefined): string; + encodeFunctionData(functionFragment: 'collSurplusPool', values?: undefined): string; + encodeFunctionData(functionFragment: 'communityIssuance', values?: undefined): string; + encodeFunctionData(functionFragment: 'debtToken', values?: undefined): string; + encodeFunctionData(functionFragment: 'defaultPool', values?: undefined): string; + encodeFunctionData(functionFragment: 'feeCollector', values?: undefined): string; + encodeFunctionData(functionFragment: 'gasPoolAddress', values?: undefined): string; + encodeFunctionData(functionFragment: 'getBorrowingFee', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'getCcr', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'getDebtTokenGasCompensation', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'getDecimals', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'getIndex', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'getIndices', values: [PromiseOrValue[]]): string; + encodeFunctionData(functionFragment: 'getIsActive', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'getMcr', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'getMinNetDebt', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'getMintCap', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'getPercentDivisor', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'getRedemptionBlockTimestamp', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'getRedemptionFeeFloor', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'getTotalAssetDebt', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'getValidCollateral', values?: undefined): string; + encodeFunctionData(functionFragment: 'grvtStaking', values?: undefined): string; + encodeFunctionData(functionFragment: 'initialize', values?: undefined): string; + encodeFunctionData(functionFragment: 'isSetupInitialized', values?: undefined): string; + encodeFunctionData(functionFragment: 'owner', values?: undefined): string; + encodeFunctionData(functionFragment: 'priceFeed', values?: undefined): string; + encodeFunctionData(functionFragment: 'proxiableUUID', values?: undefined): string; + encodeFunctionData(functionFragment: 'renounceOwnership', values?: undefined): string; + encodeFunctionData( + functionFragment: 'setBorrowingFee', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'setCCR', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'setCollateralParameters', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData( + functionFragment: 'setIsActive', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'setMCR', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'setMinNetDebt', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'setMintCap', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'setPercentDivisor', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'setRedemptionBlockTimestamp', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'setRedemptionFeeFloor', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'setSetupIsInitialized', values?: undefined): string; + encodeFunctionData(functionFragment: 'sortedVessels', values?: undefined): string; + encodeFunctionData(functionFragment: 'stabilityPool', values?: undefined): string; + encodeFunctionData(functionFragment: 'timelockAddress', values?: undefined): string; + encodeFunctionData(functionFragment: 'transferOwnership', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'treasuryAddress', values?: undefined): string; + encodeFunctionData(functionFragment: 'upgradeTo', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'upgradeToAndCall', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'validCollateral', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'vesselManager', values?: undefined): string; + encodeFunctionData(functionFragment: 'vesselManagerOperations', values?: undefined): string; + + decodeFunctionResult(functionFragment: 'BORROWING_FEE_DEFAULT', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'CCR_DEFAULT', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'DECIMAL_PRECISION', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'MCR_DEFAULT', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'MINT_CAP_DEFAULT', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'MIN_NET_DEBT_DEFAULT', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'NAME', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'PERCENT_DIVISOR_DEFAULT', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'REDEMPTION_BLOCK_TIMESTAMP_DEFAULT', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'REDEMPTION_FEE_FLOOR_DEFAULT', data: BytesLike): Result; + decodeFunctionResult(functionFragment: '_100pct', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'activePool', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'addNewCollateral', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'adminContract', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'authorizeUpgrade', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'borrowerOperations', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'collSurplusPool', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'communityIssuance', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'debtToken', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'defaultPool', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'feeCollector', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'gasPoolAddress', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getBorrowingFee', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getCcr', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getDebtTokenGasCompensation', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getDecimals', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getIndex', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getIndices', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getIsActive', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getMcr', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getMinNetDebt', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getMintCap', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getPercentDivisor', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getRedemptionBlockTimestamp', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getRedemptionFeeFloor', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getTotalAssetDebt', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getValidCollateral', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'grvtStaking', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'initialize', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'isSetupInitialized', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'owner', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'priceFeed', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'proxiableUUID', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'renounceOwnership', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setBorrowingFee', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setCCR', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setCollateralParameters', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setIsActive', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setMCR', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setMinNetDebt', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setMintCap', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setPercentDivisor', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setRedemptionBlockTimestamp', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setRedemptionFeeFloor', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setSetupIsInitialized', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'sortedVessels', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'stabilityPool', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'timelockAddress', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'transferOwnership', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'treasuryAddress', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'upgradeTo', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'upgradeToAndCall', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'validCollateral', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'vesselManager', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'vesselManagerOperations', data: BytesLike): Result; + + events: { + 'AdminChanged(address,address)': EventFragment; + 'BeaconUpgraded(address)': EventFragment; + 'BorrowingFeeChanged(uint256,uint256)': EventFragment; + 'CCRChanged(uint256,uint256)': EventFragment; + 'CollateralAdded(address)': EventFragment; + 'Initialized(uint8)': EventFragment; + 'MCRChanged(uint256,uint256)': EventFragment; + 'MinNetDebtChanged(uint256,uint256)': EventFragment; + 'MintCapChanged(uint256,uint256)': EventFragment; + 'OwnershipTransferred(address,address)': EventFragment; + 'PercentDivisorChanged(uint256,uint256)': EventFragment; + 'RedemptionBlockTimestampChanged(address,uint256)': EventFragment; + 'RedemptionFeeFloorChanged(uint256,uint256)': EventFragment; + 'Upgraded(address)': EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: 'AdminChanged'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'BeaconUpgraded'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'BorrowingFeeChanged'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'CCRChanged'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'CollateralAdded'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Initialized'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'MCRChanged'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'MinNetDebtChanged'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'MintCapChanged'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'OwnershipTransferred'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'PercentDivisorChanged'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'RedemptionBlockTimestampChanged'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'RedemptionFeeFloorChanged'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Upgraded'): EventFragment; +} + +export interface AdminChangedEventObject { + previousAdmin: string; + newAdmin: string; +} +export type AdminChangedEvent = TypedEvent<[string, string], AdminChangedEventObject>; + +export type AdminChangedEventFilter = TypedEventFilter; + +export interface BeaconUpgradedEventObject { + beacon: string; +} +export type BeaconUpgradedEvent = TypedEvent<[string], BeaconUpgradedEventObject>; + +export type BeaconUpgradedEventFilter = TypedEventFilter; + +export interface BorrowingFeeChangedEventObject { + oldBorrowingFee: BigNumber; + newBorrowingFee: BigNumber; +} +export type BorrowingFeeChangedEvent = TypedEvent<[BigNumber, BigNumber], BorrowingFeeChangedEventObject>; + +export type BorrowingFeeChangedEventFilter = TypedEventFilter; + +export interface CCRChangedEventObject { + oldCCR: BigNumber; + newCCR: BigNumber; +} +export type CCRChangedEvent = TypedEvent<[BigNumber, BigNumber], CCRChangedEventObject>; + +export type CCRChangedEventFilter = TypedEventFilter; + +export interface CollateralAddedEventObject { + _collateral: string; +} +export type CollateralAddedEvent = TypedEvent<[string], CollateralAddedEventObject>; + +export type CollateralAddedEventFilter = TypedEventFilter; + +export interface InitializedEventObject { + version: number; +} +export type InitializedEvent = TypedEvent<[number], InitializedEventObject>; + +export type InitializedEventFilter = TypedEventFilter; + +export interface MCRChangedEventObject { + oldMCR: BigNumber; + newMCR: BigNumber; +} +export type MCRChangedEvent = TypedEvent<[BigNumber, BigNumber], MCRChangedEventObject>; + +export type MCRChangedEventFilter = TypedEventFilter; + +export interface MinNetDebtChangedEventObject { + oldMinNet: BigNumber; + newMinNet: BigNumber; +} +export type MinNetDebtChangedEvent = TypedEvent<[BigNumber, BigNumber], MinNetDebtChangedEventObject>; + +export type MinNetDebtChangedEventFilter = TypedEventFilter; + +export interface MintCapChangedEventObject { + oldMintCap: BigNumber; + newMintCap: BigNumber; +} +export type MintCapChangedEvent = TypedEvent<[BigNumber, BigNumber], MintCapChangedEventObject>; + +export type MintCapChangedEventFilter = TypedEventFilter; + +export interface OwnershipTransferredEventObject { + previousOwner: string; + newOwner: string; +} +export type OwnershipTransferredEvent = TypedEvent<[string, string], OwnershipTransferredEventObject>; + +export type OwnershipTransferredEventFilter = TypedEventFilter; + +export interface PercentDivisorChangedEventObject { + oldPercentDiv: BigNumber; + newPercentDiv: BigNumber; +} +export type PercentDivisorChangedEvent = TypedEvent<[BigNumber, BigNumber], PercentDivisorChangedEventObject>; + +export type PercentDivisorChangedEventFilter = TypedEventFilter; + +export interface RedemptionBlockTimestampChangedEventObject { + _collateral: string; + _blockTimestamp: BigNumber; +} +export type RedemptionBlockTimestampChangedEvent = TypedEvent< + [string, BigNumber], + RedemptionBlockTimestampChangedEventObject +>; + +export type RedemptionBlockTimestampChangedEventFilter = TypedEventFilter; + +export interface RedemptionFeeFloorChangedEventObject { + oldRedemptionFeeFloor: BigNumber; + newRedemptionFeeFloor: BigNumber; +} +export type RedemptionFeeFloorChangedEvent = TypedEvent<[BigNumber, BigNumber], RedemptionFeeFloorChangedEventObject>; + +export type RedemptionFeeFloorChangedEventFilter = TypedEventFilter; + +export interface UpgradedEventObject { + implementation: string; +} +export type UpgradedEvent = TypedEvent<[string], UpgradedEventObject>; + +export type UpgradedEventFilter = TypedEventFilter; + +export interface AdminContract extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: AdminContractInterface; + + 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: { + BORROWING_FEE_DEFAULT(overrides?: CallOverrides): Promise<[BigNumber]>; + + CCR_DEFAULT(overrides?: CallOverrides): Promise<[BigNumber]>; + + DECIMAL_PRECISION(overrides?: CallOverrides): Promise<[BigNumber]>; + + MCR_DEFAULT(overrides?: CallOverrides): Promise<[BigNumber]>; + + MINT_CAP_DEFAULT(overrides?: CallOverrides): Promise<[BigNumber]>; + + MIN_NET_DEBT_DEFAULT(overrides?: CallOverrides): Promise<[BigNumber]>; + + NAME(overrides?: CallOverrides): Promise<[string]>; + + PERCENT_DIVISOR_DEFAULT(overrides?: CallOverrides): Promise<[BigNumber]>; + + REDEMPTION_BLOCK_TIMESTAMP_DEFAULT(overrides?: CallOverrides): Promise<[BigNumber]>; + + REDEMPTION_FEE_FLOOR_DEFAULT(overrides?: CallOverrides): Promise<[BigNumber]>; + + _100pct(overrides?: CallOverrides): Promise<[BigNumber]>; + + activePool(overrides?: CallOverrides): Promise<[string]>; + + addNewCollateral( + _collateral: PromiseOrValue, + _debtTokenGasCompensation: PromiseOrValue, + _decimals: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + adminContract(overrides?: CallOverrides): Promise<[string]>; + + authorizeUpgrade( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + borrowerOperations(overrides?: CallOverrides): Promise<[string]>; + + collSurplusPool(overrides?: CallOverrides): Promise<[string]>; + + communityIssuance(overrides?: CallOverrides): Promise<[string]>; + + debtToken(overrides?: CallOverrides): Promise<[string]>; + + defaultPool(overrides?: CallOverrides): Promise<[string]>; + + feeCollector(overrides?: CallOverrides): Promise<[string]>; + + gasPoolAddress(overrides?: CallOverrides): Promise<[string]>; + + getBorrowingFee(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + getCcr(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + getDebtTokenGasCompensation(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + getDecimals(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + getIndex(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + getIndices( + _colls: PromiseOrValue[], + overrides?: CallOverrides, + ): Promise<[BigNumber[]] & { indices: BigNumber[] }>; + + getIsActive(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise<[boolean]>; + + getMcr(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + getMinNetDebt(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + getMintCap(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + getPercentDivisor(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + getRedemptionBlockTimestamp(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + getRedemptionFeeFloor(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + getTotalAssetDebt(_asset: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + getValidCollateral(overrides?: CallOverrides): Promise<[string[]]>; + + grvtStaking(overrides?: CallOverrides): Promise<[string]>; + + initialize(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + isSetupInitialized(overrides?: CallOverrides): Promise<[boolean]>; + + owner(overrides?: CallOverrides): Promise<[string]>; + + priceFeed(overrides?: CallOverrides): Promise<[string]>; + + proxiableUUID(overrides?: CallOverrides): Promise<[string]>; + + renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + setBorrowingFee( + _collateral: PromiseOrValue, + borrowingFee: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setCCR( + _collateral: PromiseOrValue, + newCCR: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setCollateralParameters( + _collateral: PromiseOrValue, + borrowingFee: PromiseOrValue, + ccr: PromiseOrValue, + mcr: PromiseOrValue, + minNetDebt: PromiseOrValue, + mintCap: PromiseOrValue, + percentDivisor: PromiseOrValue, + redemptionFeeFloor: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setIsActive( + _collateral: PromiseOrValue, + _active: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMCR( + _collateral: PromiseOrValue, + newMCR: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMinNetDebt( + _collateral: PromiseOrValue, + minNetDebt: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMintCap( + _collateral: PromiseOrValue, + mintCap: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setPercentDivisor( + _collateral: PromiseOrValue, + percentDivisor: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setRedemptionBlockTimestamp( + _collateral: PromiseOrValue, + _blockTimestamp: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setRedemptionFeeFloor( + _collateral: PromiseOrValue, + redemptionFeeFloor: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setSetupIsInitialized(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + sortedVessels(overrides?: CallOverrides): Promise<[string]>; + + stabilityPool(overrides?: CallOverrides): Promise<[string]>; + + timelockAddress(overrides?: CallOverrides): Promise<[string]>; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + treasuryAddress(overrides?: CallOverrides): Promise<[string]>; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + validCollateral(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + + vesselManager(overrides?: CallOverrides): Promise<[string]>; + + vesselManagerOperations(overrides?: CallOverrides): Promise<[string]>; + }; + + BORROWING_FEE_DEFAULT(overrides?: CallOverrides): Promise; + + CCR_DEFAULT(overrides?: CallOverrides): Promise; + + DECIMAL_PRECISION(overrides?: CallOverrides): Promise; + + MCR_DEFAULT(overrides?: CallOverrides): Promise; + + MINT_CAP_DEFAULT(overrides?: CallOverrides): Promise; + + MIN_NET_DEBT_DEFAULT(overrides?: CallOverrides): Promise; + + NAME(overrides?: CallOverrides): Promise; + + PERCENT_DIVISOR_DEFAULT(overrides?: CallOverrides): Promise; + + REDEMPTION_BLOCK_TIMESTAMP_DEFAULT(overrides?: CallOverrides): Promise; + + REDEMPTION_FEE_FLOOR_DEFAULT(overrides?: CallOverrides): Promise; + + _100pct(overrides?: CallOverrides): Promise; + + activePool(overrides?: CallOverrides): Promise; + + addNewCollateral( + _collateral: PromiseOrValue, + _debtTokenGasCompensation: PromiseOrValue, + _decimals: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + adminContract(overrides?: CallOverrides): Promise; + + authorizeUpgrade( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + borrowerOperations(overrides?: CallOverrides): Promise; + + collSurplusPool(overrides?: CallOverrides): Promise; + + communityIssuance(overrides?: CallOverrides): Promise; + + debtToken(overrides?: CallOverrides): Promise; + + defaultPool(overrides?: CallOverrides): Promise; + + feeCollector(overrides?: CallOverrides): Promise; + + gasPoolAddress(overrides?: CallOverrides): Promise; + + getBorrowingFee(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getCcr(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getDebtTokenGasCompensation(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getDecimals(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getIndex(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getIndices(_colls: PromiseOrValue[], overrides?: CallOverrides): Promise; + + getIsActive(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getMcr(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getMinNetDebt(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getMintCap(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getPercentDivisor(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getRedemptionBlockTimestamp(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getRedemptionFeeFloor(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getTotalAssetDebt(_asset: PromiseOrValue, overrides?: CallOverrides): Promise; + + getValidCollateral(overrides?: CallOverrides): Promise; + + grvtStaking(overrides?: CallOverrides): Promise; + + initialize(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + isSetupInitialized(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + priceFeed(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + setBorrowingFee( + _collateral: PromiseOrValue, + borrowingFee: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setCCR( + _collateral: PromiseOrValue, + newCCR: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setCollateralParameters( + _collateral: PromiseOrValue, + borrowingFee: PromiseOrValue, + ccr: PromiseOrValue, + mcr: PromiseOrValue, + minNetDebt: PromiseOrValue, + mintCap: PromiseOrValue, + percentDivisor: PromiseOrValue, + redemptionFeeFloor: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setIsActive( + _collateral: PromiseOrValue, + _active: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMCR( + _collateral: PromiseOrValue, + newMCR: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMinNetDebt( + _collateral: PromiseOrValue, + minNetDebt: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMintCap( + _collateral: PromiseOrValue, + mintCap: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setPercentDivisor( + _collateral: PromiseOrValue, + percentDivisor: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setRedemptionBlockTimestamp( + _collateral: PromiseOrValue, + _blockTimestamp: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setRedemptionFeeFloor( + _collateral: PromiseOrValue, + redemptionFeeFloor: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setSetupIsInitialized(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + sortedVessels(overrides?: CallOverrides): Promise; + + stabilityPool(overrides?: CallOverrides): Promise; + + timelockAddress(overrides?: CallOverrides): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + treasuryAddress(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + validCollateral(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + + vesselManager(overrides?: CallOverrides): Promise; + + vesselManagerOperations(overrides?: CallOverrides): Promise; + + callStatic: { + BORROWING_FEE_DEFAULT(overrides?: CallOverrides): Promise; + + CCR_DEFAULT(overrides?: CallOverrides): Promise; + + DECIMAL_PRECISION(overrides?: CallOverrides): Promise; + + MCR_DEFAULT(overrides?: CallOverrides): Promise; + + MINT_CAP_DEFAULT(overrides?: CallOverrides): Promise; + + MIN_NET_DEBT_DEFAULT(overrides?: CallOverrides): Promise; + + NAME(overrides?: CallOverrides): Promise; + + PERCENT_DIVISOR_DEFAULT(overrides?: CallOverrides): Promise; + + REDEMPTION_BLOCK_TIMESTAMP_DEFAULT(overrides?: CallOverrides): Promise; + + REDEMPTION_FEE_FLOOR_DEFAULT(overrides?: CallOverrides): Promise; + + _100pct(overrides?: CallOverrides): Promise; + + activePool(overrides?: CallOverrides): Promise; + + addNewCollateral( + _collateral: PromiseOrValue, + _debtTokenGasCompensation: PromiseOrValue, + _decimals: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + adminContract(overrides?: CallOverrides): Promise; + + authorizeUpgrade(newImplementation: PromiseOrValue, overrides?: CallOverrides): Promise; + + borrowerOperations(overrides?: CallOverrides): Promise; + + collSurplusPool(overrides?: CallOverrides): Promise; + + communityIssuance(overrides?: CallOverrides): Promise; + + debtToken(overrides?: CallOverrides): Promise; + + defaultPool(overrides?: CallOverrides): Promise; + + feeCollector(overrides?: CallOverrides): Promise; + + gasPoolAddress(overrides?: CallOverrides): Promise; + + getBorrowingFee(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getCcr(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getDebtTokenGasCompensation(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getDecimals(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getIndex(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getIndices(_colls: PromiseOrValue[], overrides?: CallOverrides): Promise; + + getIsActive(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getMcr(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getMinNetDebt(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getMintCap(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getPercentDivisor(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getRedemptionBlockTimestamp(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getRedemptionFeeFloor(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getTotalAssetDebt(_asset: PromiseOrValue, overrides?: CallOverrides): Promise; + + getValidCollateral(overrides?: CallOverrides): Promise; + + grvtStaking(overrides?: CallOverrides): Promise; + + initialize(overrides?: CallOverrides): Promise; + + isSetupInitialized(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + priceFeed(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: CallOverrides): Promise; + + setBorrowingFee( + _collateral: PromiseOrValue, + borrowingFee: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + setCCR( + _collateral: PromiseOrValue, + newCCR: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + setCollateralParameters( + _collateral: PromiseOrValue, + borrowingFee: PromiseOrValue, + ccr: PromiseOrValue, + mcr: PromiseOrValue, + minNetDebt: PromiseOrValue, + mintCap: PromiseOrValue, + percentDivisor: PromiseOrValue, + redemptionFeeFloor: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + setIsActive( + _collateral: PromiseOrValue, + _active: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + setMCR( + _collateral: PromiseOrValue, + newMCR: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + setMinNetDebt( + _collateral: PromiseOrValue, + minNetDebt: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + setMintCap( + _collateral: PromiseOrValue, + mintCap: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + setPercentDivisor( + _collateral: PromiseOrValue, + percentDivisor: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + setRedemptionBlockTimestamp( + _collateral: PromiseOrValue, + _blockTimestamp: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + setRedemptionFeeFloor( + _collateral: PromiseOrValue, + redemptionFeeFloor: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + setSetupIsInitialized(overrides?: CallOverrides): Promise; + + sortedVessels(overrides?: CallOverrides): Promise; + + stabilityPool(overrides?: CallOverrides): Promise; + + timelockAddress(overrides?: CallOverrides): Promise; + + transferOwnership(newOwner: PromiseOrValue, overrides?: CallOverrides): Promise; + + treasuryAddress(overrides?: CallOverrides): Promise; + + upgradeTo(newImplementation: PromiseOrValue, overrides?: CallOverrides): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + validCollateral(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + + vesselManager(overrides?: CallOverrides): Promise; + + vesselManagerOperations(overrides?: CallOverrides): Promise; + }; + + filters: { + 'AdminChanged(address,address)'(previousAdmin?: null, newAdmin?: null): AdminChangedEventFilter; + AdminChanged(previousAdmin?: null, newAdmin?: null): AdminChangedEventFilter; + + 'BeaconUpgraded(address)'(beacon?: PromiseOrValue | null): BeaconUpgradedEventFilter; + BeaconUpgraded(beacon?: PromiseOrValue | null): BeaconUpgradedEventFilter; + + 'BorrowingFeeChanged(uint256,uint256)'( + oldBorrowingFee?: null, + newBorrowingFee?: null, + ): BorrowingFeeChangedEventFilter; + BorrowingFeeChanged(oldBorrowingFee?: null, newBorrowingFee?: null): BorrowingFeeChangedEventFilter; + + 'CCRChanged(uint256,uint256)'(oldCCR?: null, newCCR?: null): CCRChangedEventFilter; + CCRChanged(oldCCR?: null, newCCR?: null): CCRChangedEventFilter; + + 'CollateralAdded(address)'(_collateral?: null): CollateralAddedEventFilter; + CollateralAdded(_collateral?: null): CollateralAddedEventFilter; + + 'Initialized(uint8)'(version?: null): InitializedEventFilter; + Initialized(version?: null): InitializedEventFilter; + + 'MCRChanged(uint256,uint256)'(oldMCR?: null, newMCR?: null): MCRChangedEventFilter; + MCRChanged(oldMCR?: null, newMCR?: null): MCRChangedEventFilter; + + 'MinNetDebtChanged(uint256,uint256)'(oldMinNet?: null, newMinNet?: null): MinNetDebtChangedEventFilter; + MinNetDebtChanged(oldMinNet?: null, newMinNet?: null): MinNetDebtChangedEventFilter; + + 'MintCapChanged(uint256,uint256)'(oldMintCap?: null, newMintCap?: null): MintCapChangedEventFilter; + MintCapChanged(oldMintCap?: null, newMintCap?: null): MintCapChangedEventFilter; + + 'OwnershipTransferred(address,address)'( + previousOwner?: PromiseOrValue | null, + newOwner?: PromiseOrValue | null, + ): OwnershipTransferredEventFilter; + OwnershipTransferred( + previousOwner?: PromiseOrValue | null, + newOwner?: PromiseOrValue | null, + ): OwnershipTransferredEventFilter; + + 'PercentDivisorChanged(uint256,uint256)'( + oldPercentDiv?: null, + newPercentDiv?: null, + ): PercentDivisorChangedEventFilter; + PercentDivisorChanged(oldPercentDiv?: null, newPercentDiv?: null): PercentDivisorChangedEventFilter; + + 'RedemptionBlockTimestampChanged(address,uint256)'( + _collateral?: null, + _blockTimestamp?: null, + ): RedemptionBlockTimestampChangedEventFilter; + RedemptionBlockTimestampChanged( + _collateral?: null, + _blockTimestamp?: null, + ): RedemptionBlockTimestampChangedEventFilter; + + 'RedemptionFeeFloorChanged(uint256,uint256)'( + oldRedemptionFeeFloor?: null, + newRedemptionFeeFloor?: null, + ): RedemptionFeeFloorChangedEventFilter; + RedemptionFeeFloorChanged( + oldRedemptionFeeFloor?: null, + newRedemptionFeeFloor?: null, + ): RedemptionFeeFloorChangedEventFilter; + + 'Upgraded(address)'(implementation?: PromiseOrValue | null): UpgradedEventFilter; + Upgraded(implementation?: PromiseOrValue | null): UpgradedEventFilter; + }; + + estimateGas: { + BORROWING_FEE_DEFAULT(overrides?: CallOverrides): Promise; + + CCR_DEFAULT(overrides?: CallOverrides): Promise; + + DECIMAL_PRECISION(overrides?: CallOverrides): Promise; + + MCR_DEFAULT(overrides?: CallOverrides): Promise; + + MINT_CAP_DEFAULT(overrides?: CallOverrides): Promise; + + MIN_NET_DEBT_DEFAULT(overrides?: CallOverrides): Promise; + + NAME(overrides?: CallOverrides): Promise; + + PERCENT_DIVISOR_DEFAULT(overrides?: CallOverrides): Promise; + + REDEMPTION_BLOCK_TIMESTAMP_DEFAULT(overrides?: CallOverrides): Promise; + + REDEMPTION_FEE_FLOOR_DEFAULT(overrides?: CallOverrides): Promise; + + _100pct(overrides?: CallOverrides): Promise; + + activePool(overrides?: CallOverrides): Promise; + + addNewCollateral( + _collateral: PromiseOrValue, + _debtTokenGasCompensation: PromiseOrValue, + _decimals: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + adminContract(overrides?: CallOverrides): Promise; + + authorizeUpgrade( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + borrowerOperations(overrides?: CallOverrides): Promise; + + collSurplusPool(overrides?: CallOverrides): Promise; + + communityIssuance(overrides?: CallOverrides): Promise; + + debtToken(overrides?: CallOverrides): Promise; + + defaultPool(overrides?: CallOverrides): Promise; + + feeCollector(overrides?: CallOverrides): Promise; + + gasPoolAddress(overrides?: CallOverrides): Promise; + + getBorrowingFee(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getCcr(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getDebtTokenGasCompensation(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getDecimals(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getIndex(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getIndices(_colls: PromiseOrValue[], overrides?: CallOverrides): Promise; + + getIsActive(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getMcr(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getMinNetDebt(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getMintCap(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getPercentDivisor(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getRedemptionBlockTimestamp(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getRedemptionFeeFloor(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getTotalAssetDebt(_asset: PromiseOrValue, overrides?: CallOverrides): Promise; + + getValidCollateral(overrides?: CallOverrides): Promise; + + grvtStaking(overrides?: CallOverrides): Promise; + + initialize(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + isSetupInitialized(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + priceFeed(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + setBorrowingFee( + _collateral: PromiseOrValue, + borrowingFee: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setCCR( + _collateral: PromiseOrValue, + newCCR: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setCollateralParameters( + _collateral: PromiseOrValue, + borrowingFee: PromiseOrValue, + ccr: PromiseOrValue, + mcr: PromiseOrValue, + minNetDebt: PromiseOrValue, + mintCap: PromiseOrValue, + percentDivisor: PromiseOrValue, + redemptionFeeFloor: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setIsActive( + _collateral: PromiseOrValue, + _active: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMCR( + _collateral: PromiseOrValue, + newMCR: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMinNetDebt( + _collateral: PromiseOrValue, + minNetDebt: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMintCap( + _collateral: PromiseOrValue, + mintCap: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setPercentDivisor( + _collateral: PromiseOrValue, + percentDivisor: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setRedemptionBlockTimestamp( + _collateral: PromiseOrValue, + _blockTimestamp: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setRedemptionFeeFloor( + _collateral: PromiseOrValue, + redemptionFeeFloor: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setSetupIsInitialized(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + sortedVessels(overrides?: CallOverrides): Promise; + + stabilityPool(overrides?: CallOverrides): Promise; + + timelockAddress(overrides?: CallOverrides): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + treasuryAddress(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + validCollateral(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + + vesselManager(overrides?: CallOverrides): Promise; + + vesselManagerOperations(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + BORROWING_FEE_DEFAULT(overrides?: CallOverrides): Promise; + + CCR_DEFAULT(overrides?: CallOverrides): Promise; + + DECIMAL_PRECISION(overrides?: CallOverrides): Promise; + + MCR_DEFAULT(overrides?: CallOverrides): Promise; + + MINT_CAP_DEFAULT(overrides?: CallOverrides): Promise; + + MIN_NET_DEBT_DEFAULT(overrides?: CallOverrides): Promise; + + NAME(overrides?: CallOverrides): Promise; + + PERCENT_DIVISOR_DEFAULT(overrides?: CallOverrides): Promise; + + REDEMPTION_BLOCK_TIMESTAMP_DEFAULT(overrides?: CallOverrides): Promise; + + REDEMPTION_FEE_FLOOR_DEFAULT(overrides?: CallOverrides): Promise; + + _100pct(overrides?: CallOverrides): Promise; + + activePool(overrides?: CallOverrides): Promise; + + addNewCollateral( + _collateral: PromiseOrValue, + _debtTokenGasCompensation: PromiseOrValue, + _decimals: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + adminContract(overrides?: CallOverrides): Promise; + + authorizeUpgrade( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + borrowerOperations(overrides?: CallOverrides): Promise; + + collSurplusPool(overrides?: CallOverrides): Promise; + + communityIssuance(overrides?: CallOverrides): Promise; + + debtToken(overrides?: CallOverrides): Promise; + + defaultPool(overrides?: CallOverrides): Promise; + + feeCollector(overrides?: CallOverrides): Promise; + + gasPoolAddress(overrides?: CallOverrides): Promise; + + getBorrowingFee(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getCcr(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getDebtTokenGasCompensation( + _collateral: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getDecimals(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getIndex(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getIndices(_colls: PromiseOrValue[], overrides?: CallOverrides): Promise; + + getIsActive(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getMcr(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getMinNetDebt(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getMintCap(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getPercentDivisor(_collateral: PromiseOrValue, overrides?: CallOverrides): Promise; + + getRedemptionBlockTimestamp( + _collateral: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getRedemptionFeeFloor( + _collateral: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getTotalAssetDebt(_asset: PromiseOrValue, overrides?: CallOverrides): Promise; + + getValidCollateral(overrides?: CallOverrides): Promise; + + grvtStaking(overrides?: CallOverrides): Promise; + + initialize(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + isSetupInitialized(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + priceFeed(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + setBorrowingFee( + _collateral: PromiseOrValue, + borrowingFee: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setCCR( + _collateral: PromiseOrValue, + newCCR: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setCollateralParameters( + _collateral: PromiseOrValue, + borrowingFee: PromiseOrValue, + ccr: PromiseOrValue, + mcr: PromiseOrValue, + minNetDebt: PromiseOrValue, + mintCap: PromiseOrValue, + percentDivisor: PromiseOrValue, + redemptionFeeFloor: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setIsActive( + _collateral: PromiseOrValue, + _active: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMCR( + _collateral: PromiseOrValue, + newMCR: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMinNetDebt( + _collateral: PromiseOrValue, + minNetDebt: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setMintCap( + _collateral: PromiseOrValue, + mintCap: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setPercentDivisor( + _collateral: PromiseOrValue, + percentDivisor: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setRedemptionBlockTimestamp( + _collateral: PromiseOrValue, + _blockTimestamp: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setRedemptionFeeFloor( + _collateral: PromiseOrValue, + redemptionFeeFloor: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setSetupIsInitialized(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + sortedVessels(overrides?: CallOverrides): Promise; + + stabilityPool(overrides?: CallOverrides): Promise; + + timelockAddress(overrides?: CallOverrides): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + treasuryAddress(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + validCollateral(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + + vesselManager(overrides?: CallOverrides): Promise; + + vesselManagerOperations(overrides?: CallOverrides): Promise; + }; +} diff --git a/src/apps/gravita/contracts/ethers/BorrowerOperations.ts b/src/apps/gravita/contracts/ethers/BorrowerOperations.ts new file mode 100644 index 000000000..d24c6bea3 --- /dev/null +++ b/src/apps/gravita/contracts/ethers/BorrowerOperations.ts @@ -0,0 +1,1089 @@ +/* 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 BorrowerOperationsInterface extends utils.Interface { + functions: { + 'DECIMAL_PRECISION()': FunctionFragment; + 'NAME()': FunctionFragment; + 'activePool()': FunctionFragment; + 'addColl(address,uint256,address,address)': FunctionFragment; + 'adjustVessel(address,uint256,uint256,uint256,bool,address,address)': FunctionFragment; + 'adminContract()': FunctionFragment; + 'authorizeUpgrade(address)': FunctionFragment; + 'borrowerOperations()': FunctionFragment; + 'claimCollateral(address)': FunctionFragment; + 'closeVessel(address)': FunctionFragment; + 'collSurplusPool()': FunctionFragment; + 'communityIssuance()': FunctionFragment; + 'debtToken()': FunctionFragment; + 'defaultPool()': FunctionFragment; + 'feeCollector()': FunctionFragment; + 'gasPoolAddress()': FunctionFragment; + 'getCompositeDebt(address,uint256)': FunctionFragment; + 'getEntireSystemColl(address)': FunctionFragment; + 'getEntireSystemDebt(address)': FunctionFragment; + 'grvtStaking()': FunctionFragment; + 'initialize()': FunctionFragment; + 'openVessel(address,uint256,uint256,address,address)': FunctionFragment; + 'owner()': FunctionFragment; + 'priceFeed()': FunctionFragment; + 'proxiableUUID()': FunctionFragment; + 'renounceOwnership()': FunctionFragment; + 'repayDebtTokens(address,uint256,address,address)': FunctionFragment; + 'sortedVessels()': FunctionFragment; + 'stabilityPool()': FunctionFragment; + 'timelockAddress()': FunctionFragment; + 'transferOwnership(address)': FunctionFragment; + 'treasuryAddress()': FunctionFragment; + 'upgradeTo(address)': FunctionFragment; + 'upgradeToAndCall(address,bytes)': FunctionFragment; + 'vesselManager()': FunctionFragment; + 'vesselManagerOperations()': FunctionFragment; + 'withdrawColl(address,uint256,address,address)': FunctionFragment; + 'withdrawDebtTokens(address,uint256,address,address)': FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | 'DECIMAL_PRECISION' + | 'NAME' + | 'activePool' + | 'addColl' + | 'adjustVessel' + | 'adminContract' + | 'authorizeUpgrade' + | 'borrowerOperations' + | 'claimCollateral' + | 'closeVessel' + | 'collSurplusPool' + | 'communityIssuance' + | 'debtToken' + | 'defaultPool' + | 'feeCollector' + | 'gasPoolAddress' + | 'getCompositeDebt' + | 'getEntireSystemColl' + | 'getEntireSystemDebt' + | 'grvtStaking' + | 'initialize' + | 'openVessel' + | 'owner' + | 'priceFeed' + | 'proxiableUUID' + | 'renounceOwnership' + | 'repayDebtTokens' + | 'sortedVessels' + | 'stabilityPool' + | 'timelockAddress' + | 'transferOwnership' + | 'treasuryAddress' + | 'upgradeTo' + | 'upgradeToAndCall' + | 'vesselManager' + | 'vesselManagerOperations' + | 'withdrawColl' + | 'withdrawDebtTokens', + ): FunctionFragment; + + encodeFunctionData(functionFragment: 'DECIMAL_PRECISION', values?: undefined): string; + encodeFunctionData(functionFragment: 'NAME', values?: undefined): string; + encodeFunctionData(functionFragment: 'activePool', values?: undefined): string; + encodeFunctionData( + functionFragment: 'addColl', + values: [PromiseOrValue, PromiseOrValue, PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'adjustVessel', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData(functionFragment: 'adminContract', values?: undefined): string; + encodeFunctionData(functionFragment: 'authorizeUpgrade', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'borrowerOperations', values?: undefined): string; + encodeFunctionData(functionFragment: 'claimCollateral', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'closeVessel', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'collSurplusPool', values?: undefined): string; + encodeFunctionData(functionFragment: 'communityIssuance', values?: undefined): string; + encodeFunctionData(functionFragment: 'debtToken', values?: undefined): string; + encodeFunctionData(functionFragment: 'defaultPool', values?: undefined): string; + encodeFunctionData(functionFragment: 'feeCollector', values?: undefined): string; + encodeFunctionData(functionFragment: 'gasPoolAddress', values?: undefined): string; + encodeFunctionData( + functionFragment: 'getCompositeDebt', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'getEntireSystemColl', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'getEntireSystemDebt', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'grvtStaking', values?: undefined): string; + encodeFunctionData(functionFragment: 'initialize', values?: undefined): string; + encodeFunctionData( + functionFragment: 'openVessel', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData(functionFragment: 'owner', values?: undefined): string; + encodeFunctionData(functionFragment: 'priceFeed', values?: undefined): string; + encodeFunctionData(functionFragment: 'proxiableUUID', values?: undefined): string; + encodeFunctionData(functionFragment: 'renounceOwnership', values?: undefined): string; + encodeFunctionData( + functionFragment: 'repayDebtTokens', + values: [PromiseOrValue, PromiseOrValue, PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'sortedVessels', values?: undefined): string; + encodeFunctionData(functionFragment: 'stabilityPool', values?: undefined): string; + encodeFunctionData(functionFragment: 'timelockAddress', values?: undefined): string; + encodeFunctionData(functionFragment: 'transferOwnership', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'treasuryAddress', values?: undefined): string; + encodeFunctionData(functionFragment: 'upgradeTo', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'upgradeToAndCall', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'vesselManager', values?: undefined): string; + encodeFunctionData(functionFragment: 'vesselManagerOperations', values?: undefined): string; + encodeFunctionData( + functionFragment: 'withdrawColl', + values: [PromiseOrValue, PromiseOrValue, PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'withdrawDebtTokens', + values: [PromiseOrValue, PromiseOrValue, PromiseOrValue, PromiseOrValue], + ): string; + + decodeFunctionResult(functionFragment: 'DECIMAL_PRECISION', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'NAME', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'activePool', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'addColl', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'adjustVessel', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'adminContract', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'authorizeUpgrade', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'borrowerOperations', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'claimCollateral', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'closeVessel', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'collSurplusPool', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'communityIssuance', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'debtToken', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'defaultPool', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'feeCollector', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'gasPoolAddress', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getCompositeDebt', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getEntireSystemColl', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getEntireSystemDebt', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'grvtStaking', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'initialize', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'openVessel', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'owner', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'priceFeed', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'proxiableUUID', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'renounceOwnership', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'repayDebtTokens', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'sortedVessels', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'stabilityPool', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'timelockAddress', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'transferOwnership', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'treasuryAddress', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'upgradeTo', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'upgradeToAndCall', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'vesselManager', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'vesselManagerOperations', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'withdrawColl', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'withdrawDebtTokens', data: BytesLike): Result; + + events: { + 'AdminChanged(address,address)': EventFragment; + 'BeaconUpgraded(address)': EventFragment; + 'BorrowingFeePaid(address,address,uint256)': EventFragment; + 'Initialized(uint8)': EventFragment; + 'OwnershipTransferred(address,address)': EventFragment; + 'Upgraded(address)': EventFragment; + 'VesselCreated(address,address,uint256)': EventFragment; + 'VesselUpdated(address,address,uint256,uint256,uint256,uint8)': EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: 'AdminChanged'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'BeaconUpgraded'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'BorrowingFeePaid'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Initialized'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'OwnershipTransferred'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Upgraded'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'VesselCreated'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'VesselUpdated'): EventFragment; +} + +export interface AdminChangedEventObject { + previousAdmin: string; + newAdmin: string; +} +export type AdminChangedEvent = TypedEvent<[string, string], AdminChangedEventObject>; + +export type AdminChangedEventFilter = TypedEventFilter; + +export interface BeaconUpgradedEventObject { + beacon: string; +} +export type BeaconUpgradedEvent = TypedEvent<[string], BeaconUpgradedEventObject>; + +export type BeaconUpgradedEventFilter = TypedEventFilter; + +export interface BorrowingFeePaidEventObject { + _asset: string; + _borrower: string; + _feeAmount: BigNumber; +} +export type BorrowingFeePaidEvent = TypedEvent<[string, string, BigNumber], BorrowingFeePaidEventObject>; + +export type BorrowingFeePaidEventFilter = TypedEventFilter; + +export interface InitializedEventObject { + version: number; +} +export type InitializedEvent = TypedEvent<[number], InitializedEventObject>; + +export type InitializedEventFilter = TypedEventFilter; + +export interface OwnershipTransferredEventObject { + previousOwner: string; + newOwner: string; +} +export type OwnershipTransferredEvent = TypedEvent<[string, string], OwnershipTransferredEventObject>; + +export type OwnershipTransferredEventFilter = TypedEventFilter; + +export interface UpgradedEventObject { + implementation: string; +} +export type UpgradedEvent = TypedEvent<[string], UpgradedEventObject>; + +export type UpgradedEventFilter = TypedEventFilter; + +export interface VesselCreatedEventObject { + _asset: string; + _borrower: string; + arrayIndex: BigNumber; +} +export type VesselCreatedEvent = TypedEvent<[string, string, BigNumber], VesselCreatedEventObject>; + +export type VesselCreatedEventFilter = TypedEventFilter; + +export interface VesselUpdatedEventObject { + _asset: string; + _borrower: string; + _debt: BigNumber; + _coll: BigNumber; + stake: BigNumber; + operation: number; +} +export type VesselUpdatedEvent = TypedEvent< + [string, string, BigNumber, BigNumber, BigNumber, number], + VesselUpdatedEventObject +>; + +export type VesselUpdatedEventFilter = TypedEventFilter; + +export interface BorrowerOperations extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: BorrowerOperationsInterface; + + 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: { + DECIMAL_PRECISION(overrides?: CallOverrides): Promise<[BigNumber]>; + + NAME(overrides?: CallOverrides): Promise<[string]>; + + activePool(overrides?: CallOverrides): Promise<[string]>; + + addColl( + _asset: PromiseOrValue, + _assetSent: PromiseOrValue, + _upperHint: PromiseOrValue, + _lowerHint: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + adjustVessel( + _asset: PromiseOrValue, + _assetSent: PromiseOrValue, + _collWithdrawal: PromiseOrValue, + _debtTokenChange: PromiseOrValue, + _isDebtIncrease: PromiseOrValue, + _upperHint: PromiseOrValue, + _lowerHint: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + adminContract(overrides?: CallOverrides): Promise<[string]>; + + authorizeUpgrade( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + borrowerOperations(overrides?: CallOverrides): Promise<[string]>; + + claimCollateral( + _asset: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + closeVessel( + _asset: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + collSurplusPool(overrides?: CallOverrides): Promise<[string]>; + + communityIssuance(overrides?: CallOverrides): Promise<[string]>; + + debtToken(overrides?: CallOverrides): Promise<[string]>; + + defaultPool(overrides?: CallOverrides): Promise<[string]>; + + feeCollector(overrides?: CallOverrides): Promise<[string]>; + + gasPoolAddress(overrides?: CallOverrides): Promise<[string]>; + + getCompositeDebt( + _asset: PromiseOrValue, + _debt: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + getEntireSystemColl( + _asset: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber] & { entireSystemColl: BigNumber }>; + + getEntireSystemDebt( + _asset: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber] & { entireSystemDebt: BigNumber }>; + + grvtStaking(overrides?: CallOverrides): Promise<[string]>; + + initialize(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + openVessel( + _asset: PromiseOrValue, + _assetAmount: PromiseOrValue, + _debtTokenAmount: PromiseOrValue, + _upperHint: PromiseOrValue, + _lowerHint: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + owner(overrides?: CallOverrides): Promise<[string]>; + + priceFeed(overrides?: CallOverrides): Promise<[string]>; + + proxiableUUID(overrides?: CallOverrides): Promise<[string]>; + + renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + repayDebtTokens( + _asset: PromiseOrValue, + _debtTokenAmount: PromiseOrValue, + _upperHint: PromiseOrValue, + _lowerHint: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + sortedVessels(overrides?: CallOverrides): Promise<[string]>; + + stabilityPool(overrides?: CallOverrides): Promise<[string]>; + + timelockAddress(overrides?: CallOverrides): Promise<[string]>; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + treasuryAddress(overrides?: CallOverrides): Promise<[string]>; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + vesselManager(overrides?: CallOverrides): Promise<[string]>; + + vesselManagerOperations(overrides?: CallOverrides): Promise<[string]>; + + withdrawColl( + _asset: PromiseOrValue, + _collWithdrawal: PromiseOrValue, + _upperHint: PromiseOrValue, + _lowerHint: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + withdrawDebtTokens( + _asset: PromiseOrValue, + _debtTokenAmount: PromiseOrValue, + _upperHint: PromiseOrValue, + _lowerHint: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + }; + + DECIMAL_PRECISION(overrides?: CallOverrides): Promise; + + NAME(overrides?: CallOverrides): Promise; + + activePool(overrides?: CallOverrides): Promise; + + addColl( + _asset: PromiseOrValue, + _assetSent: PromiseOrValue, + _upperHint: PromiseOrValue, + _lowerHint: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + adjustVessel( + _asset: PromiseOrValue, + _assetSent: PromiseOrValue, + _collWithdrawal: PromiseOrValue, + _debtTokenChange: PromiseOrValue, + _isDebtIncrease: PromiseOrValue, + _upperHint: PromiseOrValue, + _lowerHint: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + adminContract(overrides?: CallOverrides): Promise; + + authorizeUpgrade( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + borrowerOperations(overrides?: CallOverrides): Promise; + + claimCollateral( + _asset: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + closeVessel( + _asset: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + collSurplusPool(overrides?: CallOverrides): Promise; + + communityIssuance(overrides?: CallOverrides): Promise; + + debtToken(overrides?: CallOverrides): Promise; + + defaultPool(overrides?: CallOverrides): Promise; + + feeCollector(overrides?: CallOverrides): Promise; + + gasPoolAddress(overrides?: CallOverrides): Promise; + + getCompositeDebt( + _asset: PromiseOrValue, + _debt: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getEntireSystemColl(_asset: PromiseOrValue, overrides?: CallOverrides): Promise; + + getEntireSystemDebt(_asset: PromiseOrValue, overrides?: CallOverrides): Promise; + + grvtStaking(overrides?: CallOverrides): Promise; + + initialize(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + openVessel( + _asset: PromiseOrValue, + _assetAmount: PromiseOrValue, + _debtTokenAmount: PromiseOrValue, + _upperHint: PromiseOrValue, + _lowerHint: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + priceFeed(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + repayDebtTokens( + _asset: PromiseOrValue, + _debtTokenAmount: PromiseOrValue, + _upperHint: PromiseOrValue, + _lowerHint: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + sortedVessels(overrides?: CallOverrides): Promise; + + stabilityPool(overrides?: CallOverrides): Promise; + + timelockAddress(overrides?: CallOverrides): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + treasuryAddress(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + vesselManager(overrides?: CallOverrides): Promise; + + vesselManagerOperations(overrides?: CallOverrides): Promise; + + withdrawColl( + _asset: PromiseOrValue, + _collWithdrawal: PromiseOrValue, + _upperHint: PromiseOrValue, + _lowerHint: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + withdrawDebtTokens( + _asset: PromiseOrValue, + _debtTokenAmount: PromiseOrValue, + _upperHint: PromiseOrValue, + _lowerHint: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + callStatic: { + DECIMAL_PRECISION(overrides?: CallOverrides): Promise; + + NAME(overrides?: CallOverrides): Promise; + + activePool(overrides?: CallOverrides): Promise; + + addColl( + _asset: PromiseOrValue, + _assetSent: PromiseOrValue, + _upperHint: PromiseOrValue, + _lowerHint: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + adjustVessel( + _asset: PromiseOrValue, + _assetSent: PromiseOrValue, + _collWithdrawal: PromiseOrValue, + _debtTokenChange: PromiseOrValue, + _isDebtIncrease: PromiseOrValue, + _upperHint: PromiseOrValue, + _lowerHint: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + adminContract(overrides?: CallOverrides): Promise; + + authorizeUpgrade(newImplementation: PromiseOrValue, overrides?: CallOverrides): Promise; + + borrowerOperations(overrides?: CallOverrides): Promise; + + claimCollateral(_asset: PromiseOrValue, overrides?: CallOverrides): Promise; + + closeVessel(_asset: PromiseOrValue, overrides?: CallOverrides): Promise; + + collSurplusPool(overrides?: CallOverrides): Promise; + + communityIssuance(overrides?: CallOverrides): Promise; + + debtToken(overrides?: CallOverrides): Promise; + + defaultPool(overrides?: CallOverrides): Promise; + + feeCollector(overrides?: CallOverrides): Promise; + + gasPoolAddress(overrides?: CallOverrides): Promise; + + getCompositeDebt( + _asset: PromiseOrValue, + _debt: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getEntireSystemColl(_asset: PromiseOrValue, overrides?: CallOverrides): Promise; + + getEntireSystemDebt(_asset: PromiseOrValue, overrides?: CallOverrides): Promise; + + grvtStaking(overrides?: CallOverrides): Promise; + + initialize(overrides?: CallOverrides): Promise; + + openVessel( + _asset: PromiseOrValue, + _assetAmount: PromiseOrValue, + _debtTokenAmount: PromiseOrValue, + _upperHint: PromiseOrValue, + _lowerHint: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + priceFeed(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: CallOverrides): Promise; + + repayDebtTokens( + _asset: PromiseOrValue, + _debtTokenAmount: PromiseOrValue, + _upperHint: PromiseOrValue, + _lowerHint: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + sortedVessels(overrides?: CallOverrides): Promise; + + stabilityPool(overrides?: CallOverrides): Promise; + + timelockAddress(overrides?: CallOverrides): Promise; + + transferOwnership(newOwner: PromiseOrValue, overrides?: CallOverrides): Promise; + + treasuryAddress(overrides?: CallOverrides): Promise; + + upgradeTo(newImplementation: PromiseOrValue, overrides?: CallOverrides): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + vesselManager(overrides?: CallOverrides): Promise; + + vesselManagerOperations(overrides?: CallOverrides): Promise; + + withdrawColl( + _asset: PromiseOrValue, + _collWithdrawal: PromiseOrValue, + _upperHint: PromiseOrValue, + _lowerHint: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + withdrawDebtTokens( + _asset: PromiseOrValue, + _debtTokenAmount: PromiseOrValue, + _upperHint: PromiseOrValue, + _lowerHint: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + }; + + filters: { + 'AdminChanged(address,address)'(previousAdmin?: null, newAdmin?: null): AdminChangedEventFilter; + AdminChanged(previousAdmin?: null, newAdmin?: null): AdminChangedEventFilter; + + 'BeaconUpgraded(address)'(beacon?: PromiseOrValue | null): BeaconUpgradedEventFilter; + BeaconUpgraded(beacon?: PromiseOrValue | null): BeaconUpgradedEventFilter; + + 'BorrowingFeePaid(address,address,uint256)'( + _asset?: PromiseOrValue | null, + _borrower?: PromiseOrValue | null, + _feeAmount?: null, + ): BorrowingFeePaidEventFilter; + BorrowingFeePaid( + _asset?: PromiseOrValue | null, + _borrower?: PromiseOrValue | null, + _feeAmount?: null, + ): BorrowingFeePaidEventFilter; + + 'Initialized(uint8)'(version?: null): InitializedEventFilter; + Initialized(version?: null): InitializedEventFilter; + + 'OwnershipTransferred(address,address)'( + previousOwner?: PromiseOrValue | null, + newOwner?: PromiseOrValue | null, + ): OwnershipTransferredEventFilter; + OwnershipTransferred( + previousOwner?: PromiseOrValue | null, + newOwner?: PromiseOrValue | null, + ): OwnershipTransferredEventFilter; + + 'Upgraded(address)'(implementation?: PromiseOrValue | null): UpgradedEventFilter; + Upgraded(implementation?: PromiseOrValue | null): UpgradedEventFilter; + + 'VesselCreated(address,address,uint256)'( + _asset?: PromiseOrValue | null, + _borrower?: PromiseOrValue | null, + arrayIndex?: null, + ): VesselCreatedEventFilter; + VesselCreated( + _asset?: PromiseOrValue | null, + _borrower?: PromiseOrValue | null, + arrayIndex?: null, + ): VesselCreatedEventFilter; + + 'VesselUpdated(address,address,uint256,uint256,uint256,uint8)'( + _asset?: PromiseOrValue | null, + _borrower?: PromiseOrValue | null, + _debt?: null, + _coll?: null, + stake?: null, + operation?: null, + ): VesselUpdatedEventFilter; + VesselUpdated( + _asset?: PromiseOrValue | null, + _borrower?: PromiseOrValue | null, + _debt?: null, + _coll?: null, + stake?: null, + operation?: null, + ): VesselUpdatedEventFilter; + }; + + estimateGas: { + DECIMAL_PRECISION(overrides?: CallOverrides): Promise; + + NAME(overrides?: CallOverrides): Promise; + + activePool(overrides?: CallOverrides): Promise; + + addColl( + _asset: PromiseOrValue, + _assetSent: PromiseOrValue, + _upperHint: PromiseOrValue, + _lowerHint: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + adjustVessel( + _asset: PromiseOrValue, + _assetSent: PromiseOrValue, + _collWithdrawal: PromiseOrValue, + _debtTokenChange: PromiseOrValue, + _isDebtIncrease: PromiseOrValue, + _upperHint: PromiseOrValue, + _lowerHint: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + adminContract(overrides?: CallOverrides): Promise; + + authorizeUpgrade( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + borrowerOperations(overrides?: CallOverrides): Promise; + + claimCollateral( + _asset: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + closeVessel( + _asset: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + collSurplusPool(overrides?: CallOverrides): Promise; + + communityIssuance(overrides?: CallOverrides): Promise; + + debtToken(overrides?: CallOverrides): Promise; + + defaultPool(overrides?: CallOverrides): Promise; + + feeCollector(overrides?: CallOverrides): Promise; + + gasPoolAddress(overrides?: CallOverrides): Promise; + + getCompositeDebt( + _asset: PromiseOrValue, + _debt: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getEntireSystemColl(_asset: PromiseOrValue, overrides?: CallOverrides): Promise; + + getEntireSystemDebt(_asset: PromiseOrValue, overrides?: CallOverrides): Promise; + + grvtStaking(overrides?: CallOverrides): Promise; + + initialize(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + openVessel( + _asset: PromiseOrValue, + _assetAmount: PromiseOrValue, + _debtTokenAmount: PromiseOrValue, + _upperHint: PromiseOrValue, + _lowerHint: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + priceFeed(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + repayDebtTokens( + _asset: PromiseOrValue, + _debtTokenAmount: PromiseOrValue, + _upperHint: PromiseOrValue, + _lowerHint: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + sortedVessels(overrides?: CallOverrides): Promise; + + stabilityPool(overrides?: CallOverrides): Promise; + + timelockAddress(overrides?: CallOverrides): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + treasuryAddress(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + vesselManager(overrides?: CallOverrides): Promise; + + vesselManagerOperations(overrides?: CallOverrides): Promise; + + withdrawColl( + _asset: PromiseOrValue, + _collWithdrawal: PromiseOrValue, + _upperHint: PromiseOrValue, + _lowerHint: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + withdrawDebtTokens( + _asset: PromiseOrValue, + _debtTokenAmount: PromiseOrValue, + _upperHint: PromiseOrValue, + _lowerHint: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + }; + + populateTransaction: { + DECIMAL_PRECISION(overrides?: CallOverrides): Promise; + + NAME(overrides?: CallOverrides): Promise; + + activePool(overrides?: CallOverrides): Promise; + + addColl( + _asset: PromiseOrValue, + _assetSent: PromiseOrValue, + _upperHint: PromiseOrValue, + _lowerHint: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + adjustVessel( + _asset: PromiseOrValue, + _assetSent: PromiseOrValue, + _collWithdrawal: PromiseOrValue, + _debtTokenChange: PromiseOrValue, + _isDebtIncrease: PromiseOrValue, + _upperHint: PromiseOrValue, + _lowerHint: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + adminContract(overrides?: CallOverrides): Promise; + + authorizeUpgrade( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + borrowerOperations(overrides?: CallOverrides): Promise; + + claimCollateral( + _asset: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + closeVessel( + _asset: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + collSurplusPool(overrides?: CallOverrides): Promise; + + communityIssuance(overrides?: CallOverrides): Promise; + + debtToken(overrides?: CallOverrides): Promise; + + defaultPool(overrides?: CallOverrides): Promise; + + feeCollector(overrides?: CallOverrides): Promise; + + gasPoolAddress(overrides?: CallOverrides): Promise; + + getCompositeDebt( + _asset: PromiseOrValue, + _debt: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + getEntireSystemColl(_asset: PromiseOrValue, overrides?: CallOverrides): Promise; + + getEntireSystemDebt(_asset: PromiseOrValue, overrides?: CallOverrides): Promise; + + grvtStaking(overrides?: CallOverrides): Promise; + + initialize(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + openVessel( + _asset: PromiseOrValue, + _assetAmount: PromiseOrValue, + _debtTokenAmount: PromiseOrValue, + _upperHint: PromiseOrValue, + _lowerHint: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + priceFeed(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + repayDebtTokens( + _asset: PromiseOrValue, + _debtTokenAmount: PromiseOrValue, + _upperHint: PromiseOrValue, + _lowerHint: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + sortedVessels(overrides?: CallOverrides): Promise; + + stabilityPool(overrides?: CallOverrides): Promise; + + timelockAddress(overrides?: CallOverrides): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + treasuryAddress(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + vesselManager(overrides?: CallOverrides): Promise; + + vesselManagerOperations(overrides?: CallOverrides): Promise; + + withdrawColl( + _asset: PromiseOrValue, + _collWithdrawal: PromiseOrValue, + _upperHint: PromiseOrValue, + _lowerHint: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + withdrawDebtTokens( + _asset: PromiseOrValue, + _debtTokenAmount: PromiseOrValue, + _upperHint: PromiseOrValue, + _lowerHint: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + }; +} diff --git a/src/apps/gravita/contracts/ethers/PriceFeed.ts b/src/apps/gravita/contracts/ethers/PriceFeed.ts new file mode 100644 index 000000000..3a3c0d723 --- /dev/null +++ b/src/apps/gravita/contracts/ethers/PriceFeed.ts @@ -0,0 +1,769 @@ +/* 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 PriceFeedInterface extends utils.Interface { + functions: { + 'NAME()': FunctionFragment; + 'TARGET_DIGITS()': FunctionFragment; + 'activePool()': FunctionFragment; + 'adminContract()': FunctionFragment; + 'authorizeUpgrade(address)': FunctionFragment; + 'borrowerOperations()': FunctionFragment; + 'collSurplusPool()': FunctionFragment; + 'communityIssuance()': FunctionFragment; + 'debtToken()': FunctionFragment; + 'defaultPool()': FunctionFragment; + 'fallbacks(address)': FunctionFragment; + 'feeCollector()': FunctionFragment; + 'fetchPrice(address)': FunctionFragment; + 'gasPoolAddress()': FunctionFragment; + 'grvtStaking()': FunctionFragment; + 'initialize()': FunctionFragment; + 'oracles(address)': FunctionFragment; + 'owner()': FunctionFragment; + 'priceFeed()': FunctionFragment; + 'proxiableUUID()': FunctionFragment; + 'renounceOwnership()': FunctionFragment; + 'setOracle(address,address,uint8,uint256,bool,bool)': FunctionFragment; + 'sortedVessels()': FunctionFragment; + 'stabilityPool()': FunctionFragment; + 'timelockAddress()': FunctionFragment; + 'transferOwnership(address)': FunctionFragment; + 'treasuryAddress()': FunctionFragment; + 'upgradeTo(address)': FunctionFragment; + 'upgradeToAndCall(address,bytes)': FunctionFragment; + 'vesselManager()': FunctionFragment; + 'vesselManagerOperations()': FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | 'NAME' + | 'TARGET_DIGITS' + | 'activePool' + | 'adminContract' + | 'authorizeUpgrade' + | 'borrowerOperations' + | 'collSurplusPool' + | 'communityIssuance' + | 'debtToken' + | 'defaultPool' + | 'fallbacks' + | 'feeCollector' + | 'fetchPrice' + | 'gasPoolAddress' + | 'grvtStaking' + | 'initialize' + | 'oracles' + | 'owner' + | 'priceFeed' + | 'proxiableUUID' + | 'renounceOwnership' + | 'setOracle' + | 'sortedVessels' + | 'stabilityPool' + | 'timelockAddress' + | 'transferOwnership' + | 'treasuryAddress' + | 'upgradeTo' + | 'upgradeToAndCall' + | 'vesselManager' + | 'vesselManagerOperations', + ): FunctionFragment; + + encodeFunctionData(functionFragment: 'NAME', values?: undefined): string; + encodeFunctionData(functionFragment: 'TARGET_DIGITS', values?: undefined): string; + encodeFunctionData(functionFragment: 'activePool', values?: undefined): string; + encodeFunctionData(functionFragment: 'adminContract', values?: undefined): string; + encodeFunctionData(functionFragment: 'authorizeUpgrade', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'borrowerOperations', values?: undefined): string; + encodeFunctionData(functionFragment: 'collSurplusPool', values?: undefined): string; + encodeFunctionData(functionFragment: 'communityIssuance', values?: undefined): string; + encodeFunctionData(functionFragment: 'debtToken', values?: undefined): string; + encodeFunctionData(functionFragment: 'defaultPool', values?: undefined): string; + encodeFunctionData(functionFragment: 'fallbacks', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'feeCollector', values?: undefined): string; + encodeFunctionData(functionFragment: 'fetchPrice', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'gasPoolAddress', values?: undefined): string; + encodeFunctionData(functionFragment: 'grvtStaking', values?: undefined): string; + encodeFunctionData(functionFragment: 'initialize', values?: undefined): string; + encodeFunctionData(functionFragment: 'oracles', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'owner', values?: undefined): string; + encodeFunctionData(functionFragment: 'priceFeed', values?: undefined): string; + encodeFunctionData(functionFragment: 'proxiableUUID', values?: undefined): string; + encodeFunctionData(functionFragment: 'renounceOwnership', values?: undefined): string; + encodeFunctionData( + functionFragment: 'setOracle', + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData(functionFragment: 'sortedVessels', values?: undefined): string; + encodeFunctionData(functionFragment: 'stabilityPool', values?: undefined): string; + encodeFunctionData(functionFragment: 'timelockAddress', values?: undefined): string; + encodeFunctionData(functionFragment: 'transferOwnership', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'treasuryAddress', values?: undefined): string; + encodeFunctionData(functionFragment: 'upgradeTo', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'upgradeToAndCall', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'vesselManager', values?: undefined): string; + encodeFunctionData(functionFragment: 'vesselManagerOperations', values?: undefined): string; + + decodeFunctionResult(functionFragment: 'NAME', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'TARGET_DIGITS', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'activePool', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'adminContract', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'authorizeUpgrade', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'borrowerOperations', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'collSurplusPool', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'communityIssuance', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'debtToken', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'defaultPool', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'fallbacks', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'feeCollector', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'fetchPrice', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'gasPoolAddress', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'grvtStaking', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'initialize', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'oracles', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'owner', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'priceFeed', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'proxiableUUID', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'renounceOwnership', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setOracle', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'sortedVessels', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'stabilityPool', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'timelockAddress', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'transferOwnership', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'treasuryAddress', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'upgradeTo', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'upgradeToAndCall', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'vesselManager', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'vesselManagerOperations', data: BytesLike): Result; + + events: { + 'AdminChanged(address,address)': EventFragment; + 'BeaconUpgraded(address)': EventFragment; + 'Initialized(uint8)': EventFragment; + 'NewOracleRegistered(address,address,bool,bool)': EventFragment; + 'OwnershipTransferred(address,address)': EventFragment; + 'Upgraded(address)': EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: 'AdminChanged'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'BeaconUpgraded'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Initialized'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'NewOracleRegistered'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'OwnershipTransferred'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Upgraded'): EventFragment; +} + +export interface AdminChangedEventObject { + previousAdmin: string; + newAdmin: string; +} +export type AdminChangedEvent = TypedEvent<[string, string], AdminChangedEventObject>; + +export type AdminChangedEventFilter = TypedEventFilter; + +export interface BeaconUpgradedEventObject { + beacon: string; +} +export type BeaconUpgradedEvent = TypedEvent<[string], BeaconUpgradedEventObject>; + +export type BeaconUpgradedEventFilter = TypedEventFilter; + +export interface InitializedEventObject { + version: number; +} +export type InitializedEvent = TypedEvent<[number], InitializedEventObject>; + +export type InitializedEventFilter = TypedEventFilter; + +export interface NewOracleRegisteredEventObject { + token: string; + oracleAddress: string; + isEthIndexed: boolean; + isFallback: boolean; +} +export type NewOracleRegisteredEvent = TypedEvent<[string, string, boolean, boolean], NewOracleRegisteredEventObject>; + +export type NewOracleRegisteredEventFilter = TypedEventFilter; + +export interface OwnershipTransferredEventObject { + previousOwner: string; + newOwner: string; +} +export type OwnershipTransferredEvent = TypedEvent<[string, string], OwnershipTransferredEventObject>; + +export type OwnershipTransferredEventFilter = TypedEventFilter; + +export interface UpgradedEventObject { + implementation: string; +} +export type UpgradedEvent = TypedEvent<[string], UpgradedEventObject>; + +export type UpgradedEventFilter = TypedEventFilter; + +export interface PriceFeed extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: PriceFeedInterface; + + 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: { + NAME(overrides?: CallOverrides): Promise<[string]>; + + TARGET_DIGITS(overrides?: CallOverrides): Promise<[BigNumber]>; + + activePool(overrides?: CallOverrides): Promise<[string]>; + + adminContract(overrides?: CallOverrides): Promise<[string]>; + + authorizeUpgrade( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + borrowerOperations(overrides?: CallOverrides): Promise<[string]>; + + collSurplusPool(overrides?: CallOverrides): Promise<[string]>; + + communityIssuance(overrides?: CallOverrides): Promise<[string]>; + + debtToken(overrides?: CallOverrides): Promise<[string]>; + + defaultPool(overrides?: CallOverrides): Promise<[string]>; + + fallbacks( + arg0: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [string, number, BigNumber, BigNumber, boolean] & { + oracleAddress: string; + providerType: number; + timeoutSeconds: BigNumber; + decimals: BigNumber; + isEthIndexed: boolean; + } + >; + + feeCollector(overrides?: CallOverrides): Promise<[string]>; + + fetchPrice(_token: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + gasPoolAddress(overrides?: CallOverrides): Promise<[string]>; + + grvtStaking(overrides?: CallOverrides): Promise<[string]>; + + initialize(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + oracles( + arg0: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [string, number, BigNumber, BigNumber, boolean] & { + oracleAddress: string; + providerType: number; + timeoutSeconds: BigNumber; + decimals: BigNumber; + isEthIndexed: boolean; + } + >; + + owner(overrides?: CallOverrides): Promise<[string]>; + + priceFeed(overrides?: CallOverrides): Promise<[string]>; + + proxiableUUID(overrides?: CallOverrides): Promise<[string]>; + + renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + setOracle( + _token: PromiseOrValue, + _oracle: PromiseOrValue, + _type: PromiseOrValue, + _timeoutSeconds: PromiseOrValue, + _isEthIndexed: PromiseOrValue, + _isFallback: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + sortedVessels(overrides?: CallOverrides): Promise<[string]>; + + stabilityPool(overrides?: CallOverrides): Promise<[string]>; + + timelockAddress(overrides?: CallOverrides): Promise<[string]>; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + treasuryAddress(overrides?: CallOverrides): Promise<[string]>; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + vesselManager(overrides?: CallOverrides): Promise<[string]>; + + vesselManagerOperations(overrides?: CallOverrides): Promise<[string]>; + }; + + NAME(overrides?: CallOverrides): Promise; + + TARGET_DIGITS(overrides?: CallOverrides): Promise; + + activePool(overrides?: CallOverrides): Promise; + + adminContract(overrides?: CallOverrides): Promise; + + authorizeUpgrade( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + borrowerOperations(overrides?: CallOverrides): Promise; + + collSurplusPool(overrides?: CallOverrides): Promise; + + communityIssuance(overrides?: CallOverrides): Promise; + + debtToken(overrides?: CallOverrides): Promise; + + defaultPool(overrides?: CallOverrides): Promise; + + fallbacks( + arg0: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [string, number, BigNumber, BigNumber, boolean] & { + oracleAddress: string; + providerType: number; + timeoutSeconds: BigNumber; + decimals: BigNumber; + isEthIndexed: boolean; + } + >; + + feeCollector(overrides?: CallOverrides): Promise; + + fetchPrice(_token: PromiseOrValue, overrides?: CallOverrides): Promise; + + gasPoolAddress(overrides?: CallOverrides): Promise; + + grvtStaking(overrides?: CallOverrides): Promise; + + initialize(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + oracles( + arg0: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [string, number, BigNumber, BigNumber, boolean] & { + oracleAddress: string; + providerType: number; + timeoutSeconds: BigNumber; + decimals: BigNumber; + isEthIndexed: boolean; + } + >; + + owner(overrides?: CallOverrides): Promise; + + priceFeed(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + setOracle( + _token: PromiseOrValue, + _oracle: PromiseOrValue, + _type: PromiseOrValue, + _timeoutSeconds: PromiseOrValue, + _isEthIndexed: PromiseOrValue, + _isFallback: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + sortedVessels(overrides?: CallOverrides): Promise; + + stabilityPool(overrides?: CallOverrides): Promise; + + timelockAddress(overrides?: CallOverrides): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + treasuryAddress(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + vesselManager(overrides?: CallOverrides): Promise; + + vesselManagerOperations(overrides?: CallOverrides): Promise; + + callStatic: { + NAME(overrides?: CallOverrides): Promise; + + TARGET_DIGITS(overrides?: CallOverrides): Promise; + + activePool(overrides?: CallOverrides): Promise; + + adminContract(overrides?: CallOverrides): Promise; + + authorizeUpgrade(newImplementation: PromiseOrValue, overrides?: CallOverrides): Promise; + + borrowerOperations(overrides?: CallOverrides): Promise; + + collSurplusPool(overrides?: CallOverrides): Promise; + + communityIssuance(overrides?: CallOverrides): Promise; + + debtToken(overrides?: CallOverrides): Promise; + + defaultPool(overrides?: CallOverrides): Promise; + + fallbacks( + arg0: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [string, number, BigNumber, BigNumber, boolean] & { + oracleAddress: string; + providerType: number; + timeoutSeconds: BigNumber; + decimals: BigNumber; + isEthIndexed: boolean; + } + >; + + feeCollector(overrides?: CallOverrides): Promise; + + fetchPrice(_token: PromiseOrValue, overrides?: CallOverrides): Promise; + + gasPoolAddress(overrides?: CallOverrides): Promise; + + grvtStaking(overrides?: CallOverrides): Promise; + + initialize(overrides?: CallOverrides): Promise; + + oracles( + arg0: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [string, number, BigNumber, BigNumber, boolean] & { + oracleAddress: string; + providerType: number; + timeoutSeconds: BigNumber; + decimals: BigNumber; + isEthIndexed: boolean; + } + >; + + owner(overrides?: CallOverrides): Promise; + + priceFeed(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: CallOverrides): Promise; + + setOracle( + _token: PromiseOrValue, + _oracle: PromiseOrValue, + _type: PromiseOrValue, + _timeoutSeconds: PromiseOrValue, + _isEthIndexed: PromiseOrValue, + _isFallback: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + sortedVessels(overrides?: CallOverrides): Promise; + + stabilityPool(overrides?: CallOverrides): Promise; + + timelockAddress(overrides?: CallOverrides): Promise; + + transferOwnership(newOwner: PromiseOrValue, overrides?: CallOverrides): Promise; + + treasuryAddress(overrides?: CallOverrides): Promise; + + upgradeTo(newImplementation: PromiseOrValue, overrides?: CallOverrides): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + vesselManager(overrides?: CallOverrides): Promise; + + vesselManagerOperations(overrides?: CallOverrides): Promise; + }; + + filters: { + 'AdminChanged(address,address)'(previousAdmin?: null, newAdmin?: null): AdminChangedEventFilter; + AdminChanged(previousAdmin?: null, newAdmin?: null): AdminChangedEventFilter; + + 'BeaconUpgraded(address)'(beacon?: PromiseOrValue | null): BeaconUpgradedEventFilter; + BeaconUpgraded(beacon?: PromiseOrValue | null): BeaconUpgradedEventFilter; + + 'Initialized(uint8)'(version?: null): InitializedEventFilter; + Initialized(version?: null): InitializedEventFilter; + + 'NewOracleRegistered(address,address,bool,bool)'( + token?: null, + oracleAddress?: null, + isEthIndexed?: null, + isFallback?: null, + ): NewOracleRegisteredEventFilter; + NewOracleRegistered( + token?: null, + oracleAddress?: null, + isEthIndexed?: null, + isFallback?: null, + ): NewOracleRegisteredEventFilter; + + 'OwnershipTransferred(address,address)'( + previousOwner?: PromiseOrValue | null, + newOwner?: PromiseOrValue | null, + ): OwnershipTransferredEventFilter; + OwnershipTransferred( + previousOwner?: PromiseOrValue | null, + newOwner?: PromiseOrValue | null, + ): OwnershipTransferredEventFilter; + + 'Upgraded(address)'(implementation?: PromiseOrValue | null): UpgradedEventFilter; + Upgraded(implementation?: PromiseOrValue | null): UpgradedEventFilter; + }; + + estimateGas: { + NAME(overrides?: CallOverrides): Promise; + + TARGET_DIGITS(overrides?: CallOverrides): Promise; + + activePool(overrides?: CallOverrides): Promise; + + adminContract(overrides?: CallOverrides): Promise; + + authorizeUpgrade( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + borrowerOperations(overrides?: CallOverrides): Promise; + + collSurplusPool(overrides?: CallOverrides): Promise; + + communityIssuance(overrides?: CallOverrides): Promise; + + debtToken(overrides?: CallOverrides): Promise; + + defaultPool(overrides?: CallOverrides): Promise; + + fallbacks(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + + feeCollector(overrides?: CallOverrides): Promise; + + fetchPrice(_token: PromiseOrValue, overrides?: CallOverrides): Promise; + + gasPoolAddress(overrides?: CallOverrides): Promise; + + grvtStaking(overrides?: CallOverrides): Promise; + + initialize(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + oracles(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + priceFeed(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + setOracle( + _token: PromiseOrValue, + _oracle: PromiseOrValue, + _type: PromiseOrValue, + _timeoutSeconds: PromiseOrValue, + _isEthIndexed: PromiseOrValue, + _isFallback: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + sortedVessels(overrides?: CallOverrides): Promise; + + stabilityPool(overrides?: CallOverrides): Promise; + + timelockAddress(overrides?: CallOverrides): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + treasuryAddress(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + vesselManager(overrides?: CallOverrides): Promise; + + vesselManagerOperations(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + NAME(overrides?: CallOverrides): Promise; + + TARGET_DIGITS(overrides?: CallOverrides): Promise; + + activePool(overrides?: CallOverrides): Promise; + + adminContract(overrides?: CallOverrides): Promise; + + authorizeUpgrade( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + borrowerOperations(overrides?: CallOverrides): Promise; + + collSurplusPool(overrides?: CallOverrides): Promise; + + communityIssuance(overrides?: CallOverrides): Promise; + + debtToken(overrides?: CallOverrides): Promise; + + defaultPool(overrides?: CallOverrides): Promise; + + fallbacks(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + + feeCollector(overrides?: CallOverrides): Promise; + + fetchPrice(_token: PromiseOrValue, overrides?: CallOverrides): Promise; + + gasPoolAddress(overrides?: CallOverrides): Promise; + + grvtStaking(overrides?: CallOverrides): Promise; + + initialize(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + oracles(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + priceFeed(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + setOracle( + _token: PromiseOrValue, + _oracle: PromiseOrValue, + _type: PromiseOrValue, + _timeoutSeconds: PromiseOrValue, + _isEthIndexed: PromiseOrValue, + _isFallback: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + sortedVessels(overrides?: CallOverrides): Promise; + + stabilityPool(overrides?: CallOverrides): Promise; + + timelockAddress(overrides?: CallOverrides): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + treasuryAddress(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + vesselManager(overrides?: CallOverrides): Promise; + + vesselManagerOperations(overrides?: CallOverrides): Promise; + }; +} diff --git a/src/apps/gravita/contracts/ethers/factories/AdminContract__factory.ts b/src/apps/gravita/contracts/ethers/factories/AdminContract__factory.ts new file mode 100644 index 000000000..1dcac04a6 --- /dev/null +++ b/src/apps/gravita/contracts/ethers/factories/AdminContract__factory.ts @@ -0,0 +1,1315 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from 'ethers'; +import type { Provider } from '@ethersproject/providers'; +import type { AdminContract, AdminContractInterface } from '../AdminContract'; + +const _abi = [ + { + inputs: [], + name: 'AdminContract__CollateralAlreadyInitialized', + type: 'error', + }, + { + inputs: [], + name: 'AdminContract__OnlyOwner', + type: 'error', + }, + { + inputs: [], + name: 'AdminContract__OnlyTimelock', + type: 'error', + }, + { + inputs: [ + { + internalType: 'string', + name: 'parameter', + type: 'string', + }, + { + internalType: 'uint256', + name: 'valueEntered', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'minValue', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'maxValue', + type: 'uint256', + }, + ], + name: 'SafeCheckError', + type: 'error', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'previousAdmin', + type: 'address', + }, + { + indexed: false, + internalType: 'address', + name: 'newAdmin', + type: 'address', + }, + ], + name: 'AdminChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'beacon', + type: 'address', + }, + ], + name: 'BeaconUpgraded', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint256', + name: 'oldBorrowingFee', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'newBorrowingFee', + type: 'uint256', + }, + ], + name: 'BorrowingFeeChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint256', + name: 'oldCCR', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'newCCR', + type: 'uint256', + }, + ], + name: 'CCRChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: '_collateral', + type: 'address', + }, + ], + name: 'CollateralAdded', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint8', + name: 'version', + type: 'uint8', + }, + ], + name: 'Initialized', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint256', + name: 'oldMCR', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'newMCR', + type: 'uint256', + }, + ], + name: 'MCRChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint256', + name: 'oldMinNet', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'newMinNet', + type: 'uint256', + }, + ], + name: 'MinNetDebtChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint256', + name: 'oldMintCap', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'newMintCap', + type: 'uint256', + }, + ], + name: 'MintCapChanged', + 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: 'uint256', + name: 'oldPercentDiv', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'newPercentDiv', + type: 'uint256', + }, + ], + name: 'PercentDivisorChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: '_collateral', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: '_blockTimestamp', + type: 'uint256', + }, + ], + name: 'RedemptionBlockTimestampChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint256', + name: 'oldRedemptionFeeFloor', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'newRedemptionFeeFloor', + type: 'uint256', + }, + ], + name: 'RedemptionFeeFloorChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'implementation', + type: 'address', + }, + ], + name: 'Upgraded', + type: 'event', + }, + { + inputs: [], + name: 'BORROWING_FEE_DEFAULT', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'CCR_DEFAULT', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'DECIMAL_PRECISION', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'MCR_DEFAULT', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'MINT_CAP_DEFAULT', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'MIN_NET_DEBT_DEFAULT', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'NAME', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'PERCENT_DIVISOR_DEFAULT', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'REDEMPTION_BLOCK_TIMESTAMP_DEFAULT', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'REDEMPTION_FEE_FLOOR_DEFAULT', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: '_100pct', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'activePool', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_collateral', + type: 'address', + }, + { + internalType: 'uint256', + name: '_debtTokenGasCompensation', + type: 'uint256', + }, + { + internalType: 'uint256', + name: '_decimals', + type: 'uint256', + }, + ], + name: 'addNewCollateral', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'adminContract', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newImplementation', + type: 'address', + }, + ], + name: 'authorizeUpgrade', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'borrowerOperations', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'collSurplusPool', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'communityIssuance', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'debtToken', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'defaultPool', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'feeCollector', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'gasPoolAddress', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_collateral', + type: 'address', + }, + ], + name: 'getBorrowingFee', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_collateral', + type: 'address', + }, + ], + name: 'getCcr', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_collateral', + type: 'address', + }, + ], + name: 'getDebtTokenGasCompensation', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_collateral', + type: 'address', + }, + ], + name: 'getDecimals', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_collateral', + type: 'address', + }, + ], + name: 'getIndex', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address[]', + name: '_colls', + type: 'address[]', + }, + ], + name: 'getIndices', + outputs: [ + { + internalType: 'uint256[]', + name: 'indices', + type: 'uint256[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_collateral', + type: 'address', + }, + ], + name: 'getIsActive', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_collateral', + type: 'address', + }, + ], + name: 'getMcr', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_collateral', + type: 'address', + }, + ], + name: 'getMinNetDebt', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_collateral', + type: 'address', + }, + ], + name: 'getMintCap', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_collateral', + type: 'address', + }, + ], + name: 'getPercentDivisor', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_collateral', + type: 'address', + }, + ], + name: 'getRedemptionBlockTimestamp', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_collateral', + type: 'address', + }, + ], + name: 'getRedemptionFeeFloor', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_asset', + type: 'address', + }, + ], + name: 'getTotalAssetDebt', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'getValidCollateral', + outputs: [ + { + internalType: 'address[]', + name: '', + type: 'address[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'grvtStaking', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'initialize', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'isSetupInitialized', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'owner', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'priceFeed', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'proxiableUUID', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'renounceOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_collateral', + type: 'address', + }, + { + internalType: 'uint256', + name: 'borrowingFee', + type: 'uint256', + }, + ], + name: 'setBorrowingFee', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_collateral', + type: 'address', + }, + { + internalType: 'uint256', + name: 'newCCR', + type: 'uint256', + }, + ], + name: 'setCCR', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_collateral', + type: 'address', + }, + { + internalType: 'uint256', + name: 'borrowingFee', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'ccr', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'mcr', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'minNetDebt', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'mintCap', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'percentDivisor', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'redemptionFeeFloor', + type: 'uint256', + }, + ], + name: 'setCollateralParameters', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_collateral', + type: 'address', + }, + { + internalType: 'bool', + name: '_active', + type: 'bool', + }, + ], + name: 'setIsActive', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_collateral', + type: 'address', + }, + { + internalType: 'uint256', + name: 'newMCR', + type: 'uint256', + }, + ], + name: 'setMCR', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_collateral', + type: 'address', + }, + { + internalType: 'uint256', + name: 'minNetDebt', + type: 'uint256', + }, + ], + name: 'setMinNetDebt', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_collateral', + type: 'address', + }, + { + internalType: 'uint256', + name: 'mintCap', + type: 'uint256', + }, + ], + name: 'setMintCap', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_collateral', + type: 'address', + }, + { + internalType: 'uint256', + name: 'percentDivisor', + type: 'uint256', + }, + ], + name: 'setPercentDivisor', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_collateral', + type: 'address', + }, + { + internalType: 'uint256', + name: '_blockTimestamp', + type: 'uint256', + }, + ], + name: 'setRedemptionBlockTimestamp', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_collateral', + type: 'address', + }, + { + internalType: 'uint256', + name: 'redemptionFeeFloor', + type: 'uint256', + }, + ], + name: 'setRedemptionFeeFloor', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'setSetupIsInitialized', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'sortedVessels', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'stabilityPool', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'timelockAddress', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newOwner', + type: 'address', + }, + ], + name: 'transferOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'treasuryAddress', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + 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: 'uint256', + name: '', + type: 'uint256', + }, + ], + name: 'validCollateral', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'vesselManager', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'vesselManagerOperations', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, +]; + +export class AdminContract__factory { + static readonly abi = _abi; + static createInterface(): AdminContractInterface { + return new utils.Interface(_abi) as AdminContractInterface; + } + static connect(address: string, signerOrProvider: Signer | Provider): AdminContract { + return new Contract(address, _abi, signerOrProvider) as AdminContract; + } +} diff --git a/src/apps/gravita/contracts/ethers/factories/BorrowerOperations__factory.ts b/src/apps/gravita/contracts/ethers/factories/BorrowerOperations__factory.ts new file mode 100644 index 000000000..e696f849d --- /dev/null +++ b/src/apps/gravita/contracts/ethers/factories/BorrowerOperations__factory.ts @@ -0,0 +1,820 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from 'ethers'; +import type { Provider } from '@ethersproject/providers'; +import type { BorrowerOperations, BorrowerOperationsInterface } from '../BorrowerOperations'; + +const _abi = [ + { + inputs: [], + name: 'EthUnsupportedError', + type: 'error', + }, + { + inputs: [], + name: 'InvalidAmountError', + type: 'error', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'previousAdmin', + type: 'address', + }, + { + indexed: false, + internalType: 'address', + name: 'newAdmin', + type: 'address', + }, + ], + name: 'AdminChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'beacon', + type: 'address', + }, + ], + name: 'BeaconUpgraded', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: '_asset', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: '_borrower', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: '_feeAmount', + type: 'uint256', + }, + ], + name: 'BorrowingFeePaid', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint8', + name: 'version', + type: 'uint8', + }, + ], + name: 'Initialized', + 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: 'implementation', + type: 'address', + }, + ], + name: 'Upgraded', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: '_asset', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: '_borrower', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'arrayIndex', + type: 'uint256', + }, + ], + name: 'VesselCreated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: '_asset', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: '_borrower', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: '_debt', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: '_coll', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'stake', + type: 'uint256', + }, + { + indexed: false, + internalType: 'enum IBorrowerOperations.BorrowerOperation', + name: 'operation', + type: 'uint8', + }, + ], + name: 'VesselUpdated', + type: 'event', + }, + { + inputs: [], + name: 'DECIMAL_PRECISION', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'NAME', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'activePool', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_asset', + type: 'address', + }, + { + internalType: 'uint256', + name: '_assetSent', + type: 'uint256', + }, + { + internalType: 'address', + name: '_upperHint', + type: 'address', + }, + { + internalType: 'address', + name: '_lowerHint', + type: 'address', + }, + ], + name: 'addColl', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_asset', + type: 'address', + }, + { + internalType: 'uint256', + name: '_assetSent', + type: 'uint256', + }, + { + internalType: 'uint256', + name: '_collWithdrawal', + type: 'uint256', + }, + { + internalType: 'uint256', + name: '_debtTokenChange', + type: 'uint256', + }, + { + internalType: 'bool', + name: '_isDebtIncrease', + type: 'bool', + }, + { + internalType: 'address', + name: '_upperHint', + type: 'address', + }, + { + internalType: 'address', + name: '_lowerHint', + type: 'address', + }, + ], + name: 'adjustVessel', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'adminContract', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newImplementation', + type: 'address', + }, + ], + name: 'authorizeUpgrade', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'borrowerOperations', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_asset', + type: 'address', + }, + ], + name: 'claimCollateral', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_asset', + type: 'address', + }, + ], + name: 'closeVessel', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'collSurplusPool', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'communityIssuance', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'debtToken', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'defaultPool', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'feeCollector', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'gasPoolAddress', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_asset', + type: 'address', + }, + { + internalType: 'uint256', + name: '_debt', + type: 'uint256', + }, + ], + name: 'getCompositeDebt', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_asset', + type: 'address', + }, + ], + name: 'getEntireSystemColl', + outputs: [ + { + internalType: 'uint256', + name: 'entireSystemColl', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_asset', + type: 'address', + }, + ], + name: 'getEntireSystemDebt', + outputs: [ + { + internalType: 'uint256', + name: 'entireSystemDebt', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'grvtStaking', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'initialize', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_asset', + type: 'address', + }, + { + internalType: 'uint256', + name: '_assetAmount', + type: 'uint256', + }, + { + internalType: 'uint256', + name: '_debtTokenAmount', + type: 'uint256', + }, + { + internalType: 'address', + name: '_upperHint', + type: 'address', + }, + { + internalType: 'address', + name: '_lowerHint', + type: 'address', + }, + ], + name: 'openVessel', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'owner', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'priceFeed', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'proxiableUUID', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'renounceOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_asset', + type: 'address', + }, + { + internalType: 'uint256', + name: '_debtTokenAmount', + type: 'uint256', + }, + { + internalType: 'address', + name: '_upperHint', + type: 'address', + }, + { + internalType: 'address', + name: '_lowerHint', + type: 'address', + }, + ], + name: 'repayDebtTokens', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'sortedVessels', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'stabilityPool', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'timelockAddress', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newOwner', + type: 'address', + }, + ], + name: 'transferOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'treasuryAddress', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + 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: [], + name: 'vesselManager', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'vesselManagerOperations', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_asset', + type: 'address', + }, + { + internalType: 'uint256', + name: '_collWithdrawal', + type: 'uint256', + }, + { + internalType: 'address', + name: '_upperHint', + type: 'address', + }, + { + internalType: 'address', + name: '_lowerHint', + type: 'address', + }, + ], + name: 'withdrawColl', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_asset', + type: 'address', + }, + { + internalType: 'uint256', + name: '_debtTokenAmount', + type: 'uint256', + }, + { + internalType: 'address', + name: '_upperHint', + type: 'address', + }, + { + internalType: 'address', + name: '_lowerHint', + type: 'address', + }, + ], + name: 'withdrawDebtTokens', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, +]; + +export class BorrowerOperations__factory { + static readonly abi = _abi; + static createInterface(): BorrowerOperationsInterface { + return new utils.Interface(_abi) as BorrowerOperationsInterface; + } + static connect(address: string, signerOrProvider: Signer | Provider): BorrowerOperations { + return new Contract(address, _abi, signerOrProvider) as BorrowerOperations; + } +} diff --git a/src/apps/gravita/contracts/ethers/factories/PriceFeed__factory.ts b/src/apps/gravita/contracts/ethers/factories/PriceFeed__factory.ts new file mode 100644 index 000000000..2b9c2bffb --- /dev/null +++ b/src/apps/gravita/contracts/ethers/factories/PriceFeed__factory.ts @@ -0,0 +1,638 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from 'ethers'; +import type { Provider } from '@ethersproject/providers'; +import type { PriceFeed, PriceFeedInterface } from '../PriceFeed'; + +const _abi = [ + { + inputs: [], + name: 'PriceFeed__ExistingOracleRequired', + type: 'error', + }, + { + inputs: [], + name: 'PriceFeed__InvalidDecimalsError', + type: 'error', + }, + { + inputs: [ + { + internalType: 'address', + name: 'token', + type: 'address', + }, + ], + name: 'PriceFeed__InvalidOracleResponseError', + type: 'error', + }, + { + inputs: [], + name: 'PriceFeed__TimelockOnlyError', + type: 'error', + }, + { + inputs: [], + name: 'PriceFeed__UnknownAssetError', + type: 'error', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'previousAdmin', + type: 'address', + }, + { + indexed: false, + internalType: 'address', + name: 'newAdmin', + type: 'address', + }, + ], + name: 'AdminChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'beacon', + type: 'address', + }, + ], + name: 'BeaconUpgraded', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint8', + name: 'version', + type: 'uint8', + }, + ], + name: 'Initialized', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'token', + type: 'address', + }, + { + indexed: false, + internalType: 'address', + name: 'oracleAddress', + type: 'address', + }, + { + indexed: false, + internalType: 'bool', + name: 'isEthIndexed', + type: 'bool', + }, + { + indexed: false, + internalType: 'bool', + name: 'isFallback', + type: 'bool', + }, + ], + name: 'NewOracleRegistered', + 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: 'implementation', + type: 'address', + }, + ], + name: 'Upgraded', + type: 'event', + }, + { + inputs: [], + name: 'NAME', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'TARGET_DIGITS', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'activePool', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'adminContract', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newImplementation', + type: 'address', + }, + ], + name: 'authorizeUpgrade', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'borrowerOperations', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'collSurplusPool', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'communityIssuance', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'debtToken', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'defaultPool', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'fallbacks', + outputs: [ + { + internalType: 'address', + name: 'oracleAddress', + type: 'address', + }, + { + internalType: 'enum IPriceFeed.ProviderType', + name: 'providerType', + type: 'uint8', + }, + { + internalType: 'uint256', + name: 'timeoutSeconds', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'decimals', + type: 'uint256', + }, + { + internalType: 'bool', + name: 'isEthIndexed', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'feeCollector', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_token', + type: 'address', + }, + ], + name: 'fetchPrice', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'gasPoolAddress', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'grvtStaking', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'initialize', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'oracles', + outputs: [ + { + internalType: 'address', + name: 'oracleAddress', + type: 'address', + }, + { + internalType: 'enum IPriceFeed.ProviderType', + name: 'providerType', + type: 'uint8', + }, + { + internalType: 'uint256', + name: 'timeoutSeconds', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'decimals', + type: 'uint256', + }, + { + internalType: 'bool', + name: 'isEthIndexed', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'owner', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'priceFeed', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'proxiableUUID', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'renounceOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_token', + type: 'address', + }, + { + internalType: 'address', + name: '_oracle', + type: 'address', + }, + { + internalType: 'enum IPriceFeed.ProviderType', + name: '_type', + type: 'uint8', + }, + { + internalType: 'uint256', + name: '_timeoutSeconds', + type: 'uint256', + }, + { + internalType: 'bool', + name: '_isEthIndexed', + type: 'bool', + }, + { + internalType: 'bool', + name: '_isFallback', + type: 'bool', + }, + ], + name: 'setOracle', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'sortedVessels', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'stabilityPool', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'timelockAddress', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newOwner', + type: 'address', + }, + ], + name: 'transferOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'treasuryAddress', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + 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: [], + name: 'vesselManager', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'vesselManagerOperations', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, +]; + +export class PriceFeed__factory { + static readonly abi = _abi; + static createInterface(): PriceFeedInterface { + return new utils.Interface(_abi) as PriceFeedInterface; + } + static connect(address: string, signerOrProvider: Signer | Provider): PriceFeed { + return new Contract(address, _abi, signerOrProvider) as PriceFeed; + } +} diff --git a/src/apps/gravita/contracts/ethers/factories/index.ts b/src/apps/gravita/contracts/ethers/factories/index.ts index 7aea76647..15e31180b 100644 --- a/src/apps/gravita/contracts/ethers/factories/index.ts +++ b/src/apps/gravita/contracts/ethers/factories/index.ts @@ -1,5 +1,8 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ +export { AdminContract__factory } from './AdminContract__factory'; +export { BorrowerOperations__factory } from './BorrowerOperations__factory'; +export { PriceFeed__factory } from './PriceFeed__factory'; export { StabilityPool__factory } from './StabilityPool__factory'; export { VesselManager__factory } from './VesselManager__factory'; diff --git a/src/apps/gravita/contracts/ethers/index.ts b/src/apps/gravita/contracts/ethers/index.ts index 5a749ae4c..42aa3eea2 100644 --- a/src/apps/gravita/contracts/ethers/index.ts +++ b/src/apps/gravita/contracts/ethers/index.ts @@ -1,8 +1,14 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ +export type { AdminContract } from './AdminContract'; +export type { BorrowerOperations } from './BorrowerOperations'; +export type { PriceFeed } from './PriceFeed'; export type { StabilityPool } from './StabilityPool'; export type { VesselManager } from './VesselManager'; export * as factories from './factories'; +export { AdminContract__factory } from './factories/AdminContract__factory'; +export { BorrowerOperations__factory } from './factories/BorrowerOperations__factory'; +export { PriceFeed__factory } from './factories/PriceFeed__factory'; export { StabilityPool__factory } from './factories/StabilityPool__factory'; export { VesselManager__factory } from './factories/VesselManager__factory'; diff --git a/src/apps/gravita/contracts/index.ts b/src/apps/gravita/contracts/index.ts index 4b032e259..2d597d95b 100644 --- a/src/apps/gravita/contracts/index.ts +++ b/src/apps/gravita/contracts/index.ts @@ -4,7 +4,13 @@ import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; import { ContractFactory } from '~contract/contracts'; import { Network } from '~types/network.interface'; -import { StabilityPool__factory, VesselManager__factory } from './ethers'; +import { + AdminContract__factory, + BorrowerOperations__factory, + PriceFeed__factory, + StabilityPool__factory, + VesselManager__factory, +} from './ethers'; // eslint-disable-next-line type ContractOpts = { address: string; network: Network }; @@ -15,6 +21,15 @@ export class GravitaContractFactory extends ContractFactory { super((network: Network) => appToolkit.getNetworkProvider(network)); } + adminContract({ address, network }: ContractOpts) { + return AdminContract__factory.connect(address, this.appToolkit.getNetworkProvider(network)); + } + borrowerOperations({ address, network }: ContractOpts) { + return BorrowerOperations__factory.connect(address, this.appToolkit.getNetworkProvider(network)); + } + priceFeed({ address, network }: ContractOpts) { + return PriceFeed__factory.connect(address, this.appToolkit.getNetworkProvider(network)); + } stabilityPool({ address, network }: ContractOpts) { return StabilityPool__factory.connect(address, this.appToolkit.getNetworkProvider(network)); } @@ -23,5 +38,8 @@ export class GravitaContractFactory extends ContractFactory { } } +export type { AdminContract } from './ethers'; +export type { BorrowerOperations } from './ethers'; +export type { PriceFeed } from './ethers'; export type { StabilityPool } from './ethers'; export type { VesselManager } from './ethers'; diff --git a/src/apps/gravita/ethereum/gravita.vessel.contract-position-fetcher.ts b/src/apps/gravita/ethereum/gravita.vessel.contract-position-fetcher.ts index 4ec69c0ee..ee88950ec 100644 --- a/src/apps/gravita/ethereum/gravita.vessel.contract-position-fetcher.ts +++ b/src/apps/gravita/ethereum/gravita.vessel.contract-position-fetcher.ts @@ -4,14 +4,5 @@ import { GravitaVesselContractPositionFetcher } from '../common/gravita.vessel.c @PositionTemplate() export class EthereumGravitaVesselContractPositionFetcher extends GravitaVesselContractPositionFetcher { - vesselManagerAddress = '0xdb5dacb1dfbe16326c3656a88017f0cb4ece0977'; borrowerOperationsAddress = '0x2bca0300c2aa65de6f19c2d241b54a445c9990e2'; - collateralTokenAddresses = [ - '0xae78736cd615f374d3085123a210448e74fc6393', // rETH - '0xb9d7dddca9a4ac480991865efef82e01273f79c3', // bLUSD - '0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0', // wstETH - '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', // wETH - '0xf951e335afb289353dc249e82926178eac7ded78', // swETH - '0xac3e018457b222d93114458476f3e3416abbe38f', // sfrxETH - ]; }