diff --git a/src/apps/tectonic/assets/logo.png b/src/apps/tectonic/assets/logo.png new file mode 100644 index 000000000..885a9b9c1 Binary files /dev/null and b/src/apps/tectonic/assets/logo.png differ diff --git a/src/apps/tectonic/contracts/abis/tectonic-core.json b/src/apps/tectonic/contracts/abis/tectonic-core.json new file mode 100644 index 000000000..6ab7da37f --- /dev/null +++ b/src/apps/tectonic/contracts/abis/tectonic-core.json @@ -0,0 +1,1106 @@ +[ + { + "inputs": [{ "internalType": "address", "name": "_tonicTokenContract", "type": "address" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "string", "name": "action", "type": "string" }, + { "indexed": false, "internalType": "bool", "name": "pauseState", "type": "bool" } + ], + "name": "ActionPaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "contract TToken", "name": "tToken", "type": "address" }, + { "indexed": false, "internalType": "string", "name": "action", "type": "string" }, + { "indexed": false, "internalType": "bool", "name": "pauseState", "type": "bool" } + ], + "name": "ActionPaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "contributor", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "newSpeed", "type": "uint256" } + ], + "name": "ContributorTonicSpeedUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "contract TToken", "name": "tToken", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "borrower", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "tonicDelta", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "tonicBorrowIndex", "type": "uint256" } + ], + "name": "DistributedBorrowerTonic", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "contract TToken", "name": "tToken", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "supplier", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "tonicDelta", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "tonicSupplyIndex", "type": "uint256" } + ], + "name": "DistributedSupplierTonic", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "uint256", "name": "error", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "info", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "detail", "type": "uint256" } + ], + "name": "Failure", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "contract TToken", "name": "tToken", "type": "address" }, + { "indexed": false, "internalType": "address", "name": "account", "type": "address" } + ], + "name": "MarketEntered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "contract TToken", "name": "tToken", "type": "address" }, + { "indexed": false, "internalType": "address", "name": "account", "type": "address" } + ], + "name": "MarketExited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [{ "indexed": false, "internalType": "contract TToken", "name": "tToken", "type": "address" }], + "name": "MarketListed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "contract TToken", "name": "tToken", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "newBorrowCap", "type": "uint256" } + ], + "name": "NewBorrowCap", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "address", "name": "oldBorrowCapGuardian", "type": "address" }, + { "indexed": false, "internalType": "address", "name": "newBorrowCapGuardian", "type": "address" } + ], + "name": "NewBorrowCapGuardian", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "uint256", "name": "oldCloseFactorMantissa", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "newCloseFactorMantissa", "type": "uint256" } + ], + "name": "NewCloseFactor", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "contract TToken", "name": "tToken", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "oldCollateralFactorMantissa", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "newCollateralFactorMantissa", "type": "uint256" } + ], + "name": "NewCollateralFactor", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "uint256", "name": "oldLiquidationIncentiveMantissa", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "newLiquidationIncentiveMantissa", "type": "uint256" } + ], + "name": "NewLiquidationIncentive", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "address", "name": "oldPauseGuardian", "type": "address" }, + { "indexed": false, "internalType": "address", "name": "newPauseGuardian", "type": "address" } + ], + "name": "NewPauseGuardian", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "contract PriceOracle", "name": "oldPriceOracle", "type": "address" }, + { "indexed": false, "internalType": "contract PriceOracle", "name": "newPriceOracle", "type": "address" } + ], + "name": "NewPriceOracle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "contract TToken", "name": "tToken", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "newLimitPerUser", "type": "uint256" } + ], + "name": "TVLProtectLimitUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "address", "name": "recipient", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "TonicGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "contract TToken", "name": "tToken", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "newSpeed", "type": "uint256" } + ], + "name": "TonicSpeedUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [{ "indexed": false, "internalType": "address", "name": "account", "type": "address" }], + "name": "WhitelistAccountAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [{ "indexed": false, "internalType": "address", "name": "account", "type": "address" }], + "name": "WhitelistAccountRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [{ "indexed": false, "internalType": "bool", "name": "enabled", "type": "bool" }], + "name": "WhitelistStatusChanged", + "type": "event" + }, + { + "constant": false, + "inputs": [{ "internalType": "address[]", "name": "accounts", "type": "address[]" }], + "name": "_addToWhitelistProtect", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "contract TectonicSocket", "name": "unitroller", "type": "address" }], + "name": "_become", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "_borrowGuardianPaused", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "recipient", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "_grantTonic", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "_mintGuardianPaused", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], + "name": "_removeFromWhitelistProtect", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "address", "name": "newBorrowCapGuardian", "type": "address" }], + "name": "_setBorrowCapGuardian", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "contract TToken", "name": "tToken", "type": "address" }, + { "internalType": "bool", "name": "state", "type": "bool" } + ], + "name": "_setBorrowPaused", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "uint256", "name": "newCloseFactorMantissa", "type": "uint256" }], + "name": "_setCloseFactor", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "contract TToken", "name": "tToken", "type": "address" }, + { "internalType": "uint256", "name": "newCollateralFactorMantissa", "type": "uint256" } + ], + "name": "_setCollateralFactor", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "contributor", "type": "address" }, + { "internalType": "uint256", "name": "tonicSpeed", "type": "uint256" } + ], + "name": "_setContributorTonicSpeed", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "uint256", "name": "newLiquidationIncentiveMantissa", "type": "uint256" }], + "name": "_setLiquidationIncentive", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "contract TToken[]", "name": "tTokens", "type": "address[]" }, + { "internalType": "uint256[]", "name": "newBorrowCaps", "type": "uint256[]" } + ], + "name": "_setMarketBorrowCaps", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "contract TToken", "name": "tToken", "type": "address" }, + { "internalType": "bool", "name": "state", "type": "bool" } + ], + "name": "_setMintPaused", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "address", "name": "newPauseGuardian", "type": "address" }], + "name": "_setPauseGuardian", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "contract PriceOracle", "name": "newOracle", "type": "address" }], + "name": "_setPriceOracle", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "bool", "name": "state", "type": "bool" }], + "name": "_setSeizePaused", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "contract TToken", "name": "tToken", "type": "address" }, + { "internalType": "uint256", "name": "tonicSpeed", "type": "uint256" } + ], + "name": "_setTonicSpeed", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "bool", "name": "state", "type": "bool" }], + "name": "_setTransferPaused", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "bool", "name": "whitelistStatus", "type": "bool" }], + "name": "_setWhitelistProtect", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "contract TToken", "name": "tToken", "type": "address" }], + "name": "_supportMarket", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "contract TToken[]", "name": "tTokens", "type": "address[]" }, + { "internalType": "uint256[]", "name": "newLimitPerUser", "type": "uint256[]" } + ], + "name": "_updateTvlProtectLimit", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "address", "name": "", "type": "address" }, + { "internalType": "uint256", "name": "", "type": "uint256" } + ], + "name": "accountAssets", + "outputs": [{ "internalType": "contract TToken", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "admin", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "name": "allMarkets", + "outputs": [{ "internalType": "contract TToken", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "tToken", "type": "address" }, + { "internalType": "address", "name": "borrower", "type": "address" }, + { "internalType": "uint256", "name": "borrowAmount", "type": "uint256" } + ], + "name": "borrowAllowed", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "borrowCapGuardian", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "borrowCaps", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "borrowGuardianPaused", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "tToken", "type": "address" }, + { "internalType": "address", "name": "borrower", "type": "address" }, + { "internalType": "uint256", "name": "borrowAmount", "type": "uint256" } + ], + "name": "borrowVerify", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "address", "name": "account", "type": "address" }, + { "internalType": "contract TToken", "name": "tToken", "type": "address" } + ], + "name": "checkMembership", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address[]", "name": "holders", "type": "address[]" }, + { "internalType": "contract TToken[]", "name": "tTokens", "type": "address[]" }, + { "internalType": "bool", "name": "borrowers", "type": "bool" }, + { "internalType": "bool", "name": "suppliers", "type": "bool" } + ], + "name": "claimTonic", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "address", "name": "holder", "type": "address" }], + "name": "claimTonic", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "holder", "type": "address" }, + { "internalType": "contract TToken[]", "name": "tTokens", "type": "address[]" } + ], + "name": "claimTonic", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "closeFactorMantissa", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "address[]", "name": "tTokens", "type": "address[]" }], + "name": "enterMarkets", + "outputs": [{ "internalType": "uint256[]", "name": "", "type": "uint256[]" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "address", "name": "tTokenAddress", "type": "address" }], + "name": "exitMarket", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], + "name": "getAccountLiquidity", + "outputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" }, + { "internalType": "uint256", "name": "", "type": "uint256" }, + { "internalType": "uint256", "name": "", "type": "uint256" } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getAllMarkets", + "outputs": [{ "internalType": "contract TToken[]", "name": "", "type": "address[]" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], + "name": "getAssetsIn", + "outputs": [{ "internalType": "contract TToken[]", "name": "", "type": "address[]" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getBlockNumber", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "address", "name": "account", "type": "address" }, + { "internalType": "address", "name": "tTokenModify", "type": "address" }, + { "internalType": "uint256", "name": "redeemTokens", "type": "uint256" }, + { "internalType": "uint256", "name": "borrowAmount", "type": "uint256" } + ], + "name": "getHypotheticalAccountLiquidity", + "outputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" }, + { "internalType": "uint256", "name": "", "type": "uint256" }, + { "internalType": "uint256", "name": "", "type": "uint256" } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getTonicAddress", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "contract TToken", "name": "tToken", "type": "address" }], + "name": "isDeprecated", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isTectonicCore", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "lastContributorBlock", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "tTokenBorrowed", "type": "address" }, + { "internalType": "address", "name": "tTokenCollateral", "type": "address" }, + { "internalType": "address", "name": "liquidator", "type": "address" }, + { "internalType": "address", "name": "borrower", "type": "address" }, + { "internalType": "uint256", "name": "repayAmount", "type": "uint256" } + ], + "name": "liquidateBorrowAllowed", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "tTokenBorrowed", "type": "address" }, + { "internalType": "address", "name": "tTokenCollateral", "type": "address" }, + { "internalType": "address", "name": "liquidator", "type": "address" }, + { "internalType": "address", "name": "borrower", "type": "address" }, + { "internalType": "uint256", "name": "actualRepayAmount", "type": "uint256" }, + { "internalType": "uint256", "name": "seizeTokens", "type": "uint256" } + ], + "name": "liquidateBorrowVerify", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "address", "name": "tTokenBorrowed", "type": "address" }, + { "internalType": "address", "name": "tTokenCollateral", "type": "address" }, + { "internalType": "uint256", "name": "actualRepayAmount", "type": "uint256" } + ], + "name": "liquidateCalculateSeizeTokens", + "outputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" }, + { "internalType": "uint256", "name": "", "type": "uint256" } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "liquidationIncentiveMantissa", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "markets", + "outputs": [ + { "internalType": "bool", "name": "isListed", "type": "bool" }, + { "internalType": "uint256", "name": "collateralFactorMantissa", "type": "uint256" }, + { "internalType": "bool", "name": "isTonicized", "type": "bool" } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "maxAssets", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "tToken", "type": "address" }, + { "internalType": "address", "name": "minter", "type": "address" }, + { "internalType": "uint256", "name": "mintAmount", "type": "uint256" } + ], + "name": "mintAllowed", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "mintGuardianPaused", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "tToken", "type": "address" }, + { "internalType": "address", "name": "minter", "type": "address" }, + { "internalType": "uint256", "name": "actualMintAmount", "type": "uint256" }, + { "internalType": "uint256", "name": "mintTokens", "type": "uint256" } + ], + "name": "mintVerify", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "oracle", + "outputs": [{ "internalType": "contract PriceOracle", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pauseGuardian", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pendingAdmin", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pendingTectonicCoreImplementation", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "tToken", "type": "address" }, + { "internalType": "address", "name": "redeemer", "type": "address" }, + { "internalType": "uint256", "name": "redeemTokens", "type": "uint256" } + ], + "name": "redeemAllowed", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "tToken", "type": "address" }, + { "internalType": "address", "name": "redeemer", "type": "address" }, + { "internalType": "uint256", "name": "redeemAmount", "type": "uint256" }, + { "internalType": "uint256", "name": "redeemTokens", "type": "uint256" } + ], + "name": "redeemVerify", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "tToken", "type": "address" }, + { "internalType": "address", "name": "payer", "type": "address" }, + { "internalType": "address", "name": "borrower", "type": "address" }, + { "internalType": "uint256", "name": "repayAmount", "type": "uint256" } + ], + "name": "repayBorrowAllowed", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "tToken", "type": "address" }, + { "internalType": "address", "name": "payer", "type": "address" }, + { "internalType": "address", "name": "borrower", "type": "address" }, + { "internalType": "uint256", "name": "actualRepayAmount", "type": "uint256" }, + { "internalType": "uint256", "name": "borrowerIndex", "type": "uint256" } + ], + "name": "repayBorrowVerify", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "tTokenCollateral", "type": "address" }, + { "internalType": "address", "name": "tTokenBorrowed", "type": "address" }, + { "internalType": "address", "name": "liquidator", "type": "address" }, + { "internalType": "address", "name": "borrower", "type": "address" }, + { "internalType": "uint256", "name": "seizeTokens", "type": "uint256" } + ], + "name": "seizeAllowed", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "seizeGuardianPaused", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "tTokenCollateral", "type": "address" }, + { "internalType": "address", "name": "tTokenBorrowed", "type": "address" }, + { "internalType": "address", "name": "liquidator", "type": "address" }, + { "internalType": "address", "name": "borrower", "type": "address" }, + { "internalType": "uint256", "name": "seizeTokens", "type": "uint256" } + ], + "name": "seizeVerify", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "tectonicCoreImplementation", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "tokenToPerUserTvlProtectLimit", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "tonicAccrued", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "tonicBorrowState", + "outputs": [ + { "internalType": "uint224", "name": "index", "type": "uint224" }, + { "internalType": "uint32", "name": "block", "type": "uint32" } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "address", "name": "", "type": "address" }, + { "internalType": "address", "name": "", "type": "address" } + ], + "name": "tonicBorrowerIndex", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "tonicContributorSpeeds", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "tonicInitialIndex", + "outputs": [{ "internalType": "uint224", "name": "", "type": "uint224" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "tonicRate", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "tonicSpeeds", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "address", "name": "", "type": "address" }, + { "internalType": "address", "name": "", "type": "address" } + ], + "name": "tonicSupplierIndex", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "tonicSupplyState", + "outputs": [ + { "internalType": "uint224", "name": "index", "type": "uint224" }, + { "internalType": "uint32", "name": "block", "type": "uint32" } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "tToken", "type": "address" }, + { "internalType": "address", "name": "src", "type": "address" }, + { "internalType": "address", "name": "dst", "type": "address" }, + { "internalType": "uint256", "name": "transferTokens", "type": "uint256" } + ], + "name": "transferAllowed", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "transferGuardianPaused", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "tToken", "type": "address" }, + { "internalType": "address", "name": "src", "type": "address" }, + { "internalType": "address", "name": "dst", "type": "address" }, + { "internalType": "uint256", "name": "transferTokens", "type": "uint256" } + ], + "name": "transferVerify", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "address", "name": "contributor", "type": "address" }], + "name": "updateContributorRewards", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "address", "name": "", "type": "address" }, + { "internalType": "address", "name": "", "type": "address" } + ], + "name": "utilizedTvlAmount", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "whitelistProtectEnabled", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "whitelistedAddresses", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + } +] diff --git a/src/apps/tectonic/contracts/abis/tectonic-lens.json b/src/apps/tectonic/contracts/abis/tectonic-lens.json new file mode 100644 index 000000000..4355777b6 --- /dev/null +++ b/src/apps/tectonic/contracts/abis/tectonic-lens.json @@ -0,0 +1,365 @@ +[ + { + "constant": false, + "inputs": [ + { "internalType": "contract TectonicCoreLensInterface", "name": "tectonicCore", "type": "address" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "getAccountLimits", + "outputs": [ + { + "components": [ + { "internalType": "contract TToken[]", "name": "markets", "type": "address[]" }, + { "internalType": "uint256", "name": "liquidity", "type": "uint256" }, + { "internalType": "uint256", "name": "shortfall", "type": "uint256" } + ], + "internalType": "struct TectonicLens.AccountLimits", + "name": "", + "type": "tuple" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "contract GovernorBravoInterface", "name": "governor", "type": "address" }, + { "internalType": "uint256[]", "name": "proposalIds", "type": "uint256[]" } + ], + "name": "getGovBravoProposals", + "outputs": [ + { + "components": [ + { "internalType": "uint256", "name": "proposalId", "type": "uint256" }, + { "internalType": "address", "name": "proposer", "type": "address" }, + { "internalType": "uint256", "name": "eta", "type": "uint256" }, + { "internalType": "address[]", "name": "targets", "type": "address[]" }, + { "internalType": "uint256[]", "name": "values", "type": "uint256[]" }, + { "internalType": "string[]", "name": "signatures", "type": "string[]" }, + { "internalType": "bytes[]", "name": "calldatas", "type": "bytes[]" }, + { "internalType": "uint256", "name": "startBlock", "type": "uint256" }, + { "internalType": "uint256", "name": "endBlock", "type": "uint256" }, + { "internalType": "uint256", "name": "forVotes", "type": "uint256" }, + { "internalType": "uint256", "name": "againstVotes", "type": "uint256" }, + { "internalType": "uint256", "name": "abstainVotes", "type": "uint256" }, + { "internalType": "bool", "name": "canceled", "type": "bool" }, + { "internalType": "bool", "name": "executed", "type": "bool" } + ], + "internalType": "struct TectonicLens.GovBravoProposal[]", + "name": "", + "type": "tuple[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "contract GovernorBravoInterface", "name": "governor", "type": "address" }, + { "internalType": "address", "name": "voter", "type": "address" }, + { "internalType": "uint256[]", "name": "proposalIds", "type": "uint256[]" } + ], + "name": "getGovBravoReceipts", + "outputs": [ + { + "components": [ + { "internalType": "uint256", "name": "proposalId", "type": "uint256" }, + { "internalType": "bool", "name": "hasVoted", "type": "bool" }, + { "internalType": "uint8", "name": "support", "type": "uint8" }, + { "internalType": "uint128", "name": "votes", "type": "uint128" } + ], + "internalType": "struct TectonicLens.GovBravoReceipt[]", + "name": "", + "type": "tuple[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "contract GovernorAlpha", "name": "governor", "type": "address" }, + { "internalType": "uint256[]", "name": "proposalIds", "type": "uint256[]" } + ], + "name": "getGovProposals", + "outputs": [ + { + "components": [ + { "internalType": "uint256", "name": "proposalId", "type": "uint256" }, + { "internalType": "address", "name": "proposer", "type": "address" }, + { "internalType": "uint256", "name": "eta", "type": "uint256" }, + { "internalType": "address[]", "name": "targets", "type": "address[]" }, + { "internalType": "uint256[]", "name": "values", "type": "uint256[]" }, + { "internalType": "string[]", "name": "signatures", "type": "string[]" }, + { "internalType": "bytes[]", "name": "calldatas", "type": "bytes[]" }, + { "internalType": "uint256", "name": "startBlock", "type": "uint256" }, + { "internalType": "uint256", "name": "endBlock", "type": "uint256" }, + { "internalType": "uint256", "name": "forVotes", "type": "uint256" }, + { "internalType": "uint256", "name": "againstVotes", "type": "uint256" }, + { "internalType": "bool", "name": "canceled", "type": "bool" }, + { "internalType": "bool", "name": "executed", "type": "bool" } + ], + "internalType": "struct TectonicLens.GovProposal[]", + "name": "", + "type": "tuple[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "contract GovernorAlpha", "name": "governor", "type": "address" }, + { "internalType": "address", "name": "voter", "type": "address" }, + { "internalType": "uint256[]", "name": "proposalIds", "type": "uint256[]" } + ], + "name": "getGovReceipts", + "outputs": [ + { + "components": [ + { "internalType": "uint256", "name": "proposalId", "type": "uint256" }, + { "internalType": "bool", "name": "hasVoted", "type": "bool" }, + { "internalType": "bool", "name": "support", "type": "bool" }, + { "internalType": "uint128", "name": "votes", "type": "uint128" } + ], + "internalType": "struct TectonicLens.GovReceipt[]", + "name": "", + "type": "tuple[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "contract Tonic", "name": "tonic", "type": "address" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "getTonicBalanceMetadata", + "outputs": [ + { + "components": [ + { "internalType": "uint256", "name": "balance", "type": "uint256" }, + { "internalType": "uint256", "name": "votes", "type": "uint256" }, + { "internalType": "address", "name": "delegate", "type": "address" } + ], + "internalType": "struct TectonicLens.TonicBalanceMetadata", + "name": "", + "type": "tuple" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "contract Tonic", "name": "tonic", "type": "address" }, + { "internalType": "contract TectonicCoreLensInterface", "name": "tectonicCore", "type": "address" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "getTonicBalanceMetadataExt", + "outputs": [ + { + "components": [ + { "internalType": "uint256", "name": "balance", "type": "uint256" }, + { "internalType": "uint256", "name": "votes", "type": "uint256" }, + { "internalType": "address", "name": "delegate", "type": "address" }, + { "internalType": "uint256", "name": "allocated", "type": "uint256" } + ], + "internalType": "struct TectonicLens.TonicBalanceMetadataExt", + "name": "", + "type": "tuple" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "contract Tonic", "name": "tonic", "type": "address" }, + { "internalType": "address", "name": "account", "type": "address" }, + { "internalType": "uint32[]", "name": "blockNumbers", "type": "uint32[]" } + ], + "name": "getTonicVotes", + "outputs": [ + { + "components": [ + { "internalType": "uint256", "name": "blockNumber", "type": "uint256" }, + { "internalType": "uint256", "name": "votes", "type": "uint256" } + ], + "internalType": "struct TectonicLens.TonicVotes[]", + "name": "", + "type": "tuple[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "contract TToken", "name": "tToken", "type": "address" }, + { "internalType": "address payable", "name": "account", "type": "address" } + ], + "name": "tTokenBalances", + "outputs": [ + { + "components": [ + { "internalType": "address", "name": "tToken", "type": "address" }, + { "internalType": "uint256", "name": "balanceOf", "type": "uint256" }, + { "internalType": "uint256", "name": "borrowBalanceCurrent", "type": "uint256" }, + { "internalType": "uint256", "name": "balanceOfUnderlying", "type": "uint256" }, + { "internalType": "uint256", "name": "tokenBalance", "type": "uint256" }, + { "internalType": "uint256", "name": "tokenAllowance", "type": "uint256" } + ], + "internalType": "struct TectonicLens.TTokenBalances", + "name": "", + "type": "tuple" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "contract TToken[]", "name": "tTokens", "type": "address[]" }, + { "internalType": "address payable", "name": "account", "type": "address" } + ], + "name": "tTokenBalancesAll", + "outputs": [ + { + "components": [ + { "internalType": "address", "name": "tToken", "type": "address" }, + { "internalType": "uint256", "name": "balanceOf", "type": "uint256" }, + { "internalType": "uint256", "name": "borrowBalanceCurrent", "type": "uint256" }, + { "internalType": "uint256", "name": "balanceOfUnderlying", "type": "uint256" }, + { "internalType": "uint256", "name": "tokenBalance", "type": "uint256" }, + { "internalType": "uint256", "name": "tokenAllowance", "type": "uint256" } + ], + "internalType": "struct TectonicLens.TTokenBalances[]", + "name": "", + "type": "tuple[]" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "contract TToken", "name": "tToken", "type": "address" }], + "name": "tTokenMetadata", + "outputs": [ + { + "components": [ + { "internalType": "address", "name": "tToken", "type": "address" }, + { "internalType": "uint256", "name": "exchangeRateCurrent", "type": "uint256" }, + { "internalType": "uint256", "name": "supplyRatePerBlock", "type": "uint256" }, + { "internalType": "uint256", "name": "borrowRatePerBlock", "type": "uint256" }, + { "internalType": "uint256", "name": "reserveFactorMantissa", "type": "uint256" }, + { "internalType": "uint256", "name": "totalBorrows", "type": "uint256" }, + { "internalType": "uint256", "name": "totalReserves", "type": "uint256" }, + { "internalType": "uint256", "name": "totalSupply", "type": "uint256" }, + { "internalType": "uint256", "name": "totalCash", "type": "uint256" }, + { "internalType": "bool", "name": "isListed", "type": "bool" }, + { "internalType": "uint256", "name": "collateralFactorMantissa", "type": "uint256" }, + { "internalType": "address", "name": "underlyingAssetAddress", "type": "address" }, + { "internalType": "uint256", "name": "tTokenDecimals", "type": "uint256" }, + { "internalType": "uint256", "name": "underlyingDecimals", "type": "uint256" } + ], + "internalType": "struct TectonicLens.TTokenMetadata", + "name": "", + "type": "tuple" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "contract TToken[]", "name": "tTokens", "type": "address[]" }], + "name": "tTokenMetadataAll", + "outputs": [ + { + "components": [ + { "internalType": "address", "name": "tToken", "type": "address" }, + { "internalType": "uint256", "name": "exchangeRateCurrent", "type": "uint256" }, + { "internalType": "uint256", "name": "supplyRatePerBlock", "type": "uint256" }, + { "internalType": "uint256", "name": "borrowRatePerBlock", "type": "uint256" }, + { "internalType": "uint256", "name": "reserveFactorMantissa", "type": "uint256" }, + { "internalType": "uint256", "name": "totalBorrows", "type": "uint256" }, + { "internalType": "uint256", "name": "totalReserves", "type": "uint256" }, + { "internalType": "uint256", "name": "totalSupply", "type": "uint256" }, + { "internalType": "uint256", "name": "totalCash", "type": "uint256" }, + { "internalType": "bool", "name": "isListed", "type": "bool" }, + { "internalType": "uint256", "name": "collateralFactorMantissa", "type": "uint256" }, + { "internalType": "address", "name": "underlyingAssetAddress", "type": "address" }, + { "internalType": "uint256", "name": "tTokenDecimals", "type": "uint256" }, + { "internalType": "uint256", "name": "underlyingDecimals", "type": "uint256" } + ], + "internalType": "struct TectonicLens.TTokenMetadata[]", + "name": "", + "type": "tuple[]" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "contract TToken", "name": "tToken", "type": "address" }], + "name": "tTokenUnderlyingPrice", + "outputs": [ + { + "components": [ + { "internalType": "address", "name": "tToken", "type": "address" }, + { "internalType": "uint256", "name": "underlyingPrice", "type": "uint256" } + ], + "internalType": "struct TectonicLens.TTokenUnderlyingPrice", + "name": "", + "type": "tuple" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "contract TToken[]", "name": "tTokens", "type": "address[]" }], + "name": "tTokenUnderlyingPriceAll", + "outputs": [ + { + "components": [ + { "internalType": "address", "name": "tToken", "type": "address" }, + { "internalType": "uint256", "name": "underlyingPrice", "type": "uint256" } + ], + "internalType": "struct TectonicLens.TTokenUnderlyingPrice[]", + "name": "", + "type": "tuple[]" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/src/apps/tectonic/contracts/abis/tectonic-t-token.json b/src/apps/tectonic/contracts/abis/tectonic-t-token.json new file mode 100644 index 000000000..211491e02 --- /dev/null +++ b/src/apps/tectonic/contracts/abis/tectonic-t-token.json @@ -0,0 +1,711 @@ +[ + { + "inputs": [ + { "internalType": "address", "name": "underlying_", "type": "address" }, + { "internalType": "contract TectonicCoreInterface", "name": "tcore_", "type": "address" }, + { "internalType": "contract InterestRateModel", "name": "interestRateModel_", "type": "address" }, + { "internalType": "uint256", "name": "initialExchangeRateMantissa_", "type": "uint256" }, + { "internalType": "string", "name": "name_", "type": "string" }, + { "internalType": "string", "name": "symbol_", "type": "string" }, + { "internalType": "uint8", "name": "decimals_", "type": "uint8" }, + { "internalType": "address payable", "name": "admin_", "type": "address" }, + { "internalType": "address", "name": "implementation_", "type": "address" }, + { "internalType": "bytes", "name": "becomeImplementationData", "type": "bytes" } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "uint256", "name": "cashPrior", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "interestAccumulated", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "borrowIndex", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "totalBorrows", "type": "uint256" } + ], + "name": "AccrueInterest", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "address", "name": "borrower", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "borrowAmount", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "accountBorrows", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "totalBorrows", "type": "uint256" } + ], + "name": "Borrow", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "uint256", "name": "error", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "info", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "detail", "type": "uint256" } + ], + "name": "Failure", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "address", "name": "liquidator", "type": "address" }, + { "indexed": false, "internalType": "address", "name": "borrower", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "repayAmount", "type": "uint256" }, + { "indexed": false, "internalType": "address", "name": "tTokenCollateral", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "seizeTokens", "type": "uint256" } + ], + "name": "LiquidateBorrow", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "address", "name": "minter", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "mintAmount", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "mintTokens", "type": "uint256" } + ], + "name": "Mint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "address", "name": "oldAdmin", "type": "address" }, + { "indexed": false, "internalType": "address", "name": "newAdmin", "type": "address" } + ], + "name": "NewAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "address", "name": "oldImplementation", "type": "address" }, + { "indexed": false, "internalType": "address", "name": "newImplementation", "type": "address" } + ], + "name": "NewImplementation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract InterestRateModel", + "name": "oldInterestRateModel", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract InterestRateModel", + "name": "newInterestRateModel", + "type": "address" + } + ], + "name": "NewMarketInterestRateModel", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "address", "name": "oldPendingAdmin", "type": "address" }, + { "indexed": false, "internalType": "address", "name": "newPendingAdmin", "type": "address" } + ], + "name": "NewPendingAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "uint256", "name": "oldReserveFactorMantissa", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "newReserveFactorMantissa", "type": "uint256" } + ], + "name": "NewReserveFactor", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract TectonicCoreInterface", + "name": "oldTectonicCore", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract TectonicCoreInterface", + "name": "newTectonicCore", + "type": "address" + } + ], + "name": "NewTectonicCore", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "address", "name": "redeemer", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "redeemAmount", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "redeemTokens", "type": "uint256" } + ], + "name": "Redeem", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "address", "name": "payer", "type": "address" }, + { "indexed": false, "internalType": "address", "name": "borrower", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "repayAmount", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "accountBorrows", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "totalBorrows", "type": "uint256" } + ], + "name": "RepayBorrow", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "address", "name": "benefactor", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "addAmount", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "newTotalReserves", "type": "uint256" } + ], + "name": "ReservesAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "address", "name": "admin", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "reduceAmount", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "newTotalReserves", "type": "uint256" } + ], + "name": "ReservesReduced", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "Transfer", + "type": "event" + }, + { "payable": true, "stateMutability": "payable", "type": "fallback" }, + { + "constant": false, + "inputs": [], + "name": "_acceptAdmin", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "uint256", "name": "addAmount", "type": "uint256" }], + "name": "_addReserves", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "uint256", "name": "reduceAmount", "type": "uint256" }], + "name": "_reduceReserves", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "implementation_", "type": "address" }, + { "internalType": "bool", "name": "allowResign", "type": "bool" }, + { "internalType": "bytes", "name": "becomeImplementationData", "type": "bytes" } + ], + "name": "_setImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "contract InterestRateModel", "name": "newInterestRateModel", "type": "address" }], + "name": "_setInterestRateModel", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "address payable", "name": "newPendingAdmin", "type": "address" }], + "name": "_setPendingAdmin", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "uint256", "name": "newReserveFactorMantissa", "type": "uint256" }], + "name": "_setReserveFactor", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "contract TectonicCoreInterface", "name": "newTectonicCore", "type": "address" }], + "name": "_setTectonicCore", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "accrualBlockNumber", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "accrueInterest", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "admin", + "outputs": [{ "internalType": "address payable", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "address", "name": "owner", "type": "address" }, + { "internalType": "address", "name": "spender", "type": "address" } + ], + "name": "allowance", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "approve", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }], + "name": "balanceOf", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }], + "name": "balanceOfUnderlying", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "uint256", "name": "borrowAmount", "type": "uint256" }], + "name": "borrow", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], + "name": "borrowBalanceCurrent", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], + "name": "borrowBalanceStored", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "borrowIndex", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "borrowRatePerBlock", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "bytes", "name": "data", "type": "bytes" }], + "name": "delegateToImplementation", + "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "bytes", "name": "data", "type": "bytes" }], + "name": "delegateToViewImplementation", + "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "exchangeRateCurrent", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "exchangeRateStored", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], + "name": "getAccountSnapshot", + "outputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" }, + { "internalType": "uint256", "name": "", "type": "uint256" }, + { "internalType": "uint256", "name": "", "type": "uint256" }, + { "internalType": "uint256", "name": "", "type": "uint256" } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getCash", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "implementation", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "interestRateModel", + "outputs": [{ "internalType": "contract InterestRateModel", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isTToken", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "borrower", "type": "address" }, + { "internalType": "uint256", "name": "repayAmount", "type": "uint256" }, + { "internalType": "contract TTokenInterface", "name": "tTokenCollateral", "type": "address" } + ], + "name": "liquidateBorrow", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "uint256", "name": "mintAmount", "type": "uint256" }], + "name": "mint", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pendingAdmin", + "outputs": [{ "internalType": "address payable", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "protocolSeizeShareMantissa", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" }], + "name": "redeem", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "uint256", "name": "redeemAmount", "type": "uint256" }], + "name": "redeemUnderlying", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "uint256", "name": "repayAmount", "type": "uint256" }], + "name": "repayBorrow", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "borrower", "type": "address" }, + { "internalType": "uint256", "name": "repayAmount", "type": "uint256" } + ], + "name": "repayBorrowBehalf", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "reserveFactorMantissa", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "liquidator", "type": "address" }, + { "internalType": "address", "name": "borrower", "type": "address" }, + { "internalType": "uint256", "name": "seizeTokens", "type": "uint256" } + ], + "name": "seize", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "supplyRatePerBlock", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "contract EIP20NonStandardInterface", "name": "token", "type": "address" }], + "name": "sweepToken", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "tectonicCore", + "outputs": [{ "internalType": "contract TectonicCoreInterface", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalBorrows", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "totalBorrowsCurrent", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalReserves", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "dst", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "transfer", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "src", "type": "address" }, + { "internalType": "address", "name": "dst", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "transferFrom", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "underlying", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + } +] diff --git a/src/apps/tectonic/contracts/ethers/TectonicCore.ts b/src/apps/tectonic/contracts/ethers/TectonicCore.ts new file mode 100644 index 000000000..4bc23d60e --- /dev/null +++ b/src/apps/tectonic/contracts/ethers/TectonicCore.ts @@ -0,0 +1,2491 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers'; +import type { FunctionFragment, Result, EventFragment } from '@ethersproject/abi'; +import type { Listener, Provider } from '@ethersproject/providers'; +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common'; + +export interface TectonicCoreInterface extends utils.Interface { + functions: { + '_addToWhitelistProtect(address[])': FunctionFragment; + '_become(address)': FunctionFragment; + '_borrowGuardianPaused()': FunctionFragment; + '_grantTonic(address,uint256)': FunctionFragment; + '_mintGuardianPaused()': FunctionFragment; + '_removeFromWhitelistProtect(address)': FunctionFragment; + '_setBorrowCapGuardian(address)': FunctionFragment; + '_setBorrowPaused(address,bool)': FunctionFragment; + '_setCloseFactor(uint256)': FunctionFragment; + '_setCollateralFactor(address,uint256)': FunctionFragment; + '_setContributorTonicSpeed(address,uint256)': FunctionFragment; + '_setLiquidationIncentive(uint256)': FunctionFragment; + '_setMarketBorrowCaps(address[],uint256[])': FunctionFragment; + '_setMintPaused(address,bool)': FunctionFragment; + '_setPauseGuardian(address)': FunctionFragment; + '_setPriceOracle(address)': FunctionFragment; + '_setSeizePaused(bool)': FunctionFragment; + '_setTonicSpeed(address,uint256)': FunctionFragment; + '_setTransferPaused(bool)': FunctionFragment; + '_setWhitelistProtect(bool)': FunctionFragment; + '_supportMarket(address)': FunctionFragment; + '_updateTvlProtectLimit(address[],uint256[])': FunctionFragment; + 'accountAssets(address,uint256)': FunctionFragment; + 'admin()': FunctionFragment; + 'allMarkets(uint256)': FunctionFragment; + 'borrowAllowed(address,address,uint256)': FunctionFragment; + 'borrowCapGuardian()': FunctionFragment; + 'borrowCaps(address)': FunctionFragment; + 'borrowGuardianPaused(address)': FunctionFragment; + 'borrowVerify(address,address,uint256)': FunctionFragment; + 'checkMembership(address,address)': FunctionFragment; + 'claimTonic(address[],address[],bool,bool)': FunctionFragment; + 'claimTonic(address)': FunctionFragment; + 'claimTonic(address,address[])': FunctionFragment; + 'closeFactorMantissa()': FunctionFragment; + 'enterMarkets(address[])': FunctionFragment; + 'exitMarket(address)': FunctionFragment; + 'getAccountLiquidity(address)': FunctionFragment; + 'getAllMarkets()': FunctionFragment; + 'getAssetsIn(address)': FunctionFragment; + 'getBlockNumber()': FunctionFragment; + 'getHypotheticalAccountLiquidity(address,address,uint256,uint256)': FunctionFragment; + 'getTonicAddress()': FunctionFragment; + 'isDeprecated(address)': FunctionFragment; + 'isTectonicCore()': FunctionFragment; + 'lastContributorBlock(address)': FunctionFragment; + 'liquidateBorrowAllowed(address,address,address,address,uint256)': FunctionFragment; + 'liquidateBorrowVerify(address,address,address,address,uint256,uint256)': FunctionFragment; + 'liquidateCalculateSeizeTokens(address,address,uint256)': FunctionFragment; + 'liquidationIncentiveMantissa()': FunctionFragment; + 'markets(address)': FunctionFragment; + 'maxAssets()': FunctionFragment; + 'mintAllowed(address,address,uint256)': FunctionFragment; + 'mintGuardianPaused(address)': FunctionFragment; + 'mintVerify(address,address,uint256,uint256)': FunctionFragment; + 'oracle()': FunctionFragment; + 'pauseGuardian()': FunctionFragment; + 'pendingAdmin()': FunctionFragment; + 'pendingTectonicCoreImplementation()': FunctionFragment; + 'redeemAllowed(address,address,uint256)': FunctionFragment; + 'redeemVerify(address,address,uint256,uint256)': FunctionFragment; + 'repayBorrowAllowed(address,address,address,uint256)': FunctionFragment; + 'repayBorrowVerify(address,address,address,uint256,uint256)': FunctionFragment; + 'seizeAllowed(address,address,address,address,uint256)': FunctionFragment; + 'seizeGuardianPaused()': FunctionFragment; + 'seizeVerify(address,address,address,address,uint256)': FunctionFragment; + 'tectonicCoreImplementation()': FunctionFragment; + 'tokenToPerUserTvlProtectLimit(address)': FunctionFragment; + 'tonicAccrued(address)': FunctionFragment; + 'tonicBorrowState(address)': FunctionFragment; + 'tonicBorrowerIndex(address,address)': FunctionFragment; + 'tonicContributorSpeeds(address)': FunctionFragment; + 'tonicInitialIndex()': FunctionFragment; + 'tonicRate()': FunctionFragment; + 'tonicSpeeds(address)': FunctionFragment; + 'tonicSupplierIndex(address,address)': FunctionFragment; + 'tonicSupplyState(address)': FunctionFragment; + 'transferAllowed(address,address,address,uint256)': FunctionFragment; + 'transferGuardianPaused()': FunctionFragment; + 'transferVerify(address,address,address,uint256)': FunctionFragment; + 'updateContributorRewards(address)': FunctionFragment; + 'utilizedTvlAmount(address,address)': FunctionFragment; + 'whitelistProtectEnabled()': FunctionFragment; + 'whitelistedAddresses(address)': FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | '_addToWhitelistProtect' + | '_become' + | '_borrowGuardianPaused' + | '_grantTonic' + | '_mintGuardianPaused' + | '_removeFromWhitelistProtect' + | '_setBorrowCapGuardian' + | '_setBorrowPaused' + | '_setCloseFactor' + | '_setCollateralFactor' + | '_setContributorTonicSpeed' + | '_setLiquidationIncentive' + | '_setMarketBorrowCaps' + | '_setMintPaused' + | '_setPauseGuardian' + | '_setPriceOracle' + | '_setSeizePaused' + | '_setTonicSpeed' + | '_setTransferPaused' + | '_setWhitelistProtect' + | '_supportMarket' + | '_updateTvlProtectLimit' + | 'accountAssets' + | 'admin' + | 'allMarkets' + | 'borrowAllowed' + | 'borrowCapGuardian' + | 'borrowCaps' + | 'borrowGuardianPaused' + | 'borrowVerify' + | 'checkMembership' + | 'claimTonic(address[],address[],bool,bool)' + | 'claimTonic(address)' + | 'claimTonic(address,address[])' + | 'closeFactorMantissa' + | 'enterMarkets' + | 'exitMarket' + | 'getAccountLiquidity' + | 'getAllMarkets' + | 'getAssetsIn' + | 'getBlockNumber' + | 'getHypotheticalAccountLiquidity' + | 'getTonicAddress' + | 'isDeprecated' + | 'isTectonicCore' + | 'lastContributorBlock' + | 'liquidateBorrowAllowed' + | 'liquidateBorrowVerify' + | 'liquidateCalculateSeizeTokens' + | 'liquidationIncentiveMantissa' + | 'markets' + | 'maxAssets' + | 'mintAllowed' + | 'mintGuardianPaused' + | 'mintVerify' + | 'oracle' + | 'pauseGuardian' + | 'pendingAdmin' + | 'pendingTectonicCoreImplementation' + | 'redeemAllowed' + | 'redeemVerify' + | 'repayBorrowAllowed' + | 'repayBorrowVerify' + | 'seizeAllowed' + | 'seizeGuardianPaused' + | 'seizeVerify' + | 'tectonicCoreImplementation' + | 'tokenToPerUserTvlProtectLimit' + | 'tonicAccrued' + | 'tonicBorrowState' + | 'tonicBorrowerIndex' + | 'tonicContributorSpeeds' + | 'tonicInitialIndex' + | 'tonicRate' + | 'tonicSpeeds' + | 'tonicSupplierIndex' + | 'tonicSupplyState' + | 'transferAllowed' + | 'transferGuardianPaused' + | 'transferVerify' + | 'updateContributorRewards' + | 'utilizedTvlAmount' + | 'whitelistProtectEnabled' + | 'whitelistedAddresses', + ): FunctionFragment; + + encodeFunctionData(functionFragment: '_addToWhitelistProtect', values: [string[]]): string; + encodeFunctionData(functionFragment: '_become', values: [string]): string; + encodeFunctionData(functionFragment: '_borrowGuardianPaused', values?: undefined): string; + encodeFunctionData(functionFragment: '_grantTonic', values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: '_mintGuardianPaused', values?: undefined): string; + encodeFunctionData(functionFragment: '_removeFromWhitelistProtect', values: [string]): string; + encodeFunctionData(functionFragment: '_setBorrowCapGuardian', values: [string]): string; + encodeFunctionData(functionFragment: '_setBorrowPaused', values: [string, boolean]): string; + encodeFunctionData(functionFragment: '_setCloseFactor', values: [BigNumberish]): string; + encodeFunctionData(functionFragment: '_setCollateralFactor', values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: '_setContributorTonicSpeed', values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: '_setLiquidationIncentive', values: [BigNumberish]): string; + encodeFunctionData(functionFragment: '_setMarketBorrowCaps', values: [string[], BigNumberish[]]): string; + encodeFunctionData(functionFragment: '_setMintPaused', values: [string, boolean]): string; + encodeFunctionData(functionFragment: '_setPauseGuardian', values: [string]): string; + encodeFunctionData(functionFragment: '_setPriceOracle', values: [string]): string; + encodeFunctionData(functionFragment: '_setSeizePaused', values: [boolean]): string; + encodeFunctionData(functionFragment: '_setTonicSpeed', values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: '_setTransferPaused', values: [boolean]): string; + encodeFunctionData(functionFragment: '_setWhitelistProtect', values: [boolean]): string; + encodeFunctionData(functionFragment: '_supportMarket', values: [string]): string; + encodeFunctionData(functionFragment: '_updateTvlProtectLimit', values: [string[], BigNumberish[]]): string; + encodeFunctionData(functionFragment: 'accountAssets', values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: 'admin', values?: undefined): string; + encodeFunctionData(functionFragment: 'allMarkets', values: [BigNumberish]): string; + encodeFunctionData(functionFragment: 'borrowAllowed', values: [string, string, BigNumberish]): string; + encodeFunctionData(functionFragment: 'borrowCapGuardian', values?: undefined): string; + encodeFunctionData(functionFragment: 'borrowCaps', values: [string]): string; + encodeFunctionData(functionFragment: 'borrowGuardianPaused', values: [string]): string; + encodeFunctionData(functionFragment: 'borrowVerify', values: [string, string, BigNumberish]): string; + encodeFunctionData(functionFragment: 'checkMembership', values: [string, string]): string; + encodeFunctionData( + functionFragment: 'claimTonic(address[],address[],bool,bool)', + values: [string[], string[], boolean, boolean], + ): string; + encodeFunctionData(functionFragment: 'claimTonic(address)', values: [string]): string; + encodeFunctionData(functionFragment: 'claimTonic(address,address[])', values: [string, string[]]): string; + encodeFunctionData(functionFragment: 'closeFactorMantissa', values?: undefined): string; + encodeFunctionData(functionFragment: 'enterMarkets', values: [string[]]): string; + encodeFunctionData(functionFragment: 'exitMarket', values: [string]): string; + encodeFunctionData(functionFragment: 'getAccountLiquidity', values: [string]): string; + encodeFunctionData(functionFragment: 'getAllMarkets', values?: undefined): string; + encodeFunctionData(functionFragment: 'getAssetsIn', values: [string]): string; + encodeFunctionData(functionFragment: 'getBlockNumber', values?: undefined): string; + encodeFunctionData( + functionFragment: 'getHypotheticalAccountLiquidity', + values: [string, string, BigNumberish, BigNumberish], + ): string; + encodeFunctionData(functionFragment: 'getTonicAddress', values?: undefined): string; + encodeFunctionData(functionFragment: 'isDeprecated', values: [string]): string; + encodeFunctionData(functionFragment: 'isTectonicCore', values?: undefined): string; + encodeFunctionData(functionFragment: 'lastContributorBlock', values: [string]): string; + encodeFunctionData( + functionFragment: 'liquidateBorrowAllowed', + values: [string, string, string, string, BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'liquidateBorrowVerify', + values: [string, string, string, string, BigNumberish, BigNumberish], + ): string; + encodeFunctionData(functionFragment: 'liquidateCalculateSeizeTokens', values: [string, string, BigNumberish]): string; + encodeFunctionData(functionFragment: 'liquidationIncentiveMantissa', values?: undefined): string; + encodeFunctionData(functionFragment: 'markets', values: [string]): string; + encodeFunctionData(functionFragment: 'maxAssets', values?: undefined): string; + encodeFunctionData(functionFragment: 'mintAllowed', values: [string, string, BigNumberish]): string; + encodeFunctionData(functionFragment: 'mintGuardianPaused', values: [string]): string; + encodeFunctionData(functionFragment: 'mintVerify', values: [string, string, BigNumberish, BigNumberish]): string; + encodeFunctionData(functionFragment: 'oracle', values?: undefined): string; + encodeFunctionData(functionFragment: 'pauseGuardian', values?: undefined): string; + encodeFunctionData(functionFragment: 'pendingAdmin', values?: undefined): string; + encodeFunctionData(functionFragment: 'pendingTectonicCoreImplementation', values?: undefined): string; + encodeFunctionData(functionFragment: 'redeemAllowed', values: [string, string, BigNumberish]): string; + encodeFunctionData(functionFragment: 'redeemVerify', values: [string, string, BigNumberish, BigNumberish]): string; + encodeFunctionData(functionFragment: 'repayBorrowAllowed', values: [string, string, string, BigNumberish]): string; + encodeFunctionData( + functionFragment: 'repayBorrowVerify', + values: [string, string, string, BigNumberish, BigNumberish], + ): string; + encodeFunctionData(functionFragment: 'seizeAllowed', values: [string, string, string, string, BigNumberish]): string; + encodeFunctionData(functionFragment: 'seizeGuardianPaused', values?: undefined): string; + encodeFunctionData(functionFragment: 'seizeVerify', values: [string, string, string, string, BigNumberish]): string; + encodeFunctionData(functionFragment: 'tectonicCoreImplementation', values?: undefined): string; + encodeFunctionData(functionFragment: 'tokenToPerUserTvlProtectLimit', values: [string]): string; + encodeFunctionData(functionFragment: 'tonicAccrued', values: [string]): string; + encodeFunctionData(functionFragment: 'tonicBorrowState', values: [string]): string; + encodeFunctionData(functionFragment: 'tonicBorrowerIndex', values: [string, string]): string; + encodeFunctionData(functionFragment: 'tonicContributorSpeeds', values: [string]): string; + encodeFunctionData(functionFragment: 'tonicInitialIndex', values?: undefined): string; + encodeFunctionData(functionFragment: 'tonicRate', values?: undefined): string; + encodeFunctionData(functionFragment: 'tonicSpeeds', values: [string]): string; + encodeFunctionData(functionFragment: 'tonicSupplierIndex', values: [string, string]): string; + encodeFunctionData(functionFragment: 'tonicSupplyState', values: [string]): string; + encodeFunctionData(functionFragment: 'transferAllowed', values: [string, string, string, BigNumberish]): string; + encodeFunctionData(functionFragment: 'transferGuardianPaused', values?: undefined): string; + encodeFunctionData(functionFragment: 'transferVerify', values: [string, string, string, BigNumberish]): string; + encodeFunctionData(functionFragment: 'updateContributorRewards', values: [string]): string; + encodeFunctionData(functionFragment: 'utilizedTvlAmount', values: [string, string]): string; + encodeFunctionData(functionFragment: 'whitelistProtectEnabled', values?: undefined): string; + encodeFunctionData(functionFragment: 'whitelistedAddresses', values: [string]): string; + + decodeFunctionResult(functionFragment: '_addToWhitelistProtect', data: BytesLike): Result; + decodeFunctionResult(functionFragment: '_become', data: BytesLike): Result; + decodeFunctionResult(functionFragment: '_borrowGuardianPaused', data: BytesLike): Result; + decodeFunctionResult(functionFragment: '_grantTonic', data: BytesLike): Result; + decodeFunctionResult(functionFragment: '_mintGuardianPaused', data: BytesLike): Result; + decodeFunctionResult(functionFragment: '_removeFromWhitelistProtect', data: BytesLike): Result; + decodeFunctionResult(functionFragment: '_setBorrowCapGuardian', data: BytesLike): Result; + decodeFunctionResult(functionFragment: '_setBorrowPaused', data: BytesLike): Result; + decodeFunctionResult(functionFragment: '_setCloseFactor', data: BytesLike): Result; + decodeFunctionResult(functionFragment: '_setCollateralFactor', data: BytesLike): Result; + decodeFunctionResult(functionFragment: '_setContributorTonicSpeed', data: BytesLike): Result; + decodeFunctionResult(functionFragment: '_setLiquidationIncentive', data: BytesLike): Result; + decodeFunctionResult(functionFragment: '_setMarketBorrowCaps', data: BytesLike): Result; + decodeFunctionResult(functionFragment: '_setMintPaused', data: BytesLike): Result; + decodeFunctionResult(functionFragment: '_setPauseGuardian', data: BytesLike): Result; + decodeFunctionResult(functionFragment: '_setPriceOracle', data: BytesLike): Result; + decodeFunctionResult(functionFragment: '_setSeizePaused', data: BytesLike): Result; + decodeFunctionResult(functionFragment: '_setTonicSpeed', data: BytesLike): Result; + decodeFunctionResult(functionFragment: '_setTransferPaused', data: BytesLike): Result; + decodeFunctionResult(functionFragment: '_setWhitelistProtect', data: BytesLike): Result; + decodeFunctionResult(functionFragment: '_supportMarket', data: BytesLike): Result; + decodeFunctionResult(functionFragment: '_updateTvlProtectLimit', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'accountAssets', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'admin', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'allMarkets', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'borrowAllowed', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'borrowCapGuardian', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'borrowCaps', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'borrowGuardianPaused', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'borrowVerify', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'checkMembership', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'claimTonic(address[],address[],bool,bool)', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'claimTonic(address)', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'claimTonic(address,address[])', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'closeFactorMantissa', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'enterMarkets', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'exitMarket', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getAccountLiquidity', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getAllMarkets', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getAssetsIn', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getBlockNumber', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getHypotheticalAccountLiquidity', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getTonicAddress', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'isDeprecated', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'isTectonicCore', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'lastContributorBlock', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'liquidateBorrowAllowed', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'liquidateBorrowVerify', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'liquidateCalculateSeizeTokens', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'liquidationIncentiveMantissa', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'markets', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'maxAssets', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'mintAllowed', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'mintGuardianPaused', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'mintVerify', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'oracle', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'pauseGuardian', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'pendingAdmin', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'pendingTectonicCoreImplementation', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'redeemAllowed', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'redeemVerify', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'repayBorrowAllowed', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'repayBorrowVerify', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'seizeAllowed', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'seizeGuardianPaused', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'seizeVerify', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'tectonicCoreImplementation', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'tokenToPerUserTvlProtectLimit', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'tonicAccrued', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'tonicBorrowState', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'tonicBorrowerIndex', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'tonicContributorSpeeds', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'tonicInitialIndex', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'tonicRate', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'tonicSpeeds', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'tonicSupplierIndex', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'tonicSupplyState', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'transferAllowed', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'transferGuardianPaused', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'transferVerify', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'updateContributorRewards', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'utilizedTvlAmount', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'whitelistProtectEnabled', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'whitelistedAddresses', data: BytesLike): Result; + + events: { + 'ActionPaused(string,bool)': EventFragment; + 'ActionPaused(address,string,bool)': EventFragment; + 'ContributorTonicSpeedUpdated(address,uint256)': EventFragment; + 'DistributedBorrowerTonic(address,address,uint256,uint256)': EventFragment; + 'DistributedSupplierTonic(address,address,uint256,uint256)': EventFragment; + 'Failure(uint256,uint256,uint256)': EventFragment; + 'MarketEntered(address,address)': EventFragment; + 'MarketExited(address,address)': EventFragment; + 'MarketListed(address)': EventFragment; + 'NewBorrowCap(address,uint256)': EventFragment; + 'NewBorrowCapGuardian(address,address)': EventFragment; + 'NewCloseFactor(uint256,uint256)': EventFragment; + 'NewCollateralFactor(address,uint256,uint256)': EventFragment; + 'NewLiquidationIncentive(uint256,uint256)': EventFragment; + 'NewPauseGuardian(address,address)': EventFragment; + 'NewPriceOracle(address,address)': EventFragment; + 'TVLProtectLimitUpdated(address,uint256)': EventFragment; + 'TonicGranted(address,uint256)': EventFragment; + 'TonicSpeedUpdated(address,uint256)': EventFragment; + 'WhitelistAccountAdded(address)': EventFragment; + 'WhitelistAccountRemoved(address)': EventFragment; + 'WhitelistStatusChanged(bool)': EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: 'ActionPaused(string,bool)'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'ActionPaused(address,string,bool)'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'ContributorTonicSpeedUpdated'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'DistributedBorrowerTonic'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'DistributedSupplierTonic'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Failure'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'MarketEntered'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'MarketExited'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'MarketListed'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'NewBorrowCap'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'NewBorrowCapGuardian'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'NewCloseFactor'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'NewCollateralFactor'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'NewLiquidationIncentive'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'NewPauseGuardian'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'NewPriceOracle'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'TVLProtectLimitUpdated'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'TonicGranted'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'TonicSpeedUpdated'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'WhitelistAccountAdded'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'WhitelistAccountRemoved'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'WhitelistStatusChanged'): EventFragment; +} + +export interface ActionPaused_string_bool_EventObject { + action: string; + pauseState: boolean; +} +export type ActionPaused_string_bool_Event = TypedEvent<[string, boolean], ActionPaused_string_bool_EventObject>; + +export type ActionPaused_string_bool_EventFilter = TypedEventFilter; + +export interface ActionPaused_address_string_bool_EventObject { + tToken: string; + action: string; + pauseState: boolean; +} +export type ActionPaused_address_string_bool_Event = TypedEvent< + [string, string, boolean], + ActionPaused_address_string_bool_EventObject +>; + +export type ActionPaused_address_string_bool_EventFilter = TypedEventFilter; + +export interface ContributorTonicSpeedUpdatedEventObject { + contributor: string; + newSpeed: BigNumber; +} +export type ContributorTonicSpeedUpdatedEvent = TypedEvent< + [string, BigNumber], + ContributorTonicSpeedUpdatedEventObject +>; + +export type ContributorTonicSpeedUpdatedEventFilter = TypedEventFilter; + +export interface DistributedBorrowerTonicEventObject { + tToken: string; + borrower: string; + tonicDelta: BigNumber; + tonicBorrowIndex: BigNumber; +} +export type DistributedBorrowerTonicEvent = TypedEvent< + [string, string, BigNumber, BigNumber], + DistributedBorrowerTonicEventObject +>; + +export type DistributedBorrowerTonicEventFilter = TypedEventFilter; + +export interface DistributedSupplierTonicEventObject { + tToken: string; + supplier: string; + tonicDelta: BigNumber; + tonicSupplyIndex: BigNumber; +} +export type DistributedSupplierTonicEvent = TypedEvent< + [string, string, BigNumber, BigNumber], + DistributedSupplierTonicEventObject +>; + +export type DistributedSupplierTonicEventFilter = TypedEventFilter; + +export interface FailureEventObject { + error: BigNumber; + info: BigNumber; + detail: BigNumber; +} +export type FailureEvent = TypedEvent<[BigNumber, BigNumber, BigNumber], FailureEventObject>; + +export type FailureEventFilter = TypedEventFilter; + +export interface MarketEnteredEventObject { + tToken: string; + account: string; +} +export type MarketEnteredEvent = TypedEvent<[string, string], MarketEnteredEventObject>; + +export type MarketEnteredEventFilter = TypedEventFilter; + +export interface MarketExitedEventObject { + tToken: string; + account: string; +} +export type MarketExitedEvent = TypedEvent<[string, string], MarketExitedEventObject>; + +export type MarketExitedEventFilter = TypedEventFilter; + +export interface MarketListedEventObject { + tToken: string; +} +export type MarketListedEvent = TypedEvent<[string], MarketListedEventObject>; + +export type MarketListedEventFilter = TypedEventFilter; + +export interface NewBorrowCapEventObject { + tToken: string; + newBorrowCap: BigNumber; +} +export type NewBorrowCapEvent = TypedEvent<[string, BigNumber], NewBorrowCapEventObject>; + +export type NewBorrowCapEventFilter = TypedEventFilter; + +export interface NewBorrowCapGuardianEventObject { + oldBorrowCapGuardian: string; + newBorrowCapGuardian: string; +} +export type NewBorrowCapGuardianEvent = TypedEvent<[string, string], NewBorrowCapGuardianEventObject>; + +export type NewBorrowCapGuardianEventFilter = TypedEventFilter; + +export interface NewCloseFactorEventObject { + oldCloseFactorMantissa: BigNumber; + newCloseFactorMantissa: BigNumber; +} +export type NewCloseFactorEvent = TypedEvent<[BigNumber, BigNumber], NewCloseFactorEventObject>; + +export type NewCloseFactorEventFilter = TypedEventFilter; + +export interface NewCollateralFactorEventObject { + tToken: string; + oldCollateralFactorMantissa: BigNumber; + newCollateralFactorMantissa: BigNumber; +} +export type NewCollateralFactorEvent = TypedEvent<[string, BigNumber, BigNumber], NewCollateralFactorEventObject>; + +export type NewCollateralFactorEventFilter = TypedEventFilter; + +export interface NewLiquidationIncentiveEventObject { + oldLiquidationIncentiveMantissa: BigNumber; + newLiquidationIncentiveMantissa: BigNumber; +} +export type NewLiquidationIncentiveEvent = TypedEvent<[BigNumber, BigNumber], NewLiquidationIncentiveEventObject>; + +export type NewLiquidationIncentiveEventFilter = TypedEventFilter; + +export interface NewPauseGuardianEventObject { + oldPauseGuardian: string; + newPauseGuardian: string; +} +export type NewPauseGuardianEvent = TypedEvent<[string, string], NewPauseGuardianEventObject>; + +export type NewPauseGuardianEventFilter = TypedEventFilter; + +export interface NewPriceOracleEventObject { + oldPriceOracle: string; + newPriceOracle: string; +} +export type NewPriceOracleEvent = TypedEvent<[string, string], NewPriceOracleEventObject>; + +export type NewPriceOracleEventFilter = TypedEventFilter; + +export interface TVLProtectLimitUpdatedEventObject { + tToken: string; + newLimitPerUser: BigNumber; +} +export type TVLProtectLimitUpdatedEvent = TypedEvent<[string, BigNumber], TVLProtectLimitUpdatedEventObject>; + +export type TVLProtectLimitUpdatedEventFilter = TypedEventFilter; + +export interface TonicGrantedEventObject { + recipient: string; + amount: BigNumber; +} +export type TonicGrantedEvent = TypedEvent<[string, BigNumber], TonicGrantedEventObject>; + +export type TonicGrantedEventFilter = TypedEventFilter; + +export interface TonicSpeedUpdatedEventObject { + tToken: string; + newSpeed: BigNumber; +} +export type TonicSpeedUpdatedEvent = TypedEvent<[string, BigNumber], TonicSpeedUpdatedEventObject>; + +export type TonicSpeedUpdatedEventFilter = TypedEventFilter; + +export interface WhitelistAccountAddedEventObject { + account: string; +} +export type WhitelistAccountAddedEvent = TypedEvent<[string], WhitelistAccountAddedEventObject>; + +export type WhitelistAccountAddedEventFilter = TypedEventFilter; + +export interface WhitelistAccountRemovedEventObject { + account: string; +} +export type WhitelistAccountRemovedEvent = TypedEvent<[string], WhitelistAccountRemovedEventObject>; + +export type WhitelistAccountRemovedEventFilter = TypedEventFilter; + +export interface WhitelistStatusChangedEventObject { + enabled: boolean; +} +export type WhitelistStatusChangedEvent = TypedEvent<[boolean], WhitelistStatusChangedEventObject>; + +export type WhitelistStatusChangedEventFilter = TypedEventFilter; + +export interface TectonicCore extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: TectonicCoreInterface; + + 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: { + _addToWhitelistProtect( + accounts: string[], + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _become( + unitroller: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _borrowGuardianPaused(overrides?: CallOverrides): Promise<[boolean]>; + + _grantTonic( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _mintGuardianPaused(overrides?: CallOverrides): Promise<[boolean]>; + + _removeFromWhitelistProtect( + account: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setBorrowCapGuardian( + newBorrowCapGuardian: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setBorrowPaused( + tToken: string, + state: boolean, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setCloseFactor( + newCloseFactorMantissa: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setCollateralFactor( + tToken: string, + newCollateralFactorMantissa: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setContributorTonicSpeed( + contributor: string, + tonicSpeed: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setLiquidationIncentive( + newLiquidationIncentiveMantissa: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setMarketBorrowCaps( + tTokens: string[], + newBorrowCaps: BigNumberish[], + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setMintPaused( + tToken: string, + state: boolean, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setPauseGuardian( + newPauseGuardian: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setPriceOracle( + newOracle: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setSeizePaused( + state: boolean, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setTonicSpeed( + tToken: string, + tonicSpeed: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setTransferPaused( + state: boolean, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setWhitelistProtect( + whitelistStatus: boolean, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _supportMarket( + tToken: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _updateTvlProtectLimit( + tTokens: string[], + newLimitPerUser: BigNumberish[], + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + accountAssets(arg0: string, arg1: BigNumberish, overrides?: CallOverrides): Promise<[string]>; + + admin(overrides?: CallOverrides): Promise<[string]>; + + allMarkets(arg0: BigNumberish, overrides?: CallOverrides): Promise<[string]>; + + borrowAllowed( + tToken: string, + borrower: string, + borrowAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + borrowCapGuardian(overrides?: CallOverrides): Promise<[string]>; + + borrowCaps(arg0: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + borrowGuardianPaused(arg0: string, overrides?: CallOverrides): Promise<[boolean]>; + + borrowVerify( + tToken: string, + borrower: string, + borrowAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + checkMembership(account: string, tToken: string, overrides?: CallOverrides): Promise<[boolean]>; + + 'claimTonic(address[],address[],bool,bool)'( + holders: string[], + tTokens: string[], + borrowers: boolean, + suppliers: boolean, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + 'claimTonic(address)'( + holder: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + 'claimTonic(address,address[])'( + holder: string, + tTokens: string[], + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + closeFactorMantissa(overrides?: CallOverrides): Promise<[BigNumber]>; + + enterMarkets( + tTokens: string[], + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + exitMarket( + tTokenAddress: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + getAccountLiquidity(account: string, overrides?: CallOverrides): Promise<[BigNumber, BigNumber, BigNumber]>; + + getAllMarkets(overrides?: CallOverrides): Promise<[string[]]>; + + getAssetsIn(account: string, overrides?: CallOverrides): Promise<[string[]]>; + + getBlockNumber(overrides?: CallOverrides): Promise<[BigNumber]>; + + getHypotheticalAccountLiquidity( + account: string, + tTokenModify: string, + redeemTokens: BigNumberish, + borrowAmount: BigNumberish, + overrides?: CallOverrides, + ): Promise<[BigNumber, BigNumber, BigNumber]>; + + getTonicAddress(overrides?: CallOverrides): Promise<[string]>; + + isDeprecated(tToken: string, overrides?: CallOverrides): Promise<[boolean]>; + + isTectonicCore(overrides?: CallOverrides): Promise<[boolean]>; + + lastContributorBlock(arg0: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + liquidateBorrowAllowed( + tTokenBorrowed: string, + tTokenCollateral: string, + liquidator: string, + borrower: string, + repayAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + liquidateBorrowVerify( + tTokenBorrowed: string, + tTokenCollateral: string, + liquidator: string, + borrower: string, + actualRepayAmount: BigNumberish, + seizeTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + liquidateCalculateSeizeTokens( + tTokenBorrowed: string, + tTokenCollateral: string, + actualRepayAmount: BigNumberish, + overrides?: CallOverrides, + ): Promise<[BigNumber, BigNumber]>; + + liquidationIncentiveMantissa(overrides?: CallOverrides): Promise<[BigNumber]>; + + markets( + arg0: string, + overrides?: CallOverrides, + ): Promise< + [boolean, BigNumber, boolean] & { + isListed: boolean; + collateralFactorMantissa: BigNumber; + isTonicized: boolean; + } + >; + + maxAssets(overrides?: CallOverrides): Promise<[BigNumber]>; + + mintAllowed( + tToken: string, + minter: string, + mintAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + mintGuardianPaused(arg0: string, overrides?: CallOverrides): Promise<[boolean]>; + + mintVerify( + tToken: string, + minter: string, + actualMintAmount: BigNumberish, + mintTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + oracle(overrides?: CallOverrides): Promise<[string]>; + + pauseGuardian(overrides?: CallOverrides): Promise<[string]>; + + pendingAdmin(overrides?: CallOverrides): Promise<[string]>; + + pendingTectonicCoreImplementation(overrides?: CallOverrides): Promise<[string]>; + + redeemAllowed( + tToken: string, + redeemer: string, + redeemTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + redeemVerify( + tToken: string, + redeemer: string, + redeemAmount: BigNumberish, + redeemTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + repayBorrowAllowed( + tToken: string, + payer: string, + borrower: string, + repayAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + repayBorrowVerify( + tToken: string, + payer: string, + borrower: string, + actualRepayAmount: BigNumberish, + borrowerIndex: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + seizeAllowed( + tTokenCollateral: string, + tTokenBorrowed: string, + liquidator: string, + borrower: string, + seizeTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + seizeGuardianPaused(overrides?: CallOverrides): Promise<[boolean]>; + + seizeVerify( + tTokenCollateral: string, + tTokenBorrowed: string, + liquidator: string, + borrower: string, + seizeTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + tectonicCoreImplementation(overrides?: CallOverrides): Promise<[string]>; + + tokenToPerUserTvlProtectLimit(arg0: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + tonicAccrued(arg0: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + tonicBorrowState( + arg0: string, + overrides?: CallOverrides, + ): Promise<[BigNumber, number] & { index: BigNumber; block: number }>; + + tonicBorrowerIndex(arg0: string, arg1: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + tonicContributorSpeeds(arg0: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + tonicInitialIndex(overrides?: CallOverrides): Promise<[BigNumber]>; + + tonicRate(overrides?: CallOverrides): Promise<[BigNumber]>; + + tonicSpeeds(arg0: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + tonicSupplierIndex(arg0: string, arg1: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + tonicSupplyState( + arg0: string, + overrides?: CallOverrides, + ): Promise<[BigNumber, number] & { index: BigNumber; block: number }>; + + transferAllowed( + tToken: string, + src: string, + dst: string, + transferTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + transferGuardianPaused(overrides?: CallOverrides): Promise<[boolean]>; + + transferVerify( + tToken: string, + src: string, + dst: string, + transferTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + updateContributorRewards( + contributor: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + utilizedTvlAmount(arg0: string, arg1: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + whitelistProtectEnabled(overrides?: CallOverrides): Promise<[boolean]>; + + whitelistedAddresses(arg0: string, overrides?: CallOverrides): Promise<[boolean]>; + }; + + _addToWhitelistProtect( + accounts: string[], + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _become( + unitroller: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _borrowGuardianPaused(overrides?: CallOverrides): Promise; + + _grantTonic( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _mintGuardianPaused(overrides?: CallOverrides): Promise; + + _removeFromWhitelistProtect( + account: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setBorrowCapGuardian( + newBorrowCapGuardian: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setBorrowPaused( + tToken: string, + state: boolean, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setCloseFactor( + newCloseFactorMantissa: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setCollateralFactor( + tToken: string, + newCollateralFactorMantissa: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setContributorTonicSpeed( + contributor: string, + tonicSpeed: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setLiquidationIncentive( + newLiquidationIncentiveMantissa: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setMarketBorrowCaps( + tTokens: string[], + newBorrowCaps: BigNumberish[], + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setMintPaused( + tToken: string, + state: boolean, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setPauseGuardian( + newPauseGuardian: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setPriceOracle( + newOracle: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setSeizePaused( + state: boolean, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setTonicSpeed( + tToken: string, + tonicSpeed: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setTransferPaused( + state: boolean, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setWhitelistProtect( + whitelistStatus: boolean, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _supportMarket( + tToken: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _updateTvlProtectLimit( + tTokens: string[], + newLimitPerUser: BigNumberish[], + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + accountAssets(arg0: string, arg1: BigNumberish, overrides?: CallOverrides): Promise; + + admin(overrides?: CallOverrides): Promise; + + allMarkets(arg0: BigNumberish, overrides?: CallOverrides): Promise; + + borrowAllowed( + tToken: string, + borrower: string, + borrowAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + borrowCapGuardian(overrides?: CallOverrides): Promise; + + borrowCaps(arg0: string, overrides?: CallOverrides): Promise; + + borrowGuardianPaused(arg0: string, overrides?: CallOverrides): Promise; + + borrowVerify( + tToken: string, + borrower: string, + borrowAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + checkMembership(account: string, tToken: string, overrides?: CallOverrides): Promise; + + 'claimTonic(address[],address[],bool,bool)'( + holders: string[], + tTokens: string[], + borrowers: boolean, + suppliers: boolean, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + 'claimTonic(address)'( + holder: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + 'claimTonic(address,address[])'( + holder: string, + tTokens: string[], + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + closeFactorMantissa(overrides?: CallOverrides): Promise; + + enterMarkets( + tTokens: string[], + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + exitMarket( + tTokenAddress: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + getAccountLiquidity(account: string, overrides?: CallOverrides): Promise<[BigNumber, BigNumber, BigNumber]>; + + getAllMarkets(overrides?: CallOverrides): Promise; + + getAssetsIn(account: string, overrides?: CallOverrides): Promise; + + getBlockNumber(overrides?: CallOverrides): Promise; + + getHypotheticalAccountLiquidity( + account: string, + tTokenModify: string, + redeemTokens: BigNumberish, + borrowAmount: BigNumberish, + overrides?: CallOverrides, + ): Promise<[BigNumber, BigNumber, BigNumber]>; + + getTonicAddress(overrides?: CallOverrides): Promise; + + isDeprecated(tToken: string, overrides?: CallOverrides): Promise; + + isTectonicCore(overrides?: CallOverrides): Promise; + + lastContributorBlock(arg0: string, overrides?: CallOverrides): Promise; + + liquidateBorrowAllowed( + tTokenBorrowed: string, + tTokenCollateral: string, + liquidator: string, + borrower: string, + repayAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + liquidateBorrowVerify( + tTokenBorrowed: string, + tTokenCollateral: string, + liquidator: string, + borrower: string, + actualRepayAmount: BigNumberish, + seizeTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + liquidateCalculateSeizeTokens( + tTokenBorrowed: string, + tTokenCollateral: string, + actualRepayAmount: BigNumberish, + overrides?: CallOverrides, + ): Promise<[BigNumber, BigNumber]>; + + liquidationIncentiveMantissa(overrides?: CallOverrides): Promise; + + markets( + arg0: string, + overrides?: CallOverrides, + ): Promise< + [boolean, BigNumber, boolean] & { + isListed: boolean; + collateralFactorMantissa: BigNumber; + isTonicized: boolean; + } + >; + + maxAssets(overrides?: CallOverrides): Promise; + + mintAllowed( + tToken: string, + minter: string, + mintAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + mintGuardianPaused(arg0: string, overrides?: CallOverrides): Promise; + + mintVerify( + tToken: string, + minter: string, + actualMintAmount: BigNumberish, + mintTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + oracle(overrides?: CallOverrides): Promise; + + pauseGuardian(overrides?: CallOverrides): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + pendingTectonicCoreImplementation(overrides?: CallOverrides): Promise; + + redeemAllowed( + tToken: string, + redeemer: string, + redeemTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + redeemVerify( + tToken: string, + redeemer: string, + redeemAmount: BigNumberish, + redeemTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + repayBorrowAllowed( + tToken: string, + payer: string, + borrower: string, + repayAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + repayBorrowVerify( + tToken: string, + payer: string, + borrower: string, + actualRepayAmount: BigNumberish, + borrowerIndex: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + seizeAllowed( + tTokenCollateral: string, + tTokenBorrowed: string, + liquidator: string, + borrower: string, + seizeTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + seizeGuardianPaused(overrides?: CallOverrides): Promise; + + seizeVerify( + tTokenCollateral: string, + tTokenBorrowed: string, + liquidator: string, + borrower: string, + seizeTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + tectonicCoreImplementation(overrides?: CallOverrides): Promise; + + tokenToPerUserTvlProtectLimit(arg0: string, overrides?: CallOverrides): Promise; + + tonicAccrued(arg0: string, overrides?: CallOverrides): Promise; + + tonicBorrowState( + arg0: string, + overrides?: CallOverrides, + ): Promise<[BigNumber, number] & { index: BigNumber; block: number }>; + + tonicBorrowerIndex(arg0: string, arg1: string, overrides?: CallOverrides): Promise; + + tonicContributorSpeeds(arg0: string, overrides?: CallOverrides): Promise; + + tonicInitialIndex(overrides?: CallOverrides): Promise; + + tonicRate(overrides?: CallOverrides): Promise; + + tonicSpeeds(arg0: string, overrides?: CallOverrides): Promise; + + tonicSupplierIndex(arg0: string, arg1: string, overrides?: CallOverrides): Promise; + + tonicSupplyState( + arg0: string, + overrides?: CallOverrides, + ): Promise<[BigNumber, number] & { index: BigNumber; block: number }>; + + transferAllowed( + tToken: string, + src: string, + dst: string, + transferTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + transferGuardianPaused(overrides?: CallOverrides): Promise; + + transferVerify( + tToken: string, + src: string, + dst: string, + transferTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + updateContributorRewards( + contributor: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + utilizedTvlAmount(arg0: string, arg1: string, overrides?: CallOverrides): Promise; + + whitelistProtectEnabled(overrides?: CallOverrides): Promise; + + whitelistedAddresses(arg0: string, overrides?: CallOverrides): Promise; + + callStatic: { + _addToWhitelistProtect(accounts: string[], overrides?: CallOverrides): Promise; + + _become(unitroller: string, overrides?: CallOverrides): Promise; + + _borrowGuardianPaused(overrides?: CallOverrides): Promise; + + _grantTonic(recipient: string, amount: BigNumberish, overrides?: CallOverrides): Promise; + + _mintGuardianPaused(overrides?: CallOverrides): Promise; + + _removeFromWhitelistProtect(account: string, overrides?: CallOverrides): Promise; + + _setBorrowCapGuardian(newBorrowCapGuardian: string, overrides?: CallOverrides): Promise; + + _setBorrowPaused(tToken: string, state: boolean, overrides?: CallOverrides): Promise; + + _setCloseFactor(newCloseFactorMantissa: BigNumberish, overrides?: CallOverrides): Promise; + + _setCollateralFactor( + tToken: string, + newCollateralFactorMantissa: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + _setContributorTonicSpeed(contributor: string, tonicSpeed: BigNumberish, overrides?: CallOverrides): Promise; + + _setLiquidationIncentive( + newLiquidationIncentiveMantissa: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + _setMarketBorrowCaps(tTokens: string[], newBorrowCaps: BigNumberish[], overrides?: CallOverrides): Promise; + + _setMintPaused(tToken: string, state: boolean, overrides?: CallOverrides): Promise; + + _setPauseGuardian(newPauseGuardian: string, overrides?: CallOverrides): Promise; + + _setPriceOracle(newOracle: string, overrides?: CallOverrides): Promise; + + _setSeizePaused(state: boolean, overrides?: CallOverrides): Promise; + + _setTonicSpeed(tToken: string, tonicSpeed: BigNumberish, overrides?: CallOverrides): Promise; + + _setTransferPaused(state: boolean, overrides?: CallOverrides): Promise; + + _setWhitelistProtect(whitelistStatus: boolean, overrides?: CallOverrides): Promise; + + _supportMarket(tToken: string, overrides?: CallOverrides): Promise; + + _updateTvlProtectLimit( + tTokens: string[], + newLimitPerUser: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + + accountAssets(arg0: string, arg1: BigNumberish, overrides?: CallOverrides): Promise; + + admin(overrides?: CallOverrides): Promise; + + allMarkets(arg0: BigNumberish, overrides?: CallOverrides): Promise; + + borrowAllowed( + tToken: string, + borrower: string, + borrowAmount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + borrowCapGuardian(overrides?: CallOverrides): Promise; + + borrowCaps(arg0: string, overrides?: CallOverrides): Promise; + + borrowGuardianPaused(arg0: string, overrides?: CallOverrides): Promise; + + borrowVerify( + tToken: string, + borrower: string, + borrowAmount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + checkMembership(account: string, tToken: string, overrides?: CallOverrides): Promise; + + 'claimTonic(address[],address[],bool,bool)'( + holders: string[], + tTokens: string[], + borrowers: boolean, + suppliers: boolean, + overrides?: CallOverrides, + ): Promise; + + 'claimTonic(address)'(holder: string, overrides?: CallOverrides): Promise; + + 'claimTonic(address,address[])'(holder: string, tTokens: string[], overrides?: CallOverrides): Promise; + + closeFactorMantissa(overrides?: CallOverrides): Promise; + + enterMarkets(tTokens: string[], overrides?: CallOverrides): Promise; + + exitMarket(tTokenAddress: string, overrides?: CallOverrides): Promise; + + getAccountLiquidity(account: string, overrides?: CallOverrides): Promise<[BigNumber, BigNumber, BigNumber]>; + + getAllMarkets(overrides?: CallOverrides): Promise; + + getAssetsIn(account: string, overrides?: CallOverrides): Promise; + + getBlockNumber(overrides?: CallOverrides): Promise; + + getHypotheticalAccountLiquidity( + account: string, + tTokenModify: string, + redeemTokens: BigNumberish, + borrowAmount: BigNumberish, + overrides?: CallOverrides, + ): Promise<[BigNumber, BigNumber, BigNumber]>; + + getTonicAddress(overrides?: CallOverrides): Promise; + + isDeprecated(tToken: string, overrides?: CallOverrides): Promise; + + isTectonicCore(overrides?: CallOverrides): Promise; + + lastContributorBlock(arg0: string, overrides?: CallOverrides): Promise; + + liquidateBorrowAllowed( + tTokenBorrowed: string, + tTokenCollateral: string, + liquidator: string, + borrower: string, + repayAmount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + liquidateBorrowVerify( + tTokenBorrowed: string, + tTokenCollateral: string, + liquidator: string, + borrower: string, + actualRepayAmount: BigNumberish, + seizeTokens: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + liquidateCalculateSeizeTokens( + tTokenBorrowed: string, + tTokenCollateral: string, + actualRepayAmount: BigNumberish, + overrides?: CallOverrides, + ): Promise<[BigNumber, BigNumber]>; + + liquidationIncentiveMantissa(overrides?: CallOverrides): Promise; + + markets( + arg0: string, + overrides?: CallOverrides, + ): Promise< + [boolean, BigNumber, boolean] & { + isListed: boolean; + collateralFactorMantissa: BigNumber; + isTonicized: boolean; + } + >; + + maxAssets(overrides?: CallOverrides): Promise; + + mintAllowed( + tToken: string, + minter: string, + mintAmount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + mintGuardianPaused(arg0: string, overrides?: CallOverrides): Promise; + + mintVerify( + tToken: string, + minter: string, + actualMintAmount: BigNumberish, + mintTokens: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + oracle(overrides?: CallOverrides): Promise; + + pauseGuardian(overrides?: CallOverrides): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + pendingTectonicCoreImplementation(overrides?: CallOverrides): Promise; + + redeemAllowed( + tToken: string, + redeemer: string, + redeemTokens: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + redeemVerify( + tToken: string, + redeemer: string, + redeemAmount: BigNumberish, + redeemTokens: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + repayBorrowAllowed( + tToken: string, + payer: string, + borrower: string, + repayAmount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + repayBorrowVerify( + tToken: string, + payer: string, + borrower: string, + actualRepayAmount: BigNumberish, + borrowerIndex: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + seizeAllowed( + tTokenCollateral: string, + tTokenBorrowed: string, + liquidator: string, + borrower: string, + seizeTokens: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + seizeGuardianPaused(overrides?: CallOverrides): Promise; + + seizeVerify( + tTokenCollateral: string, + tTokenBorrowed: string, + liquidator: string, + borrower: string, + seizeTokens: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + tectonicCoreImplementation(overrides?: CallOverrides): Promise; + + tokenToPerUserTvlProtectLimit(arg0: string, overrides?: CallOverrides): Promise; + + tonicAccrued(arg0: string, overrides?: CallOverrides): Promise; + + tonicBorrowState( + arg0: string, + overrides?: CallOverrides, + ): Promise<[BigNumber, number] & { index: BigNumber; block: number }>; + + tonicBorrowerIndex(arg0: string, arg1: string, overrides?: CallOverrides): Promise; + + tonicContributorSpeeds(arg0: string, overrides?: CallOverrides): Promise; + + tonicInitialIndex(overrides?: CallOverrides): Promise; + + tonicRate(overrides?: CallOverrides): Promise; + + tonicSpeeds(arg0: string, overrides?: CallOverrides): Promise; + + tonicSupplierIndex(arg0: string, arg1: string, overrides?: CallOverrides): Promise; + + tonicSupplyState( + arg0: string, + overrides?: CallOverrides, + ): Promise<[BigNumber, number] & { index: BigNumber; block: number }>; + + transferAllowed( + tToken: string, + src: string, + dst: string, + transferTokens: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + transferGuardianPaused(overrides?: CallOverrides): Promise; + + transferVerify( + tToken: string, + src: string, + dst: string, + transferTokens: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + updateContributorRewards(contributor: string, overrides?: CallOverrides): Promise; + + utilizedTvlAmount(arg0: string, arg1: string, overrides?: CallOverrides): Promise; + + whitelistProtectEnabled(overrides?: CallOverrides): Promise; + + whitelistedAddresses(arg0: string, overrides?: CallOverrides): Promise; + }; + + filters: { + 'ActionPaused(string,bool)'(action?: null, pauseState?: null): ActionPaused_string_bool_EventFilter; + 'ActionPaused(address,string,bool)'( + tToken?: null, + action?: null, + pauseState?: null, + ): ActionPaused_address_string_bool_EventFilter; + + 'ContributorTonicSpeedUpdated(address,uint256)'( + contributor?: string | null, + newSpeed?: null, + ): ContributorTonicSpeedUpdatedEventFilter; + ContributorTonicSpeedUpdated(contributor?: string | null, newSpeed?: null): ContributorTonicSpeedUpdatedEventFilter; + + 'DistributedBorrowerTonic(address,address,uint256,uint256)'( + tToken?: string | null, + borrower?: string | null, + tonicDelta?: null, + tonicBorrowIndex?: null, + ): DistributedBorrowerTonicEventFilter; + DistributedBorrowerTonic( + tToken?: string | null, + borrower?: string | null, + tonicDelta?: null, + tonicBorrowIndex?: null, + ): DistributedBorrowerTonicEventFilter; + + 'DistributedSupplierTonic(address,address,uint256,uint256)'( + tToken?: string | null, + supplier?: string | null, + tonicDelta?: null, + tonicSupplyIndex?: null, + ): DistributedSupplierTonicEventFilter; + DistributedSupplierTonic( + tToken?: string | null, + supplier?: string | null, + tonicDelta?: null, + tonicSupplyIndex?: null, + ): DistributedSupplierTonicEventFilter; + + 'Failure(uint256,uint256,uint256)'(error?: null, info?: null, detail?: null): FailureEventFilter; + Failure(error?: null, info?: null, detail?: null): FailureEventFilter; + + 'MarketEntered(address,address)'(tToken?: null, account?: null): MarketEnteredEventFilter; + MarketEntered(tToken?: null, account?: null): MarketEnteredEventFilter; + + 'MarketExited(address,address)'(tToken?: null, account?: null): MarketExitedEventFilter; + MarketExited(tToken?: null, account?: null): MarketExitedEventFilter; + + 'MarketListed(address)'(tToken?: null): MarketListedEventFilter; + MarketListed(tToken?: null): MarketListedEventFilter; + + 'NewBorrowCap(address,uint256)'(tToken?: string | null, newBorrowCap?: null): NewBorrowCapEventFilter; + NewBorrowCap(tToken?: string | null, newBorrowCap?: null): NewBorrowCapEventFilter; + + 'NewBorrowCapGuardian(address,address)'( + oldBorrowCapGuardian?: null, + newBorrowCapGuardian?: null, + ): NewBorrowCapGuardianEventFilter; + NewBorrowCapGuardian(oldBorrowCapGuardian?: null, newBorrowCapGuardian?: null): NewBorrowCapGuardianEventFilter; + + 'NewCloseFactor(uint256,uint256)'( + oldCloseFactorMantissa?: null, + newCloseFactorMantissa?: null, + ): NewCloseFactorEventFilter; + NewCloseFactor(oldCloseFactorMantissa?: null, newCloseFactorMantissa?: null): NewCloseFactorEventFilter; + + 'NewCollateralFactor(address,uint256,uint256)'( + tToken?: null, + oldCollateralFactorMantissa?: null, + newCollateralFactorMantissa?: null, + ): NewCollateralFactorEventFilter; + NewCollateralFactor( + tToken?: null, + oldCollateralFactorMantissa?: null, + newCollateralFactorMantissa?: null, + ): NewCollateralFactorEventFilter; + + 'NewLiquidationIncentive(uint256,uint256)'( + oldLiquidationIncentiveMantissa?: null, + newLiquidationIncentiveMantissa?: null, + ): NewLiquidationIncentiveEventFilter; + NewLiquidationIncentive( + oldLiquidationIncentiveMantissa?: null, + newLiquidationIncentiveMantissa?: null, + ): NewLiquidationIncentiveEventFilter; + + 'NewPauseGuardian(address,address)'(oldPauseGuardian?: null, newPauseGuardian?: null): NewPauseGuardianEventFilter; + NewPauseGuardian(oldPauseGuardian?: null, newPauseGuardian?: null): NewPauseGuardianEventFilter; + + 'NewPriceOracle(address,address)'(oldPriceOracle?: null, newPriceOracle?: null): NewPriceOracleEventFilter; + NewPriceOracle(oldPriceOracle?: null, newPriceOracle?: null): NewPriceOracleEventFilter; + + 'TVLProtectLimitUpdated(address,uint256)'( + tToken?: string | null, + newLimitPerUser?: null, + ): TVLProtectLimitUpdatedEventFilter; + TVLProtectLimitUpdated(tToken?: string | null, newLimitPerUser?: null): TVLProtectLimitUpdatedEventFilter; + + 'TonicGranted(address,uint256)'(recipient?: null, amount?: null): TonicGrantedEventFilter; + TonicGranted(recipient?: null, amount?: null): TonicGrantedEventFilter; + + 'TonicSpeedUpdated(address,uint256)'(tToken?: string | null, newSpeed?: null): TonicSpeedUpdatedEventFilter; + TonicSpeedUpdated(tToken?: string | null, newSpeed?: null): TonicSpeedUpdatedEventFilter; + + 'WhitelistAccountAdded(address)'(account?: null): WhitelistAccountAddedEventFilter; + WhitelistAccountAdded(account?: null): WhitelistAccountAddedEventFilter; + + 'WhitelistAccountRemoved(address)'(account?: null): WhitelistAccountRemovedEventFilter; + WhitelistAccountRemoved(account?: null): WhitelistAccountRemovedEventFilter; + + 'WhitelistStatusChanged(bool)'(enabled?: null): WhitelistStatusChangedEventFilter; + WhitelistStatusChanged(enabled?: null): WhitelistStatusChangedEventFilter; + }; + + estimateGas: { + _addToWhitelistProtect( + accounts: string[], + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _become(unitroller: string, overrides?: Overrides & { from?: string | Promise }): Promise; + + _borrowGuardianPaused(overrides?: CallOverrides): Promise; + + _grantTonic( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _mintGuardianPaused(overrides?: CallOverrides): Promise; + + _removeFromWhitelistProtect( + account: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setBorrowCapGuardian( + newBorrowCapGuardian: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setBorrowPaused( + tToken: string, + state: boolean, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setCloseFactor( + newCloseFactorMantissa: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setCollateralFactor( + tToken: string, + newCollateralFactorMantissa: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setContributorTonicSpeed( + contributor: string, + tonicSpeed: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setLiquidationIncentive( + newLiquidationIncentiveMantissa: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setMarketBorrowCaps( + tTokens: string[], + newBorrowCaps: BigNumberish[], + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setMintPaused( + tToken: string, + state: boolean, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setPauseGuardian( + newPauseGuardian: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setPriceOracle(newOracle: string, overrides?: Overrides & { from?: string | Promise }): Promise; + + _setSeizePaused(state: boolean, overrides?: Overrides & { from?: string | Promise }): Promise; + + _setTonicSpeed( + tToken: string, + tonicSpeed: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setTransferPaused(state: boolean, overrides?: Overrides & { from?: string | Promise }): Promise; + + _setWhitelistProtect( + whitelistStatus: boolean, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _supportMarket(tToken: string, overrides?: Overrides & { from?: string | Promise }): Promise; + + _updateTvlProtectLimit( + tTokens: string[], + newLimitPerUser: BigNumberish[], + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + accountAssets(arg0: string, arg1: BigNumberish, overrides?: CallOverrides): Promise; + + admin(overrides?: CallOverrides): Promise; + + allMarkets(arg0: BigNumberish, overrides?: CallOverrides): Promise; + + borrowAllowed( + tToken: string, + borrower: string, + borrowAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + borrowCapGuardian(overrides?: CallOverrides): Promise; + + borrowCaps(arg0: string, overrides?: CallOverrides): Promise; + + borrowGuardianPaused(arg0: string, overrides?: CallOverrides): Promise; + + borrowVerify( + tToken: string, + borrower: string, + borrowAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + checkMembership(account: string, tToken: string, overrides?: CallOverrides): Promise; + + 'claimTonic(address[],address[],bool,bool)'( + holders: string[], + tTokens: string[], + borrowers: boolean, + suppliers: boolean, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + 'claimTonic(address)'( + holder: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + 'claimTonic(address,address[])'( + holder: string, + tTokens: string[], + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + closeFactorMantissa(overrides?: CallOverrides): Promise; + + enterMarkets(tTokens: string[], overrides?: Overrides & { from?: string | Promise }): Promise; + + exitMarket(tTokenAddress: string, overrides?: Overrides & { from?: string | Promise }): Promise; + + getAccountLiquidity(account: string, overrides?: CallOverrides): Promise; + + getAllMarkets(overrides?: CallOverrides): Promise; + + getAssetsIn(account: string, overrides?: CallOverrides): Promise; + + getBlockNumber(overrides?: CallOverrides): Promise; + + getHypotheticalAccountLiquidity( + account: string, + tTokenModify: string, + redeemTokens: BigNumberish, + borrowAmount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getTonicAddress(overrides?: CallOverrides): Promise; + + isDeprecated(tToken: string, overrides?: CallOverrides): Promise; + + isTectonicCore(overrides?: CallOverrides): Promise; + + lastContributorBlock(arg0: string, overrides?: CallOverrides): Promise; + + liquidateBorrowAllowed( + tTokenBorrowed: string, + tTokenCollateral: string, + liquidator: string, + borrower: string, + repayAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + liquidateBorrowVerify( + tTokenBorrowed: string, + tTokenCollateral: string, + liquidator: string, + borrower: string, + actualRepayAmount: BigNumberish, + seizeTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + liquidateCalculateSeizeTokens( + tTokenBorrowed: string, + tTokenCollateral: string, + actualRepayAmount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + liquidationIncentiveMantissa(overrides?: CallOverrides): Promise; + + markets(arg0: string, overrides?: CallOverrides): Promise; + + maxAssets(overrides?: CallOverrides): Promise; + + mintAllowed( + tToken: string, + minter: string, + mintAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + mintGuardianPaused(arg0: string, overrides?: CallOverrides): Promise; + + mintVerify( + tToken: string, + minter: string, + actualMintAmount: BigNumberish, + mintTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + oracle(overrides?: CallOverrides): Promise; + + pauseGuardian(overrides?: CallOverrides): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + pendingTectonicCoreImplementation(overrides?: CallOverrides): Promise; + + redeemAllowed( + tToken: string, + redeemer: string, + redeemTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + redeemVerify( + tToken: string, + redeemer: string, + redeemAmount: BigNumberish, + redeemTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + repayBorrowAllowed( + tToken: string, + payer: string, + borrower: string, + repayAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + repayBorrowVerify( + tToken: string, + payer: string, + borrower: string, + actualRepayAmount: BigNumberish, + borrowerIndex: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + seizeAllowed( + tTokenCollateral: string, + tTokenBorrowed: string, + liquidator: string, + borrower: string, + seizeTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + seizeGuardianPaused(overrides?: CallOverrides): Promise; + + seizeVerify( + tTokenCollateral: string, + tTokenBorrowed: string, + liquidator: string, + borrower: string, + seizeTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + tectonicCoreImplementation(overrides?: CallOverrides): Promise; + + tokenToPerUserTvlProtectLimit(arg0: string, overrides?: CallOverrides): Promise; + + tonicAccrued(arg0: string, overrides?: CallOverrides): Promise; + + tonicBorrowState(arg0: string, overrides?: CallOverrides): Promise; + + tonicBorrowerIndex(arg0: string, arg1: string, overrides?: CallOverrides): Promise; + + tonicContributorSpeeds(arg0: string, overrides?: CallOverrides): Promise; + + tonicInitialIndex(overrides?: CallOverrides): Promise; + + tonicRate(overrides?: CallOverrides): Promise; + + tonicSpeeds(arg0: string, overrides?: CallOverrides): Promise; + + tonicSupplierIndex(arg0: string, arg1: string, overrides?: CallOverrides): Promise; + + tonicSupplyState(arg0: string, overrides?: CallOverrides): Promise; + + transferAllowed( + tToken: string, + src: string, + dst: string, + transferTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + transferGuardianPaused(overrides?: CallOverrides): Promise; + + transferVerify( + tToken: string, + src: string, + dst: string, + transferTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + updateContributorRewards( + contributor: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + utilizedTvlAmount(arg0: string, arg1: string, overrides?: CallOverrides): Promise; + + whitelistProtectEnabled(overrides?: CallOverrides): Promise; + + whitelistedAddresses(arg0: string, overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + _addToWhitelistProtect( + accounts: string[], + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _become( + unitroller: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _borrowGuardianPaused(overrides?: CallOverrides): Promise; + + _grantTonic( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _mintGuardianPaused(overrides?: CallOverrides): Promise; + + _removeFromWhitelistProtect( + account: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setBorrowCapGuardian( + newBorrowCapGuardian: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setBorrowPaused( + tToken: string, + state: boolean, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setCloseFactor( + newCloseFactorMantissa: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setCollateralFactor( + tToken: string, + newCollateralFactorMantissa: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setContributorTonicSpeed( + contributor: string, + tonicSpeed: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setLiquidationIncentive( + newLiquidationIncentiveMantissa: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setMarketBorrowCaps( + tTokens: string[], + newBorrowCaps: BigNumberish[], + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setMintPaused( + tToken: string, + state: boolean, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setPauseGuardian( + newPauseGuardian: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setPriceOracle( + newOracle: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setSeizePaused( + state: boolean, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setTonicSpeed( + tToken: string, + tonicSpeed: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setTransferPaused( + state: boolean, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setWhitelistProtect( + whitelistStatus: boolean, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _supportMarket( + tToken: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _updateTvlProtectLimit( + tTokens: string[], + newLimitPerUser: BigNumberish[], + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + accountAssets(arg0: string, arg1: BigNumberish, overrides?: CallOverrides): Promise; + + admin(overrides?: CallOverrides): Promise; + + allMarkets(arg0: BigNumberish, overrides?: CallOverrides): Promise; + + borrowAllowed( + tToken: string, + borrower: string, + borrowAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + borrowCapGuardian(overrides?: CallOverrides): Promise; + + borrowCaps(arg0: string, overrides?: CallOverrides): Promise; + + borrowGuardianPaused(arg0: string, overrides?: CallOverrides): Promise; + + borrowVerify( + tToken: string, + borrower: string, + borrowAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + checkMembership(account: string, tToken: string, overrides?: CallOverrides): Promise; + + 'claimTonic(address[],address[],bool,bool)'( + holders: string[], + tTokens: string[], + borrowers: boolean, + suppliers: boolean, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + 'claimTonic(address)'( + holder: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + 'claimTonic(address,address[])'( + holder: string, + tTokens: string[], + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + closeFactorMantissa(overrides?: CallOverrides): Promise; + + enterMarkets( + tTokens: string[], + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + exitMarket( + tTokenAddress: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + getAccountLiquidity(account: string, overrides?: CallOverrides): Promise; + + getAllMarkets(overrides?: CallOverrides): Promise; + + getAssetsIn(account: string, overrides?: CallOverrides): Promise; + + getBlockNumber(overrides?: CallOverrides): Promise; + + getHypotheticalAccountLiquidity( + account: string, + tTokenModify: string, + redeemTokens: BigNumberish, + borrowAmount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getTonicAddress(overrides?: CallOverrides): Promise; + + isDeprecated(tToken: string, overrides?: CallOverrides): Promise; + + isTectonicCore(overrides?: CallOverrides): Promise; + + lastContributorBlock(arg0: string, overrides?: CallOverrides): Promise; + + liquidateBorrowAllowed( + tTokenBorrowed: string, + tTokenCollateral: string, + liquidator: string, + borrower: string, + repayAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + liquidateBorrowVerify( + tTokenBorrowed: string, + tTokenCollateral: string, + liquidator: string, + borrower: string, + actualRepayAmount: BigNumberish, + seizeTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + liquidateCalculateSeizeTokens( + tTokenBorrowed: string, + tTokenCollateral: string, + actualRepayAmount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + liquidationIncentiveMantissa(overrides?: CallOverrides): Promise; + + markets(arg0: string, overrides?: CallOverrides): Promise; + + maxAssets(overrides?: CallOverrides): Promise; + + mintAllowed( + tToken: string, + minter: string, + mintAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + mintGuardianPaused(arg0: string, overrides?: CallOverrides): Promise; + + mintVerify( + tToken: string, + minter: string, + actualMintAmount: BigNumberish, + mintTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + oracle(overrides?: CallOverrides): Promise; + + pauseGuardian(overrides?: CallOverrides): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + pendingTectonicCoreImplementation(overrides?: CallOverrides): Promise; + + redeemAllowed( + tToken: string, + redeemer: string, + redeemTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + redeemVerify( + tToken: string, + redeemer: string, + redeemAmount: BigNumberish, + redeemTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + repayBorrowAllowed( + tToken: string, + payer: string, + borrower: string, + repayAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + repayBorrowVerify( + tToken: string, + payer: string, + borrower: string, + actualRepayAmount: BigNumberish, + borrowerIndex: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + seizeAllowed( + tTokenCollateral: string, + tTokenBorrowed: string, + liquidator: string, + borrower: string, + seizeTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + seizeGuardianPaused(overrides?: CallOverrides): Promise; + + seizeVerify( + tTokenCollateral: string, + tTokenBorrowed: string, + liquidator: string, + borrower: string, + seizeTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + tectonicCoreImplementation(overrides?: CallOverrides): Promise; + + tokenToPerUserTvlProtectLimit(arg0: string, overrides?: CallOverrides): Promise; + + tonicAccrued(arg0: string, overrides?: CallOverrides): Promise; + + tonicBorrowState(arg0: string, overrides?: CallOverrides): Promise; + + tonicBorrowerIndex(arg0: string, arg1: string, overrides?: CallOverrides): Promise; + + tonicContributorSpeeds(arg0: string, overrides?: CallOverrides): Promise; + + tonicInitialIndex(overrides?: CallOverrides): Promise; + + tonicRate(overrides?: CallOverrides): Promise; + + tonicSpeeds(arg0: string, overrides?: CallOverrides): Promise; + + tonicSupplierIndex(arg0: string, arg1: string, overrides?: CallOverrides): Promise; + + tonicSupplyState(arg0: string, overrides?: CallOverrides): Promise; + + transferAllowed( + tToken: string, + src: string, + dst: string, + transferTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + transferGuardianPaused(overrides?: CallOverrides): Promise; + + transferVerify( + tToken: string, + src: string, + dst: string, + transferTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + updateContributorRewards( + contributor: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + utilizedTvlAmount(arg0: string, arg1: string, overrides?: CallOverrides): Promise; + + whitelistProtectEnabled(overrides?: CallOverrides): Promise; + + whitelistedAddresses(arg0: string, overrides?: CallOverrides): Promise; + }; +} diff --git a/src/apps/tectonic/contracts/ethers/TectonicLens.ts b/src/apps/tectonic/contracts/ethers/TectonicLens.ts new file mode 100644 index 000000000..9da27ac11 --- /dev/null +++ b/src/apps/tectonic/contracts/ethers/TectonicLens.ts @@ -0,0 +1,765 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers'; +import type { FunctionFragment, Result } from '@ethersproject/abi'; +import type { Listener, Provider } from '@ethersproject/providers'; +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common'; + +export declare namespace TectonicLens { + export type AccountLimitsStruct = { + markets: string[]; + liquidity: BigNumberish; + shortfall: BigNumberish; + }; + + export type AccountLimitsStructOutput = [string[], BigNumber, BigNumber] & { + markets: string[]; + liquidity: BigNumber; + shortfall: BigNumber; + }; + + export type GovBravoProposalStruct = { + proposalId: BigNumberish; + proposer: string; + eta: BigNumberish; + targets: string[]; + values: BigNumberish[]; + signatures: string[]; + calldatas: BytesLike[]; + startBlock: BigNumberish; + endBlock: BigNumberish; + forVotes: BigNumberish; + againstVotes: BigNumberish; + abstainVotes: BigNumberish; + canceled: boolean; + executed: boolean; + }; + + export type GovBravoProposalStructOutput = [ + BigNumber, + string, + BigNumber, + string[], + BigNumber[], + string[], + string[], + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean, + ] & { + proposalId: BigNumber; + proposer: string; + eta: BigNumber; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + }; + + export type GovBravoReceiptStruct = { + proposalId: BigNumberish; + hasVoted: boolean; + support: BigNumberish; + votes: BigNumberish; + }; + + export type GovBravoReceiptStructOutput = [BigNumber, boolean, number, BigNumber] & { + proposalId: BigNumber; + hasVoted: boolean; + support: number; + votes: BigNumber; + }; + + export type GovProposalStruct = { + proposalId: BigNumberish; + proposer: string; + eta: BigNumberish; + targets: string[]; + values: BigNumberish[]; + signatures: string[]; + calldatas: BytesLike[]; + startBlock: BigNumberish; + endBlock: BigNumberish; + forVotes: BigNumberish; + againstVotes: BigNumberish; + canceled: boolean; + executed: boolean; + }; + + export type GovProposalStructOutput = [ + BigNumber, + string, + BigNumber, + string[], + BigNumber[], + string[], + string[], + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean, + ] & { + proposalId: BigNumber; + proposer: string; + eta: BigNumber; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + canceled: boolean; + executed: boolean; + }; + + export type GovReceiptStruct = { + proposalId: BigNumberish; + hasVoted: boolean; + support: boolean; + votes: BigNumberish; + }; + + export type GovReceiptStructOutput = [BigNumber, boolean, boolean, BigNumber] & { + proposalId: BigNumber; + hasVoted: boolean; + support: boolean; + votes: BigNumber; + }; + + export type TonicBalanceMetadataStruct = { + balance: BigNumberish; + votes: BigNumberish; + delegate: string; + }; + + export type TonicBalanceMetadataStructOutput = [BigNumber, BigNumber, string] & { + balance: BigNumber; + votes: BigNumber; + delegate: string; + }; + + export type TonicBalanceMetadataExtStruct = { + balance: BigNumberish; + votes: BigNumberish; + delegate: string; + allocated: BigNumberish; + }; + + export type TonicBalanceMetadataExtStructOutput = [BigNumber, BigNumber, string, BigNumber] & { + balance: BigNumber; + votes: BigNumber; + delegate: string; + allocated: BigNumber; + }; + + export type TonicVotesStruct = { + blockNumber: BigNumberish; + votes: BigNumberish; + }; + + export type TonicVotesStructOutput = [BigNumber, BigNumber] & { + blockNumber: BigNumber; + votes: BigNumber; + }; + + export type TTokenBalancesStruct = { + tToken: string; + balanceOf: BigNumberish; + borrowBalanceCurrent: BigNumberish; + balanceOfUnderlying: BigNumberish; + tokenBalance: BigNumberish; + tokenAllowance: BigNumberish; + }; + + export type TTokenBalancesStructOutput = [string, BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { + tToken: string; + balanceOf: BigNumber; + borrowBalanceCurrent: BigNumber; + balanceOfUnderlying: BigNumber; + tokenBalance: BigNumber; + tokenAllowance: BigNumber; + }; + + export type TTokenMetadataStruct = { + tToken: string; + exchangeRateCurrent: BigNumberish; + supplyRatePerBlock: BigNumberish; + borrowRatePerBlock: BigNumberish; + reserveFactorMantissa: BigNumberish; + totalBorrows: BigNumberish; + totalReserves: BigNumberish; + totalSupply: BigNumberish; + totalCash: BigNumberish; + isListed: boolean; + collateralFactorMantissa: BigNumberish; + underlyingAssetAddress: string; + tTokenDecimals: BigNumberish; + underlyingDecimals: BigNumberish; + }; + + export type TTokenMetadataStructOutput = [ + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + BigNumber, + string, + BigNumber, + BigNumber, + ] & { + tToken: string; + exchangeRateCurrent: BigNumber; + supplyRatePerBlock: BigNumber; + borrowRatePerBlock: BigNumber; + reserveFactorMantissa: BigNumber; + totalBorrows: BigNumber; + totalReserves: BigNumber; + totalSupply: BigNumber; + totalCash: BigNumber; + isListed: boolean; + collateralFactorMantissa: BigNumber; + underlyingAssetAddress: string; + tTokenDecimals: BigNumber; + underlyingDecimals: BigNumber; + }; + + export type TTokenUnderlyingPriceStruct = { + tToken: string; + underlyingPrice: BigNumberish; + }; + + export type TTokenUnderlyingPriceStructOutput = [string, BigNumber] & { + tToken: string; + underlyingPrice: BigNumber; + }; +} + +export interface TectonicLensInterface extends utils.Interface { + functions: { + 'getAccountLimits(address,address)': FunctionFragment; + 'getGovBravoProposals(address,uint256[])': FunctionFragment; + 'getGovBravoReceipts(address,address,uint256[])': FunctionFragment; + 'getGovProposals(address,uint256[])': FunctionFragment; + 'getGovReceipts(address,address,uint256[])': FunctionFragment; + 'getTonicBalanceMetadata(address,address)': FunctionFragment; + 'getTonicBalanceMetadataExt(address,address,address)': FunctionFragment; + 'getTonicVotes(address,address,uint32[])': FunctionFragment; + 'tTokenBalances(address,address)': FunctionFragment; + 'tTokenBalancesAll(address[],address)': FunctionFragment; + 'tTokenMetadata(address)': FunctionFragment; + 'tTokenMetadataAll(address[])': FunctionFragment; + 'tTokenUnderlyingPrice(address)': FunctionFragment; + 'tTokenUnderlyingPriceAll(address[])': FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | 'getAccountLimits' + | 'getGovBravoProposals' + | 'getGovBravoReceipts' + | 'getGovProposals' + | 'getGovReceipts' + | 'getTonicBalanceMetadata' + | 'getTonicBalanceMetadataExt' + | 'getTonicVotes' + | 'tTokenBalances' + | 'tTokenBalancesAll' + | 'tTokenMetadata' + | 'tTokenMetadataAll' + | 'tTokenUnderlyingPrice' + | 'tTokenUnderlyingPriceAll', + ): FunctionFragment; + + encodeFunctionData(functionFragment: 'getAccountLimits', values: [string, string]): string; + encodeFunctionData(functionFragment: 'getGovBravoProposals', values: [string, BigNumberish[]]): string; + encodeFunctionData(functionFragment: 'getGovBravoReceipts', values: [string, string, BigNumberish[]]): string; + encodeFunctionData(functionFragment: 'getGovProposals', values: [string, BigNumberish[]]): string; + encodeFunctionData(functionFragment: 'getGovReceipts', values: [string, string, BigNumberish[]]): string; + encodeFunctionData(functionFragment: 'getTonicBalanceMetadata', values: [string, string]): string; + encodeFunctionData(functionFragment: 'getTonicBalanceMetadataExt', values: [string, string, string]): string; + encodeFunctionData(functionFragment: 'getTonicVotes', values: [string, string, BigNumberish[]]): string; + encodeFunctionData(functionFragment: 'tTokenBalances', values: [string, string]): string; + encodeFunctionData(functionFragment: 'tTokenBalancesAll', values: [string[], string]): string; + encodeFunctionData(functionFragment: 'tTokenMetadata', values: [string]): string; + encodeFunctionData(functionFragment: 'tTokenMetadataAll', values: [string[]]): string; + encodeFunctionData(functionFragment: 'tTokenUnderlyingPrice', values: [string]): string; + encodeFunctionData(functionFragment: 'tTokenUnderlyingPriceAll', values: [string[]]): string; + + decodeFunctionResult(functionFragment: 'getAccountLimits', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getGovBravoProposals', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getGovBravoReceipts', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getGovProposals', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getGovReceipts', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getTonicBalanceMetadata', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getTonicBalanceMetadataExt', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getTonicVotes', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'tTokenBalances', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'tTokenBalancesAll', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'tTokenMetadata', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'tTokenMetadataAll', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'tTokenUnderlyingPrice', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'tTokenUnderlyingPriceAll', data: BytesLike): Result; + + events: {}; +} + +export interface TectonicLens extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: TectonicLensInterface; + + 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: { + getAccountLimits( + tectonicCore: string, + account: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + getGovBravoProposals( + governor: string, + proposalIds: BigNumberish[], + overrides?: CallOverrides, + ): Promise<[TectonicLens.GovBravoProposalStructOutput[]]>; + + getGovBravoReceipts( + governor: string, + voter: string, + proposalIds: BigNumberish[], + overrides?: CallOverrides, + ): Promise<[TectonicLens.GovBravoReceiptStructOutput[]]>; + + getGovProposals( + governor: string, + proposalIds: BigNumberish[], + overrides?: CallOverrides, + ): Promise<[TectonicLens.GovProposalStructOutput[]]>; + + getGovReceipts( + governor: string, + voter: string, + proposalIds: BigNumberish[], + overrides?: CallOverrides, + ): Promise<[TectonicLens.GovReceiptStructOutput[]]>; + + getTonicBalanceMetadata( + tonic: string, + account: string, + overrides?: CallOverrides, + ): Promise<[TectonicLens.TonicBalanceMetadataStructOutput]>; + + getTonicBalanceMetadataExt( + tonic: string, + tectonicCore: string, + account: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + getTonicVotes( + tonic: string, + account: string, + blockNumbers: BigNumberish[], + overrides?: CallOverrides, + ): Promise<[TectonicLens.TonicVotesStructOutput[]]>; + + tTokenBalances( + tToken: string, + account: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + tTokenBalancesAll( + tTokens: string[], + account: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + tTokenMetadata( + tToken: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + tTokenMetadataAll( + tTokens: string[], + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + tTokenUnderlyingPrice( + tToken: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + tTokenUnderlyingPriceAll( + tTokens: string[], + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + }; + + getAccountLimits( + tectonicCore: string, + account: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + getGovBravoProposals( + governor: string, + proposalIds: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + + getGovBravoReceipts( + governor: string, + voter: string, + proposalIds: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + + getGovProposals( + governor: string, + proposalIds: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + + getGovReceipts( + governor: string, + voter: string, + proposalIds: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + + getTonicBalanceMetadata( + tonic: string, + account: string, + overrides?: CallOverrides, + ): Promise; + + getTonicBalanceMetadataExt( + tonic: string, + tectonicCore: string, + account: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + getTonicVotes( + tonic: string, + account: string, + blockNumbers: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + + tTokenBalances( + tToken: string, + account: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + tTokenBalancesAll( + tTokens: string[], + account: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + tTokenMetadata( + tToken: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + tTokenMetadataAll( + tTokens: string[], + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + tTokenUnderlyingPrice( + tToken: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + tTokenUnderlyingPriceAll( + tTokens: string[], + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + callStatic: { + getAccountLimits( + tectonicCore: string, + account: string, + overrides?: CallOverrides, + ): Promise; + + getGovBravoProposals( + governor: string, + proposalIds: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + + getGovBravoReceipts( + governor: string, + voter: string, + proposalIds: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + + getGovProposals( + governor: string, + proposalIds: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + + getGovReceipts( + governor: string, + voter: string, + proposalIds: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + + getTonicBalanceMetadata( + tonic: string, + account: string, + overrides?: CallOverrides, + ): Promise; + + getTonicBalanceMetadataExt( + tonic: string, + tectonicCore: string, + account: string, + overrides?: CallOverrides, + ): Promise; + + getTonicVotes( + tonic: string, + account: string, + blockNumbers: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + + tTokenBalances( + tToken: string, + account: string, + overrides?: CallOverrides, + ): Promise; + + tTokenBalancesAll( + tTokens: string[], + account: string, + overrides?: CallOverrides, + ): Promise; + + tTokenMetadata(tToken: string, overrides?: CallOverrides): Promise; + + tTokenMetadataAll(tTokens: string[], overrides?: CallOverrides): Promise; + + tTokenUnderlyingPrice( + tToken: string, + overrides?: CallOverrides, + ): Promise; + + tTokenUnderlyingPriceAll( + tTokens: string[], + overrides?: CallOverrides, + ): Promise; + }; + + filters: {}; + + estimateGas: { + getAccountLimits( + tectonicCore: string, + account: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + getGovBravoProposals(governor: string, proposalIds: BigNumberish[], overrides?: CallOverrides): Promise; + + getGovBravoReceipts( + governor: string, + voter: string, + proposalIds: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + + getGovProposals(governor: string, proposalIds: BigNumberish[], overrides?: CallOverrides): Promise; + + getGovReceipts( + governor: string, + voter: string, + proposalIds: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + + getTonicBalanceMetadata(tonic: string, account: string, overrides?: CallOverrides): Promise; + + getTonicBalanceMetadataExt( + tonic: string, + tectonicCore: string, + account: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + getTonicVotes( + tonic: string, + account: string, + blockNumbers: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + + tTokenBalances( + tToken: string, + account: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + tTokenBalancesAll( + tTokens: string[], + account: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + tTokenMetadata(tToken: string, overrides?: Overrides & { from?: string | Promise }): Promise; + + tTokenMetadataAll( + tTokens: string[], + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + tTokenUnderlyingPrice( + tToken: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + tTokenUnderlyingPriceAll( + tTokens: string[], + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + }; + + populateTransaction: { + getAccountLimits( + tectonicCore: string, + account: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + getGovBravoProposals( + governor: string, + proposalIds: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + + getGovBravoReceipts( + governor: string, + voter: string, + proposalIds: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + + getGovProposals( + governor: string, + proposalIds: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + + getGovReceipts( + governor: string, + voter: string, + proposalIds: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + + getTonicBalanceMetadata(tonic: string, account: string, overrides?: CallOverrides): Promise; + + getTonicBalanceMetadataExt( + tonic: string, + tectonicCore: string, + account: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + getTonicVotes( + tonic: string, + account: string, + blockNumbers: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + + tTokenBalances( + tToken: string, + account: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + tTokenBalancesAll( + tTokens: string[], + account: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + tTokenMetadata( + tToken: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + tTokenMetadataAll( + tTokens: string[], + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + tTokenUnderlyingPrice( + tToken: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + tTokenUnderlyingPriceAll( + tTokens: string[], + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + }; +} diff --git a/src/apps/tectonic/contracts/ethers/TectonicTToken.ts b/src/apps/tectonic/contracts/ethers/TectonicTToken.ts new file mode 100644 index 000000000..df5367629 --- /dev/null +++ b/src/apps/tectonic/contracts/ethers/TectonicTToken.ts @@ -0,0 +1,1409 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers'; +import type { FunctionFragment, Result, EventFragment } from '@ethersproject/abi'; +import type { Listener, Provider } from '@ethersproject/providers'; +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common'; + +export interface TectonicTTokenInterface extends utils.Interface { + functions: { + '_acceptAdmin()': FunctionFragment; + '_addReserves(uint256)': FunctionFragment; + '_reduceReserves(uint256)': FunctionFragment; + '_setImplementation(address,bool,bytes)': FunctionFragment; + '_setInterestRateModel(address)': FunctionFragment; + '_setPendingAdmin(address)': FunctionFragment; + '_setReserveFactor(uint256)': FunctionFragment; + '_setTectonicCore(address)': FunctionFragment; + 'accrualBlockNumber()': FunctionFragment; + 'accrueInterest()': FunctionFragment; + 'admin()': FunctionFragment; + 'allowance(address,address)': FunctionFragment; + 'approve(address,uint256)': FunctionFragment; + 'balanceOf(address)': FunctionFragment; + 'balanceOfUnderlying(address)': FunctionFragment; + 'borrow(uint256)': FunctionFragment; + 'borrowBalanceCurrent(address)': FunctionFragment; + 'borrowBalanceStored(address)': FunctionFragment; + 'borrowIndex()': FunctionFragment; + 'borrowRatePerBlock()': FunctionFragment; + 'decimals()': FunctionFragment; + 'delegateToImplementation(bytes)': FunctionFragment; + 'delegateToViewImplementation(bytes)': FunctionFragment; + 'exchangeRateCurrent()': FunctionFragment; + 'exchangeRateStored()': FunctionFragment; + 'getAccountSnapshot(address)': FunctionFragment; + 'getCash()': FunctionFragment; + 'implementation()': FunctionFragment; + 'interestRateModel()': FunctionFragment; + 'isTToken()': FunctionFragment; + 'liquidateBorrow(address,uint256,address)': FunctionFragment; + 'mint(uint256)': FunctionFragment; + 'name()': FunctionFragment; + 'pendingAdmin()': FunctionFragment; + 'protocolSeizeShareMantissa()': FunctionFragment; + 'redeem(uint256)': FunctionFragment; + 'redeemUnderlying(uint256)': FunctionFragment; + 'repayBorrow(uint256)': FunctionFragment; + 'repayBorrowBehalf(address,uint256)': FunctionFragment; + 'reserveFactorMantissa()': FunctionFragment; + 'seize(address,address,uint256)': FunctionFragment; + 'supplyRatePerBlock()': FunctionFragment; + 'sweepToken(address)': FunctionFragment; + 'symbol()': FunctionFragment; + 'tectonicCore()': FunctionFragment; + 'totalBorrows()': FunctionFragment; + 'totalBorrowsCurrent()': FunctionFragment; + 'totalReserves()': FunctionFragment; + 'totalSupply()': FunctionFragment; + 'transfer(address,uint256)': FunctionFragment; + 'transferFrom(address,address,uint256)': FunctionFragment; + 'underlying()': FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | '_acceptAdmin' + | '_addReserves' + | '_reduceReserves' + | '_setImplementation' + | '_setInterestRateModel' + | '_setPendingAdmin' + | '_setReserveFactor' + | '_setTectonicCore' + | 'accrualBlockNumber' + | 'accrueInterest' + | 'admin' + | 'allowance' + | 'approve' + | 'balanceOf' + | 'balanceOfUnderlying' + | 'borrow' + | 'borrowBalanceCurrent' + | 'borrowBalanceStored' + | 'borrowIndex' + | 'borrowRatePerBlock' + | 'decimals' + | 'delegateToImplementation' + | 'delegateToViewImplementation' + | 'exchangeRateCurrent' + | 'exchangeRateStored' + | 'getAccountSnapshot' + | 'getCash' + | 'implementation' + | 'interestRateModel' + | 'isTToken' + | 'liquidateBorrow' + | 'mint' + | 'name' + | 'pendingAdmin' + | 'protocolSeizeShareMantissa' + | 'redeem' + | 'redeemUnderlying' + | 'repayBorrow' + | 'repayBorrowBehalf' + | 'reserveFactorMantissa' + | 'seize' + | 'supplyRatePerBlock' + | 'sweepToken' + | 'symbol' + | 'tectonicCore' + | 'totalBorrows' + | 'totalBorrowsCurrent' + | 'totalReserves' + | 'totalSupply' + | 'transfer' + | 'transferFrom' + | 'underlying', + ): FunctionFragment; + + encodeFunctionData(functionFragment: '_acceptAdmin', values?: undefined): string; + encodeFunctionData(functionFragment: '_addReserves', values: [BigNumberish]): string; + encodeFunctionData(functionFragment: '_reduceReserves', values: [BigNumberish]): string; + encodeFunctionData(functionFragment: '_setImplementation', values: [string, boolean, BytesLike]): string; + encodeFunctionData(functionFragment: '_setInterestRateModel', values: [string]): string; + encodeFunctionData(functionFragment: '_setPendingAdmin', values: [string]): string; + encodeFunctionData(functionFragment: '_setReserveFactor', values: [BigNumberish]): string; + encodeFunctionData(functionFragment: '_setTectonicCore', values: [string]): string; + encodeFunctionData(functionFragment: 'accrualBlockNumber', values?: undefined): string; + encodeFunctionData(functionFragment: 'accrueInterest', values?: undefined): string; + encodeFunctionData(functionFragment: 'admin', values?: undefined): string; + encodeFunctionData(functionFragment: 'allowance', values: [string, string]): string; + encodeFunctionData(functionFragment: 'approve', values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: 'balanceOf', values: [string]): string; + encodeFunctionData(functionFragment: 'balanceOfUnderlying', values: [string]): string; + encodeFunctionData(functionFragment: 'borrow', values: [BigNumberish]): string; + encodeFunctionData(functionFragment: 'borrowBalanceCurrent', values: [string]): string; + encodeFunctionData(functionFragment: 'borrowBalanceStored', values: [string]): string; + encodeFunctionData(functionFragment: 'borrowIndex', values?: undefined): string; + encodeFunctionData(functionFragment: 'borrowRatePerBlock', values?: undefined): string; + encodeFunctionData(functionFragment: 'decimals', values?: undefined): string; + encodeFunctionData(functionFragment: 'delegateToImplementation', values: [BytesLike]): string; + encodeFunctionData(functionFragment: 'delegateToViewImplementation', values: [BytesLike]): string; + encodeFunctionData(functionFragment: 'exchangeRateCurrent', values?: undefined): string; + encodeFunctionData(functionFragment: 'exchangeRateStored', values?: undefined): string; + encodeFunctionData(functionFragment: 'getAccountSnapshot', values: [string]): string; + encodeFunctionData(functionFragment: 'getCash', values?: undefined): string; + encodeFunctionData(functionFragment: 'implementation', values?: undefined): string; + encodeFunctionData(functionFragment: 'interestRateModel', values?: undefined): string; + encodeFunctionData(functionFragment: 'isTToken', values?: undefined): string; + encodeFunctionData(functionFragment: 'liquidateBorrow', values: [string, BigNumberish, string]): string; + encodeFunctionData(functionFragment: 'mint', values: [BigNumberish]): string; + encodeFunctionData(functionFragment: 'name', values?: undefined): string; + encodeFunctionData(functionFragment: 'pendingAdmin', values?: undefined): string; + encodeFunctionData(functionFragment: 'protocolSeizeShareMantissa', values?: undefined): string; + encodeFunctionData(functionFragment: 'redeem', values: [BigNumberish]): string; + encodeFunctionData(functionFragment: 'redeemUnderlying', values: [BigNumberish]): string; + encodeFunctionData(functionFragment: 'repayBorrow', values: [BigNumberish]): string; + encodeFunctionData(functionFragment: 'repayBorrowBehalf', values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: 'reserveFactorMantissa', values?: undefined): string; + encodeFunctionData(functionFragment: 'seize', values: [string, string, BigNumberish]): string; + encodeFunctionData(functionFragment: 'supplyRatePerBlock', values?: undefined): string; + encodeFunctionData(functionFragment: 'sweepToken', values: [string]): string; + encodeFunctionData(functionFragment: 'symbol', values?: undefined): string; + encodeFunctionData(functionFragment: 'tectonicCore', values?: undefined): string; + encodeFunctionData(functionFragment: 'totalBorrows', values?: undefined): string; + encodeFunctionData(functionFragment: 'totalBorrowsCurrent', values?: undefined): string; + encodeFunctionData(functionFragment: 'totalReserves', values?: undefined): string; + encodeFunctionData(functionFragment: 'totalSupply', values?: undefined): string; + encodeFunctionData(functionFragment: 'transfer', values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: 'transferFrom', values: [string, string, BigNumberish]): string; + encodeFunctionData(functionFragment: 'underlying', values?: undefined): string; + + decodeFunctionResult(functionFragment: '_acceptAdmin', data: BytesLike): Result; + decodeFunctionResult(functionFragment: '_addReserves', data: BytesLike): Result; + decodeFunctionResult(functionFragment: '_reduceReserves', data: BytesLike): Result; + decodeFunctionResult(functionFragment: '_setImplementation', data: BytesLike): Result; + decodeFunctionResult(functionFragment: '_setInterestRateModel', data: BytesLike): Result; + decodeFunctionResult(functionFragment: '_setPendingAdmin', data: BytesLike): Result; + decodeFunctionResult(functionFragment: '_setReserveFactor', data: BytesLike): Result; + decodeFunctionResult(functionFragment: '_setTectonicCore', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'accrualBlockNumber', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'accrueInterest', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'admin', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'allowance', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'approve', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'balanceOf', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'balanceOfUnderlying', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'borrow', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'borrowBalanceCurrent', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'borrowBalanceStored', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'borrowIndex', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'borrowRatePerBlock', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'decimals', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'delegateToImplementation', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'delegateToViewImplementation', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'exchangeRateCurrent', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'exchangeRateStored', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getAccountSnapshot', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getCash', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'implementation', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'interestRateModel', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'isTToken', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'liquidateBorrow', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'mint', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'name', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'pendingAdmin', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'protocolSeizeShareMantissa', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'redeem', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'redeemUnderlying', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'repayBorrow', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'repayBorrowBehalf', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'reserveFactorMantissa', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'seize', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'supplyRatePerBlock', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'sweepToken', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'symbol', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'tectonicCore', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'totalBorrows', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'totalBorrowsCurrent', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'totalReserves', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'totalSupply', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'transfer', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'transferFrom', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'underlying', data: BytesLike): Result; + + events: { + 'AccrueInterest(uint256,uint256,uint256,uint256)': EventFragment; + 'Approval(address,address,uint256)': EventFragment; + 'Borrow(address,uint256,uint256,uint256)': EventFragment; + 'Failure(uint256,uint256,uint256)': EventFragment; + 'LiquidateBorrow(address,address,uint256,address,uint256)': EventFragment; + 'Mint(address,uint256,uint256)': EventFragment; + 'NewAdmin(address,address)': EventFragment; + 'NewImplementation(address,address)': EventFragment; + 'NewMarketInterestRateModel(address,address)': EventFragment; + 'NewPendingAdmin(address,address)': EventFragment; + 'NewReserveFactor(uint256,uint256)': EventFragment; + 'NewTectonicCore(address,address)': EventFragment; + 'Redeem(address,uint256,uint256)': EventFragment; + 'RepayBorrow(address,address,uint256,uint256,uint256)': EventFragment; + 'ReservesAdded(address,uint256,uint256)': EventFragment; + 'ReservesReduced(address,uint256,uint256)': EventFragment; + 'Transfer(address,address,uint256)': EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: 'AccrueInterest'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Approval'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Borrow'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Failure'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'LiquidateBorrow'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Mint'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'NewAdmin'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'NewImplementation'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'NewMarketInterestRateModel'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'NewPendingAdmin'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'NewReserveFactor'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'NewTectonicCore'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Redeem'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'RepayBorrow'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'ReservesAdded'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'ReservesReduced'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Transfer'): EventFragment; +} + +export interface AccrueInterestEventObject { + cashPrior: BigNumber; + interestAccumulated: BigNumber; + borrowIndex: BigNumber; + totalBorrows: BigNumber; +} +export type AccrueInterestEvent = TypedEvent<[BigNumber, BigNumber, BigNumber, BigNumber], AccrueInterestEventObject>; + +export type AccrueInterestEventFilter = TypedEventFilter; + +export interface ApprovalEventObject { + owner: string; + spender: string; + amount: BigNumber; +} +export type ApprovalEvent = TypedEvent<[string, string, BigNumber], ApprovalEventObject>; + +export type ApprovalEventFilter = TypedEventFilter; + +export interface BorrowEventObject { + borrower: string; + borrowAmount: BigNumber; + accountBorrows: BigNumber; + totalBorrows: BigNumber; +} +export type BorrowEvent = TypedEvent<[string, BigNumber, BigNumber, BigNumber], BorrowEventObject>; + +export type BorrowEventFilter = TypedEventFilter; + +export interface FailureEventObject { + error: BigNumber; + info: BigNumber; + detail: BigNumber; +} +export type FailureEvent = TypedEvent<[BigNumber, BigNumber, BigNumber], FailureEventObject>; + +export type FailureEventFilter = TypedEventFilter; + +export interface LiquidateBorrowEventObject { + liquidator: string; + borrower: string; + repayAmount: BigNumber; + tTokenCollateral: string; + seizeTokens: BigNumber; +} +export type LiquidateBorrowEvent = TypedEvent< + [string, string, BigNumber, string, BigNumber], + LiquidateBorrowEventObject +>; + +export type LiquidateBorrowEventFilter = TypedEventFilter; + +export interface MintEventObject { + minter: string; + mintAmount: BigNumber; + mintTokens: BigNumber; +} +export type MintEvent = TypedEvent<[string, BigNumber, BigNumber], MintEventObject>; + +export type MintEventFilter = TypedEventFilter; + +export interface NewAdminEventObject { + oldAdmin: string; + newAdmin: string; +} +export type NewAdminEvent = TypedEvent<[string, string], NewAdminEventObject>; + +export type NewAdminEventFilter = TypedEventFilter; + +export interface NewImplementationEventObject { + oldImplementation: string; + newImplementation: string; +} +export type NewImplementationEvent = TypedEvent<[string, string], NewImplementationEventObject>; + +export type NewImplementationEventFilter = TypedEventFilter; + +export interface NewMarketInterestRateModelEventObject { + oldInterestRateModel: string; + newInterestRateModel: string; +} +export type NewMarketInterestRateModelEvent = TypedEvent<[string, string], NewMarketInterestRateModelEventObject>; + +export type NewMarketInterestRateModelEventFilter = TypedEventFilter; + +export interface NewPendingAdminEventObject { + oldPendingAdmin: string; + newPendingAdmin: string; +} +export type NewPendingAdminEvent = TypedEvent<[string, string], NewPendingAdminEventObject>; + +export type NewPendingAdminEventFilter = TypedEventFilter; + +export interface NewReserveFactorEventObject { + oldReserveFactorMantissa: BigNumber; + newReserveFactorMantissa: BigNumber; +} +export type NewReserveFactorEvent = TypedEvent<[BigNumber, BigNumber], NewReserveFactorEventObject>; + +export type NewReserveFactorEventFilter = TypedEventFilter; + +export interface NewTectonicCoreEventObject { + oldTectonicCore: string; + newTectonicCore: string; +} +export type NewTectonicCoreEvent = TypedEvent<[string, string], NewTectonicCoreEventObject>; + +export type NewTectonicCoreEventFilter = TypedEventFilter; + +export interface RedeemEventObject { + redeemer: string; + redeemAmount: BigNumber; + redeemTokens: BigNumber; +} +export type RedeemEvent = TypedEvent<[string, BigNumber, BigNumber], RedeemEventObject>; + +export type RedeemEventFilter = TypedEventFilter; + +export interface RepayBorrowEventObject { + payer: string; + borrower: string; + repayAmount: BigNumber; + accountBorrows: BigNumber; + totalBorrows: BigNumber; +} +export type RepayBorrowEvent = TypedEvent<[string, string, BigNumber, BigNumber, BigNumber], RepayBorrowEventObject>; + +export type RepayBorrowEventFilter = TypedEventFilter; + +export interface ReservesAddedEventObject { + benefactor: string; + addAmount: BigNumber; + newTotalReserves: BigNumber; +} +export type ReservesAddedEvent = TypedEvent<[string, BigNumber, BigNumber], ReservesAddedEventObject>; + +export type ReservesAddedEventFilter = TypedEventFilter; + +export interface ReservesReducedEventObject { + admin: string; + reduceAmount: BigNumber; + newTotalReserves: BigNumber; +} +export type ReservesReducedEvent = TypedEvent<[string, BigNumber, BigNumber], ReservesReducedEventObject>; + +export type ReservesReducedEventFilter = TypedEventFilter; + +export interface TransferEventObject { + from: string; + to: string; + amount: BigNumber; +} +export type TransferEvent = TypedEvent<[string, string, BigNumber], TransferEventObject>; + +export type TransferEventFilter = TypedEventFilter; + +export interface TectonicTToken extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: TectonicTTokenInterface; + + 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: { + _acceptAdmin(overrides?: Overrides & { from?: string | Promise }): Promise; + + _addReserves( + addAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _reduceReserves( + reduceAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setImplementation( + implementation_: string, + allowResign: boolean, + becomeImplementationData: BytesLike, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setInterestRateModel( + newInterestRateModel: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setPendingAdmin( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setReserveFactor( + newReserveFactorMantissa: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setTectonicCore( + newTectonicCore: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + accrualBlockNumber(overrides?: CallOverrides): Promise<[BigNumber]>; + + accrueInterest(overrides?: Overrides & { from?: string | Promise }): Promise; + + admin(overrides?: CallOverrides): Promise<[string]>; + + allowance(owner: string, spender: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + balanceOfUnderlying( + owner: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + borrow( + borrowAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + borrowBalanceCurrent( + account: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + borrowBalanceStored(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + borrowIndex(overrides?: CallOverrides): Promise<[BigNumber]>; + + borrowRatePerBlock(overrides?: CallOverrides): Promise<[BigNumber]>; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + delegateToImplementation( + data: BytesLike, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + delegateToViewImplementation(data: BytesLike, overrides?: CallOverrides): Promise<[string]>; + + exchangeRateCurrent(overrides?: Overrides & { from?: string | Promise }): Promise; + + exchangeRateStored(overrides?: CallOverrides): Promise<[BigNumber]>; + + getAccountSnapshot( + account: string, + overrides?: CallOverrides, + ): Promise<[BigNumber, BigNumber, BigNumber, BigNumber]>; + + getCash(overrides?: CallOverrides): Promise<[BigNumber]>; + + implementation(overrides?: CallOverrides): Promise<[string]>; + + interestRateModel(overrides?: CallOverrides): Promise<[string]>; + + isTToken(overrides?: CallOverrides): Promise<[boolean]>; + + liquidateBorrow( + borrower: string, + repayAmount: BigNumberish, + tTokenCollateral: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + mint( + mintAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + name(overrides?: CallOverrides): Promise<[string]>; + + pendingAdmin(overrides?: CallOverrides): Promise<[string]>; + + protocolSeizeShareMantissa(overrides?: CallOverrides): Promise<[BigNumber]>; + + redeem( + redeemTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + redeemUnderlying( + redeemAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + repayBorrow( + repayAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + repayBorrowBehalf( + borrower: string, + repayAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + reserveFactorMantissa(overrides?: CallOverrides): Promise<[BigNumber]>; + + seize( + liquidator: string, + borrower: string, + seizeTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + supplyRatePerBlock(overrides?: CallOverrides): Promise<[BigNumber]>; + + sweepToken( + token: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + tectonicCore(overrides?: CallOverrides): Promise<[string]>; + + totalBorrows(overrides?: CallOverrides): Promise<[BigNumber]>; + + totalBorrowsCurrent(overrides?: Overrides & { from?: string | Promise }): Promise; + + totalReserves(overrides?: CallOverrides): Promise<[BigNumber]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + dst: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + transferFrom( + src: string, + dst: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + underlying(overrides?: CallOverrides): Promise<[string]>; + }; + + _acceptAdmin(overrides?: Overrides & { from?: string | Promise }): Promise; + + _addReserves( + addAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _reduceReserves( + reduceAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setImplementation( + implementation_: string, + allowResign: boolean, + becomeImplementationData: BytesLike, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setInterestRateModel( + newInterestRateModel: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setPendingAdmin( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setReserveFactor( + newReserveFactorMantissa: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setTectonicCore( + newTectonicCore: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + accrualBlockNumber(overrides?: CallOverrides): Promise; + + accrueInterest(overrides?: Overrides & { from?: string | Promise }): Promise; + + admin(overrides?: CallOverrides): Promise; + + allowance(owner: string, spender: string, overrides?: CallOverrides): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise; + + balanceOfUnderlying( + owner: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + borrow( + borrowAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + borrowBalanceCurrent( + account: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + borrowBalanceStored(account: string, overrides?: CallOverrides): Promise; + + borrowIndex(overrides?: CallOverrides): Promise; + + borrowRatePerBlock(overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + delegateToImplementation( + data: BytesLike, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + delegateToViewImplementation(data: BytesLike, overrides?: CallOverrides): Promise; + + exchangeRateCurrent(overrides?: Overrides & { from?: string | Promise }): Promise; + + exchangeRateStored(overrides?: CallOverrides): Promise; + + getAccountSnapshot(account: string, overrides?: CallOverrides): Promise<[BigNumber, BigNumber, BigNumber, BigNumber]>; + + getCash(overrides?: CallOverrides): Promise; + + implementation(overrides?: CallOverrides): Promise; + + interestRateModel(overrides?: CallOverrides): Promise; + + isTToken(overrides?: CallOverrides): Promise; + + liquidateBorrow( + borrower: string, + repayAmount: BigNumberish, + tTokenCollateral: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + mint( + mintAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + name(overrides?: CallOverrides): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + protocolSeizeShareMantissa(overrides?: CallOverrides): Promise; + + redeem( + redeemTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + redeemUnderlying( + redeemAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + repayBorrow( + repayAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + repayBorrowBehalf( + borrower: string, + repayAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + reserveFactorMantissa(overrides?: CallOverrides): Promise; + + seize( + liquidator: string, + borrower: string, + seizeTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + supplyRatePerBlock(overrides?: CallOverrides): Promise; + + sweepToken(token: string, overrides?: Overrides & { from?: string | Promise }): Promise; + + symbol(overrides?: CallOverrides): Promise; + + tectonicCore(overrides?: CallOverrides): Promise; + + totalBorrows(overrides?: CallOverrides): Promise; + + totalBorrowsCurrent(overrides?: Overrides & { from?: string | Promise }): Promise; + + totalReserves(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + transferFrom( + src: string, + dst: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + underlying(overrides?: CallOverrides): Promise; + + callStatic: { + _acceptAdmin(overrides?: CallOverrides): Promise; + + _addReserves(addAmount: BigNumberish, overrides?: CallOverrides): Promise; + + _reduceReserves(reduceAmount: BigNumberish, overrides?: CallOverrides): Promise; + + _setImplementation( + implementation_: string, + allowResign: boolean, + becomeImplementationData: BytesLike, + overrides?: CallOverrides, + ): Promise; + + _setInterestRateModel(newInterestRateModel: string, overrides?: CallOverrides): Promise; + + _setPendingAdmin(newPendingAdmin: string, overrides?: CallOverrides): Promise; + + _setReserveFactor(newReserveFactorMantissa: BigNumberish, overrides?: CallOverrides): Promise; + + _setTectonicCore(newTectonicCore: string, overrides?: CallOverrides): Promise; + + accrualBlockNumber(overrides?: CallOverrides): Promise; + + accrueInterest(overrides?: CallOverrides): Promise; + + admin(overrides?: CallOverrides): Promise; + + allowance(owner: string, spender: string, overrides?: CallOverrides): Promise; + + approve(spender: string, amount: BigNumberish, overrides?: CallOverrides): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise; + + balanceOfUnderlying(owner: string, overrides?: CallOverrides): Promise; + + borrow(borrowAmount: BigNumberish, overrides?: CallOverrides): Promise; + + borrowBalanceCurrent(account: string, overrides?: CallOverrides): Promise; + + borrowBalanceStored(account: string, overrides?: CallOverrides): Promise; + + borrowIndex(overrides?: CallOverrides): Promise; + + borrowRatePerBlock(overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + delegateToImplementation(data: BytesLike, overrides?: CallOverrides): Promise; + + delegateToViewImplementation(data: BytesLike, overrides?: CallOverrides): Promise; + + exchangeRateCurrent(overrides?: CallOverrides): Promise; + + exchangeRateStored(overrides?: CallOverrides): Promise; + + getAccountSnapshot( + account: string, + overrides?: CallOverrides, + ): Promise<[BigNumber, BigNumber, BigNumber, BigNumber]>; + + getCash(overrides?: CallOverrides): Promise; + + implementation(overrides?: CallOverrides): Promise; + + interestRateModel(overrides?: CallOverrides): Promise; + + isTToken(overrides?: CallOverrides): Promise; + + liquidateBorrow( + borrower: string, + repayAmount: BigNumberish, + tTokenCollateral: string, + overrides?: CallOverrides, + ): Promise; + + mint(mintAmount: BigNumberish, overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + protocolSeizeShareMantissa(overrides?: CallOverrides): Promise; + + redeem(redeemTokens: BigNumberish, overrides?: CallOverrides): Promise; + + redeemUnderlying(redeemAmount: BigNumberish, overrides?: CallOverrides): Promise; + + repayBorrow(repayAmount: BigNumberish, overrides?: CallOverrides): Promise; + + repayBorrowBehalf(borrower: string, repayAmount: BigNumberish, overrides?: CallOverrides): Promise; + + reserveFactorMantissa(overrides?: CallOverrides): Promise; + + seize( + liquidator: string, + borrower: string, + seizeTokens: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + supplyRatePerBlock(overrides?: CallOverrides): Promise; + + sweepToken(token: string, overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + tectonicCore(overrides?: CallOverrides): Promise; + + totalBorrows(overrides?: CallOverrides): Promise; + + totalBorrowsCurrent(overrides?: CallOverrides): Promise; + + totalReserves(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer(dst: string, amount: BigNumberish, overrides?: CallOverrides): Promise; + + transferFrom(src: string, dst: string, amount: BigNumberish, overrides?: CallOverrides): Promise; + + underlying(overrides?: CallOverrides): Promise; + }; + + filters: { + 'AccrueInterest(uint256,uint256,uint256,uint256)'( + cashPrior?: null, + interestAccumulated?: null, + borrowIndex?: null, + totalBorrows?: null, + ): AccrueInterestEventFilter; + AccrueInterest( + cashPrior?: null, + interestAccumulated?: null, + borrowIndex?: null, + totalBorrows?: null, + ): AccrueInterestEventFilter; + + 'Approval(address,address,uint256)'( + owner?: string | null, + spender?: string | null, + amount?: null, + ): ApprovalEventFilter; + Approval(owner?: string | null, spender?: string | null, amount?: null): ApprovalEventFilter; + + 'Borrow(address,uint256,uint256,uint256)'( + borrower?: null, + borrowAmount?: null, + accountBorrows?: null, + totalBorrows?: null, + ): BorrowEventFilter; + Borrow(borrower?: null, borrowAmount?: null, accountBorrows?: null, totalBorrows?: null): BorrowEventFilter; + + 'Failure(uint256,uint256,uint256)'(error?: null, info?: null, detail?: null): FailureEventFilter; + Failure(error?: null, info?: null, detail?: null): FailureEventFilter; + + 'LiquidateBorrow(address,address,uint256,address,uint256)'( + liquidator?: null, + borrower?: null, + repayAmount?: null, + tTokenCollateral?: null, + seizeTokens?: null, + ): LiquidateBorrowEventFilter; + LiquidateBorrow( + liquidator?: null, + borrower?: null, + repayAmount?: null, + tTokenCollateral?: null, + seizeTokens?: null, + ): LiquidateBorrowEventFilter; + + 'Mint(address,uint256,uint256)'(minter?: null, mintAmount?: null, mintTokens?: null): MintEventFilter; + Mint(minter?: null, mintAmount?: null, mintTokens?: null): MintEventFilter; + + 'NewAdmin(address,address)'(oldAdmin?: null, newAdmin?: null): NewAdminEventFilter; + NewAdmin(oldAdmin?: null, newAdmin?: null): NewAdminEventFilter; + + 'NewImplementation(address,address)'( + oldImplementation?: null, + newImplementation?: null, + ): NewImplementationEventFilter; + NewImplementation(oldImplementation?: null, newImplementation?: null): NewImplementationEventFilter; + + 'NewMarketInterestRateModel(address,address)'( + oldInterestRateModel?: null, + newInterestRateModel?: null, + ): NewMarketInterestRateModelEventFilter; + NewMarketInterestRateModel( + oldInterestRateModel?: null, + newInterestRateModel?: null, + ): NewMarketInterestRateModelEventFilter; + + 'NewPendingAdmin(address,address)'(oldPendingAdmin?: null, newPendingAdmin?: null): NewPendingAdminEventFilter; + NewPendingAdmin(oldPendingAdmin?: null, newPendingAdmin?: null): NewPendingAdminEventFilter; + + 'NewReserveFactor(uint256,uint256)'( + oldReserveFactorMantissa?: null, + newReserveFactorMantissa?: null, + ): NewReserveFactorEventFilter; + NewReserveFactor(oldReserveFactorMantissa?: null, newReserveFactorMantissa?: null): NewReserveFactorEventFilter; + + 'NewTectonicCore(address,address)'(oldTectonicCore?: null, newTectonicCore?: null): NewTectonicCoreEventFilter; + NewTectonicCore(oldTectonicCore?: null, newTectonicCore?: null): NewTectonicCoreEventFilter; + + 'Redeem(address,uint256,uint256)'(redeemer?: null, redeemAmount?: null, redeemTokens?: null): RedeemEventFilter; + Redeem(redeemer?: null, redeemAmount?: null, redeemTokens?: null): RedeemEventFilter; + + 'RepayBorrow(address,address,uint256,uint256,uint256)'( + payer?: null, + borrower?: null, + repayAmount?: null, + accountBorrows?: null, + totalBorrows?: null, + ): RepayBorrowEventFilter; + RepayBorrow( + payer?: null, + borrower?: null, + repayAmount?: null, + accountBorrows?: null, + totalBorrows?: null, + ): RepayBorrowEventFilter; + + 'ReservesAdded(address,uint256,uint256)'( + benefactor?: null, + addAmount?: null, + newTotalReserves?: null, + ): ReservesAddedEventFilter; + ReservesAdded(benefactor?: null, addAmount?: null, newTotalReserves?: null): ReservesAddedEventFilter; + + 'ReservesReduced(address,uint256,uint256)'( + admin?: null, + reduceAmount?: null, + newTotalReserves?: null, + ): ReservesReducedEventFilter; + ReservesReduced(admin?: null, reduceAmount?: null, newTotalReserves?: null): ReservesReducedEventFilter; + + 'Transfer(address,address,uint256)'(from?: string | null, to?: string | null, amount?: null): TransferEventFilter; + Transfer(from?: string | null, to?: string | null, amount?: null): TransferEventFilter; + }; + + estimateGas: { + _acceptAdmin(overrides?: Overrides & { from?: string | Promise }): Promise; + + _addReserves( + addAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _reduceReserves( + reduceAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setImplementation( + implementation_: string, + allowResign: boolean, + becomeImplementationData: BytesLike, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setInterestRateModel( + newInterestRateModel: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setPendingAdmin( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setReserveFactor( + newReserveFactorMantissa: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setTectonicCore( + newTectonicCore: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + accrualBlockNumber(overrides?: CallOverrides): Promise; + + accrueInterest(overrides?: Overrides & { from?: string | Promise }): Promise; + + admin(overrides?: CallOverrides): Promise; + + allowance(owner: string, spender: string, overrides?: CallOverrides): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise; + + balanceOfUnderlying(owner: string, overrides?: Overrides & { from?: string | Promise }): Promise; + + borrow(borrowAmount: BigNumberish, overrides?: Overrides & { from?: string | Promise }): Promise; + + borrowBalanceCurrent( + account: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + borrowBalanceStored(account: string, overrides?: CallOverrides): Promise; + + borrowIndex(overrides?: CallOverrides): Promise; + + borrowRatePerBlock(overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + delegateToImplementation( + data: BytesLike, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + delegateToViewImplementation(data: BytesLike, overrides?: CallOverrides): Promise; + + exchangeRateCurrent(overrides?: Overrides & { from?: string | Promise }): Promise; + + exchangeRateStored(overrides?: CallOverrides): Promise; + + getAccountSnapshot(account: string, overrides?: CallOverrides): Promise; + + getCash(overrides?: CallOverrides): Promise; + + implementation(overrides?: CallOverrides): Promise; + + interestRateModel(overrides?: CallOverrides): Promise; + + isTToken(overrides?: CallOverrides): Promise; + + liquidateBorrow( + borrower: string, + repayAmount: BigNumberish, + tTokenCollateral: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + mint(mintAmount: BigNumberish, overrides?: Overrides & { from?: string | Promise }): Promise; + + name(overrides?: CallOverrides): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + protocolSeizeShareMantissa(overrides?: CallOverrides): Promise; + + redeem(redeemTokens: BigNumberish, overrides?: Overrides & { from?: string | Promise }): Promise; + + redeemUnderlying( + redeemAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + repayBorrow( + repayAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + repayBorrowBehalf( + borrower: string, + repayAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + reserveFactorMantissa(overrides?: CallOverrides): Promise; + + seize( + liquidator: string, + borrower: string, + seizeTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + supplyRatePerBlock(overrides?: CallOverrides): Promise; + + sweepToken(token: string, overrides?: Overrides & { from?: string | Promise }): Promise; + + symbol(overrides?: CallOverrides): Promise; + + tectonicCore(overrides?: CallOverrides): Promise; + + totalBorrows(overrides?: CallOverrides): Promise; + + totalBorrowsCurrent(overrides?: Overrides & { from?: string | Promise }): Promise; + + totalReserves(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + transferFrom( + src: string, + dst: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + underlying(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + _acceptAdmin(overrides?: Overrides & { from?: string | Promise }): Promise; + + _addReserves( + addAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _reduceReserves( + reduceAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setImplementation( + implementation_: string, + allowResign: boolean, + becomeImplementationData: BytesLike, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setInterestRateModel( + newInterestRateModel: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setPendingAdmin( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setReserveFactor( + newReserveFactorMantissa: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + _setTectonicCore( + newTectonicCore: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + accrualBlockNumber(overrides?: CallOverrides): Promise; + + accrueInterest(overrides?: Overrides & { from?: string | Promise }): Promise; + + admin(overrides?: CallOverrides): Promise; + + allowance(owner: string, spender: string, overrides?: CallOverrides): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise; + + balanceOfUnderlying( + owner: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + borrow( + borrowAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + borrowBalanceCurrent( + account: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + borrowBalanceStored(account: string, overrides?: CallOverrides): Promise; + + borrowIndex(overrides?: CallOverrides): Promise; + + borrowRatePerBlock(overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + delegateToImplementation( + data: BytesLike, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + delegateToViewImplementation(data: BytesLike, overrides?: CallOverrides): Promise; + + exchangeRateCurrent(overrides?: Overrides & { from?: string | Promise }): Promise; + + exchangeRateStored(overrides?: CallOverrides): Promise; + + getAccountSnapshot(account: string, overrides?: CallOverrides): Promise; + + getCash(overrides?: CallOverrides): Promise; + + implementation(overrides?: CallOverrides): Promise; + + interestRateModel(overrides?: CallOverrides): Promise; + + isTToken(overrides?: CallOverrides): Promise; + + liquidateBorrow( + borrower: string, + repayAmount: BigNumberish, + tTokenCollateral: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + mint( + mintAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + name(overrides?: CallOverrides): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + protocolSeizeShareMantissa(overrides?: CallOverrides): Promise; + + redeem( + redeemTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + redeemUnderlying( + redeemAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + repayBorrow( + repayAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + repayBorrowBehalf( + borrower: string, + repayAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + reserveFactorMantissa(overrides?: CallOverrides): Promise; + + seize( + liquidator: string, + borrower: string, + seizeTokens: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + supplyRatePerBlock(overrides?: CallOverrides): Promise; + + sweepToken( + token: string, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + tectonicCore(overrides?: CallOverrides): Promise; + + totalBorrows(overrides?: CallOverrides): Promise; + + totalBorrowsCurrent(overrides?: Overrides & { from?: string | Promise }): Promise; + + totalReserves(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + dst: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + transferFrom( + src: string, + dst: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise }, + ): Promise; + + underlying(overrides?: CallOverrides): Promise; + }; +} diff --git a/src/apps/tectonic/contracts/ethers/common.ts b/src/apps/tectonic/contracts/ethers/common.ts new file mode 100644 index 000000000..6cfb10425 --- /dev/null +++ b/src/apps/tectonic/contracts/ethers/common.ts @@ -0,0 +1,30 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { Listener } from '@ethersproject/providers'; +import type { Event, EventFilter } from 'ethers'; + +export interface TypedEvent = any, TArgsObject = any> extends Event { + args: TArgsArray & TArgsObject; +} + +export interface TypedEventFilter<_TEvent extends TypedEvent> extends EventFilter {} + +export interface TypedListener { + (...listenerArg: [...__TypechainArgsArray, TEvent]): void; +} + +type __TypechainArgsArray = T extends TypedEvent ? U : never; + +export interface OnEvent { + (eventFilter: TypedEventFilter, listener: TypedListener): TRes; + (eventName: string, listener: Listener): TRes; +} + +export type MinEthersFactory = { + deploy(...a: ARGS[]): Promise; +}; + +export type GetContractTypeFromFactory = F extends MinEthersFactory ? C : never; + +export type GetARGsTypeFromFactory = F extends MinEthersFactory ? Parameters : never; diff --git a/src/apps/tectonic/contracts/ethers/factories/TectonicCore__factory.ts b/src/apps/tectonic/contracts/ethers/factories/TectonicCore__factory.ts new file mode 100644 index 000000000..e3d25a353 --- /dev/null +++ b/src/apps/tectonic/contracts/ethers/factories/TectonicCore__factory.ts @@ -0,0 +1,2355 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from 'ethers'; +import type { Provider } from '@ethersproject/providers'; +import type { TectonicCore, TectonicCoreInterface } from '../TectonicCore'; + +const _abi = [ + { + inputs: [ + { + internalType: 'address', + name: '_tonicTokenContract', + type: 'address', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'constructor', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'string', + name: 'action', + type: 'string', + }, + { + indexed: false, + internalType: 'bool', + name: 'pauseState', + type: 'bool', + }, + ], + name: 'ActionPaused', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'contract TToken', + name: 'tToken', + type: 'address', + }, + { + indexed: false, + internalType: 'string', + name: 'action', + type: 'string', + }, + { + indexed: false, + internalType: 'bool', + name: 'pauseState', + type: 'bool', + }, + ], + name: 'ActionPaused', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'contributor', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'newSpeed', + type: 'uint256', + }, + ], + name: 'ContributorTonicSpeedUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'contract TToken', + name: 'tToken', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'borrower', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'tonicDelta', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'tonicBorrowIndex', + type: 'uint256', + }, + ], + name: 'DistributedBorrowerTonic', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'contract TToken', + name: 'tToken', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'supplier', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'tonicDelta', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'tonicSupplyIndex', + type: 'uint256', + }, + ], + name: 'DistributedSupplierTonic', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint256', + name: 'error', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'info', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'detail', + type: 'uint256', + }, + ], + name: 'Failure', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'contract TToken', + name: 'tToken', + type: 'address', + }, + { + indexed: false, + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'MarketEntered', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'contract TToken', + name: 'tToken', + type: 'address', + }, + { + indexed: false, + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'MarketExited', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'contract TToken', + name: 'tToken', + type: 'address', + }, + ], + name: 'MarketListed', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'contract TToken', + name: 'tToken', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'newBorrowCap', + type: 'uint256', + }, + ], + name: 'NewBorrowCap', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'oldBorrowCapGuardian', + type: 'address', + }, + { + indexed: false, + internalType: 'address', + name: 'newBorrowCapGuardian', + type: 'address', + }, + ], + name: 'NewBorrowCapGuardian', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint256', + name: 'oldCloseFactorMantissa', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'newCloseFactorMantissa', + type: 'uint256', + }, + ], + name: 'NewCloseFactor', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'contract TToken', + name: 'tToken', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'oldCollateralFactorMantissa', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'newCollateralFactorMantissa', + type: 'uint256', + }, + ], + name: 'NewCollateralFactor', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint256', + name: 'oldLiquidationIncentiveMantissa', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'newLiquidationIncentiveMantissa', + type: 'uint256', + }, + ], + name: 'NewLiquidationIncentive', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'oldPauseGuardian', + type: 'address', + }, + { + indexed: false, + internalType: 'address', + name: 'newPauseGuardian', + type: 'address', + }, + ], + name: 'NewPauseGuardian', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'contract PriceOracle', + name: 'oldPriceOracle', + type: 'address', + }, + { + indexed: false, + internalType: 'contract PriceOracle', + name: 'newPriceOracle', + type: 'address', + }, + ], + name: 'NewPriceOracle', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'contract TToken', + name: 'tToken', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'newLimitPerUser', + type: 'uint256', + }, + ], + name: 'TVLProtectLimitUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'recipient', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'TonicGranted', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'contract TToken', + name: 'tToken', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'newSpeed', + type: 'uint256', + }, + ], + name: 'TonicSpeedUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'WhitelistAccountAdded', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'WhitelistAccountRemoved', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'bool', + name: 'enabled', + type: 'bool', + }, + ], + name: 'WhitelistStatusChanged', + type: 'event', + }, + { + constant: false, + inputs: [ + { + internalType: 'address[]', + name: 'accounts', + type: 'address[]', + }, + ], + name: '_addToWhitelistProtect', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'contract TectonicSocket', + name: 'unitroller', + type: 'address', + }, + ], + name: '_become', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [], + name: '_borrowGuardianPaused', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'recipient', + type: 'address', + }, + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: '_grantTonic', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [], + name: '_mintGuardianPaused', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: '_removeFromWhitelistProtect', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'newBorrowCapGuardian', + type: 'address', + }, + ], + name: '_setBorrowCapGuardian', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'contract TToken', + name: 'tToken', + type: 'address', + }, + { + internalType: 'bool', + name: 'state', + type: 'bool', + }, + ], + name: '_setBorrowPaused', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'uint256', + name: 'newCloseFactorMantissa', + type: 'uint256', + }, + ], + name: '_setCloseFactor', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'contract TToken', + name: 'tToken', + type: 'address', + }, + { + internalType: 'uint256', + name: 'newCollateralFactorMantissa', + type: 'uint256', + }, + ], + name: '_setCollateralFactor', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'contributor', + type: 'address', + }, + { + internalType: 'uint256', + name: 'tonicSpeed', + type: 'uint256', + }, + ], + name: '_setContributorTonicSpeed', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'uint256', + name: 'newLiquidationIncentiveMantissa', + type: 'uint256', + }, + ], + name: '_setLiquidationIncentive', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'contract TToken[]', + name: 'tTokens', + type: 'address[]', + }, + { + internalType: 'uint256[]', + name: 'newBorrowCaps', + type: 'uint256[]', + }, + ], + name: '_setMarketBorrowCaps', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'contract TToken', + name: 'tToken', + type: 'address', + }, + { + internalType: 'bool', + name: 'state', + type: 'bool', + }, + ], + name: '_setMintPaused', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'newPauseGuardian', + type: 'address', + }, + ], + name: '_setPauseGuardian', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'contract PriceOracle', + name: 'newOracle', + type: 'address', + }, + ], + name: '_setPriceOracle', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'bool', + name: 'state', + type: 'bool', + }, + ], + name: '_setSeizePaused', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'contract TToken', + name: 'tToken', + type: 'address', + }, + { + internalType: 'uint256', + name: 'tonicSpeed', + type: 'uint256', + }, + ], + name: '_setTonicSpeed', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'bool', + name: 'state', + type: 'bool', + }, + ], + name: '_setTransferPaused', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'bool', + name: 'whitelistStatus', + type: 'bool', + }, + ], + name: '_setWhitelistProtect', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'contract TToken', + name: 'tToken', + type: 'address', + }, + ], + name: '_supportMarket', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'contract TToken[]', + name: 'tTokens', + type: 'address[]', + }, + { + internalType: 'uint256[]', + name: 'newLimitPerUser', + type: 'uint256[]', + }, + ], + name: '_updateTvlProtectLimit', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + name: 'accountAssets', + outputs: [ + { + internalType: 'contract TToken', + name: '', + type: 'address', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'admin', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + name: 'allMarkets', + outputs: [ + { + internalType: 'contract TToken', + name: '', + type: 'address', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'tToken', + type: 'address', + }, + { + internalType: 'address', + name: 'borrower', + type: 'address', + }, + { + internalType: 'uint256', + name: 'borrowAmount', + type: 'uint256', + }, + ], + name: 'borrowAllowed', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'borrowCapGuardian', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'borrowCaps', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'borrowGuardianPaused', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'tToken', + type: 'address', + }, + { + internalType: 'address', + name: 'borrower', + type: 'address', + }, + { + internalType: 'uint256', + name: 'borrowAmount', + type: 'uint256', + }, + ], + name: 'borrowVerify', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'contract TToken', + name: 'tToken', + type: 'address', + }, + ], + name: 'checkMembership', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address[]', + name: 'holders', + type: 'address[]', + }, + { + internalType: 'contract TToken[]', + name: 'tTokens', + type: 'address[]', + }, + { + internalType: 'bool', + name: 'borrowers', + type: 'bool', + }, + { + internalType: 'bool', + name: 'suppliers', + type: 'bool', + }, + ], + name: 'claimTonic', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'holder', + type: 'address', + }, + ], + name: 'claimTonic', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'holder', + type: 'address', + }, + { + internalType: 'contract TToken[]', + name: 'tTokens', + type: 'address[]', + }, + ], + name: 'claimTonic', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'closeFactorMantissa', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address[]', + name: 'tTokens', + type: 'address[]', + }, + ], + name: 'enterMarkets', + outputs: [ + { + internalType: 'uint256[]', + name: '', + type: 'uint256[]', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'tTokenAddress', + type: 'address', + }, + ], + name: 'exitMarket', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'getAccountLiquidity', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'getAllMarkets', + outputs: [ + { + internalType: 'contract TToken[]', + name: '', + type: 'address[]', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'getAssetsIn', + outputs: [ + { + internalType: 'contract TToken[]', + name: '', + type: 'address[]', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'getBlockNumber', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'address', + name: 'tTokenModify', + type: 'address', + }, + { + internalType: 'uint256', + name: 'redeemTokens', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'borrowAmount', + type: 'uint256', + }, + ], + name: 'getHypotheticalAccountLiquidity', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'getTonicAddress', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'contract TToken', + name: 'tToken', + type: 'address', + }, + ], + name: 'isDeprecated', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'isTectonicCore', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'lastContributorBlock', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'tTokenBorrowed', + type: 'address', + }, + { + internalType: 'address', + name: 'tTokenCollateral', + type: 'address', + }, + { + internalType: 'address', + name: 'liquidator', + type: 'address', + }, + { + internalType: 'address', + name: 'borrower', + type: 'address', + }, + { + internalType: 'uint256', + name: 'repayAmount', + type: 'uint256', + }, + ], + name: 'liquidateBorrowAllowed', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'tTokenBorrowed', + type: 'address', + }, + { + internalType: 'address', + name: 'tTokenCollateral', + type: 'address', + }, + { + internalType: 'address', + name: 'liquidator', + type: 'address', + }, + { + internalType: 'address', + name: 'borrower', + type: 'address', + }, + { + internalType: 'uint256', + name: 'actualRepayAmount', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'seizeTokens', + type: 'uint256', + }, + ], + name: 'liquidateBorrowVerify', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'address', + name: 'tTokenBorrowed', + type: 'address', + }, + { + internalType: 'address', + name: 'tTokenCollateral', + type: 'address', + }, + { + internalType: 'uint256', + name: 'actualRepayAmount', + type: 'uint256', + }, + ], + name: 'liquidateCalculateSeizeTokens', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'liquidationIncentiveMantissa', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'markets', + outputs: [ + { + internalType: 'bool', + name: 'isListed', + type: 'bool', + }, + { + internalType: 'uint256', + name: 'collateralFactorMantissa', + type: 'uint256', + }, + { + internalType: 'bool', + name: 'isTonicized', + type: 'bool', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'maxAssets', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'tToken', + type: 'address', + }, + { + internalType: 'address', + name: 'minter', + type: 'address', + }, + { + internalType: 'uint256', + name: 'mintAmount', + type: 'uint256', + }, + ], + name: 'mintAllowed', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'mintGuardianPaused', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'tToken', + type: 'address', + }, + { + internalType: 'address', + name: 'minter', + type: 'address', + }, + { + internalType: 'uint256', + name: 'actualMintAmount', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'mintTokens', + type: 'uint256', + }, + ], + name: 'mintVerify', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'oracle', + outputs: [ + { + internalType: 'contract PriceOracle', + name: '', + type: 'address', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'pauseGuardian', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'pendingAdmin', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'pendingTectonicCoreImplementation', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'tToken', + type: 'address', + }, + { + internalType: 'address', + name: 'redeemer', + type: 'address', + }, + { + internalType: 'uint256', + name: 'redeemTokens', + type: 'uint256', + }, + ], + name: 'redeemAllowed', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'tToken', + type: 'address', + }, + { + internalType: 'address', + name: 'redeemer', + type: 'address', + }, + { + internalType: 'uint256', + name: 'redeemAmount', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'redeemTokens', + type: 'uint256', + }, + ], + name: 'redeemVerify', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'tToken', + type: 'address', + }, + { + internalType: 'address', + name: 'payer', + type: 'address', + }, + { + internalType: 'address', + name: 'borrower', + type: 'address', + }, + { + internalType: 'uint256', + name: 'repayAmount', + type: 'uint256', + }, + ], + name: 'repayBorrowAllowed', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'tToken', + type: 'address', + }, + { + internalType: 'address', + name: 'payer', + type: 'address', + }, + { + internalType: 'address', + name: 'borrower', + type: 'address', + }, + { + internalType: 'uint256', + name: 'actualRepayAmount', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'borrowerIndex', + type: 'uint256', + }, + ], + name: 'repayBorrowVerify', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'tTokenCollateral', + type: 'address', + }, + { + internalType: 'address', + name: 'tTokenBorrowed', + type: 'address', + }, + { + internalType: 'address', + name: 'liquidator', + type: 'address', + }, + { + internalType: 'address', + name: 'borrower', + type: 'address', + }, + { + internalType: 'uint256', + name: 'seizeTokens', + type: 'uint256', + }, + ], + name: 'seizeAllowed', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'seizeGuardianPaused', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'tTokenCollateral', + type: 'address', + }, + { + internalType: 'address', + name: 'tTokenBorrowed', + type: 'address', + }, + { + internalType: 'address', + name: 'liquidator', + type: 'address', + }, + { + internalType: 'address', + name: 'borrower', + type: 'address', + }, + { + internalType: 'uint256', + name: 'seizeTokens', + type: 'uint256', + }, + ], + name: 'seizeVerify', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'tectonicCoreImplementation', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'tokenToPerUserTvlProtectLimit', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'tonicAccrued', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'tonicBorrowState', + outputs: [ + { + internalType: 'uint224', + name: 'index', + type: 'uint224', + }, + { + internalType: 'uint32', + name: 'block', + type: 'uint32', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'tonicBorrowerIndex', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'tonicContributorSpeeds', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'tonicInitialIndex', + outputs: [ + { + internalType: 'uint224', + name: '', + type: 'uint224', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'tonicRate', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'tonicSpeeds', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'tonicSupplierIndex', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'tonicSupplyState', + outputs: [ + { + internalType: 'uint224', + name: 'index', + type: 'uint224', + }, + { + internalType: 'uint32', + name: 'block', + type: 'uint32', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'tToken', + type: 'address', + }, + { + internalType: 'address', + name: 'src', + type: 'address', + }, + { + internalType: 'address', + name: 'dst', + type: 'address', + }, + { + internalType: 'uint256', + name: 'transferTokens', + type: 'uint256', + }, + ], + name: 'transferAllowed', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'transferGuardianPaused', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'tToken', + type: 'address', + }, + { + internalType: 'address', + name: 'src', + type: 'address', + }, + { + internalType: 'address', + name: 'dst', + type: 'address', + }, + { + internalType: 'uint256', + name: 'transferTokens', + type: 'uint256', + }, + ], + name: 'transferVerify', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'contributor', + type: 'address', + }, + ], + name: 'updateContributorRewards', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'utilizedTvlAmount', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'whitelistProtectEnabled', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'whitelistedAddresses', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, +]; + +export class TectonicCore__factory { + static readonly abi = _abi; + static createInterface(): TectonicCoreInterface { + return new utils.Interface(_abi) as TectonicCoreInterface; + } + static connect(address: string, signerOrProvider: Signer | Provider): TectonicCore { + return new Contract(address, _abi, signerOrProvider) as TectonicCore; + } +} diff --git a/src/apps/tectonic/contracts/ethers/factories/TectonicLens__factory.ts b/src/apps/tectonic/contracts/ethers/factories/TectonicLens__factory.ts new file mode 100644 index 000000000..55d64bbc4 --- /dev/null +++ b/src/apps/tectonic/contracts/ethers/factories/TectonicLens__factory.ts @@ -0,0 +1,867 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from 'ethers'; +import type { Provider } from '@ethersproject/providers'; +import type { TectonicLens, TectonicLensInterface } from '../TectonicLens'; + +const _abi = [ + { + constant: false, + inputs: [ + { + internalType: 'contract TectonicCoreLensInterface', + name: 'tectonicCore', + type: 'address', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'getAccountLimits', + outputs: [ + { + components: [ + { + internalType: 'contract TToken[]', + name: 'markets', + type: 'address[]', + }, + { + internalType: 'uint256', + name: 'liquidity', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'shortfall', + type: 'uint256', + }, + ], + internalType: 'struct TectonicLens.AccountLimits', + name: '', + type: 'tuple', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'contract GovernorBravoInterface', + name: 'governor', + type: 'address', + }, + { + internalType: 'uint256[]', + name: 'proposalIds', + type: 'uint256[]', + }, + ], + name: 'getGovBravoProposals', + outputs: [ + { + components: [ + { + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + { + internalType: 'address', + name: 'proposer', + type: 'address', + }, + { + internalType: 'uint256', + name: 'eta', + type: 'uint256', + }, + { + internalType: 'address[]', + name: 'targets', + type: 'address[]', + }, + { + internalType: 'uint256[]', + name: 'values', + type: 'uint256[]', + }, + { + internalType: 'string[]', + name: 'signatures', + type: 'string[]', + }, + { + internalType: 'bytes[]', + name: 'calldatas', + type: 'bytes[]', + }, + { + internalType: 'uint256', + name: 'startBlock', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'endBlock', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'forVotes', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'againstVotes', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'abstainVotes', + type: 'uint256', + }, + { + internalType: 'bool', + name: 'canceled', + type: 'bool', + }, + { + internalType: 'bool', + name: 'executed', + type: 'bool', + }, + ], + internalType: 'struct TectonicLens.GovBravoProposal[]', + name: '', + type: 'tuple[]', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'contract GovernorBravoInterface', + name: 'governor', + type: 'address', + }, + { + internalType: 'address', + name: 'voter', + type: 'address', + }, + { + internalType: 'uint256[]', + name: 'proposalIds', + type: 'uint256[]', + }, + ], + name: 'getGovBravoReceipts', + outputs: [ + { + components: [ + { + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + { + internalType: 'bool', + name: 'hasVoted', + type: 'bool', + }, + { + internalType: 'uint8', + name: 'support', + type: 'uint8', + }, + { + internalType: 'uint128', + name: 'votes', + type: 'uint128', + }, + ], + internalType: 'struct TectonicLens.GovBravoReceipt[]', + name: '', + type: 'tuple[]', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'contract GovernorAlpha', + name: 'governor', + type: 'address', + }, + { + internalType: 'uint256[]', + name: 'proposalIds', + type: 'uint256[]', + }, + ], + name: 'getGovProposals', + outputs: [ + { + components: [ + { + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + { + internalType: 'address', + name: 'proposer', + type: 'address', + }, + { + internalType: 'uint256', + name: 'eta', + type: 'uint256', + }, + { + internalType: 'address[]', + name: 'targets', + type: 'address[]', + }, + { + internalType: 'uint256[]', + name: 'values', + type: 'uint256[]', + }, + { + internalType: 'string[]', + name: 'signatures', + type: 'string[]', + }, + { + internalType: 'bytes[]', + name: 'calldatas', + type: 'bytes[]', + }, + { + internalType: 'uint256', + name: 'startBlock', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'endBlock', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'forVotes', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'againstVotes', + type: 'uint256', + }, + { + internalType: 'bool', + name: 'canceled', + type: 'bool', + }, + { + internalType: 'bool', + name: 'executed', + type: 'bool', + }, + ], + internalType: 'struct TectonicLens.GovProposal[]', + name: '', + type: 'tuple[]', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'contract GovernorAlpha', + name: 'governor', + type: 'address', + }, + { + internalType: 'address', + name: 'voter', + type: 'address', + }, + { + internalType: 'uint256[]', + name: 'proposalIds', + type: 'uint256[]', + }, + ], + name: 'getGovReceipts', + outputs: [ + { + components: [ + { + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + { + internalType: 'bool', + name: 'hasVoted', + type: 'bool', + }, + { + internalType: 'bool', + name: 'support', + type: 'bool', + }, + { + internalType: 'uint128', + name: 'votes', + type: 'uint128', + }, + ], + internalType: 'struct TectonicLens.GovReceipt[]', + name: '', + type: 'tuple[]', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'contract Tonic', + name: 'tonic', + type: 'address', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'getTonicBalanceMetadata', + outputs: [ + { + components: [ + { + internalType: 'uint256', + name: 'balance', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'votes', + type: 'uint256', + }, + { + internalType: 'address', + name: 'delegate', + type: 'address', + }, + ], + internalType: 'struct TectonicLens.TonicBalanceMetadata', + name: '', + type: 'tuple', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'contract Tonic', + name: 'tonic', + type: 'address', + }, + { + internalType: 'contract TectonicCoreLensInterface', + name: 'tectonicCore', + type: 'address', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'getTonicBalanceMetadataExt', + outputs: [ + { + components: [ + { + internalType: 'uint256', + name: 'balance', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'votes', + type: 'uint256', + }, + { + internalType: 'address', + name: 'delegate', + type: 'address', + }, + { + internalType: 'uint256', + name: 'allocated', + type: 'uint256', + }, + ], + internalType: 'struct TectonicLens.TonicBalanceMetadataExt', + name: '', + type: 'tuple', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'contract Tonic', + name: 'tonic', + type: 'address', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'uint32[]', + name: 'blockNumbers', + type: 'uint32[]', + }, + ], + name: 'getTonicVotes', + outputs: [ + { + components: [ + { + internalType: 'uint256', + name: 'blockNumber', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'votes', + type: 'uint256', + }, + ], + internalType: 'struct TectonicLens.TonicVotes[]', + name: '', + type: 'tuple[]', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'contract TToken', + name: 'tToken', + type: 'address', + }, + { + internalType: 'address payable', + name: 'account', + type: 'address', + }, + ], + name: 'tTokenBalances', + outputs: [ + { + components: [ + { + internalType: 'address', + name: 'tToken', + type: 'address', + }, + { + internalType: 'uint256', + name: 'balanceOf', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'borrowBalanceCurrent', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'balanceOfUnderlying', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'tokenBalance', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'tokenAllowance', + type: 'uint256', + }, + ], + internalType: 'struct TectonicLens.TTokenBalances', + name: '', + type: 'tuple', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'contract TToken[]', + name: 'tTokens', + type: 'address[]', + }, + { + internalType: 'address payable', + name: 'account', + type: 'address', + }, + ], + name: 'tTokenBalancesAll', + outputs: [ + { + components: [ + { + internalType: 'address', + name: 'tToken', + type: 'address', + }, + { + internalType: 'uint256', + name: 'balanceOf', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'borrowBalanceCurrent', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'balanceOfUnderlying', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'tokenBalance', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'tokenAllowance', + type: 'uint256', + }, + ], + internalType: 'struct TectonicLens.TTokenBalances[]', + name: '', + type: 'tuple[]', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'contract TToken', + name: 'tToken', + type: 'address', + }, + ], + name: 'tTokenMetadata', + outputs: [ + { + components: [ + { + internalType: 'address', + name: 'tToken', + type: 'address', + }, + { + internalType: 'uint256', + name: 'exchangeRateCurrent', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'supplyRatePerBlock', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'borrowRatePerBlock', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'reserveFactorMantissa', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'totalBorrows', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'totalReserves', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'totalSupply', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'totalCash', + type: 'uint256', + }, + { + internalType: 'bool', + name: 'isListed', + type: 'bool', + }, + { + internalType: 'uint256', + name: 'collateralFactorMantissa', + type: 'uint256', + }, + { + internalType: 'address', + name: 'underlyingAssetAddress', + type: 'address', + }, + { + internalType: 'uint256', + name: 'tTokenDecimals', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'underlyingDecimals', + type: 'uint256', + }, + ], + internalType: 'struct TectonicLens.TTokenMetadata', + name: '', + type: 'tuple', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'contract TToken[]', + name: 'tTokens', + type: 'address[]', + }, + ], + name: 'tTokenMetadataAll', + outputs: [ + { + components: [ + { + internalType: 'address', + name: 'tToken', + type: 'address', + }, + { + internalType: 'uint256', + name: 'exchangeRateCurrent', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'supplyRatePerBlock', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'borrowRatePerBlock', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'reserveFactorMantissa', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'totalBorrows', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'totalReserves', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'totalSupply', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'totalCash', + type: 'uint256', + }, + { + internalType: 'bool', + name: 'isListed', + type: 'bool', + }, + { + internalType: 'uint256', + name: 'collateralFactorMantissa', + type: 'uint256', + }, + { + internalType: 'address', + name: 'underlyingAssetAddress', + type: 'address', + }, + { + internalType: 'uint256', + name: 'tTokenDecimals', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'underlyingDecimals', + type: 'uint256', + }, + ], + internalType: 'struct TectonicLens.TTokenMetadata[]', + name: '', + type: 'tuple[]', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'contract TToken', + name: 'tToken', + type: 'address', + }, + ], + name: 'tTokenUnderlyingPrice', + outputs: [ + { + components: [ + { + internalType: 'address', + name: 'tToken', + type: 'address', + }, + { + internalType: 'uint256', + name: 'underlyingPrice', + type: 'uint256', + }, + ], + internalType: 'struct TectonicLens.TTokenUnderlyingPrice', + name: '', + type: 'tuple', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'contract TToken[]', + name: 'tTokens', + type: 'address[]', + }, + ], + name: 'tTokenUnderlyingPriceAll', + outputs: [ + { + components: [ + { + internalType: 'address', + name: 'tToken', + type: 'address', + }, + { + internalType: 'uint256', + name: 'underlyingPrice', + type: 'uint256', + }, + ], + internalType: 'struct TectonicLens.TTokenUnderlyingPrice[]', + name: '', + type: 'tuple[]', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, +]; + +export class TectonicLens__factory { + static readonly abi = _abi; + static createInterface(): TectonicLensInterface { + return new utils.Interface(_abi) as TectonicLensInterface; + } + static connect(address: string, signerOrProvider: Signer | Provider): TectonicLens { + return new Contract(address, _abi, signerOrProvider) as TectonicLens; + } +} diff --git a/src/apps/tectonic/contracts/ethers/factories/TectonicTToken__factory.ts b/src/apps/tectonic/contracts/ethers/factories/TectonicTToken__factory.ts new file mode 100644 index 000000000..72eaf80ff --- /dev/null +++ b/src/apps/tectonic/contracts/ethers/factories/TectonicTToken__factory.ts @@ -0,0 +1,1512 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from 'ethers'; +import type { Provider } from '@ethersproject/providers'; +import type { TectonicTToken, TectonicTTokenInterface } from '../TectonicTToken'; + +const _abi = [ + { + inputs: [ + { + internalType: 'address', + name: 'underlying_', + type: 'address', + }, + { + internalType: 'contract TectonicCoreInterface', + name: 'tcore_', + type: 'address', + }, + { + internalType: 'contract InterestRateModel', + name: 'interestRateModel_', + type: 'address', + }, + { + internalType: 'uint256', + name: 'initialExchangeRateMantissa_', + type: 'uint256', + }, + { + internalType: 'string', + name: 'name_', + type: 'string', + }, + { + internalType: 'string', + name: 'symbol_', + type: 'string', + }, + { + internalType: 'uint8', + name: 'decimals_', + type: 'uint8', + }, + { + internalType: 'address payable', + name: 'admin_', + type: 'address', + }, + { + internalType: 'address', + name: 'implementation_', + type: 'address', + }, + { + internalType: 'bytes', + name: 'becomeImplementationData', + type: 'bytes', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'constructor', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint256', + name: 'cashPrior', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'interestAccumulated', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'borrowIndex', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'totalBorrows', + type: 'uint256', + }, + ], + name: 'AccrueInterest', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'spender', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'Approval', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'borrower', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'borrowAmount', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'accountBorrows', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'totalBorrows', + type: 'uint256', + }, + ], + name: 'Borrow', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint256', + name: 'error', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'info', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'detail', + type: 'uint256', + }, + ], + name: 'Failure', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'liquidator', + type: 'address', + }, + { + indexed: false, + internalType: 'address', + name: 'borrower', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'repayAmount', + type: 'uint256', + }, + { + indexed: false, + internalType: 'address', + name: 'tTokenCollateral', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'seizeTokens', + type: 'uint256', + }, + ], + name: 'LiquidateBorrow', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'minter', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'mintAmount', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'mintTokens', + type: 'uint256', + }, + ], + name: 'Mint', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'oldAdmin', + type: 'address', + }, + { + indexed: false, + internalType: 'address', + name: 'newAdmin', + type: 'address', + }, + ], + name: 'NewAdmin', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'oldImplementation', + type: 'address', + }, + { + indexed: false, + internalType: 'address', + name: 'newImplementation', + type: 'address', + }, + ], + name: 'NewImplementation', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'contract InterestRateModel', + name: 'oldInterestRateModel', + type: 'address', + }, + { + indexed: false, + internalType: 'contract InterestRateModel', + name: 'newInterestRateModel', + type: 'address', + }, + ], + name: 'NewMarketInterestRateModel', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'oldPendingAdmin', + type: 'address', + }, + { + indexed: false, + internalType: 'address', + name: 'newPendingAdmin', + type: 'address', + }, + ], + name: 'NewPendingAdmin', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint256', + name: 'oldReserveFactorMantissa', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'newReserveFactorMantissa', + type: 'uint256', + }, + ], + name: 'NewReserveFactor', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'contract TectonicCoreInterface', + name: 'oldTectonicCore', + type: 'address', + }, + { + indexed: false, + internalType: 'contract TectonicCoreInterface', + name: 'newTectonicCore', + type: 'address', + }, + ], + name: 'NewTectonicCore', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'redeemer', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'redeemAmount', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'redeemTokens', + type: 'uint256', + }, + ], + name: 'Redeem', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'payer', + type: 'address', + }, + { + indexed: false, + internalType: 'address', + name: 'borrower', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'repayAmount', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'accountBorrows', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'totalBorrows', + type: 'uint256', + }, + ], + name: 'RepayBorrow', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'benefactor', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'addAmount', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'newTotalReserves', + type: 'uint256', + }, + ], + name: 'ReservesAdded', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'admin', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'reduceAmount', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'newTotalReserves', + type: 'uint256', + }, + ], + name: 'ReservesReduced', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'from', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'to', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'Transfer', + type: 'event', + }, + { + payable: true, + stateMutability: 'payable', + type: 'fallback', + }, + { + constant: false, + inputs: [], + name: '_acceptAdmin', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'uint256', + name: 'addAmount', + type: 'uint256', + }, + ], + name: '_addReserves', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'uint256', + name: 'reduceAmount', + type: 'uint256', + }, + ], + name: '_reduceReserves', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'implementation_', + type: 'address', + }, + { + internalType: 'bool', + name: 'allowResign', + type: 'bool', + }, + { + internalType: 'bytes', + name: 'becomeImplementationData', + type: 'bytes', + }, + ], + name: '_setImplementation', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'contract InterestRateModel', + name: 'newInterestRateModel', + type: 'address', + }, + ], + name: '_setInterestRateModel', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address payable', + name: 'newPendingAdmin', + type: 'address', + }, + ], + name: '_setPendingAdmin', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'uint256', + name: 'newReserveFactorMantissa', + type: 'uint256', + }, + ], + name: '_setReserveFactor', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'contract TectonicCoreInterface', + name: 'newTectonicCore', + type: 'address', + }, + ], + name: '_setTectonicCore', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'accrualBlockNumber', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [], + name: 'accrueInterest', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'admin', + outputs: [ + { + internalType: 'address payable', + name: '', + type: 'address', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + internalType: 'address', + name: 'spender', + type: 'address', + }, + ], + name: 'allowance', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'spender', + type: 'address', + }, + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'approve', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + ], + name: 'balanceOf', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + ], + name: 'balanceOfUnderlying', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'uint256', + name: 'borrowAmount', + type: 'uint256', + }, + ], + name: 'borrow', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'borrowBalanceCurrent', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'borrowBalanceStored', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'borrowIndex', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'borrowRatePerBlock', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'decimals', + outputs: [ + { + internalType: 'uint8', + name: '', + type: 'uint8', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + ], + name: 'delegateToImplementation', + outputs: [ + { + internalType: 'bytes', + name: '', + type: 'bytes', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + ], + name: 'delegateToViewImplementation', + outputs: [ + { + internalType: 'bytes', + name: '', + type: 'bytes', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [], + name: 'exchangeRateCurrent', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'exchangeRateStored', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'getAccountSnapshot', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'getCash', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'implementation', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'interestRateModel', + outputs: [ + { + internalType: 'contract InterestRateModel', + name: '', + type: 'address', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'isTToken', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'borrower', + type: 'address', + }, + { + internalType: 'uint256', + name: 'repayAmount', + type: 'uint256', + }, + { + internalType: 'contract TTokenInterface', + name: 'tTokenCollateral', + type: 'address', + }, + ], + name: 'liquidateBorrow', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'uint256', + name: 'mintAmount', + type: 'uint256', + }, + ], + name: 'mint', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'name', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'pendingAdmin', + outputs: [ + { + internalType: 'address payable', + name: '', + type: 'address', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'protocolSeizeShareMantissa', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'uint256', + name: 'redeemTokens', + type: 'uint256', + }, + ], + name: 'redeem', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'uint256', + name: 'redeemAmount', + type: 'uint256', + }, + ], + name: 'redeemUnderlying', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'uint256', + name: 'repayAmount', + type: 'uint256', + }, + ], + name: 'repayBorrow', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'borrower', + type: 'address', + }, + { + internalType: 'uint256', + name: 'repayAmount', + type: 'uint256', + }, + ], + name: 'repayBorrowBehalf', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'reserveFactorMantissa', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'liquidator', + type: 'address', + }, + { + internalType: 'address', + name: 'borrower', + type: 'address', + }, + { + internalType: 'uint256', + name: 'seizeTokens', + type: 'uint256', + }, + ], + name: 'seize', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'supplyRatePerBlock', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'contract EIP20NonStandardInterface', + name: 'token', + type: 'address', + }, + ], + name: 'sweepToken', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'symbol', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'tectonicCore', + outputs: [ + { + internalType: 'contract TectonicCoreInterface', + name: '', + type: 'address', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'totalBorrows', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [], + name: 'totalBorrowsCurrent', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'totalReserves', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'totalSupply', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'dst', + type: 'address', + }, + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'transfer', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [ + { + internalType: 'address', + name: 'src', + type: 'address', + }, + { + internalType: 'address', + name: 'dst', + type: 'address', + }, + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'transferFrom', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'underlying', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + payable: false, + stateMutability: 'view', + type: 'function', + }, +]; + +export class TectonicTToken__factory { + static readonly abi = _abi; + static createInterface(): TectonicTTokenInterface { + return new utils.Interface(_abi) as TectonicTTokenInterface; + } + static connect(address: string, signerOrProvider: Signer | Provider): TectonicTToken { + return new Contract(address, _abi, signerOrProvider) as TectonicTToken; + } +} diff --git a/src/apps/tectonic/contracts/ethers/factories/index.ts b/src/apps/tectonic/contracts/ethers/factories/index.ts new file mode 100644 index 000000000..204b5aaae --- /dev/null +++ b/src/apps/tectonic/contracts/ethers/factories/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { TectonicCore__factory } from './TectonicCore__factory'; +export { TectonicLens__factory } from './TectonicLens__factory'; +export { TectonicTToken__factory } from './TectonicTToken__factory'; diff --git a/src/apps/tectonic/contracts/ethers/index.ts b/src/apps/tectonic/contracts/ethers/index.ts new file mode 100644 index 000000000..2683122df --- /dev/null +++ b/src/apps/tectonic/contracts/ethers/index.ts @@ -0,0 +1,10 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { TectonicCore } from './TectonicCore'; +export type { TectonicLens } from './TectonicLens'; +export type { TectonicTToken } from './TectonicTToken'; +export * as factories from './factories'; +export { TectonicCore__factory } from './factories/TectonicCore__factory'; +export { TectonicLens__factory } from './factories/TectonicLens__factory'; +export { TectonicTToken__factory } from './factories/TectonicTToken__factory'; diff --git a/src/apps/tectonic/contracts/index.ts b/src/apps/tectonic/contracts/index.ts new file mode 100644 index 000000000..665635170 --- /dev/null +++ b/src/apps/tectonic/contracts/index.ts @@ -0,0 +1,33 @@ +import { Injectable, Inject } from '@nestjs/common'; + +import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; +import { ContractFactory } from '~contract/contracts'; +import { Network } from '~types/network.interface'; + +import { TectonicCore__factory } from './ethers'; +import { TectonicLens__factory } from './ethers'; +import { TectonicTToken__factory } from './ethers'; + +// eslint-disable-next-line +type ContractOpts = { address: string; network: Network }; + +@Injectable() +export class TectonicContractFactory extends ContractFactory { + constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) { + super((network: Network) => appToolkit.getNetworkProvider(network)); + } + + tectonicCore({ address, network }: ContractOpts) { + return TectonicCore__factory.connect(address, this.appToolkit.getNetworkProvider(network)); + } + tectonicLens({ address, network }: ContractOpts) { + return TectonicLens__factory.connect(address, this.appToolkit.getNetworkProvider(network)); + } + tectonicTToken({ address, network }: ContractOpts) { + return TectonicTToken__factory.connect(address, this.appToolkit.getNetworkProvider(network)); + } +} + +export type { TectonicCore } from './ethers'; +export type { TectonicLens } from './ethers'; +export type { TectonicTToken } from './ethers'; diff --git a/src/apps/tectonic/cronos/tectonic.balance-fetcher.ts b/src/apps/tectonic/cronos/tectonic.balance-fetcher.ts new file mode 100644 index 000000000..da087d443 --- /dev/null +++ b/src/apps/tectonic/cronos/tectonic.balance-fetcher.ts @@ -0,0 +1,80 @@ +import { Inject } from '@nestjs/common'; + +import { Register } from '~app-toolkit/decorators'; +import { presentBalanceFetcherResponse } from '~app-toolkit/helpers/presentation/balance-fetcher-response.present'; +import { BalanceFetcher } from '~balance/balance-fetcher.interface'; +import { Network } from '~types/network.interface'; +import { CompoundLendingMetaHelper, CompoundSupplyBalanceHelper } from '~apps/compound'; + +import { TectonicContractFactory } from '../contracts'; +import { TectonicClaimableBalanceHelper } from '../helper/tectonic.claimable.balance-helper'; +import { TectonicSupplyBalanceHelper } from '../helper/tectonic.supply.balance-helper'; +import { TectonicBorrowBalanceHelper } from '../helper/tectonic.borrow.balance-helper'; +import { TECTONIC_DEFINITION } from '../tectonic.definition'; + +const appId = TECTONIC_DEFINITION.id; +const network = Network.CRONOS_MAINNET; + +@Register.BalanceFetcher(appId, network) +export class CronosTectonicBalanceFetcher implements BalanceFetcher { + constructor( + @Inject(TectonicBorrowBalanceHelper) + private readonly tectonicBorrowBalanceHelper: TectonicBorrowBalanceHelper, + @Inject(TectonicSupplyBalanceHelper) + private readonly tectonicSupplyBalanceHelper: TectonicSupplyBalanceHelper, + @Inject(TectonicClaimableBalanceHelper) + private readonly tectonicClaimableBalanceHelper: TectonicClaimableBalanceHelper, + @Inject(CompoundLendingMetaHelper) + private readonly lendingMetaHelper: CompoundLendingMetaHelper, + @Inject(TectonicContractFactory) + private readonly tectonicContractFactory: TectonicContractFactory, + ) {} + + async getSupplyBalances(address: string) { + return this.tectonicSupplyBalanceHelper.getBalances({ + address, + appId, + groupId: TECTONIC_DEFINITION.groups.supply.id, + network, + getTokenContract: ({ address, network }) => this.tectonicContractFactory.tectonicTToken({ address, network }), + getBalanceRaw: ({ contract, address, multicall }) => multicall.wrap(contract).balanceOf(address), + }); + } + + async getBorrowBalances(address: string) { + return this.tectonicBorrowBalanceHelper.getBalances({ + address, + appId, + groupId: TECTONIC_DEFINITION.groups.borrow.id, + network, + getTokenContract: ({ address, network }) => this.tectonicContractFactory.tectonicTToken({ address, network }), + getBorrowBalanceRaw: ({ contract, address }) => contract.callStatic.borrowBalanceCurrent(address), + }); + } + + async getClaimableBalances(address: string) { + return this.tectonicClaimableBalanceHelper.getBalances({ + address, + appId, + groupId: TECTONIC_DEFINITION.groups.claimable.id, + network, + lensAddress: '0x37bafe282cb7d4ef6ad80ee979c341c91def4c17', + rewardTokenAddress: '0xdd73dea10abc2bff99c60882ec5b2b81bb1dc5b2', + tectonicCoreAddress: '0xb3831584acb95ed9ccb0c11f677b5ad01deaeec0', + }); + } + + async getBalances(address: string) { + const [supplyBalances, borrowBalances, claimableBalances] = await Promise.all([ + this.getSupplyBalances(address), + this.getBorrowBalances(address), + this.getClaimableBalances(address), + ]); + + const meta = this.lendingMetaHelper.getMeta({ balances: [...supplyBalances, ...borrowBalances] }); + const claimableProduct = { label: 'Claimable', assets: claimableBalances }; + const lendingProduct = { label: 'Lending', assets: [...supplyBalances, ...borrowBalances], meta }; + + return presentBalanceFetcherResponse([lendingProduct, claimableProduct]); + } +} diff --git a/src/apps/tectonic/cronos/tectonic.borrow.contract-position-fetcher.ts b/src/apps/tectonic/cronos/tectonic.borrow.contract-position-fetcher.ts new file mode 100644 index 000000000..09f2fb95b --- /dev/null +++ b/src/apps/tectonic/cronos/tectonic.borrow.contract-position-fetcher.ts @@ -0,0 +1,30 @@ +import { Inject } from '@nestjs/common'; + +import { Register } from '~app-toolkit/decorators'; +import { PositionFetcher } from '~position/position-fetcher.interface'; +import { ContractPosition } from '~position/position.interface'; +import { Network } from '~types/network.interface'; +import { CompoundBorrowContractPositionHelper } from '~apps/compound'; + +import { TECTONIC_DEFINITION } from '../tectonic.definition'; + +const appId = TECTONIC_DEFINITION.id; +const groupId = TECTONIC_DEFINITION.groups.borrow.id; +const network = Network.CRONOS_MAINNET; + +@Register.ContractPositionFetcher({ appId, groupId, network }) +export class CronosTectonicBorrowContractPositionFetcher implements PositionFetcher { + constructor( + @Inject(CompoundBorrowContractPositionHelper) + private readonly borrowContractPositionHelper: CompoundBorrowContractPositionHelper, + ) {} + + async getPositions() { + return this.borrowContractPositionHelper.getPositions({ + network, + appId, + groupId, + supplyGroupId: TECTONIC_DEFINITION.groups.supply.id, + }); + } +} diff --git a/src/apps/tectonic/cronos/tectonic.supply.token-fetcher.ts b/src/apps/tectonic/cronos/tectonic.supply.token-fetcher.ts new file mode 100644 index 000000000..5e6a7d9e0 --- /dev/null +++ b/src/apps/tectonic/cronos/tectonic.supply.token-fetcher.ts @@ -0,0 +1,40 @@ +import { Inject } from '@nestjs/common'; + +import { Register } from '~app-toolkit/decorators'; +import { PositionFetcher } from '~position/position-fetcher.interface'; +import { AppTokenPosition } from '~position/position.interface'; +import { Network } from '~types/network.interface'; + +import { TectonicContractFactory } from '../contracts'; +import { TectonicSupplyTokenHelper } from '../helper/tectonic.supply.token-helper'; +import { TECTONIC_DEFINITION } from '../tectonic.definition'; + +const appId = TECTONIC_DEFINITION.id; +const groupId = TECTONIC_DEFINITION.groups.supply.id; +const network = Network.CRONOS_MAINNET; + +@Register.TokenPositionFetcher({ appId, groupId, network }) +export class CronosTectonicSupplyTokenFetcher implements PositionFetcher { + constructor( + @Inject(TectonicContractFactory) private readonly tectonicContractFactory: TectonicContractFactory, + @Inject(TectonicSupplyTokenHelper) private readonly tectonicSupplyTokenHelper: TectonicSupplyTokenHelper, + ) {} + + async getPositions() { + return this.tectonicSupplyTokenHelper.getTokens({ + network, + appId, + groupId, + tectonicCoreAddress: '0xb3831584acb95ed9ccb0c11f677b5ad01deaeec0', + getTectonicCoreContract: ({ address, network }) => + this.tectonicContractFactory.tectonicCore({ address, network }), + getTokenContract: ({ address, network }) => this.tectonicContractFactory.tectonicTToken({ address, network }), + getAllMarkets: ({ contract }) => contract.getAllMarkets(), + getExchangeRate: ({ contract }) => contract.callStatic.exchangeRateCurrent(), + getSupplyRate: ({ contract }) => contract.supplyRatePerBlock(), + getBorrowRate: ({ contract }) => contract.borrowRatePerBlock(), + getUnderlyingAddress: ({ contract }) => contract.underlying(), + getExchangeRateMantissa: ({ underlyingTokenDecimals }) => underlyingTokenDecimals + 10, + }); + } +} diff --git a/src/apps/tectonic/cronos/tectonic.tvl-fetcher.ts b/src/apps/tectonic/cronos/tectonic.tvl-fetcher.ts new file mode 100644 index 000000000..fb13d5660 --- /dev/null +++ b/src/apps/tectonic/cronos/tectonic.tvl-fetcher.ts @@ -0,0 +1,26 @@ +import { Inject } from '@nestjs/common'; + +import { Register } from '~app-toolkit/decorators'; +import { TvlFetcher } from '~stats/tvl/tvl-fetcher.interface'; +import { Network } from '~types/network.interface'; +import { CompoundTvlHelper } from '~apps/compound'; + +import { TECTONIC_DEFINITION } from '../tectonic.definition'; + +const appId = TECTONIC_DEFINITION.id; +const network = Network.CRONOS_MAINNET; + +@Register.TvlFetcher({ appId, network }) +export class CronosTectonicTvlFetcher implements TvlFetcher { + constructor(@Inject(CompoundTvlHelper) private readonly tvlHelper: CompoundTvlHelper) {} + + async getTvl() { + const tvl = await this.tvlHelper.getTotalSupplyBasedOnBorrowedPositions({ + appId, + groupIds: [TECTONIC_DEFINITION.groups.borrow.id], + network, + }); + + return tvl; + } +} diff --git a/src/apps/tectonic/helper/tectonic.borrow.balance-helper.ts b/src/apps/tectonic/helper/tectonic.borrow.balance-helper.ts new file mode 100644 index 000000000..98df9cb4d --- /dev/null +++ b/src/apps/tectonic/helper/tectonic.borrow.balance-helper.ts @@ -0,0 +1,53 @@ +import { Inject, Injectable } from '@nestjs/common'; +import { BigNumberish } from 'ethers'; + +import { drillBalance } from '~app-toolkit'; +import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; +import { EthersMulticall as Multicall } from '~multicall/multicall.ethers'; +import { Network } from '~types/network.interface'; + +import { TectonicTToken } from '../contracts'; + +import { TectonicSupplyTokenDataProps } from './tectonic.supply.token-helper'; + +type TectonicBorrowBalanceHelperParams = { + address: string; + network: Network; + appId: string; + groupId: string; + getTokenContract: (opts: { address: string; network: Network }) => T; + getBorrowBalanceRaw: (opts: { contract: T; multicall: Multicall; address: string }) => Promise; +}; + +@Injectable() +export class TectonicBorrowBalanceHelper { + constructor(@Inject(APP_TOOLKIT) private readonly appToolkit: IAppToolkit) {} + + async getBalances({ + address, + network, + appId, + groupId, + getTokenContract, + getBorrowBalanceRaw, + }: TectonicBorrowBalanceHelperParams) { + const multicall = this.appToolkit.getMulticall(network); + + const borrowPositions = await this.appToolkit.getAppContractPositions({ + appId, + groupIds: [groupId], + network, + }); + + const borrowPositionBalances = await Promise.all( + borrowPositions.map(async borrowPosition => { + const borrowContract = getTokenContract({ address: borrowPosition.address, network }); + const balanceRaw = await getBorrowBalanceRaw({ contract: borrowContract, multicall, address }); + const tokens = [drillBalance(borrowPosition.tokens[0], balanceRaw.toString(), { isDebt: true })]; + return { ...borrowPosition, tokens, balanceUSD: tokens[0].balanceUSD }; + }), + ); + + return borrowPositionBalances; + } +} diff --git a/src/apps/tectonic/helper/tectonic.claimable.balance-helper.ts b/src/apps/tectonic/helper/tectonic.claimable.balance-helper.ts new file mode 100644 index 000000000..01b31c052 --- /dev/null +++ b/src/apps/tectonic/helper/tectonic.claimable.balance-helper.ts @@ -0,0 +1,79 @@ +import { Inject, Injectable } from '@nestjs/common'; + +import { drillBalance } from '~app-toolkit'; +import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; +import { buildDollarDisplayItem } from '~app-toolkit/helpers/presentation/display-item.present'; +import { getTokenImg } from '~app-toolkit/helpers/presentation/image.present'; +import { ContractType } from '~position/contract.interface'; +import { ContractPositionBalance } from '~position/position-balance.interface'; +import { MetaType } from '~position/position.interface'; +import { Network } from '~types/network.interface'; + +import { TectonicContractFactory } from '../contracts'; + +type TectonicBalanceHelperParams = { + address: string; + network: Network; + appId: string; + groupId: string; + lensAddress: string; + rewardTokenAddress: string; + tectonicCoreAddress: string; +}; + +@Injectable() +export class TectonicClaimableBalanceHelper { + constructor( + @Inject(TectonicContractFactory) private readonly tectonicContractFactory: TectonicContractFactory, + @Inject(APP_TOOLKIT) private readonly appToolkit: IAppToolkit, + ) {} + + async getBalances({ + address, + network, + appId, + groupId, + lensAddress, + rewardTokenAddress, + tectonicCoreAddress, + }: TectonicBalanceHelperParams) { + const lensContract = this.tectonicContractFactory.tectonicLens({ address: lensAddress, network }); + const prices = await this.appToolkit.getBaseTokenPrices(network); + + // Resolve reward metadata + const rewardMetadata = await lensContract.callStatic.getTonicBalanceMetadataExt( + rewardTokenAddress, + tectonicCoreAddress, + address, + ); + + // Calculate claimable TONIC rewards + const rewardToken = prices.find(price => price.address === rewardTokenAddress); + if (!rewardToken) return []; + + const rewardBalanceRaw = rewardMetadata[3]; + const rewardTokenWithMetaType = { metaType: MetaType.CLAIMABLE, ...rewardToken }; + const tokenBalance = drillBalance(rewardTokenWithMetaType, rewardBalanceRaw.toString()); + + // Display Props + const label = `Claimable ${rewardToken.symbol}`; + const secondaryLabel = buildDollarDisplayItem(rewardToken.price); + const images = [getTokenImg(rewardToken.address, network)]; + const statsItems = []; + const displayProps = { label, secondaryLabel, images, statsItems }; + + const contractPositionBalance: ContractPositionBalance = { + type: ContractType.POSITION, + address: tectonicCoreAddress, + appId, + groupId, + network, + dataProps: {}, + displayProps, + tokens: [tokenBalance], + balanceUSD: tokenBalance.balanceUSD, + }; + + return [contractPositionBalance]; + } +} diff --git a/src/apps/tectonic/helper/tectonic.supply.balance-helper.ts b/src/apps/tectonic/helper/tectonic.supply.balance-helper.ts new file mode 100644 index 000000000..f18174797 --- /dev/null +++ b/src/apps/tectonic/helper/tectonic.supply.balance-helper.ts @@ -0,0 +1,52 @@ +import { Inject, Injectable } from '@nestjs/common'; +import { BigNumberish } from 'ethers'; + +import { drillBalance } from '~app-toolkit'; +import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; +import { EthersMulticall as Multicall } from '~multicall/multicall.ethers'; +import { Network } from '~types/network.interface'; + +import { TectonicTToken } from '../contracts'; + +import { TectonicSupplyTokenDataProps } from './tectonic.supply.token-helper'; + +type TectonicSupplyBalanceHelperParams = { + address: string; + network: Network; + appId: string; + groupId: string; + getTokenContract: (opts: { address: string; network: Network }) => T; + getBalanceRaw: (opts: { contract: T; multicall: Multicall; address: string }) => Promise; +}; + +@Injectable() +export class TectonicSupplyBalanceHelper { + constructor(@Inject(APP_TOOLKIT) private readonly appToolkit: IAppToolkit) {} + + async getBalances({ + address, + network, + appId, + groupId, + getTokenContract, + getBalanceRaw, + }: TectonicSupplyBalanceHelperParams) { + const multicall = this.appToolkit.getMulticall(network); + + const supplyTokens = await this.appToolkit.getAppTokenPositions({ + appId, + groupIds: [groupId], + network, + }); + + const supplyTokenBalances = await Promise.all( + supplyTokens.map(async supplyToken => { + const supplyTokenContract = getTokenContract({ address: supplyToken.address, network }); + const balanceRaw = await getBalanceRaw({ contract: supplyTokenContract, multicall, address }); + return drillBalance(supplyToken, balanceRaw.toString()); + }), + ); + + return supplyTokenBalances; + } +} diff --git a/src/apps/tectonic/helper/tectonic.supply.token-helper.ts b/src/apps/tectonic/helper/tectonic.supply.token-helper.ts new file mode 100644 index 000000000..8496d3099 --- /dev/null +++ b/src/apps/tectonic/helper/tectonic.supply.token-helper.ts @@ -0,0 +1,182 @@ +import { Inject, Injectable } from '@nestjs/common'; +import { BigNumberish } from 'ethers'; +import _ from 'lodash'; + +import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; +import { ETH_ADDR_ALIAS, ZERO_ADDRESS } from '~app-toolkit/constants/address'; +import { BLOCKS_PER_DAY } from '~app-toolkit/constants/blocks'; +import { + buildDollarDisplayItem, + buildPercentageDisplayItem, +} from '~app-toolkit/helpers/presentation/display-item.present'; +import { getTokenImg } from '~app-toolkit/helpers/presentation/image.present'; +import { EthersMulticall as Multicall } from '~multicall/multicall.ethers'; +import { ContractType } from '~position/contract.interface'; +import { BalanceDisplayMode } from '~position/display.interface'; +import { AppTokenPosition, Token } from '~position/position.interface'; +import { AppGroupsDefinition } from '~position/position.service'; +import { BaseToken } from '~position/token.interface'; +import { Network } from '~types/network.interface'; + +import { TectonicCore, TectonicContractFactory, TectonicTToken } from '../contracts'; + +export type TectonicSupplyTokenDataProps = { + supplyApy: number; + borrowApy: number; + liquidity: number; + marketName?: string; + tectonicCoreAddress: string; +}; + +type TectonicSupplyTokenHelperParams = { + network: Network; + appId: string; + groupId: string; + dependencies?: AppGroupsDefinition[]; + allTokens?: (BaseToken | AppTokenPosition)[]; + tectonicCoreAddress: string; + marketName?: string; + getTectonicCoreContract: (opts: { address: string; network: Network }) => T; + getTokenContract: (opts: { address: string; network: Network }) => V; + getAllMarkets: (opts: { contract: T; multicall: Multicall }) => string[] | Promise; + getExchangeRate: (opts: { contract: V; multicall: Multicall }) => Promise; + getSupplyRate: (opts: { contract: V; multicall: Multicall }) => Promise; + getBorrowRate: (opts: { contract: V; multicall: Multicall }) => Promise; + getUnderlyingAddress: (opts: { contract: V; multicall: Multicall }) => Promise; + getExchangeRateMantissa: (opts: { tokenDecimals: number; underlyingTokenDecimals: number }) => number; + getDisplayLabel?: (opts: { contract: V; multicall: Multicall; underlyingToken: Token }) => Promise; + getDenormalizedRate?: (opts: { rate: BigNumberish; blocksPerDay: number; decimals: number }) => number; +}; + +@Injectable() +export class TectonicSupplyTokenHelper { + constructor( + @Inject(TectonicContractFactory) private readonly contractFactory: TectonicContractFactory, + @Inject(APP_TOOLKIT) private readonly appToolkit: IAppToolkit, + ) {} + + async getTokens({ + tectonicCoreAddress, + marketName, + network, + appId, + groupId, + dependencies = [], + allTokens = [], + getTectonicCoreContract, + getTokenContract, + getAllMarkets, + getExchangeRate, + getSupplyRate, + getBorrowRate, + getUnderlyingAddress, + getExchangeRateMantissa, + getDisplayLabel, + getDenormalizedRate = ({ blocksPerDay, rate }) => + Math.pow(1 + (blocksPerDay * Number(rate)) / Number(1e18), 365) - 1, + }: TectonicSupplyTokenHelperParams) { + const multicall = this.appToolkit.getMulticall(network); + + if (!allTokens.length) { + const baseTokens = await this.appToolkit.getBaseTokenPrices(network); + const appTokens = await this.appToolkit.getAppTokenPositions(...dependencies); + allTokens.push(...appTokens, ...baseTokens); + } + + const tectonicCoreContract = getTectonicCoreContract({ network, address: tectonicCoreAddress }); + const marketTokenAddressesRaw = await getAllMarkets({ contract: tectonicCoreContract, multicall }); + + const tokens = await Promise.all( + marketTokenAddressesRaw.map(async marketTokenAddressRaw => { + const address = marketTokenAddressRaw.toLowerCase(); + const erc20TokenContract = this.contractFactory.erc20({ address, network }); + const contract = getTokenContract({ address, network }); + + const underlyingAddress = await getUnderlyingAddress({ contract, multicall }) + .then(t => t.toLowerCase().replace(ETH_ADDR_ALIAS, ZERO_ADDRESS)) + .catch(() => ZERO_ADDRESS); + + const underlyingToken = allTokens.find(v => v.address === underlyingAddress); + if (!underlyingToken) return null; + + const [symbol, decimals, supplyRaw, rateRaw, supplyRateRaw, borrowRateRaw] = await Promise.all([ + erc20TokenContract.symbol(), + erc20TokenContract.decimals(), + erc20TokenContract.totalSupply(), + getExchangeRate({ contract, multicall }), + getSupplyRate({ contract, multicall }).catch(() => 0), + getBorrowRate({ contract, multicall }).catch(() => 0), + ]); + + // Data Props + const type = ContractType.APP_TOKEN; + const supply = Number(supplyRaw) / 10 ** decimals; + const underlyingTokenDecimals = underlyingToken.decimals; + const mantissa = getExchangeRateMantissa({ tokenDecimals: decimals, underlyingTokenDecimals }); + const pricePerShare = Number(rateRaw) / 10 ** mantissa; + const price = pricePerShare * underlyingToken.price; + const liquidity = price * supply; + const tokens = [underlyingToken]; + const blocksPerDay = BLOCKS_PER_DAY[network]; + const supplyApy = getDenormalizedRate({ + blocksPerDay, + rate: supplyRateRaw, + decimals: underlyingToken.decimals, + }); + const borrowApy = getDenormalizedRate({ + blocksPerDay, + rate: borrowRateRaw, + decimals: underlyingToken.decimals, + }); + + // Display Props + const label = getDisplayLabel + ? await getDisplayLabel({ contract, multicall, underlyingToken }) + : underlyingToken.symbol; + const secondaryLabel = buildDollarDisplayItem(underlyingToken.price); + const tertiaryLabel = `${(supplyApy * 100).toFixed(3)}% APY`; + const images = [getTokenImg(underlyingToken.address, network)]; + const balanceDisplayMode = BalanceDisplayMode.UNDERLYING; + const statsItems = [ + { label: 'Supply APY', value: buildPercentageDisplayItem(supplyApy) }, + { label: 'Liquidity', value: buildDollarDisplayItem(liquidity) }, + ]; + + const token: AppTokenPosition = { + type, + address, + network, + appId, + groupId, + symbol, + decimals, + supply, + price, + pricePerShare, + tokens, + + dataProps: { + marketName, + supplyApy, + borrowApy, + liquidity, + tectonicCoreAddress, + }, + + displayProps: { + label, + secondaryLabel, + tertiaryLabel, + images, + statsItems, + balanceDisplayMode, + }, + }; + + return token; + }), + ); + + return _.compact(tokens); + } +} diff --git a/src/apps/tectonic/index.ts b/src/apps/tectonic/index.ts new file mode 100644 index 000000000..8abd5a782 --- /dev/null +++ b/src/apps/tectonic/index.ts @@ -0,0 +1,3 @@ +export { TECTONIC_DEFINITION, TectonicAppDefinition } from './tectonic.definition'; +export { TectonicAppModule } from './tectonic.module'; +export { TectonicContractFactory } from './contracts'; diff --git a/src/apps/tectonic/tectonic.definition.ts b/src/apps/tectonic/tectonic.definition.ts new file mode 100644 index 000000000..40bbf8d18 --- /dev/null +++ b/src/apps/tectonic/tectonic.definition.ts @@ -0,0 +1,51 @@ +import { Register } from '~app-toolkit/decorators'; +import { appDefinition, AppDefinition } from '~app/app.definition'; +import { AppAction, AppTag, GroupType } from '~app/app.interface'; +import { Network } from '~types/network.interface'; + +export const TECTONIC_DEFINITION = appDefinition({ + id: 'tectonic', + name: 'tectonic', + description: + 'Tectonic is the first DeFi protocol designed to maximize capital efficiency, benefiting liquidity providers, traders, and borrowers.', + url: 'https://tectonic.finance/', + + groups: { + claimable: { + id: 'claimable', + type: GroupType.POSITION, + label: 'Claimable', + }, + + supply: { + id: 'supply', + type: GroupType.TOKEN, + label: 'Supply', + }, + + borrow: { + id: 'borrow', + type: GroupType.POSITION, + label: 'Borrow', + }, + }, + + tags: [AppTag.LENDING], + keywords: [], + links: {}, + + supportedNetworks: { + [Network.CRONOS_MAINNET]: [AppAction.VIEW], + }, + + primaryColor: '#000024', +}); + +@Register.AppDefinition(TECTONIC_DEFINITION.id) +export class TectonicAppDefinition extends AppDefinition { + constructor() { + super(TECTONIC_DEFINITION); + } +} + +export default TECTONIC_DEFINITION; diff --git a/src/apps/tectonic/tectonic.module.ts b/src/apps/tectonic/tectonic.module.ts new file mode 100644 index 000000000..8467677e1 --- /dev/null +++ b/src/apps/tectonic/tectonic.module.ts @@ -0,0 +1,40 @@ +import { Register } from '~app-toolkit/decorators'; +import { AbstractApp } from '~app/app.dynamic-module'; +import { CompoundAppModule } from '~apps/compound'; + +import { TectonicContractFactory } from './contracts'; +import { CronosTectonicBalanceFetcher } from './cronos/tectonic.balance-fetcher'; +import { CronosTectonicBorrowContractPositionFetcher } from './cronos/tectonic.borrow.contract-position-fetcher'; +import { CronosTectonicSupplyTokenFetcher } from './cronos/tectonic.supply.token-fetcher'; +import { CronosTectonicTvlFetcher } from './cronos/tectonic.tvl-fetcher'; +import { TectonicClaimableBalanceHelper } from './helper/tectonic.claimable.balance-helper'; +import { TectonicBorrowBalanceHelper } from './helper/tectonic.borrow.balance-helper'; +import { TectonicSupplyTokenHelper } from './helper/tectonic.supply.token-helper'; +import { TectonicSupplyBalanceHelper } from './helper/tectonic.supply.balance-helper'; +import { TectonicAppDefinition, TECTONIC_DEFINITION } from './tectonic.definition'; + +@Register.AppModule({ + appId: TECTONIC_DEFINITION.id, + imports: [CompoundAppModule], + providers: [ + CronosTectonicBalanceFetcher, + CronosTectonicBorrowContractPositionFetcher, + CronosTectonicSupplyTokenFetcher, + CronosTectonicTvlFetcher, + TectonicAppDefinition, + TectonicContractFactory, + TectonicClaimableBalanceHelper, + TectonicBorrowBalanceHelper, + TectonicSupplyTokenHelper, + TectonicSupplyBalanceHelper, + TectonicContractFactory, + ], + exports: [ + TectonicClaimableBalanceHelper, + TectonicBorrowBalanceHelper, + TectonicSupplyTokenHelper, + TectonicSupplyBalanceHelper, + TectonicContractFactory, + ], +}) +export class TectonicAppModule extends AbstractApp() {}