diff --git a/src/apps/aave-safety-module/aave-safety-module.module.ts b/src/apps/aave-safety-module/aave-safety-module.module.ts index 6290dfa27..c887380b8 100644 --- a/src/apps/aave-safety-module/aave-safety-module.module.ts +++ b/src/apps/aave-safety-module/aave-safety-module.module.ts @@ -3,14 +3,12 @@ import { Module } from '@nestjs/common'; import { AbstractApp } from '~app/app.dynamic-module'; import { AaveSafetyModuleViemContractFactory } from './contracts'; -import { EthereumAaveSafetyModuleAbptTokenFetcher } from './ethereum/aave-safety-module.abpt.token-fetcher'; import { EthereumAaveSafetyModuleStkAaveClaimableContractPositionFetcher } from './ethereum/aave-safety-module.stk-aave-claimable.contract-position-fetcher'; import { EthereumAaveSafetyModuleStkAbptClaimableContractPositionFetcher } from './ethereum/aave-safety-module.stk-abpt-claimable.contract-position-fetcher'; @Module({ providers: [ AaveSafetyModuleViemContractFactory, - EthereumAaveSafetyModuleAbptTokenFetcher, EthereumAaveSafetyModuleStkAaveClaimableContractPositionFetcher, EthereumAaveSafetyModuleStkAbptClaimableContractPositionFetcher, ], diff --git a/src/apps/aave-safety-module/contracts/abis/aave-abpt.json b/src/apps/aave-safety-module/contracts/abis/aave-abpt.json deleted file mode 100644 index 7e9c0f536..000000000 --- a/src/apps/aave-safety-module/contracts/abis/aave-abpt.json +++ /dev/null @@ -1,574 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "caller", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "oldCap", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "newCap", "type": "uint256" } - ], - "name": "CapChanged", - "type": "event" - }, - { - "anonymous": true, - "inputs": [ - { "indexed": true, "internalType": "bytes4", "name": "sig", "type": "bytes4" }, - { "indexed": true, "internalType": "address", "name": "caller", "type": "address" }, - { "indexed": false, "internalType": "bytes", "name": "data", "type": "bytes" } - ], - "name": "LogCall", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "caller", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "tokenOut", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "tokenAmountOut", "type": "uint256" } - ], - "name": "LogExit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "caller", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "tokenIn", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "tokenAmountIn", "type": "uint256" } - ], - "name": "LogJoin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "token", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "pool", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "caller", "type": "address" } - ], - "name": "NewTokenCommitted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [], - "name": "DECIMALS", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DEFAULT_ADD_TOKEN_TIME_LOCK_IN_BLOCKS", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DEFAULT_MIN_WEIGHT_CHANGE_BLOCK_PERIOD", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NAME", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "REVISION", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "addTokenTimeLockInBlocks", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "spender", "type": "address" } - ], - "name": "allowance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { "inputs": [], "name": "applyAddToken", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "approve", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "bFactory", - "outputs": [{ "internalType": "contract IBFactory", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "bPool", - "outputs": [{ "internalType": "contract IBPool", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "bspCap", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], - "name": "burnPoolShareFromLib", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "provider", "type": "address" }], - "name": "canProvideLiquidity", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "token", "type": "address" }, - { "internalType": "uint256", "name": "balance", "type": "uint256" }, - { "internalType": "uint256", "name": "denormalizedWeight", "type": "uint256" } - ], - "name": "commitAddToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "initialSupply", "type": "uint256" }], - "name": "createPool", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "initialSupply", "type": "uint256" }, - { "internalType": "uint256", "name": "minimumWeightChangeBlockPeriodParam", "type": "uint256" }, - { "internalType": "uint256", "name": "addTokenTimeLockInBlocksParam", "type": "uint256" } - ], - "name": "createPool", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "decreaseApproval", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "poolAmountIn", "type": "uint256" }, - { "internalType": "uint256[]", "name": "minAmountsOut", "type": "uint256[]" } - ], - "name": "exitPool", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "tokenOut", "type": "address" }, - { "internalType": "uint256", "name": "tokenAmountOut", "type": "uint256" }, - { "internalType": "uint256", "name": "maxPoolAmountIn", "type": "uint256" } - ], - "name": "exitswapExternAmountOut", - "outputs": [{ "internalType": "uint256", "name": "poolAmountIn", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "tokenOut", "type": "address" }, - { "internalType": "uint256", "name": "poolAmountIn", "type": "uint256" }, - { "internalType": "uint256", "name": "minAmountOut", "type": "uint256" } - ], - "name": "exitswapPoolAmountIn", - "outputs": [{ "internalType": "uint256", "name": "tokenAmountOut", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getBalancerSafeMathVersion", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "getController", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "token", "type": "address" }], - "name": "getDenormalizedWeight", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getRightsManagerVersion", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "getSmartPoolManagerVersion", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "gradualUpdate", - "outputs": [ - { "internalType": "uint256", "name": "startBlock", "type": "uint256" }, - { "internalType": "uint256", "name": "endBlock", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "enum RightsManager.Permissions", "name": "permission", "type": "uint8" }], - "name": "hasPermission", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "increaseApproval", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "factoryAddress", "type": "address" }, - { - "components": [ - { "internalType": "string", "name": "poolTokenSymbol", "type": "string" }, - { "internalType": "string", "name": "poolTokenName", "type": "string" }, - { "internalType": "address[]", "name": "constituentTokens", "type": "address[]" }, - { "internalType": "uint256[]", "name": "tokenBalances", "type": "uint256[]" }, - { "internalType": "uint256[]", "name": "tokenWeights", "type": "uint256[]" }, - { "internalType": "uint256", "name": "swapFee", "type": "uint256" } - ], - "internalType": "struct ConfigurableRightsPool.PoolParams", - "name": "poolParams", - "type": "tuple" - }, - { - "components": [ - { "internalType": "bool", "name": "canPauseSwapping", "type": "bool" }, - { "internalType": "bool", "name": "canChangeSwapFee", "type": "bool" }, - { "internalType": "bool", "name": "canChangeWeights", "type": "bool" }, - { "internalType": "bool", "name": "canAddRemoveTokens", "type": "bool" }, - { "internalType": "bool", "name": "canWhitelistLPs", "type": "bool" }, - { "internalType": "bool", "name": "canChangeCap", "type": "bool" } - ], - "internalType": "struct RightsManager.Rights", - "name": "rightsStruct", - "type": "tuple" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "isPublicSwap", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "poolAmountOut", "type": "uint256" }, - { "internalType": "uint256[]", "name": "maxAmountsIn", "type": "uint256[]" } - ], - "name": "joinPool", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "tokenIn", "type": "address" }, - { "internalType": "uint256", "name": "tokenAmountIn", "type": "uint256" }, - { "internalType": "uint256", "name": "minPoolAmountOut", "type": "uint256" } - ], - "name": "joinswapExternAmountIn", - "outputs": [{ "internalType": "uint256", "name": "poolAmountOut", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "tokenIn", "type": "address" }, - { "internalType": "uint256", "name": "poolAmountOut", "type": "uint256" }, - { "internalType": "uint256", "name": "maxAmountIn", "type": "uint256" } - ], - "name": "joinswapPoolAmountOut", - "outputs": [{ "internalType": "uint256", "name": "tokenAmountIn", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "minimumWeightChangeBlockPeriod", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], - "name": "mintPoolShareFromLib", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "newToken", - "outputs": [ - { "internalType": "address", "name": "addr", "type": "address" }, - { "internalType": "bool", "name": "isCommitted", "type": "bool" }, - { "internalType": "uint256", "name": "commitBlock", "type": "uint256" }, - { "internalType": "uint256", "name": "denorm", "type": "uint256" }, - { "internalType": "uint256", "name": "balance", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { "inputs": [], "name": "pokeWeights", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { "internalType": "address", "name": "from", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "pullPoolShareFromLib", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "pushPoolShareFromLib", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "token", "type": "address" }], - "name": "removeToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "provider", "type": "address" }], - "name": "removeWhitelistedLiquidityProvider", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "rights", - "outputs": [ - { "internalType": "bool", "name": "canPauseSwapping", "type": "bool" }, - { "internalType": "bool", "name": "canChangeSwapFee", "type": "bool" }, - { "internalType": "bool", "name": "canChangeWeights", "type": "bool" }, - { "internalType": "bool", "name": "canAddRemoveTokens", "type": "bool" }, - { "internalType": "bool", "name": "canWhitelistLPs", "type": "bool" }, - { "internalType": "bool", "name": "canChangeCap", "type": "bool" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "newCap", "type": "uint256" }], - "name": "setCap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], - "name": "setController", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bool", "name": "publicSwap", "type": "bool" }], - "name": "setPublicSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "swapFee", "type": "uint256" }], - "name": "setSwapFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "sender", "type": "address" }, - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "token", "type": "address" }, - { "internalType": "uint256", "name": "newWeight", "type": "uint256" } - ], - "name": "updateWeight", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256[]", "name": "newWeights", "type": "uint256[]" }, - { "internalType": "uint256", "name": "startBlock", "type": "uint256" }, - { "internalType": "uint256", "name": "endBlock", "type": "uint256" } - ], - "name": "updateWeightsGradually", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "provider", "type": "address" }], - "name": "whitelistLiquidityProvider", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/aave-safety-module/contracts/abis/aave-bpt.json b/src/apps/aave-safety-module/contracts/abis/aave-bpt.json deleted file mode 100644 index ad2c86d2b..000000000 --- a/src/apps/aave-safety-module/contracts/abis/aave-bpt.json +++ /dev/null @@ -1,771 +0,0 @@ -[ - { "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "src", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "dst", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amt", "type": "uint256" } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": true, - "inputs": [ - { "indexed": true, "internalType": "bytes4", "name": "sig", "type": "bytes4" }, - { "indexed": true, "internalType": "address", "name": "caller", "type": "address" }, - { "indexed": false, "internalType": "bytes", "name": "data", "type": "bytes" } - ], - "name": "LOG_CALL", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "caller", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "tokenOut", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "tokenAmountOut", "type": "uint256" } - ], - "name": "LOG_EXIT", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "caller", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "tokenIn", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "tokenAmountIn", "type": "uint256" } - ], - "name": "LOG_JOIN", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "caller", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "tokenIn", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "tokenOut", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "tokenAmountIn", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "tokenAmountOut", "type": "uint256" } - ], - "name": "LOG_SWAP", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "src", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "dst", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amt", "type": "uint256" } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "BONE", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "BPOW_PRECISION", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "EXIT_FEE", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "INIT_POOL_SUPPLY", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "MAX_BOUND_TOKENS", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "MAX_BPOW_BASE", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "MAX_FEE", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "MAX_IN_RATIO", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "MAX_OUT_RATIO", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "MAX_TOTAL_WEIGHT", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "MAX_WEIGHT", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "MIN_BALANCE", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "MIN_BOUND_TOKENS", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "MIN_BPOW_BASE", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "MIN_FEE", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "MIN_WEIGHT", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { "internalType": "address", "name": "src", "type": "address" }, - { "internalType": "address", "name": "dst", "type": "address" } - ], - "name": "allowance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "dst", "type": "address" }, - { "internalType": "uint256", "name": "amt", "type": "uint256" } - ], - "name": "approve", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "internalType": "address", "name": "whom", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "token", "type": "address" }, - { "internalType": "uint256", "name": "balance", "type": "uint256" }, - { "internalType": "uint256", "name": "denorm", "type": "uint256" } - ], - "name": "bind", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { "internalType": "uint256", "name": "tokenBalanceIn", "type": "uint256" }, - { "internalType": "uint256", "name": "tokenWeightIn", "type": "uint256" }, - { "internalType": "uint256", "name": "tokenBalanceOut", "type": "uint256" }, - { "internalType": "uint256", "name": "tokenWeightOut", "type": "uint256" }, - { "internalType": "uint256", "name": "tokenAmountOut", "type": "uint256" }, - { "internalType": "uint256", "name": "swapFee", "type": "uint256" } - ], - "name": "calcInGivenOut", - "outputs": [{ "internalType": "uint256", "name": "tokenAmountIn", "type": "uint256" }], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { "internalType": "uint256", "name": "tokenBalanceIn", "type": "uint256" }, - { "internalType": "uint256", "name": "tokenWeightIn", "type": "uint256" }, - { "internalType": "uint256", "name": "tokenBalanceOut", "type": "uint256" }, - { "internalType": "uint256", "name": "tokenWeightOut", "type": "uint256" }, - { "internalType": "uint256", "name": "tokenAmountIn", "type": "uint256" }, - { "internalType": "uint256", "name": "swapFee", "type": "uint256" } - ], - "name": "calcOutGivenIn", - "outputs": [{ "internalType": "uint256", "name": "tokenAmountOut", "type": "uint256" }], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { "internalType": "uint256", "name": "tokenBalanceOut", "type": "uint256" }, - { "internalType": "uint256", "name": "tokenWeightOut", "type": "uint256" }, - { "internalType": "uint256", "name": "poolSupply", "type": "uint256" }, - { "internalType": "uint256", "name": "totalWeight", "type": "uint256" }, - { "internalType": "uint256", "name": "tokenAmountOut", "type": "uint256" }, - { "internalType": "uint256", "name": "swapFee", "type": "uint256" } - ], - "name": "calcPoolInGivenSingleOut", - "outputs": [{ "internalType": "uint256", "name": "poolAmountIn", "type": "uint256" }], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { "internalType": "uint256", "name": "tokenBalanceIn", "type": "uint256" }, - { "internalType": "uint256", "name": "tokenWeightIn", "type": "uint256" }, - { "internalType": "uint256", "name": "poolSupply", "type": "uint256" }, - { "internalType": "uint256", "name": "totalWeight", "type": "uint256" }, - { "internalType": "uint256", "name": "tokenAmountIn", "type": "uint256" }, - { "internalType": "uint256", "name": "swapFee", "type": "uint256" } - ], - "name": "calcPoolOutGivenSingleIn", - "outputs": [{ "internalType": "uint256", "name": "poolAmountOut", "type": "uint256" }], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { "internalType": "uint256", "name": "tokenBalanceIn", "type": "uint256" }, - { "internalType": "uint256", "name": "tokenWeightIn", "type": "uint256" }, - { "internalType": "uint256", "name": "poolSupply", "type": "uint256" }, - { "internalType": "uint256", "name": "totalWeight", "type": "uint256" }, - { "internalType": "uint256", "name": "poolAmountOut", "type": "uint256" }, - { "internalType": "uint256", "name": "swapFee", "type": "uint256" } - ], - "name": "calcSingleInGivenPoolOut", - "outputs": [{ "internalType": "uint256", "name": "tokenAmountIn", "type": "uint256" }], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { "internalType": "uint256", "name": "tokenBalanceOut", "type": "uint256" }, - { "internalType": "uint256", "name": "tokenWeightOut", "type": "uint256" }, - { "internalType": "uint256", "name": "poolSupply", "type": "uint256" }, - { "internalType": "uint256", "name": "totalWeight", "type": "uint256" }, - { "internalType": "uint256", "name": "poolAmountIn", "type": "uint256" }, - { "internalType": "uint256", "name": "swapFee", "type": "uint256" } - ], - "name": "calcSingleOutGivenPoolIn", - "outputs": [{ "internalType": "uint256", "name": "tokenAmountOut", "type": "uint256" }], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { "internalType": "uint256", "name": "tokenBalanceIn", "type": "uint256" }, - { "internalType": "uint256", "name": "tokenWeightIn", "type": "uint256" }, - { "internalType": "uint256", "name": "tokenBalanceOut", "type": "uint256" }, - { "internalType": "uint256", "name": "tokenWeightOut", "type": "uint256" }, - { "internalType": "uint256", "name": "swapFee", "type": "uint256" } - ], - "name": "calcSpotPrice", - "outputs": [{ "internalType": "uint256", "name": "spotPrice", "type": "uint256" }], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "dst", "type": "address" }, - { "internalType": "uint256", "name": "amt", "type": "uint256" } - ], - "name": "decreaseApproval", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "uint256", "name": "poolAmountIn", "type": "uint256" }, - { "internalType": "uint256[]", "name": "minAmountsOut", "type": "uint256[]" } - ], - "name": "exitPool", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "tokenOut", "type": "address" }, - { "internalType": "uint256", "name": "tokenAmountOut", "type": "uint256" }, - { "internalType": "uint256", "name": "maxPoolAmountIn", "type": "uint256" } - ], - "name": "exitswapExternAmountOut", - "outputs": [{ "internalType": "uint256", "name": "poolAmountIn", "type": "uint256" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "tokenOut", "type": "address" }, - { "internalType": "uint256", "name": "poolAmountIn", "type": "uint256" }, - { "internalType": "uint256", "name": "minAmountOut", "type": "uint256" } - ], - "name": "exitswapPoolAmountIn", - "outputs": [{ "internalType": "uint256", "name": "tokenAmountOut", "type": "uint256" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "finalize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "internalType": "address", "name": "token", "type": "address" }], - "name": "getBalance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getColor", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getController", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCurrentTokens", - "outputs": [{ "internalType": "address[]", "name": "tokens", "type": "address[]" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "internalType": "address", "name": "token", "type": "address" }], - "name": "getDenormalizedWeight", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getFinalTokens", - "outputs": [{ "internalType": "address[]", "name": "tokens", "type": "address[]" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "internalType": "address", "name": "token", "type": "address" }], - "name": "getNormalizedWeight", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getNumTokens", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { "internalType": "address", "name": "tokenIn", "type": "address" }, - { "internalType": "address", "name": "tokenOut", "type": "address" } - ], - "name": "getSpotPrice", - "outputs": [{ "internalType": "uint256", "name": "spotPrice", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { "internalType": "address", "name": "tokenIn", "type": "address" }, - { "internalType": "address", "name": "tokenOut", "type": "address" } - ], - "name": "getSpotPriceSansFee", - "outputs": [{ "internalType": "uint256", "name": "spotPrice", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getSwapFee", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getTotalDenormalizedWeight", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "internalType": "address", "name": "token", "type": "address" }], - "name": "gulp", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "dst", "type": "address" }, - { "internalType": "uint256", "name": "amt", "type": "uint256" } - ], - "name": "increaseApproval", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "internalType": "address", "name": "t", "type": "address" }], - "name": "isBound", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isFinalized", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isPublicSwap", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "uint256", "name": "poolAmountOut", "type": "uint256" }, - { "internalType": "uint256[]", "name": "maxAmountsIn", "type": "uint256[]" } - ], - "name": "joinPool", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "tokenIn", "type": "address" }, - { "internalType": "uint256", "name": "tokenAmountIn", "type": "uint256" }, - { "internalType": "uint256", "name": "minPoolAmountOut", "type": "uint256" } - ], - "name": "joinswapExternAmountIn", - "outputs": [{ "internalType": "uint256", "name": "poolAmountOut", "type": "uint256" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "tokenIn", "type": "address" }, - { "internalType": "uint256", "name": "poolAmountOut", "type": "uint256" }, - { "internalType": "uint256", "name": "maxAmountIn", "type": "uint256" } - ], - "name": "joinswapPoolAmountOut", - "outputs": [{ "internalType": "uint256", "name": "tokenAmountIn", "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": false, - "inputs": [ - { "internalType": "address", "name": "token", "type": "address" }, - { "internalType": "uint256", "name": "balance", "type": "uint256" }, - { "internalType": "uint256", "name": "denorm", "type": "uint256" } - ], - "name": "rebind", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "internalType": "address", "name": "manager", "type": "address" }], - "name": "setController", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "internalType": "bool", "name": "public_", "type": "bool" }], - "name": "setPublicSwap", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "internalType": "uint256", "name": "swapFee", "type": "uint256" }], - "name": "setSwapFee", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "tokenIn", "type": "address" }, - { "internalType": "uint256", "name": "tokenAmountIn", "type": "uint256" }, - { "internalType": "address", "name": "tokenOut", "type": "address" }, - { "internalType": "uint256", "name": "minAmountOut", "type": "uint256" }, - { "internalType": "uint256", "name": "maxPrice", "type": "uint256" } - ], - "name": "swapExactAmountIn", - "outputs": [ - { "internalType": "uint256", "name": "tokenAmountOut", "type": "uint256" }, - { "internalType": "uint256", "name": "spotPriceAfter", "type": "uint256" } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "tokenIn", "type": "address" }, - { "internalType": "uint256", "name": "maxAmountIn", "type": "uint256" }, - { "internalType": "address", "name": "tokenOut", "type": "address" }, - { "internalType": "uint256", "name": "tokenAmountOut", "type": "uint256" }, - { "internalType": "uint256", "name": "maxPrice", "type": "uint256" } - ], - "name": "swapExactAmountOut", - "outputs": [ - { "internalType": "uint256", "name": "tokenAmountIn", "type": "uint256" }, - { "internalType": "uint256", "name": "spotPriceAfter", "type": "uint256" } - ], - "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": "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": "amt", "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": "amt", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "internalType": "address", "name": "token", "type": "address" }], - "name": "unbind", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/aave-safety-module/contracts/abis/aave-stk-apy-helper.json b/src/apps/aave-safety-module/contracts/abis/aave-stk-apy-helper.json deleted file mode 100644 index 2069cb2b8..000000000 --- a/src/apps/aave-safety-module/contracts/abis/aave-stk-apy-helper.json +++ /dev/null @@ -1,161 +0,0 @@ -[ - { - "inputs": [ - { "internalType": "contract IPriceOracle", "name": "priceOracle", "type": "address" }, - { "internalType": "contract BPTPriceFeedI", "name": "bptPriceFeed", "type": "address" }, - { "internalType": "address", "name": "aave", "type": "address" }, - { "internalType": "contract IStakedToken", "name": "stkAave", "type": "address" }, - { "internalType": "address", "name": "bpt", "type": "address" }, - { "internalType": "contract IStakedToken", "name": "stkBpt", "type": "address" } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AAVE", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "BPT", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "BPT_PRICE_FEED", - "outputs": [{ "internalType": "contract BPTPriceFeedI", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PRICE_ORACLE", - "outputs": [{ "internalType": "contract IPriceOracle", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "STAKED_AAVE", - "outputs": [{ "internalType": "contract IStakedToken", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "STAKED_BPT", - "outputs": [{ "internalType": "contract IStakedToken", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "user", "type": "address" }], - "name": "getStkAaveData", - "outputs": [ - { - "components": [ - { "internalType": "uint256", "name": "stakeTokenTotalSupply", "type": "uint256" }, - { "internalType": "uint256", "name": "stakeCooldownSeconds", "type": "uint256" }, - { "internalType": "uint256", "name": "stakeUnstakeWindow", "type": "uint256" }, - { "internalType": "uint256", "name": "stakeTokenPriceEth", "type": "uint256" }, - { "internalType": "uint256", "name": "rewardTokenPriceEth", "type": "uint256" }, - { "internalType": "uint256", "name": "stakeApy", "type": "uint256" }, - { "internalType": "uint128", "name": "distributionPerSecond", "type": "uint128" }, - { "internalType": "uint256", "name": "distributionEnd", "type": "uint256" }, - { "internalType": "uint256", "name": "stakeTokenUserBalance", "type": "uint256" }, - { "internalType": "uint256", "name": "underlyingTokenUserBalance", "type": "uint256" }, - { "internalType": "uint256", "name": "userCooldown", "type": "uint256" }, - { "internalType": "uint256", "name": "userIncentivesToClaim", "type": "uint256" }, - { "internalType": "uint256", "name": "userPermitNonce", "type": "uint256" } - ], - "internalType": "struct StakeUIHelperI.AssetUIData", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "user", "type": "address" }], - "name": "getStkBptData", - "outputs": [ - { - "components": [ - { "internalType": "uint256", "name": "stakeTokenTotalSupply", "type": "uint256" }, - { "internalType": "uint256", "name": "stakeCooldownSeconds", "type": "uint256" }, - { "internalType": "uint256", "name": "stakeUnstakeWindow", "type": "uint256" }, - { "internalType": "uint256", "name": "stakeTokenPriceEth", "type": "uint256" }, - { "internalType": "uint256", "name": "rewardTokenPriceEth", "type": "uint256" }, - { "internalType": "uint256", "name": "stakeApy", "type": "uint256" }, - { "internalType": "uint128", "name": "distributionPerSecond", "type": "uint128" }, - { "internalType": "uint256", "name": "distributionEnd", "type": "uint256" }, - { "internalType": "uint256", "name": "stakeTokenUserBalance", "type": "uint256" }, - { "internalType": "uint256", "name": "underlyingTokenUserBalance", "type": "uint256" }, - { "internalType": "uint256", "name": "userCooldown", "type": "uint256" }, - { "internalType": "uint256", "name": "userIncentivesToClaim", "type": "uint256" }, - { "internalType": "uint256", "name": "userPermitNonce", "type": "uint256" } - ], - "internalType": "struct StakeUIHelperI.AssetUIData", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "user", "type": "address" }], - "name": "getUserUIData", - "outputs": [ - { - "components": [ - { "internalType": "uint256", "name": "stakeTokenTotalSupply", "type": "uint256" }, - { "internalType": "uint256", "name": "stakeCooldownSeconds", "type": "uint256" }, - { "internalType": "uint256", "name": "stakeUnstakeWindow", "type": "uint256" }, - { "internalType": "uint256", "name": "stakeTokenPriceEth", "type": "uint256" }, - { "internalType": "uint256", "name": "rewardTokenPriceEth", "type": "uint256" }, - { "internalType": "uint256", "name": "stakeApy", "type": "uint256" }, - { "internalType": "uint128", "name": "distributionPerSecond", "type": "uint128" }, - { "internalType": "uint256", "name": "distributionEnd", "type": "uint256" }, - { "internalType": "uint256", "name": "stakeTokenUserBalance", "type": "uint256" }, - { "internalType": "uint256", "name": "underlyingTokenUserBalance", "type": "uint256" }, - { "internalType": "uint256", "name": "userCooldown", "type": "uint256" }, - { "internalType": "uint256", "name": "userIncentivesToClaim", "type": "uint256" }, - { "internalType": "uint256", "name": "userPermitNonce", "type": "uint256" } - ], - "internalType": "struct StakeUIHelperI.AssetUIData", - "name": "", - "type": "tuple" - }, - { - "components": [ - { "internalType": "uint256", "name": "stakeTokenTotalSupply", "type": "uint256" }, - { "internalType": "uint256", "name": "stakeCooldownSeconds", "type": "uint256" }, - { "internalType": "uint256", "name": "stakeUnstakeWindow", "type": "uint256" }, - { "internalType": "uint256", "name": "stakeTokenPriceEth", "type": "uint256" }, - { "internalType": "uint256", "name": "rewardTokenPriceEth", "type": "uint256" }, - { "internalType": "uint256", "name": "stakeApy", "type": "uint256" }, - { "internalType": "uint128", "name": "distributionPerSecond", "type": "uint128" }, - { "internalType": "uint256", "name": "distributionEnd", "type": "uint256" }, - { "internalType": "uint256", "name": "stakeTokenUserBalance", "type": "uint256" }, - { "internalType": "uint256", "name": "underlyingTokenUserBalance", "type": "uint256" }, - { "internalType": "uint256", "name": "userCooldown", "type": "uint256" }, - { "internalType": "uint256", "name": "userIncentivesToClaim", "type": "uint256" }, - { "internalType": "uint256", "name": "userPermitNonce", "type": "uint256" } - ], - "internalType": "struct StakeUIHelperI.AssetUIData", - "name": "", - "type": "tuple" - }, - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/src/apps/aave-safety-module/contracts/viem.contract-factory.ts b/src/apps/aave-safety-module/contracts/viem.contract-factory.ts index ed7200c4f..b5a223b3c 100644 --- a/src/apps/aave-safety-module/contracts/viem.contract-factory.ts +++ b/src/apps/aave-safety-module/contracts/viem.contract-factory.ts @@ -3,13 +3,7 @@ import { Injectable, Inject } from '@nestjs/common'; import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; import { Network } from '~types/network.interface'; -import { - AaveAbpt__factory, - AaveBpt__factory, - AaveStkAave__factory, - AaveStkAbpt__factory, - AaveStkApyHelper__factory, -} from './viem'; +import { AaveStkAave__factory, AaveStkAbpt__factory } from './viem'; type ContractOpts = { address: string; network: Network }; @@ -17,19 +11,10 @@ type ContractOpts = { address: string; network: Network }; export class AaveSafetyModuleViemContractFactory { constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - aaveAbpt({ address, network }: ContractOpts) { - return AaveAbpt__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - aaveBpt({ address, network }: ContractOpts) { - return AaveBpt__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } aaveStkAave({ address, network }: ContractOpts) { return AaveStkAave__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } aaveStkAbpt({ address, network }: ContractOpts) { return AaveStkAbpt__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } - aaveStkApyHelper({ address, network }: ContractOpts) { - return AaveStkApyHelper__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } } diff --git a/src/apps/aave-safety-module/contracts/viem/AaveAbpt.ts b/src/apps/aave-safety-module/contracts/viem/AaveAbpt.ts deleted file mode 100644 index 79ce7aa2a..000000000 --- a/src/apps/aave-safety-module/contracts/viem/AaveAbpt.ts +++ /dev/null @@ -1,1277 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const aaveAbptAbi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'caller', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'oldCap', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'newCap', - type: 'uint256', - }, - ], - name: 'CapChanged', - type: 'event', - }, - { - anonymous: true, - inputs: [ - { - indexed: true, - internalType: 'bytes4', - name: 'sig', - type: 'bytes4', - }, - { - indexed: true, - internalType: 'address', - name: 'caller', - type: 'address', - }, - { - indexed: false, - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - ], - name: 'LogCall', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'caller', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'tokenOut', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'tokenAmountOut', - type: 'uint256', - }, - ], - name: 'LogExit', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'caller', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'tokenIn', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'tokenAmountIn', - type: 'uint256', - }, - ], - name: 'LogJoin', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'token', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'caller', - type: 'address', - }, - ], - name: 'NewTokenCommitted', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipTransferred', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - inputs: [], - name: 'DECIMALS', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'DEFAULT_ADD_TOKEN_TIME_LOCK_IN_BLOCKS', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'DEFAULT_MIN_WEIGHT_CHANGE_BLOCK_PERIOD', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'NAME', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'REVISION', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'addTokenTimeLockInBlocks', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'applyAddToken', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'bFactory', - outputs: [ - { - internalType: 'contract IBFactory', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'bPool', - outputs: [ - { - internalType: 'contract IBPool', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'bspCap', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'burnPoolShareFromLib', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'provider', - type: 'address', - }, - ], - name: 'canProvideLiquidity', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'token', - type: 'address', - }, - { - internalType: 'uint256', - name: 'balance', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'denormalizedWeight', - type: 'uint256', - }, - ], - name: 'commitAddToken', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'initialSupply', - type: 'uint256', - }, - ], - name: 'createPool', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'initialSupply', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'minimumWeightChangeBlockPeriodParam', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'addTokenTimeLockInBlocksParam', - type: 'uint256', - }, - ], - name: 'createPool', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'pure', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'decreaseApproval', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'poolAmountIn', - type: 'uint256', - }, - { - internalType: 'uint256[]', - name: 'minAmountsOut', - type: 'uint256[]', - }, - ], - name: 'exitPool', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'tokenOut', - type: 'address', - }, - { - internalType: 'uint256', - name: 'tokenAmountOut', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'maxPoolAmountIn', - type: 'uint256', - }, - ], - name: 'exitswapExternAmountOut', - outputs: [ - { - internalType: 'uint256', - name: 'poolAmountIn', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'tokenOut', - type: 'address', - }, - { - internalType: 'uint256', - name: 'poolAmountIn', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'minAmountOut', - type: 'uint256', - }, - ], - name: 'exitswapPoolAmountIn', - outputs: [ - { - internalType: 'uint256', - name: 'tokenAmountOut', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'getBalancerSafeMathVersion', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'pure', - type: 'function', - }, - { - inputs: [], - name: 'getController', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'token', - type: 'address', - }, - ], - name: 'getDenormalizedWeight', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getRightsManagerVersion', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'pure', - type: 'function', - }, - { - inputs: [], - name: 'getSmartPoolManagerVersion', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'pure', - type: 'function', - }, - { - inputs: [], - name: 'gradualUpdate', - outputs: [ - { - internalType: 'uint256', - name: 'startBlock', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'endBlock', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'enum RightsManager.Permissions', - name: 'permission', - type: 'uint8', - }, - ], - name: 'hasPermission', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'increaseApproval', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'factoryAddress', - type: 'address', - }, - { - components: [ - { - internalType: 'string', - name: 'poolTokenSymbol', - type: 'string', - }, - { - internalType: 'string', - name: 'poolTokenName', - type: 'string', - }, - { - internalType: 'address[]', - name: 'constituentTokens', - type: 'address[]', - }, - { - internalType: 'uint256[]', - name: 'tokenBalances', - type: 'uint256[]', - }, - { - internalType: 'uint256[]', - name: 'tokenWeights', - type: 'uint256[]', - }, - { - internalType: 'uint256', - name: 'swapFee', - type: 'uint256', - }, - ], - internalType: 'struct ConfigurableRightsPool.PoolParams', - name: 'poolParams', - type: 'tuple', - }, - { - components: [ - { - internalType: 'bool', - name: 'canPauseSwapping', - type: 'bool', - }, - { - internalType: 'bool', - name: 'canChangeSwapFee', - type: 'bool', - }, - { - internalType: 'bool', - name: 'canChangeWeights', - type: 'bool', - }, - { - internalType: 'bool', - name: 'canAddRemoveTokens', - type: 'bool', - }, - { - internalType: 'bool', - name: 'canWhitelistLPs', - type: 'bool', - }, - { - internalType: 'bool', - name: 'canChangeCap', - type: 'bool', - }, - ], - internalType: 'struct RightsManager.Rights', - name: 'rightsStruct', - type: 'tuple', - }, - ], - name: 'initialize', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'isPublicSwap', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'poolAmountOut', - type: 'uint256', - }, - { - internalType: 'uint256[]', - name: 'maxAmountsIn', - type: 'uint256[]', - }, - ], - name: 'joinPool', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'tokenIn', - type: 'address', - }, - { - internalType: 'uint256', - name: 'tokenAmountIn', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'minPoolAmountOut', - type: 'uint256', - }, - ], - name: 'joinswapExternAmountIn', - outputs: [ - { - internalType: 'uint256', - name: 'poolAmountOut', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'tokenIn', - type: 'address', - }, - { - internalType: 'uint256', - name: 'poolAmountOut', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'maxAmountIn', - type: 'uint256', - }, - ], - name: 'joinswapPoolAmountOut', - outputs: [ - { - internalType: 'uint256', - name: 'tokenAmountIn', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'minimumWeightChangeBlockPeriod', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'mintPoolShareFromLib', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'newToken', - outputs: [ - { - internalType: 'address', - name: 'addr', - type: 'address', - }, - { - internalType: 'bool', - name: 'isCommitted', - type: 'bool', - }, - { - internalType: 'uint256', - name: 'commitBlock', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'denorm', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'balance', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'pokeWeights', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'from', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'pullPoolShareFromLib', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'pushPoolShareFromLib', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'token', - type: 'address', - }, - ], - name: 'removeToken', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'provider', - type: 'address', - }, - ], - name: 'removeWhitelistedLiquidityProvider', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'rights', - outputs: [ - { - internalType: 'bool', - name: 'canPauseSwapping', - type: 'bool', - }, - { - internalType: 'bool', - name: 'canChangeSwapFee', - type: 'bool', - }, - { - internalType: 'bool', - name: 'canChangeWeights', - type: 'bool', - }, - { - internalType: 'bool', - name: 'canAddRemoveTokens', - type: 'bool', - }, - { - internalType: 'bool', - name: 'canWhitelistLPs', - type: 'bool', - }, - { - internalType: 'bool', - name: 'canChangeCap', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'newCap', - type: 'uint256', - }, - ], - name: 'setCap', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'setController', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bool', - name: 'publicSwap', - type: 'bool', - }, - ], - name: 'setPublicSwap', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'swapFee', - type: 'uint256', - }, - ], - name: 'setSwapFee', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'token', - type: 'address', - }, - { - internalType: 'uint256', - name: 'newWeight', - type: 'uint256', - }, - ], - name: 'updateWeight', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256[]', - name: 'newWeights', - type: 'uint256[]', - }, - { - internalType: 'uint256', - name: 'startBlock', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'endBlock', - type: 'uint256', - }, - ], - name: 'updateWeightsGradually', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'provider', - type: 'address', - }, - ], - name: 'whitelistLiquidityProvider', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type AaveAbpt = typeof aaveAbptAbi; -export type AaveAbptContract = GetContractReturnType; - -export class AaveAbpt__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: aaveAbptAbi, publicClient: client }); - } -} diff --git a/src/apps/aave-safety-module/contracts/viem/AaveBpt.ts b/src/apps/aave-safety-module/contracts/viem/AaveBpt.ts deleted file mode 100644 index 0350dd330..000000000 --- a/src/apps/aave-safety-module/contracts/viem/AaveBpt.ts +++ /dev/null @@ -1,1644 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const aaveBptAbi = [ - { - inputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'src', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'dst', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amt', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: true, - inputs: [ - { - indexed: true, - internalType: 'bytes4', - name: 'sig', - type: 'bytes4', - }, - { - indexed: true, - internalType: 'address', - name: 'caller', - type: 'address', - }, - { - indexed: false, - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - ], - name: 'LOG_CALL', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'caller', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'tokenOut', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'tokenAmountOut', - type: 'uint256', - }, - ], - name: 'LOG_EXIT', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'caller', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'tokenIn', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'tokenAmountIn', - type: 'uint256', - }, - ], - name: 'LOG_JOIN', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'caller', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'tokenIn', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'tokenOut', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'tokenAmountIn', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'tokenAmountOut', - type: 'uint256', - }, - ], - name: 'LOG_SWAP', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'src', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'dst', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amt', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - constant: true, - inputs: [], - name: 'BONE', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'BPOW_PRECISION', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'EXIT_FEE', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'INIT_POOL_SUPPLY', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'MAX_BOUND_TOKENS', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'MAX_BPOW_BASE', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'MAX_FEE', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'MAX_IN_RATIO', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'MAX_OUT_RATIO', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'MAX_TOTAL_WEIGHT', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'MAX_WEIGHT', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'MIN_BALANCE', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'MIN_BOUND_TOKENS', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'MIN_BPOW_BASE', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'MIN_FEE', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'MIN_WEIGHT', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'address', - name: 'src', - type: 'address', - }, - { - internalType: 'address', - name: 'dst', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address', - name: 'dst', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amt', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'address', - name: 'whom', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address', - name: 'token', - type: 'address', - }, - { - internalType: 'uint256', - name: 'balance', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'denorm', - type: 'uint256', - }, - ], - name: 'bind', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'uint256', - name: 'tokenBalanceIn', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'tokenWeightIn', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'tokenBalanceOut', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'tokenWeightOut', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'tokenAmountOut', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'swapFee', - type: 'uint256', - }, - ], - name: 'calcInGivenOut', - outputs: [ - { - internalType: 'uint256', - name: 'tokenAmountIn', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'pure', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'uint256', - name: 'tokenBalanceIn', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'tokenWeightIn', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'tokenBalanceOut', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'tokenWeightOut', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'tokenAmountIn', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'swapFee', - type: 'uint256', - }, - ], - name: 'calcOutGivenIn', - outputs: [ - { - internalType: 'uint256', - name: 'tokenAmountOut', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'pure', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'uint256', - name: 'tokenBalanceOut', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'tokenWeightOut', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'poolSupply', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'totalWeight', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'tokenAmountOut', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'swapFee', - type: 'uint256', - }, - ], - name: 'calcPoolInGivenSingleOut', - outputs: [ - { - internalType: 'uint256', - name: 'poolAmountIn', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'pure', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'uint256', - name: 'tokenBalanceIn', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'tokenWeightIn', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'poolSupply', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'totalWeight', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'tokenAmountIn', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'swapFee', - type: 'uint256', - }, - ], - name: 'calcPoolOutGivenSingleIn', - outputs: [ - { - internalType: 'uint256', - name: 'poolAmountOut', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'pure', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'uint256', - name: 'tokenBalanceIn', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'tokenWeightIn', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'poolSupply', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'totalWeight', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'poolAmountOut', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'swapFee', - type: 'uint256', - }, - ], - name: 'calcSingleInGivenPoolOut', - outputs: [ - { - internalType: 'uint256', - name: 'tokenAmountIn', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'pure', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'uint256', - name: 'tokenBalanceOut', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'tokenWeightOut', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'poolSupply', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'totalWeight', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'poolAmountIn', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'swapFee', - type: 'uint256', - }, - ], - name: 'calcSingleOutGivenPoolIn', - outputs: [ - { - internalType: 'uint256', - name: 'tokenAmountOut', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'pure', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'uint256', - name: 'tokenBalanceIn', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'tokenWeightIn', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'tokenBalanceOut', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'tokenWeightOut', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'swapFee', - type: 'uint256', - }, - ], - name: 'calcSpotPrice', - outputs: [ - { - internalType: 'uint256', - name: 'spotPrice', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'pure', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address', - name: 'dst', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amt', - type: 'uint256', - }, - ], - name: 'decreaseApproval', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'uint256', - name: 'poolAmountIn', - type: 'uint256', - }, - { - internalType: 'uint256[]', - name: 'minAmountsOut', - type: 'uint256[]', - }, - ], - name: 'exitPool', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address', - name: 'tokenOut', - type: 'address', - }, - { - internalType: 'uint256', - name: 'tokenAmountOut', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'maxPoolAmountIn', - type: 'uint256', - }, - ], - name: 'exitswapExternAmountOut', - outputs: [ - { - internalType: 'uint256', - name: 'poolAmountIn', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address', - name: 'tokenOut', - type: 'address', - }, - { - internalType: 'uint256', - name: 'poolAmountIn', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'minAmountOut', - type: 'uint256', - }, - ], - name: 'exitswapPoolAmountIn', - outputs: [ - { - internalType: 'uint256', - name: 'tokenAmountOut', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [], - name: 'finalize', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'address', - name: 'token', - type: 'address', - }, - ], - name: 'getBalance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'getColor', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'getController', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'getCurrentTokens', - outputs: [ - { - internalType: 'address[]', - name: 'tokens', - type: 'address[]', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'address', - name: 'token', - type: 'address', - }, - ], - name: 'getDenormalizedWeight', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'getFinalTokens', - outputs: [ - { - internalType: 'address[]', - name: 'tokens', - type: 'address[]', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'address', - name: 'token', - type: 'address', - }, - ], - name: 'getNormalizedWeight', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'getNumTokens', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'address', - name: 'tokenIn', - type: 'address', - }, - { - internalType: 'address', - name: 'tokenOut', - type: 'address', - }, - ], - name: 'getSpotPrice', - outputs: [ - { - internalType: 'uint256', - name: 'spotPrice', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'address', - name: 'tokenIn', - type: 'address', - }, - { - internalType: 'address', - name: 'tokenOut', - type: 'address', - }, - ], - name: 'getSpotPriceSansFee', - outputs: [ - { - internalType: 'uint256', - name: 'spotPrice', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'getSwapFee', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'getTotalDenormalizedWeight', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address', - name: 'token', - type: 'address', - }, - ], - name: 'gulp', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address', - name: 'dst', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amt', - type: 'uint256', - }, - ], - name: 'increaseApproval', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'address', - name: 't', - type: 'address', - }, - ], - name: 'isBound', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'isFinalized', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'isPublicSwap', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'uint256', - name: 'poolAmountOut', - type: 'uint256', - }, - { - internalType: 'uint256[]', - name: 'maxAmountsIn', - type: 'uint256[]', - }, - ], - name: 'joinPool', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address', - name: 'tokenIn', - type: 'address', - }, - { - internalType: 'uint256', - name: 'tokenAmountIn', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'minPoolAmountOut', - type: 'uint256', - }, - ], - name: 'joinswapExternAmountIn', - outputs: [ - { - internalType: 'uint256', - name: 'poolAmountOut', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address', - name: 'tokenIn', - type: 'address', - }, - { - internalType: 'uint256', - name: 'poolAmountOut', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'maxAmountIn', - type: 'uint256', - }, - ], - name: 'joinswapPoolAmountOut', - outputs: [ - { - internalType: 'uint256', - name: 'tokenAmountIn', - 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: false, - inputs: [ - { - internalType: 'address', - name: 'token', - type: 'address', - }, - { - internalType: 'uint256', - name: 'balance', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'denorm', - type: 'uint256', - }, - ], - name: 'rebind', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address', - name: 'manager', - type: 'address', - }, - ], - name: 'setController', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'bool', - name: 'public_', - type: 'bool', - }, - ], - name: 'setPublicSwap', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'uint256', - name: 'swapFee', - type: 'uint256', - }, - ], - name: 'setSwapFee', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address', - name: 'tokenIn', - type: 'address', - }, - { - internalType: 'uint256', - name: 'tokenAmountIn', - type: 'uint256', - }, - { - internalType: 'address', - name: 'tokenOut', - type: 'address', - }, - { - internalType: 'uint256', - name: 'minAmountOut', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'maxPrice', - type: 'uint256', - }, - ], - name: 'swapExactAmountIn', - outputs: [ - { - internalType: 'uint256', - name: 'tokenAmountOut', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'spotPriceAfter', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address', - name: 'tokenIn', - type: 'address', - }, - { - internalType: 'uint256', - name: 'maxAmountIn', - type: 'uint256', - }, - { - internalType: 'address', - name: 'tokenOut', - type: 'address', - }, - { - internalType: 'uint256', - name: 'tokenAmountOut', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'maxPrice', - type: 'uint256', - }, - ], - name: 'swapExactAmountOut', - outputs: [ - { - internalType: 'uint256', - name: 'tokenAmountIn', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'spotPriceAfter', - type: 'uint256', - }, - ], - 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: '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: 'amt', - 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: 'amt', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address', - name: 'token', - type: 'address', - }, - ], - name: 'unbind', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type AaveBpt = typeof aaveBptAbi; -export type AaveBptContract = GetContractReturnType; - -export class AaveBpt__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: aaveBptAbi, publicClient: client }); - } -} diff --git a/src/apps/aave-safety-module/contracts/viem/AaveStkApyHelper.ts b/src/apps/aave-safety-module/contracts/viem/AaveStkApyHelper.ts deleted file mode 100644 index 731484d91..000000000 --- a/src/apps/aave-safety-module/contracts/viem/AaveStkApyHelper.ts +++ /dev/null @@ -1,465 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const aaveStkApyHelperAbi = [ - { - inputs: [ - { - internalType: 'contract IPriceOracle', - name: 'priceOracle', - type: 'address', - }, - { - internalType: 'contract BPTPriceFeedI', - name: 'bptPriceFeed', - type: 'address', - }, - { - internalType: 'address', - name: 'aave', - type: 'address', - }, - { - internalType: 'contract IStakedToken', - name: 'stkAave', - type: 'address', - }, - { - internalType: 'address', - name: 'bpt', - type: 'address', - }, - { - internalType: 'contract IStakedToken', - name: 'stkBpt', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - inputs: [], - name: 'AAVE', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'BPT', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'BPT_PRICE_FEED', - outputs: [ - { - internalType: 'contract BPTPriceFeedI', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'PRICE_ORACLE', - outputs: [ - { - internalType: 'contract IPriceOracle', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'STAKED_AAVE', - outputs: [ - { - internalType: 'contract IStakedToken', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'STAKED_BPT', - outputs: [ - { - internalType: 'contract IStakedToken', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'user', - type: 'address', - }, - ], - name: 'getStkAaveData', - outputs: [ - { - components: [ - { - internalType: 'uint256', - name: 'stakeTokenTotalSupply', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'stakeCooldownSeconds', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'stakeUnstakeWindow', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'stakeTokenPriceEth', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'rewardTokenPriceEth', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'stakeApy', - type: 'uint256', - }, - { - internalType: 'uint128', - name: 'distributionPerSecond', - type: 'uint128', - }, - { - internalType: 'uint256', - name: 'distributionEnd', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'stakeTokenUserBalance', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'underlyingTokenUserBalance', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'userCooldown', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'userIncentivesToClaim', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'userPermitNonce', - type: 'uint256', - }, - ], - internalType: 'struct StakeUIHelperI.AssetUIData', - name: '', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'user', - type: 'address', - }, - ], - name: 'getStkBptData', - outputs: [ - { - components: [ - { - internalType: 'uint256', - name: 'stakeTokenTotalSupply', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'stakeCooldownSeconds', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'stakeUnstakeWindow', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'stakeTokenPriceEth', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'rewardTokenPriceEth', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'stakeApy', - type: 'uint256', - }, - { - internalType: 'uint128', - name: 'distributionPerSecond', - type: 'uint128', - }, - { - internalType: 'uint256', - name: 'distributionEnd', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'stakeTokenUserBalance', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'underlyingTokenUserBalance', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'userCooldown', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'userIncentivesToClaim', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'userPermitNonce', - type: 'uint256', - }, - ], - internalType: 'struct StakeUIHelperI.AssetUIData', - name: '', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'user', - type: 'address', - }, - ], - name: 'getUserUIData', - outputs: [ - { - components: [ - { - internalType: 'uint256', - name: 'stakeTokenTotalSupply', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'stakeCooldownSeconds', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'stakeUnstakeWindow', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'stakeTokenPriceEth', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'rewardTokenPriceEth', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'stakeApy', - type: 'uint256', - }, - { - internalType: 'uint128', - name: 'distributionPerSecond', - type: 'uint128', - }, - { - internalType: 'uint256', - name: 'distributionEnd', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'stakeTokenUserBalance', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'underlyingTokenUserBalance', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'userCooldown', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'userIncentivesToClaim', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'userPermitNonce', - type: 'uint256', - }, - ], - internalType: 'struct StakeUIHelperI.AssetUIData', - name: '', - type: 'tuple', - }, - { - components: [ - { - internalType: 'uint256', - name: 'stakeTokenTotalSupply', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'stakeCooldownSeconds', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'stakeUnstakeWindow', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'stakeTokenPriceEth', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'rewardTokenPriceEth', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'stakeApy', - type: 'uint256', - }, - { - internalType: 'uint128', - name: 'distributionPerSecond', - type: 'uint128', - }, - { - internalType: 'uint256', - name: 'distributionEnd', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'stakeTokenUserBalance', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'underlyingTokenUserBalance', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'userCooldown', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'userIncentivesToClaim', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'userPermitNonce', - type: 'uint256', - }, - ], - internalType: 'struct StakeUIHelperI.AssetUIData', - name: '', - type: 'tuple', - }, - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, -] as const; - -export type AaveStkApyHelper = typeof aaveStkApyHelperAbi; -export type AaveStkApyHelperContract = GetContractReturnType; - -export class AaveStkApyHelper__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: aaveStkApyHelperAbi, publicClient: client }); - } -} diff --git a/src/apps/aave-safety-module/contracts/viem/index.ts b/src/apps/aave-safety-module/contracts/viem/index.ts index 8a6061d71..a2aa0266f 100644 --- a/src/apps/aave-safety-module/contracts/viem/index.ts +++ b/src/apps/aave-safety-module/contracts/viem/index.ts @@ -2,14 +2,8 @@ /* tslint:disable */ /* eslint-disable */ -export type { AaveAbpt } from './AaveAbpt'; -export type { AaveBpt } from './AaveBpt'; export type { AaveStkAave } from './AaveStkAave'; export type { AaveStkAbpt } from './AaveStkAbpt'; -export type { AaveStkApyHelper } from './AaveStkApyHelper'; -export { AaveAbpt__factory } from './AaveAbpt'; -export { AaveBpt__factory } from './AaveBpt'; export { AaveStkAave__factory } from './AaveStkAave'; export { AaveStkAbpt__factory } from './AaveStkAbpt'; -export { AaveStkApyHelper__factory } from './AaveStkApyHelper'; diff --git a/src/apps/aave-safety-module/ethereum/aave-safety-module.abpt.token-fetcher.ts b/src/apps/aave-safety-module/ethereum/aave-safety-module.abpt.token-fetcher.ts deleted file mode 100644 index b098cb8f0..000000000 --- a/src/apps/aave-safety-module/ethereum/aave-safety-module.abpt.token-fetcher.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { Inject } from '@nestjs/common'; -import { sum } from 'lodash'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { getLabelFromToken } from '~app-toolkit/helpers/presentation/image.present'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { - DefaultAppTokenDataProps, - GetDataPropsParams, - GetDisplayPropsParams, - GetPricePerShareParams, - GetUnderlyingTokensParams, -} from '~position/template/app-token.template.types'; - -import { AaveSafetyModuleViemContractFactory } from '../contracts'; -import { AaveAbpt } from '../contracts/viem'; - -type AaveSafetyModuleAbptTokenDataProps = DefaultAppTokenDataProps & { - fee: number; -}; - -@PositionTemplate() -export class EthereumAaveSafetyModuleAbptTokenFetcher extends AppTokenTemplatePositionFetcher< - AaveAbpt, - AaveSafetyModuleAbptTokenDataProps -> { - groupLabel = 'ABPT'; - - readonly bptAddress = '0xc697051d1c6296c24ae3bcef39aca743861d9a81'; - readonly abptAddress = '0x41a08648c3766f9f9d85598ff102a08f4ef84f84'; - readonly aaveAddress = '0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9'; - readonly wethAddress = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(AaveSafetyModuleViemContractFactory) - protected readonly contractFactory: AaveSafetyModuleViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.aaveAbpt({ address, network: this.network }); - } - - async getAddresses(): Promise { - return ['0x41a08648c3766f9f9d85598ff102a08f4ef84f84']; - } - - async getUnderlyingTokenDefinitions(_params: GetUnderlyingTokensParams) { - return [ - { address: this.aaveAddress, network: this.network }, - { address: this.wethAddress, network: this.network }, - ]; - } - - async getPricePerShare({ - appToken, - multicall, - }: GetPricePerShareParams) { - const poolToken = this.contractFactory.aaveBpt({ - address: this.bptAddress, - network: this.network, - }); - - const [wethReserveRaw, aaveReserveRaw] = await Promise.all([ - multicall.wrap(poolToken).read.getBalance([this.wethAddress]), - multicall.wrap(poolToken).read.getBalance([this.aaveAddress]), - ]); - - const aaveReserve = Number(aaveReserveRaw) / 10 ** 18; - const wethReserve = Number(wethReserveRaw) / 10 ** 18; - return [aaveReserve / appToken.supply, wethReserve / appToken.supply]; - } - - async getLiquidity({ appToken }: GetDataPropsParams) { - const reserves = (appToken.pricePerShare as number[]).map(v => v * appToken.supply); - const liquidity = sum(reserves.map((v, i) => v * appToken.tokens[i].price)); - return liquidity; - } - - async getDataProps(params: GetDataPropsParams) { - const defaultDataProps = await super.getDataProps(params); - return { ...defaultDataProps, fee: 0.003 }; - } - - async getLabel({ appToken }: GetDisplayPropsParams) { - return appToken.tokens.map(v => getLabelFromToken(v)).join(' / '); - } - - async getSecondaryLabel({ appToken }: GetDisplayPropsParams) { - const { reserves, liquidity } = appToken.dataProps; - const reservePercentages = appToken.tokens.map((t, i) => reserves[i] * (t.price / liquidity)); - return reservePercentages.map(p => `${Math.round(p * 100)}%`).join(' / '); - } -} diff --git a/src/apps/across/across.module.ts b/src/apps/across/across.module.ts index 157a8fcf7..7a1cd8a9a 100644 --- a/src/apps/across/across.module.ts +++ b/src/apps/across/across.module.ts @@ -3,16 +3,10 @@ import { Module } from '@nestjs/common'; import { AbstractApp } from '~app/app.dynamic-module'; import { AcrossViemContractFactory } from './contracts'; -import { EthereumAcrossPoolV1TokenFetcher } from './ethereum/across.pool-v1.token-fetcher'; import { EthereumAcrossPoolV2TokenFetcher } from './ethereum/across.pool-v2.token-fetcher'; import { EthereumStakingContractPositionFetcher } from './ethereum/across.staking.contract-position-fetcher'; @Module({ - providers: [ - AcrossViemContractFactory, - EthereumAcrossPoolV1TokenFetcher, - EthereumAcrossPoolV2TokenFetcher, - EthereumStakingContractPositionFetcher, - ], + providers: [AcrossViemContractFactory, EthereumAcrossPoolV2TokenFetcher, EthereumStakingContractPositionFetcher], }) export class AcrossAppModule extends AbstractApp() {} diff --git a/src/apps/across/common/across.pool-v1.token-fetcher.ts b/src/apps/across/common/across.pool-v1.token-fetcher.ts deleted file mode 100644 index fd3f9a2dc..000000000 --- a/src/apps/across/common/across.pool-v1.token-fetcher.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { getLabelFromToken } from '~app-toolkit/helpers/presentation/image.present'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { - GetDataPropsParams, - GetDisplayPropsParams, - GetPricePerShareParams, - GetUnderlyingTokensParams, -} from '~position/template/app-token.template.types'; - -import { AcrossViemContractFactory } from '../contracts'; -import { AcrossPoolV1 } from '../contracts/viem/AcrossPoolV1'; - -export abstract class AcrossPoolV1TokenFetcher extends AppTokenTemplatePositionFetcher { - abstract poolAddresses: string[]; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(AcrossViemContractFactory) protected readonly contractFactory: AcrossViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.acrossPoolV1({ network: this.network, address }); - } - - async getAddresses() { - return this.poolAddresses; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.l1Token(), network: this.network }]; - } - - async getPricePerShare({ contract, appToken, multicall }: GetPricePerShareParams) { - const pricePerShareRaw = await multicall - .wrap(contract) - .simulate.exchangeRateCurrent() - .then(v => v.result); - const decimals = appToken.tokens[0].decimals; - return [Number(pricePerShareRaw) / 10 ** decimals]; - } - - async getLiquidity({ contract, appToken }: GetDataPropsParams) { - const reserveRaw = await contract.read.liquidReserves(); - const reserve = Number(reserveRaw) / 10 ** appToken.tokens[0].decimals; - return reserve * appToken.tokens[0].price; - } - - async getReserves({ contract, appToken }: GetDataPropsParams) { - const reserveRaw = await contract.read.liquidReserves(); - return [Number(reserveRaw) / 10 ** appToken.tokens[0].decimals]; - } - - async getLabel({ appToken }: GetDisplayPropsParams): Promise { - return getLabelFromToken(appToken.tokens[0]); - } -} diff --git a/src/apps/across/contracts/abis/across-pool-v-1.json b/src/apps/across/contracts/abis/across-pool-v-1.json deleted file mode 100644 index c605e0770..000000000 --- a/src/apps/across/contracts/abis/across-pool-v-1.json +++ /dev/null @@ -1,1635 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "string", - "name": "_lpTokenName", - "type": "string" - }, - { - "internalType": "string", - "name": "_lpTokenSymbol", - "type": "string" - }, - { - "internalType": "address", - "name": "_bridgeAdmin", - "type": "address" - }, - { - "internalType": "address", - "name": "_l1Token", - "type": "address" - }, - { - "internalType": "uint64", - "name": "_lpFeeRatePerSecond", - "type": "uint64" - }, - { - "internalType": "bool", - "name": "_isWethPool", - "type": "bool" - }, - { - "internalType": "address", - "name": "_timer", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "BridgePoolAdminTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "depositHash", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "uint64", - "name": "depositId", - "type": "uint64" - }, - { - "internalType": "address payable", - "name": "l1Recipient", - "type": "address" - }, - { - "internalType": "address", - "name": "l2Sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint64", - "name": "slowRelayFeePct", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "instantRelayFeePct", - "type": "uint64" - }, - { - "internalType": "uint32", - "name": "quoteTimestamp", - "type": "uint32" - } - ], - "indexed": false, - "internalType": "struct BridgePool.DepositData", - "name": "depositData", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "enum BridgePool.RelayState", - "name": "relayState", - "type": "uint8" - }, - { - "internalType": "address", - "name": "slowRelayer", - "type": "address" - }, - { - "internalType": "uint32", - "name": "relayId", - "type": "uint32" - }, - { - "internalType": "uint64", - "name": "realizedLpFeePct", - "type": "uint64" - }, - { - "internalType": "uint32", - "name": "priceRequestTime", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "proposerBond", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "finalFee", - "type": "uint256" - } - ], - "indexed": false, - "internalType": "struct BridgePool.RelayData", - "name": "relay", - "type": "tuple" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "relayAncillaryDataHash", - "type": "bytes32" - } - ], - "name": "DepositRelayed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "lpTokensMinted", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "liquidityProvider", - "type": "address" - } - ], - "name": "LiquidityAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "lpTokensBurnt", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "liquidityProvider", - "type": "address" - } - ], - "name": "LiquidityRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "depositHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "relayHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "disputer", - "type": "address" - } - ], - "name": "RelayCanceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "depositHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "relayHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "disputer", - "type": "address" - } - ], - "name": "RelayDisputed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "depositHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "components": [ - { - "internalType": "enum BridgePool.RelayState", - "name": "relayState", - "type": "uint8" - }, - { - "internalType": "address", - "name": "slowRelayer", - "type": "address" - }, - { - "internalType": "uint32", - "name": "relayId", - "type": "uint32" - }, - { - "internalType": "uint64", - "name": "realizedLpFeePct", - "type": "uint64" - }, - { - "internalType": "uint32", - "name": "priceRequestTime", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "proposerBond", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "finalFee", - "type": "uint256" - } - ], - "indexed": false, - "internalType": "struct BridgePool.RelayData", - "name": "relay", - "type": "tuple" - } - ], - "name": "RelaySettled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "depositHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "instantRelayer", - "type": "address" - }, - { - "components": [ - { - "internalType": "enum BridgePool.RelayState", - "name": "relayState", - "type": "uint8" - }, - { - "internalType": "address", - "name": "slowRelayer", - "type": "address" - }, - { - "internalType": "uint32", - "name": "relayId", - "type": "uint32" - }, - { - "internalType": "uint64", - "name": "realizedLpFeePct", - "type": "uint64" - }, - { - "internalType": "uint32", - "name": "priceRequestTime", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "proposerBond", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "finalFee", - "type": "uint256" - } - ], - "indexed": false, - "internalType": "struct BridgePool.RelayData", - "name": "relay", - "type": "tuple" - } - ], - "name": "RelaySpedUp", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "l1TokenAmount", - "type": "uint256" - } - ], - "name": "addLiquidity", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "bonds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "bridgeAdmin", - "outputs": [ - { - "internalType": "contract BridgeAdminInterface", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_newAdmin", - "type": "address" - } - ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "uint64", - "name": "depositId", - "type": "uint64" - }, - { - "internalType": "address payable", - "name": "l1Recipient", - "type": "address" - }, - { - "internalType": "address", - "name": "l2Sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint64", - "name": "slowRelayFeePct", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "instantRelayFeePct", - "type": "uint64" - }, - { - "internalType": "uint32", - "name": "quoteTimestamp", - "type": "uint32" - } - ], - "internalType": "struct BridgePool.DepositData", - "name": "depositData", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "enum BridgePool.RelayState", - "name": "relayState", - "type": "uint8" - }, - { - "internalType": "address", - "name": "slowRelayer", - "type": "address" - }, - { - "internalType": "uint32", - "name": "relayId", - "type": "uint32" - }, - { - "internalType": "uint64", - "name": "realizedLpFeePct", - "type": "uint64" - }, - { - "internalType": "uint32", - "name": "priceRequestTime", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "proposerBond", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "finalFee", - "type": "uint256" - } - ], - "internalType": "struct BridgePool.RelayData", - "name": "relayData", - "type": "tuple" - } - ], - "name": "disputeRelay", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getAccumulatedFees", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getCurrentTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "relayedAmount", - "type": "uint256" - } - ], - "name": "getLiquidityUtilization", - "outputs": [ - { - "internalType": "uint256", - "name": "utilizationCurrent", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "utilizationPostRelay", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "uint64", - "name": "depositId", - "type": "uint64" - }, - { - "internalType": "address payable", - "name": "l1Recipient", - "type": "address" - }, - { - "internalType": "address", - "name": "l2Sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint64", - "name": "slowRelayFeePct", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "instantRelayFeePct", - "type": "uint64" - }, - { - "internalType": "uint32", - "name": "quoteTimestamp", - "type": "uint32" - } - ], - "internalType": "struct BridgePool.DepositData", - "name": "depositData", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "enum BridgePool.RelayState", - "name": "relayState", - "type": "uint8" - }, - { - "internalType": "address", - "name": "slowRelayer", - "type": "address" - }, - { - "internalType": "uint32", - "name": "relayId", - "type": "uint32" - }, - { - "internalType": "uint64", - "name": "realizedLpFeePct", - "type": "uint64" - }, - { - "internalType": "uint32", - "name": "priceRequestTime", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "proposerBond", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "finalFee", - "type": "uint256" - } - ], - "internalType": "struct BridgePool.RelayData", - "name": "relayData", - "type": "tuple" - } - ], - "name": "getRelayAncillaryData", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "identifier", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "instantRelays", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "isWethPool", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "l1Token", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastLpFeeUpdate", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "liquidReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "liquidityUtilizationCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "relayedAmount", - "type": "uint256" - } - ], - "name": "liquidityUtilizationPostRelay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "lpFeeRatePerSecond", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes[]", - "name": "data", - "type": "bytes[]" - } - ], - "name": "multicall", - "outputs": [ - { - "internalType": "bytes[]", - "name": "results", - "type": "bytes[]" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "numberOfRelays", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "optimisticOracle", - "outputs": [ - { - "internalType": "contract SkinnyOptimisticOracleInterface", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "optimisticOracleLiveness", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pendingReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proposerBondPct", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "uint64", - "name": "depositId", - "type": "uint64" - }, - { - "internalType": "address payable", - "name": "l1Recipient", - "type": "address" - }, - { - "internalType": "address", - "name": "l2Sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint64", - "name": "slowRelayFeePct", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "instantRelayFeePct", - "type": "uint64" - }, - { - "internalType": "uint32", - "name": "quoteTimestamp", - "type": "uint32" - } - ], - "internalType": "struct BridgePool.DepositData", - "name": "depositData", - "type": "tuple" - }, - { - "internalType": "uint64", - "name": "realizedLpFeePct", - "type": "uint64" - } - ], - "name": "relayAndSpeedUp", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "uint64", - "name": "depositId", - "type": "uint64" - }, - { - "internalType": "address payable", - "name": "l1Recipient", - "type": "address" - }, - { - "internalType": "address", - "name": "l2Sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint64", - "name": "slowRelayFeePct", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "instantRelayFeePct", - "type": "uint64" - }, - { - "internalType": "uint32", - "name": "quoteTimestamp", - "type": "uint32" - } - ], - "internalType": "struct BridgePool.DepositData", - "name": "depositData", - "type": "tuple" - }, - { - "internalType": "uint64", - "name": "realizedLpFeePct", - "type": "uint64" - } - ], - "name": "relayDeposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "relays", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "lpTokenAmount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "sendEth", - "type": "bool" - } - ], - "name": "removeLiquidity", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "time", - "type": "uint256" - } - ], - "name": "setCurrentTime", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "uint64", - "name": "depositId", - "type": "uint64" - }, - { - "internalType": "address payable", - "name": "l1Recipient", - "type": "address" - }, - { - "internalType": "address", - "name": "l2Sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint64", - "name": "slowRelayFeePct", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "instantRelayFeePct", - "type": "uint64" - }, - { - "internalType": "uint32", - "name": "quoteTimestamp", - "type": "uint32" - } - ], - "internalType": "struct BridgePool.DepositData", - "name": "depositData", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "enum BridgePool.RelayState", - "name": "relayState", - "type": "uint8" - }, - { - "internalType": "address", - "name": "slowRelayer", - "type": "address" - }, - { - "internalType": "uint32", - "name": "relayId", - "type": "uint32" - }, - { - "internalType": "uint64", - "name": "realizedLpFeePct", - "type": "uint64" - }, - { - "internalType": "uint32", - "name": "priceRequestTime", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "proposerBond", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "finalFee", - "type": "uint256" - } - ], - "internalType": "struct BridgePool.RelayData", - "name": "relayData", - "type": "tuple" - } - ], - "name": "settleRelay", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "uint64", - "name": "depositId", - "type": "uint64" - }, - { - "internalType": "address payable", - "name": "l1Recipient", - "type": "address" - }, - { - "internalType": "address", - "name": "l2Sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint64", - "name": "slowRelayFeePct", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "instantRelayFeePct", - "type": "uint64" - }, - { - "internalType": "uint32", - "name": "quoteTimestamp", - "type": "uint32" - } - ], - "internalType": "struct BridgePool.DepositData", - "name": "depositData", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "enum BridgePool.RelayState", - "name": "relayState", - "type": "uint8" - }, - { - "internalType": "address", - "name": "slowRelayer", - "type": "address" - }, - { - "internalType": "uint32", - "name": "relayId", - "type": "uint32" - }, - { - "internalType": "uint64", - "name": "realizedLpFeePct", - "type": "uint64" - }, - { - "internalType": "uint32", - "name": "priceRequestTime", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "proposerBond", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "finalFee", - "type": "uint256" - } - ], - "internalType": "struct BridgePool.RelayData", - "name": "relayData", - "type": "tuple" - } - ], - "name": "speedUpRelay", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "store", - "outputs": [ - { - "internalType": "contract StoreInterface", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "sync", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "syncUmaEcosystemParams", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "syncWithBridgeAdminParams", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "timerAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "undistributedLpFees", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "utilizedReserves", - "outputs": [ - { - "internalType": "int256", - "name": "", - "type": "int256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } -] diff --git a/src/apps/across/contracts/viem.contract-factory.ts b/src/apps/across/contracts/viem.contract-factory.ts index 88729eb7f..3de7608f2 100644 --- a/src/apps/across/contracts/viem.contract-factory.ts +++ b/src/apps/across/contracts/viem.contract-factory.ts @@ -3,7 +3,7 @@ import { Injectable, Inject } from '@nestjs/common'; import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; import { Network } from '~types/network.interface'; -import { AcrossHubPoolV2__factory, AcrossPoolV1__factory, AcrossPoolV2__factory, AcrossStaking__factory } from './viem'; +import { AcrossHubPoolV2__factory, AcrossPoolV2__factory, AcrossStaking__factory } from './viem'; type ContractOpts = { address: string; network: Network }; @@ -14,9 +14,6 @@ export class AcrossViemContractFactory { acrossHubPoolV2({ address, network }: ContractOpts) { return AcrossHubPoolV2__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } - acrossPoolV1({ address, network }: ContractOpts) { - return AcrossPoolV1__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } acrossPoolV2({ address, network }: ContractOpts) { return AcrossPoolV2__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } diff --git a/src/apps/across/contracts/viem/AcrossPoolV1.ts b/src/apps/across/contracts/viem/AcrossPoolV1.ts deleted file mode 100644 index 069613b71..000000000 --- a/src/apps/across/contracts/viem/AcrossPoolV1.ts +++ /dev/null @@ -1,1649 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const acrossPoolV1Abi = [ - { - inputs: [ - { - internalType: 'string', - name: '_lpTokenName', - type: 'string', - }, - { - internalType: 'string', - name: '_lpTokenSymbol', - type: 'string', - }, - { - internalType: 'address', - name: '_bridgeAdmin', - type: 'address', - }, - { - internalType: 'address', - name: '_l1Token', - type: 'address', - }, - { - internalType: 'uint64', - name: '_lpFeeRatePerSecond', - type: 'uint64', - }, - { - internalType: 'bool', - name: '_isWethPool', - type: 'bool', - }, - { - internalType: 'address', - name: '_timer', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'oldAdmin', - type: 'address', - }, - { - indexed: false, - internalType: 'address', - name: 'newAdmin', - type: 'address', - }, - ], - name: 'BridgePoolAdminTransferred', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: 'depositHash', - type: 'bytes32', - }, - { - components: [ - { - internalType: 'uint256', - name: 'chainId', - type: 'uint256', - }, - { - internalType: 'uint64', - name: 'depositId', - type: 'uint64', - }, - { - internalType: 'address payable', - name: 'l1Recipient', - type: 'address', - }, - { - internalType: 'address', - name: 'l2Sender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'uint64', - name: 'slowRelayFeePct', - type: 'uint64', - }, - { - internalType: 'uint64', - name: 'instantRelayFeePct', - type: 'uint64', - }, - { - internalType: 'uint32', - name: 'quoteTimestamp', - type: 'uint32', - }, - ], - indexed: false, - internalType: 'struct BridgePool.DepositData', - name: 'depositData', - type: 'tuple', - }, - { - components: [ - { - internalType: 'enum BridgePool.RelayState', - name: 'relayState', - type: 'uint8', - }, - { - internalType: 'address', - name: 'slowRelayer', - type: 'address', - }, - { - internalType: 'uint32', - name: 'relayId', - type: 'uint32', - }, - { - internalType: 'uint64', - name: 'realizedLpFeePct', - type: 'uint64', - }, - { - internalType: 'uint32', - name: 'priceRequestTime', - type: 'uint32', - }, - { - internalType: 'uint256', - name: 'proposerBond', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'finalFee', - type: 'uint256', - }, - ], - indexed: false, - internalType: 'struct BridgePool.RelayData', - name: 'relay', - type: 'tuple', - }, - { - indexed: false, - internalType: 'bytes32', - name: 'relayAncillaryDataHash', - type: 'bytes32', - }, - ], - name: 'DepositRelayed', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'lpTokensMinted', - type: 'uint256', - }, - { - indexed: true, - internalType: 'address', - name: 'liquidityProvider', - type: 'address', - }, - ], - name: 'LiquidityAdded', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'lpTokensBurnt', - type: 'uint256', - }, - { - indexed: true, - internalType: 'address', - name: 'liquidityProvider', - type: 'address', - }, - ], - name: 'LiquidityRemoved', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: 'depositHash', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'bytes32', - name: 'relayHash', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'address', - name: 'disputer', - type: 'address', - }, - ], - name: 'RelayCanceled', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: 'depositHash', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'bytes32', - name: 'relayHash', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'address', - name: 'disputer', - type: 'address', - }, - ], - name: 'RelayDisputed', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: 'depositHash', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'address', - name: 'caller', - type: 'address', - }, - { - components: [ - { - internalType: 'enum BridgePool.RelayState', - name: 'relayState', - type: 'uint8', - }, - { - internalType: 'address', - name: 'slowRelayer', - type: 'address', - }, - { - internalType: 'uint32', - name: 'relayId', - type: 'uint32', - }, - { - internalType: 'uint64', - name: 'realizedLpFeePct', - type: 'uint64', - }, - { - internalType: 'uint32', - name: 'priceRequestTime', - type: 'uint32', - }, - { - internalType: 'uint256', - name: 'proposerBond', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'finalFee', - type: 'uint256', - }, - ], - indexed: false, - internalType: 'struct BridgePool.RelayData', - name: 'relay', - type: 'tuple', - }, - ], - name: 'RelaySettled', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: 'depositHash', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'address', - name: 'instantRelayer', - type: 'address', - }, - { - components: [ - { - internalType: 'enum BridgePool.RelayState', - name: 'relayState', - type: 'uint8', - }, - { - internalType: 'address', - name: 'slowRelayer', - type: 'address', - }, - { - internalType: 'uint32', - name: 'relayId', - type: 'uint32', - }, - { - internalType: 'uint64', - name: 'realizedLpFeePct', - type: 'uint64', - }, - { - internalType: 'uint32', - name: 'priceRequestTime', - type: 'uint32', - }, - { - internalType: 'uint256', - name: 'proposerBond', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'finalFee', - type: 'uint256', - }, - ], - indexed: false, - internalType: 'struct BridgePool.RelayData', - name: 'relay', - type: 'tuple', - }, - ], - name: 'RelaySpedUp', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'l1TokenAmount', - type: 'uint256', - }, - ], - name: 'addLiquidity', - outputs: [], - stateMutability: 'payable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'bonds', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'bridgeAdmin', - outputs: [ - { - internalType: 'contract BridgeAdminInterface', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_newAdmin', - type: 'address', - }, - ], - name: 'changeAdmin', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - components: [ - { - internalType: 'uint256', - name: 'chainId', - type: 'uint256', - }, - { - internalType: 'uint64', - name: 'depositId', - type: 'uint64', - }, - { - internalType: 'address payable', - name: 'l1Recipient', - type: 'address', - }, - { - internalType: 'address', - name: 'l2Sender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'uint64', - name: 'slowRelayFeePct', - type: 'uint64', - }, - { - internalType: 'uint64', - name: 'instantRelayFeePct', - type: 'uint64', - }, - { - internalType: 'uint32', - name: 'quoteTimestamp', - type: 'uint32', - }, - ], - internalType: 'struct BridgePool.DepositData', - name: 'depositData', - type: 'tuple', - }, - { - components: [ - { - internalType: 'enum BridgePool.RelayState', - name: 'relayState', - type: 'uint8', - }, - { - internalType: 'address', - name: 'slowRelayer', - type: 'address', - }, - { - internalType: 'uint32', - name: 'relayId', - type: 'uint32', - }, - { - internalType: 'uint64', - name: 'realizedLpFeePct', - type: 'uint64', - }, - { - internalType: 'uint32', - name: 'priceRequestTime', - type: 'uint32', - }, - { - internalType: 'uint256', - name: 'proposerBond', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'finalFee', - type: 'uint256', - }, - ], - internalType: 'struct BridgePool.RelayData', - name: 'relayData', - type: 'tuple', - }, - ], - name: 'disputeRelay', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'exchangeRateCurrent', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'getAccumulatedFees', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getCurrentTime', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'relayedAmount', - type: 'uint256', - }, - ], - name: 'getLiquidityUtilization', - outputs: [ - { - internalType: 'uint256', - name: 'utilizationCurrent', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'utilizationPostRelay', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - components: [ - { - internalType: 'uint256', - name: 'chainId', - type: 'uint256', - }, - { - internalType: 'uint64', - name: 'depositId', - type: 'uint64', - }, - { - internalType: 'address payable', - name: 'l1Recipient', - type: 'address', - }, - { - internalType: 'address', - name: 'l2Sender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'uint64', - name: 'slowRelayFeePct', - type: 'uint64', - }, - { - internalType: 'uint64', - name: 'instantRelayFeePct', - type: 'uint64', - }, - { - internalType: 'uint32', - name: 'quoteTimestamp', - type: 'uint32', - }, - ], - internalType: 'struct BridgePool.DepositData', - name: 'depositData', - type: 'tuple', - }, - { - components: [ - { - internalType: 'enum BridgePool.RelayState', - name: 'relayState', - type: 'uint8', - }, - { - internalType: 'address', - name: 'slowRelayer', - type: 'address', - }, - { - internalType: 'uint32', - name: 'relayId', - type: 'uint32', - }, - { - internalType: 'uint64', - name: 'realizedLpFeePct', - type: 'uint64', - }, - { - internalType: 'uint32', - name: 'priceRequestTime', - type: 'uint32', - }, - { - internalType: 'uint256', - name: 'proposerBond', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'finalFee', - type: 'uint256', - }, - ], - internalType: 'struct BridgePool.RelayData', - name: 'relayData', - type: 'tuple', - }, - ], - name: 'getRelayAncillaryData', - outputs: [ - { - internalType: 'bytes', - name: '', - type: 'bytes', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'identifier', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - name: 'instantRelays', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'isWethPool', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'l1Token', - outputs: [ - { - internalType: 'contract IERC20', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'lastLpFeeUpdate', - outputs: [ - { - internalType: 'uint32', - name: '', - type: 'uint32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'liquidReserves', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'liquidityUtilizationCurrent', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'relayedAmount', - type: 'uint256', - }, - ], - name: 'liquidityUtilizationPostRelay', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'lpFeeRatePerSecond', - outputs: [ - { - internalType: 'uint64', - name: '', - type: 'uint64', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes[]', - name: 'data', - type: 'bytes[]', - }, - ], - name: 'multicall', - outputs: [ - { - internalType: 'bytes[]', - name: 'results', - type: 'bytes[]', - }, - ], - stateMutability: 'payable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'numberOfRelays', - outputs: [ - { - internalType: 'uint32', - name: '', - type: 'uint32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'optimisticOracle', - outputs: [ - { - internalType: 'contract SkinnyOptimisticOracleInterface', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'optimisticOracleLiveness', - outputs: [ - { - internalType: 'uint32', - name: '', - type: 'uint32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'pendingReserves', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'proposerBondPct', - outputs: [ - { - internalType: 'uint64', - name: '', - type: 'uint64', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - components: [ - { - internalType: 'uint256', - name: 'chainId', - type: 'uint256', - }, - { - internalType: 'uint64', - name: 'depositId', - type: 'uint64', - }, - { - internalType: 'address payable', - name: 'l1Recipient', - type: 'address', - }, - { - internalType: 'address', - name: 'l2Sender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'uint64', - name: 'slowRelayFeePct', - type: 'uint64', - }, - { - internalType: 'uint64', - name: 'instantRelayFeePct', - type: 'uint64', - }, - { - internalType: 'uint32', - name: 'quoteTimestamp', - type: 'uint32', - }, - ], - internalType: 'struct BridgePool.DepositData', - name: 'depositData', - type: 'tuple', - }, - { - internalType: 'uint64', - name: 'realizedLpFeePct', - type: 'uint64', - }, - ], - name: 'relayAndSpeedUp', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - components: [ - { - internalType: 'uint256', - name: 'chainId', - type: 'uint256', - }, - { - internalType: 'uint64', - name: 'depositId', - type: 'uint64', - }, - { - internalType: 'address payable', - name: 'l1Recipient', - type: 'address', - }, - { - internalType: 'address', - name: 'l2Sender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'uint64', - name: 'slowRelayFeePct', - type: 'uint64', - }, - { - internalType: 'uint64', - name: 'instantRelayFeePct', - type: 'uint64', - }, - { - internalType: 'uint32', - name: 'quoteTimestamp', - type: 'uint32', - }, - ], - internalType: 'struct BridgePool.DepositData', - name: 'depositData', - type: 'tuple', - }, - { - internalType: 'uint64', - name: 'realizedLpFeePct', - type: 'uint64', - }, - ], - name: 'relayDeposit', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - name: 'relays', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'lpTokenAmount', - type: 'uint256', - }, - { - internalType: 'bool', - name: 'sendEth', - type: 'bool', - }, - ], - name: 'removeLiquidity', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'time', - type: 'uint256', - }, - ], - name: 'setCurrentTime', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - components: [ - { - internalType: 'uint256', - name: 'chainId', - type: 'uint256', - }, - { - internalType: 'uint64', - name: 'depositId', - type: 'uint64', - }, - { - internalType: 'address payable', - name: 'l1Recipient', - type: 'address', - }, - { - internalType: 'address', - name: 'l2Sender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'uint64', - name: 'slowRelayFeePct', - type: 'uint64', - }, - { - internalType: 'uint64', - name: 'instantRelayFeePct', - type: 'uint64', - }, - { - internalType: 'uint32', - name: 'quoteTimestamp', - type: 'uint32', - }, - ], - internalType: 'struct BridgePool.DepositData', - name: 'depositData', - type: 'tuple', - }, - { - components: [ - { - internalType: 'enum BridgePool.RelayState', - name: 'relayState', - type: 'uint8', - }, - { - internalType: 'address', - name: 'slowRelayer', - type: 'address', - }, - { - internalType: 'uint32', - name: 'relayId', - type: 'uint32', - }, - { - internalType: 'uint64', - name: 'realizedLpFeePct', - type: 'uint64', - }, - { - internalType: 'uint32', - name: 'priceRequestTime', - type: 'uint32', - }, - { - internalType: 'uint256', - name: 'proposerBond', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'finalFee', - type: 'uint256', - }, - ], - internalType: 'struct BridgePool.RelayData', - name: 'relayData', - type: 'tuple', - }, - ], - name: 'settleRelay', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - components: [ - { - internalType: 'uint256', - name: 'chainId', - type: 'uint256', - }, - { - internalType: 'uint64', - name: 'depositId', - type: 'uint64', - }, - { - internalType: 'address payable', - name: 'l1Recipient', - type: 'address', - }, - { - internalType: 'address', - name: 'l2Sender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'uint64', - name: 'slowRelayFeePct', - type: 'uint64', - }, - { - internalType: 'uint64', - name: 'instantRelayFeePct', - type: 'uint64', - }, - { - internalType: 'uint32', - name: 'quoteTimestamp', - type: 'uint32', - }, - ], - internalType: 'struct BridgePool.DepositData', - name: 'depositData', - type: 'tuple', - }, - { - components: [ - { - internalType: 'enum BridgePool.RelayState', - name: 'relayState', - type: 'uint8', - }, - { - internalType: 'address', - name: 'slowRelayer', - type: 'address', - }, - { - internalType: 'uint32', - name: 'relayId', - type: 'uint32', - }, - { - internalType: 'uint64', - name: 'realizedLpFeePct', - type: 'uint64', - }, - { - internalType: 'uint32', - name: 'priceRequestTime', - type: 'uint32', - }, - { - internalType: 'uint256', - name: 'proposerBond', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'finalFee', - type: 'uint256', - }, - ], - internalType: 'struct BridgePool.RelayData', - name: 'relayData', - type: 'tuple', - }, - ], - name: 'speedUpRelay', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'store', - outputs: [ - { - internalType: 'contract StoreInterface', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'sync', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'syncUmaEcosystemParams', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'syncWithBridgeAdminParams', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'timerAddress', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'undistributedLpFees', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'utilizedReserves', - outputs: [ - { - internalType: 'int256', - name: '', - type: 'int256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - stateMutability: 'payable', - type: 'receive', - }, -] as const; - -export type AcrossPoolV1 = typeof acrossPoolV1Abi; -export type AcrossPoolV1Contract = GetContractReturnType; - -export class AcrossPoolV1__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: acrossPoolV1Abi, publicClient: client }); - } -} diff --git a/src/apps/across/contracts/viem/index.ts b/src/apps/across/contracts/viem/index.ts index 82ebb01f7..d486dbf82 100644 --- a/src/apps/across/contracts/viem/index.ts +++ b/src/apps/across/contracts/viem/index.ts @@ -3,11 +3,9 @@ /* eslint-disable */ export type { AcrossHubPoolV2 } from './AcrossHubPoolV2'; -export type { AcrossPoolV1 } from './AcrossPoolV1'; export type { AcrossPoolV2 } from './AcrossPoolV2'; export type { AcrossStaking } from './AcrossStaking'; export { AcrossHubPoolV2__factory } from './AcrossHubPoolV2'; -export { AcrossPoolV1__factory } from './AcrossPoolV1'; export { AcrossPoolV2__factory } from './AcrossPoolV2'; export { AcrossStaking__factory } from './AcrossStaking'; diff --git a/src/apps/across/ethereum/across.pool-v1.token-fetcher.ts b/src/apps/across/ethereum/across.pool-v1.token-fetcher.ts deleted file mode 100644 index 10603b4e8..000000000 --- a/src/apps/across/ethereum/across.pool-v1.token-fetcher.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { AcrossPoolV1TokenFetcher } from '../common/across.pool-v1.token-fetcher'; - -@PositionTemplate() -export class EthereumAcrossPoolV1TokenFetcher extends AcrossPoolV1TokenFetcher { - groupLabel = 'Pools'; - - poolAddresses = [ - '0x43298f9f91a4545df64748e78a2c777c580573d6', // BADGER - '0x4841572daa1f8e4ce0f62570877c2d0cc18c9535', // BOBA - '0x43f133fe6fdfa17c417695c476447dc2a449ba5b', // DAI - '0xdfe0ec39291e3b60aca122908f86809c9ee64e90', // UMA - '0x256c8919ce1ab0e33974cf6aa9c71561ef3017b6', // USDC - '0x02fbb64517e1c6ed69a6faa3abf37db0482f1152', // WBTC - '0x7355efc63ae731f584380a9838292c7046c1e433', // WETH - ]; -} diff --git a/src/apps/alpha-v1/alpha-v1.module.ts b/src/apps/alpha-v1/alpha-v1.module.ts deleted file mode 100644 index 4f484c05f..000000000 --- a/src/apps/alpha-v1/alpha-v1.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Module } from '@nestjs/common'; - -import { AbstractApp } from '~app/app.dynamic-module'; - -import { AlphaV1ViemContractFactory } from './contracts'; -import { EthereumAlphaV1LendingTokenFetcher } from './ethereum/alpha-v1.lending.token-fetcher'; - -@Module({ - providers: [AlphaV1ViemContractFactory, EthereumAlphaV1LendingTokenFetcher], -}) -export class AlphaV1AppModule extends AbstractApp() {} diff --git a/src/apps/alpha-v1/assets/logo.png b/src/apps/alpha-v1/assets/logo.png deleted file mode 100644 index c89da9cad..000000000 Binary files a/src/apps/alpha-v1/assets/logo.png and /dev/null differ diff --git a/src/apps/alpha-v1/contracts/abis/alpha-bank.json b/src/apps/alpha-v1/contracts/abis/alpha-bank.json deleted file mode 100644 index 183752bc2..000000000 --- a/src/apps/alpha-v1/contracts/abis/alpha-bank.json +++ /dev/null @@ -1,846 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "contract BankConfig", - "name": "_config", - "type": "address" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "debtShare", - "type": "uint256" - } - ], - "name": "AddDebt", - "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": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "killer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "prize", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "left", - "type": "uint256" - } - ], - "name": "Kill", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "debtShare", - "type": "uint256" - } - ], - "name": "RemoveDebt", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "loan", - "type": "uint256" - } - ], - "name": "Work", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "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": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "config", - "outputs": [ - { - "internalType": "contract BankConfig", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "debtShare", - "type": "uint256" - } - ], - "name": "debtShareToVal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "debtVal", - "type": "uint256" - } - ], - "name": "debtValToShare", - "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": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "deposit", - "outputs": [], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "glbDebtShare", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "glbDebtVal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isOwner", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "kill", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "lastAccrueTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "nextPositionID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "msgValue", - "type": "uint256" - } - ], - "name": "pendingInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "positionInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "positions", - "outputs": [ - { - "internalType": "address", - "name": "goblin", - "type": "address" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "uint256", - "name": "debtShare", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "recover", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "reduceReserve", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reservePool", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalETH", - "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": "recipient", - "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": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract BankConfig", - "name": "_config", - "type": "address" - } - ], - "name": "updateConfig", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "share", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "withdrawReserve", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "goblin", - "type": "address" - }, - { - "internalType": "uint256", - "name": "loan", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxReturn", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "work", - "outputs": [], - "payable": true, - "stateMutability": "payable", - "type": "function" - } -] diff --git a/src/apps/alpha-v1/contracts/index.ts b/src/apps/alpha-v1/contracts/index.ts deleted file mode 100644 index 5dcfebdf6..000000000 --- a/src/apps/alpha-v1/contracts/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * from './viem.contract-factory'; diff --git a/src/apps/alpha-v1/contracts/viem.contract-factory.ts b/src/apps/alpha-v1/contracts/viem.contract-factory.ts deleted file mode 100644 index 6618edc2b..000000000 --- a/src/apps/alpha-v1/contracts/viem.contract-factory.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Injectable, Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { Network } from '~types/network.interface'; - -import { AlphaBank__factory } from './viem'; - -type ContractOpts = { address: string; network: Network }; - -@Injectable() -export class AlphaV1ViemContractFactory { - constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - - alphaBank({ address, network }: ContractOpts) { - return AlphaBank__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } -} diff --git a/src/apps/alpha-v1/contracts/viem/AlphaBank.ts b/src/apps/alpha-v1/contracts/viem/AlphaBank.ts deleted file mode 100644 index 3f7b81a94..000000000 --- a/src/apps/alpha-v1/contracts/viem/AlphaBank.ts +++ /dev/null @@ -1,860 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const alphaBankAbi = [ - { - inputs: [ - { - internalType: 'contract BankConfig', - name: '_config', - type: 'address', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'uint256', - name: 'id', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'debtShare', - type: 'uint256', - }, - ], - name: 'AddDebt', - 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: 'value', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'uint256', - name: 'id', - type: 'uint256', - }, - { - indexed: true, - internalType: 'address', - name: 'killer', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'prize', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'left', - type: 'uint256', - }, - ], - name: 'Kill', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipTransferred', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'uint256', - name: 'id', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'debtShare', - type: 'uint256', - }, - ], - name: 'RemoveDebt', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'uint256', - name: 'id', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'loan', - type: 'uint256', - }, - ], - name: 'Work', - type: 'event', - }, - { - payable: true, - stateMutability: 'payable', - type: 'fallback', - }, - { - 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: 'value', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'config', - outputs: [ - { - internalType: 'contract BankConfig', - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'uint256', - name: 'debtShare', - type: 'uint256', - }, - ], - name: 'debtShareToVal', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'uint256', - name: 'debtVal', - type: 'uint256', - }, - ], - name: 'debtValToShare', - 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: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [], - name: 'deposit', - outputs: [], - payable: true, - stateMutability: 'payable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'glbDebtShare', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'glbDebtVal', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'isOwner', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'uint256', - name: 'id', - type: 'uint256', - }, - ], - name: 'kill', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'lastAccrueTime', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'nextPositionID', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'owner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'uint256', - name: 'msgValue', - type: 'uint256', - }, - ], - name: 'pendingInterest', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'uint256', - name: 'id', - type: 'uint256', - }, - ], - name: 'positionInfo', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'positions', - outputs: [ - { - internalType: 'address', - name: 'goblin', - type: 'address', - }, - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'uint256', - name: 'debtShare', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address', - name: 'token', - type: 'address', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'recover', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'reduceReserve', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [], - name: 'renounceOwnership', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'reservePool', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'totalETH', - 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: 'recipient', - 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: 'sender', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'transferOwnership', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'contract BankConfig', - name: '_config', - type: 'address', - }, - ], - name: 'updateConfig', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'uint256', - name: 'share', - type: 'uint256', - }, - ], - name: 'withdraw', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'withdrawReserve', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'uint256', - name: 'id', - type: 'uint256', - }, - { - internalType: 'address', - name: 'goblin', - type: 'address', - }, - { - internalType: 'uint256', - name: 'loan', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'maxReturn', - type: 'uint256', - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - ], - name: 'work', - outputs: [], - payable: true, - stateMutability: 'payable', - type: 'function', - }, -] as const; - -export type AlphaBank = typeof alphaBankAbi; -export type AlphaBankContract = GetContractReturnType; - -export class AlphaBank__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: alphaBankAbi, publicClient: client }); - } -} diff --git a/src/apps/alpha-v1/contracts/viem/index.ts b/src/apps/alpha-v1/contracts/viem/index.ts deleted file mode 100644 index 6c7632d18..000000000 --- a/src/apps/alpha-v1/contracts/viem/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -export type { AlphaBank } from './AlphaBank'; - -export { AlphaBank__factory } from './AlphaBank'; diff --git a/src/apps/alpha-v1/ethereum/alpha-v1.lending.token-fetcher.ts b/src/apps/alpha-v1/ethereum/alpha-v1.lending.token-fetcher.ts deleted file mode 100644 index 549884dec..000000000 --- a/src/apps/alpha-v1/ethereum/alpha-v1.lending.token-fetcher.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { Inject } from '@nestjs/common'; -import { BigNumber } from 'bignumber.js'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { ZERO_ADDRESS } from '~app-toolkit/constants/address'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { - GetDataPropsParams, - DefaultAppTokenDataProps, - GetPricePerShareParams, - DefaultAppTokenDefinition, - GetPriceParams, -} from '~position/template/app-token.template.types'; - -import { AlphaV1ViemContractFactory } from '../contracts'; -import { AlphaBank } from '../contracts/viem'; - -@PositionTemplate() -export class EthereumAlphaV1LendingTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Lending'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(AlphaV1ViemContractFactory) protected readonly contractFactory: AlphaV1ViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.alphaBank({ network: this.network, address }); - } - - async getAddresses(): Promise { - return ['0x67b66c99d3eb37fa76aa3ed1ff33e8e39f0b9c7a']; - } - - async getUnderlyingTokenDefinitions() { - return [{ address: ZERO_ADDRESS, network: this.network }]; - } - - async getPrice({ - appToken, - contract, - }: GetPriceParams): Promise { - const ethPrice = appToken.tokens[0].price; - const [totalEthRaw, totalSupplyRaw] = await Promise.all([contract.read.totalETH(), contract.read.totalSupply()]); - - return (ethPrice * Number(totalEthRaw)) / Number(totalSupplyRaw); - } - - async getPricePerShare({ contract }: GetPricePerShareParams) { - const [totalEthRaw, totalSupplyRaw] = await Promise.all([contract.read.totalETH(), contract.read.totalSupply()]); - return [Number(totalEthRaw) / Number(totalSupplyRaw)]; - } - - async getLiquidity({ appToken }: GetDataPropsParams) { - return appToken.supply * appToken.price; - } - - async getReserves({ appToken, contract }: GetDataPropsParams) { - const totalEthRaw = await contract.read.totalETH(); - return [Number(totalEthRaw) / 10 ** appToken.tokens[0].decimals]; - } - - async getApy({ contract }: GetDataPropsParams) { - const [totalEthRaw, totalDebtValueRaw] = await Promise.all([contract.read.totalETH(), contract.read.glbDebtVal()]); - const utilizationRate = new BigNumber(totalDebtValueRaw.toString()).div(totalEthRaw.toString()); - - const tripleSlope = utilizationRate.lt(new BigNumber(0.8)) - ? utilizationRate.times(new BigNumber(0.1)).div(new BigNumber(0.8)) - : utilizationRate.lt(new BigNumber(0.9)) - ? new BigNumber(0.1) - : new BigNumber(0.1).plus( - utilizationRate.minus(new BigNumber(0.9)).times(new BigNumber(0.4)).div(new BigNumber(0.1)), - ); - - return tripleSlope.times(utilizationRate).times(0.9).toNumber(); - } -} diff --git a/src/apps/aura/aura.module.ts b/src/apps/aura/aura.module.ts index e89024722..2667bf047 100644 --- a/src/apps/aura/aura.module.ts +++ b/src/apps/aura/aura.module.ts @@ -15,7 +15,6 @@ import { EthereumAuraChefContractPositionFetcher } from './ethereum/aura.chef.co import { EthereumAuraDepositTokenFetcher } from './ethereum/aura.deposit.token-fetcher'; import { EthereumAuraLockerContractPositionFetcher } from './ethereum/aura.locker.contract-position-fetcher'; import { EthereumAuraLpFarmContractPositionFetcher } from './ethereum/aura.lp-farm.contract-position-fetcher'; -import { EthereumAuraStakedAuraBalTokenFetcher } from './ethereum/aura.staked-aura-bal.token-fetcher'; import { OptimismAuraDepositTokenFetcher } from './optimism/aura.deposit.token-fetcher'; import { OptimismAuraLpFarmContractPositionFetcher } from './optimism/aura.lp-farm.contract-position-fetcher'; @@ -37,7 +36,6 @@ import { OptimismAuraLpFarmContractPositionFetcher } from './optimism/aura.lp-fa EthereumAuraLpFarmContractPositionFetcher, EthereumAuraLockerContractPositionFetcher, EthereumAuraAuraBalStakingContractPositionFetcher, - EthereumAuraStakedAuraBalTokenFetcher, EthereumAuraAuraBalCompounderContractPositionFetcher, // Optimism OptimismAuraDepositTokenFetcher, diff --git a/src/apps/aura/contracts/abis/aura-bal-staking-token.json b/src/apps/aura/contracts/abis/aura-bal-staking-token.json deleted file mode 100644 index 0d0804393..000000000 --- a/src/apps/aura/contracts/abis/aura-bal-staking-token.json +++ /dev/null @@ -1,479 +0,0 @@ -[ - { - "inputs": [ - { "internalType": "address", "name": "_token", "type": "address" }, - { "internalType": "address", "name": "_virtualRewardFactory", "type": "address" } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256", "name": "_incentive", "type": "uint256" }], - "name": "CallerIncentiveUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "assets", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "shares", "type": "uint256" } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "_reward", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "extraReward", "type": "address" } - ], - "name": "ExtraRewardAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": true, "internalType": "address", "name": "_reward", "type": "address" }], - "name": "ExtraRewardCleared", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "_caller", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "_value", "type": "uint256" } - ], - "name": "Harvest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": true, "internalType": "address", "name": "_strategy", "type": "address" }], - "name": "StrategySet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "receiver", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "assets", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "shares", "type": "uint256" } - ], - "name": "Withdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256", "name": "_penalty", "type": "uint256" }], - "name": "WithdrawalPenaltyUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "FEE_DENOMINATOR", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_WITHDRAWAL_PENALTY", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_reward", "type": "address" }], - "name": "addExtraReward", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "spender", "type": "address" } - ], - "name": "allowance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "approve", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "asset", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "authorizedHarvesters", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "user", "type": "address" }], - "name": "balanceOfUnderlying", - "outputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { "inputs": [], "name": "clearExtraRewards", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [{ "internalType": "uint256", "name": "_shares", "type": "uint256" }], - "name": "convertToAssets", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_assets", "type": "uint256" }], - "name": "convertToShares", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } - ], - "name": "decreaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "_amount", "type": "uint256" }, - { "internalType": "address", "name": "_receiver", "type": "address" } - ], - "name": "deposit", - "outputs": [{ "internalType": "uint256", "name": "_shares", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "name": "extraRewards", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "extraRewardsLength", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { "inputs": [], "name": "harvest", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [{ "internalType": "uint256", "name": "_minAmountOut", "type": "uint256" }], - "name": "harvest", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "addedValue", "type": "uint256" } - ], - "name": "increaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "isExtraReward", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "isHarvestPermissioned", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "maxDeposit", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "maxMint", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_owner", "type": "address" }], - "name": "maxRedeem", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_owner", "type": "address" }], - "name": "maxWithdraw", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "_shares", "type": "uint256" }, - { "internalType": "address", "name": "_receiver", "type": "address" } - ], - "name": "mint", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_assets", "type": "uint256" }], - "name": "previewDeposit", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_shares", "type": "uint256" }], - "name": "previewMint", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_shares", "type": "uint256" }], - "name": "previewRedeem", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_assets", "type": "uint256" }], - "name": "previewWithdraw", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "_shares", "type": "uint256" }, - { "internalType": "address", "name": "_receiver", "type": "address" }, - { "internalType": "address", "name": "_owner", "type": "address" } - ], - "name": "redeem", - "outputs": [{ "internalType": "uint256", "name": "withdrawn", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [{ "internalType": "bool", "name": "_status", "type": "bool" }], - "name": "setHarvestPermissions", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_strategy", "type": "address" }], - "name": "setStrategy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_penalty", "type": "uint256" }], - "name": "setWithdrawalPenalty", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "strategy", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalAssets", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalUnderlying", - "outputs": [{ "internalType": "uint256", "name": "total", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "sender", "type": "address" }, - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "underlying", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_harvester", "type": "address" }, - { "internalType": "bool", "name": "_authorized", "type": "bool" } - ], - "name": "updateAuthorizedHarvesters", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "virtualRewardFactory", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "_assets", "type": "uint256" }, - { "internalType": "address", "name": "_receiver", "type": "address" }, - { "internalType": "address", "name": "_owner", "type": "address" } - ], - "name": "withdraw", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "withdrawalPenalty", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - } -] diff --git a/src/apps/aura/contracts/viem.contract-factory.ts b/src/apps/aura/contracts/viem.contract-factory.ts index 7f2b259b1..31d1e69a1 100644 --- a/src/apps/aura/contracts/viem.contract-factory.ts +++ b/src/apps/aura/contracts/viem.contract-factory.ts @@ -4,7 +4,6 @@ import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; import { Network } from '~types/network.interface'; import { - AuraBalStakingToken__factory, AuraBalToken__factory, AuraBalVirtualRewardPool__factory, AuraBalancerHelpers__factory, @@ -25,9 +24,6 @@ type ContractOpts = { address: string; network: Network }; export class AuraViemContractFactory { constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - auraBalStakingToken({ address, network }: ContractOpts) { - return AuraBalStakingToken__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } auraBalToken({ address, network }: ContractOpts) { return AuraBalToken__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } diff --git a/src/apps/aura/contracts/viem/AuraBalStakingToken.ts b/src/apps/aura/contracts/viem/AuraBalStakingToken.ts deleted file mode 100644 index 1b107d9d3..000000000 --- a/src/apps/aura/contracts/viem/AuraBalStakingToken.ts +++ /dev/null @@ -1,1130 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const auraBalStakingTokenAbi = [ - { - inputs: [ - { - internalType: 'address', - name: '_token', - type: 'address', - }, - { - internalType: 'address', - name: '_virtualRewardFactory', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: '_incentive', - type: 'uint256', - }, - ], - name: 'CallerIncentiveUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'Deposit', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: '_reward', - type: 'address', - }, - { - indexed: false, - internalType: 'address', - name: 'extraReward', - type: 'address', - }, - ], - name: 'ExtraRewardAdded', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: '_reward', - type: 'address', - }, - ], - name: 'ExtraRewardCleared', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: '_caller', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: '_value', - type: 'uint256', - }, - ], - name: 'Harvest', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipTransferred', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: '_strategy', - type: 'address', - }, - ], - name: 'StrategySet', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'receiver', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'Withdraw', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: '_penalty', - type: 'uint256', - }, - ], - name: 'WithdrawalPenaltyUpdated', - type: 'event', - }, - { - inputs: [], - name: 'FEE_DENOMINATOR', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'MAX_WITHDRAWAL_PENALTY', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_reward', - type: 'address', - }, - ], - name: 'addExtraReward', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'asset', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'authorizedHarvesters', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'user', - type: 'address', - }, - ], - name: 'balanceOfUnderlying', - outputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'clearExtraRewards', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_shares', - type: 'uint256', - }, - ], - name: 'convertToAssets', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_assets', - type: 'uint256', - }, - ], - name: 'convertToShares', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - { - internalType: 'address', - name: '_receiver', - type: 'address', - }, - ], - name: 'deposit', - outputs: [ - { - internalType: 'uint256', - name: '_shares', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'extraRewards', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'extraRewardsLength', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'harvest', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_minAmountOut', - type: 'uint256', - }, - ], - name: 'harvest', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'isExtraReward', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'isHarvestPermissioned', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'maxDeposit', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'pure', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'maxMint', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'pure', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_owner', - type: 'address', - }, - ], - name: 'maxRedeem', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_owner', - type: 'address', - }, - ], - name: 'maxWithdraw', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_shares', - type: 'uint256', - }, - { - internalType: 'address', - name: '_receiver', - type: 'address', - }, - ], - name: 'mint', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'owner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_assets', - type: 'uint256', - }, - ], - name: 'previewDeposit', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_shares', - type: 'uint256', - }, - ], - name: 'previewMint', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_shares', - type: 'uint256', - }, - ], - name: 'previewRedeem', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_assets', - type: 'uint256', - }, - ], - name: 'previewWithdraw', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_shares', - type: 'uint256', - }, - { - internalType: 'address', - name: '_receiver', - type: 'address', - }, - { - internalType: 'address', - name: '_owner', - type: 'address', - }, - ], - name: 'redeem', - outputs: [ - { - internalType: 'uint256', - name: 'withdrawn', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'renounceOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bool', - name: '_status', - type: 'bool', - }, - ], - name: 'setHarvestPermissions', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_strategy', - type: 'address', - }, - ], - name: 'setStrategy', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_penalty', - type: 'uint256', - }, - ], - name: 'setWithdrawalPenalty', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'strategy', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalAssets', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalUnderlying', - outputs: [ - { - internalType: 'uint256', - name: 'total', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'transferOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'underlying', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_harvester', - type: 'address', - }, - { - internalType: 'bool', - name: '_authorized', - type: 'bool', - }, - ], - name: 'updateAuthorizedHarvesters', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'virtualRewardFactory', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_assets', - type: 'uint256', - }, - { - internalType: 'address', - name: '_receiver', - type: 'address', - }, - { - internalType: 'address', - name: '_owner', - type: 'address', - }, - ], - name: 'withdraw', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'withdrawalPenalty', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, -] as const; - -export type AuraBalStakingToken = typeof auraBalStakingTokenAbi; -export type AuraBalStakingTokenContract = GetContractReturnType; - -export class AuraBalStakingToken__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: auraBalStakingTokenAbi, publicClient: client }); - } -} diff --git a/src/apps/aura/contracts/viem/index.ts b/src/apps/aura/contracts/viem/index.ts index 679d51082..f0c3457f1 100644 --- a/src/apps/aura/contracts/viem/index.ts +++ b/src/apps/aura/contracts/viem/index.ts @@ -2,7 +2,6 @@ /* tslint:disable */ /* eslint-disable */ -export type { AuraBalStakingToken } from './AuraBalStakingToken'; export type { AuraBalToken } from './AuraBalToken'; export type { AuraBalVirtualRewardPool } from './AuraBalVirtualRewardPool'; export type { AuraBalancerHelpers } from './AuraBalancerHelpers'; @@ -16,7 +15,6 @@ export type { AuraStashToken } from './AuraStashToken'; export type { AuraToken } from './AuraToken'; export type { AuraVirtualBalanceRewardPool } from './AuraVirtualBalanceRewardPool'; -export { AuraBalStakingToken__factory } from './AuraBalStakingToken'; export { AuraBalToken__factory } from './AuraBalToken'; export { AuraBalVirtualRewardPool__factory } from './AuraBalVirtualRewardPool'; export { AuraBalancerHelpers__factory } from './AuraBalancerHelpers'; diff --git a/src/apps/aura/ethereum/aura.staked-aura-bal.token-fetcher.ts b/src/apps/aura/ethereum/aura.staked-aura-bal.token-fetcher.ts deleted file mode 100644 index 8067f7b57..000000000 --- a/src/apps/aura/ethereum/aura.staked-aura-bal.token-fetcher.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { Inject } from '@nestjs/common'; -import { BigNumber } from 'ethers'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { getLabelFromToken } from '~app-toolkit/helpers/presentation/image.present'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { - GetUnderlyingTokensParams, - GetDisplayPropsParams, - GetPricePerShareParams, -} from '~position/template/app-token.template.types'; - -import { AuraViemContractFactory } from '../contracts'; -import { AuraBalStakingToken } from '../contracts/viem/AuraBalStakingToken'; - -@PositionTemplate() -export class EthereumAuraStakedAuraBalTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Staked Aura BAL'; - - isExcludedFromBalances = true; - isExcludedFromExplore = true; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(AuraViemContractFactory) protected readonly contractFactory: AuraViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.auraBalStakingToken({ address, network: this.network }); - } - - async getAddresses() { - return ['0xfaa2ed111b4f580fcb85c48e6dc6782dc5fcd7a6']; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.asset(), network: this.network }]; - } - - async getPricePerShare({ appToken, contract }: GetPricePerShareParams) { - const amount = BigNumber.from((1e18).toString()).toString(); - const ratioRaw = await contract.read.convertToAssets([BigInt(amount)]); - const ratio = Number(ratioRaw) / 10 ** appToken.decimals; - return [ratio]; - } - - async getLabel({ appToken }: GetDisplayPropsParams) { - return getLabelFromToken(appToken.tokens[0]!); - } -} diff --git a/src/apps/balancer-v2/balancer-v2.module.ts b/src/apps/balancer-v2/balancer-v2.module.ts index ce36890c3..4afce1b17 100644 --- a/src/apps/balancer-v2/balancer-v2.module.ts +++ b/src/apps/balancer-v2/balancer-v2.module.ts @@ -16,14 +16,12 @@ import { EthereumBalancerV2FarmContractPositionFetcher } from './ethereum/balanc import { EthereumBalancerV2PoolTokenFetcher } from './ethereum/balancer-v2.pool.token-fetcher'; import { EthereumBalancerV2VeBalRewardsContractPositionFetcher } from './ethereum/balancer-v2.ve-bal-rewards.contract-position-fetcher'; import { EthereumBalancerV2VotingEscrowContractPositionFetcher } from './ethereum/balancer-v2.voting-escrow.contract-position-fetcher'; -import { EthereumBalancerV2WrappedAaveTokenFetcher } from './ethereum/balancer-v2.wrapped-aave.token-fetcher'; import { GnosisBalancerV2BoostedTokenFetcher } from './gnosis/balancer-v2.boosted.token-fetcher'; import { GnosisBalancerV2FarmContractPositionFetcher } from './gnosis/balancer-v2.farm.contract-position-fetcher'; import { GnosisBalancerV2PoolTokenFetcher } from './gnosis/balancer-v2.pool.token-fetcher'; import { PolygonBalancerV2BoostedTokenFetcher } from './polygon/balancer-v2.boosted.token-fetcher'; import { PolygonBalancerV2FarmContractPositionFetcher } from './polygon/balancer-v2.farm.contract-position-fetcher'; import { PolygonBalancerV2PoolTokenFetcher } from './polygon/balancer-v2.pool.token-fetcher'; -import { PolygonBalancerV2StaticYieldTokenFetcher } from './polygon/balancer-v2.static-yield.token-fetcher'; @Module({ providers: [ @@ -44,7 +42,6 @@ import { PolygonBalancerV2StaticYieldTokenFetcher } from './polygon/balancer-v2. EthereumBalancerV2PoolTokenFetcher, EthereumBalancerV2VotingEscrowContractPositionFetcher, EthereumBalancerV2FarmContractPositionFetcher, - EthereumBalancerV2WrappedAaveTokenFetcher, EthereumBalancerV2VeBalRewardsContractPositionFetcher, // Gnosis GnosisBalancerV2BoostedTokenFetcher, @@ -54,7 +51,6 @@ import { PolygonBalancerV2StaticYieldTokenFetcher } from './polygon/balancer-v2. PolygonBalancerV2BoostedTokenFetcher, PolygonBalancerV2PoolTokenFetcher, PolygonBalancerV2FarmContractPositionFetcher, - PolygonBalancerV2StaticYieldTokenFetcher, ], }) export class BalancerV2AppModule extends AbstractApp() {} diff --git a/src/apps/balancer-v2/common/balancer-v2.static-yield.token-fetcher.ts b/src/apps/balancer-v2/common/balancer-v2.static-yield.token-fetcher.ts deleted file mode 100644 index 58e40a2f6..000000000 --- a/src/apps/balancer-v2/common/balancer-v2.static-yield.token-fetcher.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; - -import { BalancerV2ViemContractFactory } from '../contracts'; -import { BalancerStaticAToken } from '../contracts/viem/BalancerStaticAToken'; - -export abstract class BalancerV2StaticYieldTokenFetcher extends AppTokenTemplatePositionFetcher { - abstract staticYieldTokenAddresses: string[]; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(BalancerV2ViemContractFactory) protected readonly contractFactory: BalancerV2ViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.balancerStaticAToken({ address, network: this.network }); - } - - async getAddresses() { - return this.staticYieldTokenAddresses; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.simulate.ATOKEN().then(v => v.result), network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } -} diff --git a/src/apps/balancer-v2/contracts/abis/balancer-static-a-token.json b/src/apps/balancer-v2/contracts/abis/balancer-static-a-token.json deleted file mode 100644 index 82fa34055..000000000 --- a/src/apps/balancer-v2/contracts/abis/balancer-static-a-token.json +++ /dev/null @@ -1,629 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [], - "name": "ASSET", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "ATOKEN", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "LENDING_POOL", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "_nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint16", - "name": "referralCode", - "type": "uint16" - }, - { - "internalType": "bool", - "name": "fromUnderlying", - "type": "bool" - } - ], - "name": "deposit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "dynamicBalanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "dynamicToStaticAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "staticAmount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "name": "getDomainSeparator", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "depositor", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint16", - "name": "referralCode", - "type": "uint16" - }, - { - "internalType": "bool", - "name": "fromUnderlying", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "internalType": "struct IStaticAToken.SignatureParams", - "name": "sigParams", - "type": "tuple" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "name": "metaDeposit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "staticAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "dynamicAmount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "toUnderlying", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "internalType": "struct IStaticAToken.SignatureParams", - "name": "sigParams", - "type": "tuple" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "name": "metaWithdraw", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "name": "permit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "rate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "staticToDynamicAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "dynamicAmount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "toUnderlying", - "type": "bool" - } - ], - "name": "withdraw", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "toUnderlying", - "type": "bool" - } - ], - "name": "withdrawDynamicAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/balancer-v2/contracts/abis/balancer-wrapped-aave-token.json b/src/apps/balancer-v2/contracts/abis/balancer-wrapped-aave-token.json deleted file mode 100644 index e460a5cdb..000000000 --- a/src/apps/balancer-v2/contracts/abis/balancer-wrapped-aave-token.json +++ /dev/null @@ -1,465 +0,0 @@ -[ - { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "pool", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "aToken", "type": "address" }, - { "indexed": false, "internalType": "string", "name": "staticATokenName", "type": "string" }, - { "indexed": false, "internalType": "string", "name": "staticATokenSymbol", "type": "string" } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [], - "name": "ASSET", - "outputs": [{ "internalType": "contract IERC20", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ATOKEN", - "outputs": [{ "internalType": "contract IERC20", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "EIP712_REVISION", - "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "INCENTIVES_CONTROLLER", - "outputs": [{ "internalType": "contract IAaveIncentivesController", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LENDING_POOL", - "outputs": [{ "internalType": "contract ILendingPool", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "METADEPOSIT_TYPEHASH", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "METAWITHDRAWAL_TYPEHASH", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PERMIT_TYPEHASH", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "REWARD_TOKEN", - "outputs": [{ "internalType": "contract IERC20", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "STATIC_ATOKEN_LM_REVISION", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "UNDERLYING_ASSET_ADDRESS", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "_nonces", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "spender", "type": "address" } - ], - "name": "allowance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "approve", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "receiver", "type": "address" }, - { "internalType": "bool", "name": "forceUpdate", "type": "bool" } - ], - "name": "claimRewards", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "onBehalfOf", "type": "address" }, - { "internalType": "address", "name": "receiver", "type": "address" }, - { "internalType": "bool", "name": "forceUpdate", "type": "bool" } - ], - "name": "claimRewardsOnBehalf", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bool", "name": "forceUpdate", "type": "bool" }], - "name": "claimRewardsToSelf", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "collectAndUpdateRewards", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } - ], - "name": "decreaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { "internalType": "uint16", "name": "referralCode", "type": "uint16" }, - { "internalType": "bool", "name": "fromUnderlying", "type": "bool" } - ], - "name": "deposit", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "dynamicBalanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], - "name": "dynamicToStaticAmount", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getAccRewardsPerToken", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "user", "type": "address" }], - "name": "getClaimableRewards", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getDomainSeparator", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getIncentivesController", - "outputs": [{ "internalType": "contract IAaveIncentivesController", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getLastRewardBlock", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getLifetimeRewards", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getLifetimeRewardsClaimed", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalClaimableRewards", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "user", "type": "address" }], - "name": "getUnclaimedRewards", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "addedValue", "type": "uint256" } - ], - "name": "increaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "contract ILendingPool", "name": "pool", "type": "address" }, - { "internalType": "address", "name": "aToken", "type": "address" }, - { "internalType": "string", "name": "staticATokenName", "type": "string" }, - { "internalType": "string", "name": "staticATokenSymbol", "type": "string" } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "isImplementation", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "depositor", "type": "address" }, - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "value", "type": "uint256" }, - { "internalType": "uint16", "name": "referralCode", "type": "uint16" }, - { "internalType": "bool", "name": "fromUnderlying", "type": "bool" }, - { "internalType": "uint256", "name": "deadline", "type": "uint256" }, - { - "components": [ - { "internalType": "uint8", "name": "v", "type": "uint8" }, - { "internalType": "bytes32", "name": "r", "type": "bytes32" }, - { "internalType": "bytes32", "name": "s", "type": "bytes32" } - ], - "internalType": "struct IStaticATokenLM.SignatureParams", - "name": "sigParams", - "type": "tuple" - } - ], - "name": "metaDeposit", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "staticAmount", "type": "uint256" }, - { "internalType": "uint256", "name": "dynamicAmount", "type": "uint256" }, - { "internalType": "bool", "name": "toUnderlying", "type": "bool" }, - { "internalType": "uint256", "name": "deadline", "type": "uint256" }, - { - "components": [ - { "internalType": "uint8", "name": "v", "type": "uint8" }, - { "internalType": "bytes32", "name": "r", "type": "bytes32" }, - { "internalType": "bytes32", "name": "s", "type": "bytes32" } - ], - "internalType": "struct IStaticATokenLM.SignatureParams", - "name": "sigParams", - "type": "tuple" - } - ], - "name": "metaWithdraw", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" }, - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "value", "type": "uint256" }, - { "internalType": "uint256", "name": "deadline", "type": "uint256" }, - { "internalType": "uint8", "name": "v", "type": "uint8" }, - { "internalType": "bytes32", "name": "r", "type": "bytes32" }, - { "internalType": "bytes32", "name": "s", "type": "bytes32" } - ], - "name": "permit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "rate", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], - "name": "staticToDynamicAmount", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "sender", "type": "address" }, - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { "internalType": "bool", "name": "toUnderlying", "type": "bool" } - ], - "name": "withdraw", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" }, - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { "internalType": "bool", "name": "toUnderlying", "type": "bool" } - ], - "name": "withdrawDynamicAmount", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" }, - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/balancer-v2/contracts/viem.contract-factory.ts b/src/apps/balancer-v2/contracts/viem.contract-factory.ts index c43ce26e4..9e8b54e87 100644 --- a/src/apps/balancer-v2/contracts/viem.contract-factory.ts +++ b/src/apps/balancer-v2/contracts/viem.contract-factory.ts @@ -14,10 +14,8 @@ import { BalancerMerkleRedeem__factory, BalancerPool__factory, BalancerStablePhantomPool__factory, - BalancerStaticAToken__factory, BalancerVault__factory, BalancerVeBal__factory, - BalancerWrappedAaveToken__factory, } from './viem'; type ContractOpts = { address: string; network: Network }; @@ -56,16 +54,10 @@ export class BalancerV2ViemContractFactory { balancerStablePhantomPool({ address, network }: ContractOpts) { return BalancerStablePhantomPool__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } - balancerStaticAToken({ address, network }: ContractOpts) { - return BalancerStaticAToken__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } balancerVault({ address, network }: ContractOpts) { return BalancerVault__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } balancerVeBal({ address, network }: ContractOpts) { return BalancerVeBal__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } - balancerWrappedAaveToken({ address, network }: ContractOpts) { - return BalancerWrappedAaveToken__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } } diff --git a/src/apps/balancer-v2/contracts/viem/BalancerStaticAToken.ts b/src/apps/balancer-v2/contracts/viem/BalancerStaticAToken.ts deleted file mode 100644 index 2c536f620..000000000 --- a/src/apps/balancer-v2/contracts/viem/BalancerStaticAToken.ts +++ /dev/null @@ -1,643 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const balancerStaticATokenAbi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - inputs: [], - name: 'ASSET', - outputs: [ - { - internalType: 'contract IERC20', - name: '', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'ATOKEN', - outputs: [ - { - internalType: 'contract IERC20', - name: '', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'LENDING_POOL', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - ], - name: '_nonces', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'uint16', - name: 'referralCode', - type: 'uint16', - }, - { - internalType: 'bool', - name: 'fromUnderlying', - type: 'bool', - }, - ], - name: 'deposit', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'dynamicBalanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'dynamicToStaticAmount', - outputs: [ - { - internalType: 'uint256', - name: 'staticAmount', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'chainId', - type: 'uint256', - }, - ], - name: 'getDomainSeparator', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'depositor', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - internalType: 'uint16', - name: 'referralCode', - type: 'uint16', - }, - { - internalType: 'bool', - name: 'fromUnderlying', - type: 'bool', - }, - { - internalType: 'uint256', - name: 'deadline', - type: 'uint256', - }, - { - components: [ - { - internalType: 'uint8', - name: 'v', - type: 'uint8', - }, - { - internalType: 'bytes32', - name: 'r', - type: 'bytes32', - }, - { - internalType: 'bytes32', - name: 's', - type: 'bytes32', - }, - ], - internalType: 'struct IStaticAToken.SignatureParams', - name: 'sigParams', - type: 'tuple', - }, - { - internalType: 'uint256', - name: 'chainId', - type: 'uint256', - }, - ], - name: 'metaDeposit', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'staticAmount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'dynamicAmount', - type: 'uint256', - }, - { - internalType: 'bool', - name: 'toUnderlying', - type: 'bool', - }, - { - internalType: 'uint256', - name: 'deadline', - type: 'uint256', - }, - { - components: [ - { - internalType: 'uint8', - name: 'v', - type: 'uint8', - }, - { - internalType: 'bytes32', - name: 'r', - type: 'bytes32', - }, - { - internalType: 'bytes32', - name: 's', - type: 'bytes32', - }, - ], - internalType: 'struct IStaticAToken.SignatureParams', - name: 'sigParams', - type: 'tuple', - }, - { - internalType: 'uint256', - name: 'chainId', - type: 'uint256', - }, - ], - name: 'metaWithdraw', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'deadline', - type: 'uint256', - }, - { - internalType: 'uint8', - name: 'v', - type: 'uint8', - }, - { - internalType: 'bytes32', - name: 'r', - type: 'bytes32', - }, - { - internalType: 'bytes32', - name: 's', - type: 'bytes32', - }, - { - internalType: 'uint256', - name: 'chainId', - type: 'uint256', - }, - ], - name: 'permit', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'rate', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'staticToDynamicAmount', - outputs: [ - { - internalType: 'uint256', - name: 'dynamicAmount', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'from', - type: 'address', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'bool', - name: 'toUnderlying', - type: 'bool', - }, - ], - name: 'withdraw', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'bool', - name: 'toUnderlying', - type: 'bool', - }, - ], - name: 'withdrawDynamicAmount', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type BalancerStaticAToken = typeof balancerStaticATokenAbi; -export type BalancerStaticATokenContract = GetContractReturnType; - -export class BalancerStaticAToken__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: balancerStaticATokenAbi, publicClient: client }); - } -} diff --git a/src/apps/balancer-v2/contracts/viem/BalancerWrappedAaveToken.ts b/src/apps/balancer-v2/contracts/viem/BalancerWrappedAaveToken.ts deleted file mode 100644 index b499c637e..000000000 --- a/src/apps/balancer-v2/contracts/viem/BalancerWrappedAaveToken.ts +++ /dev/null @@ -1,1067 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const balancerWrappedAaveTokenAbi = [ - { - inputs: [], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - indexed: false, - internalType: 'address', - name: 'aToken', - type: 'address', - }, - { - indexed: false, - internalType: 'string', - name: 'staticATokenName', - type: 'string', - }, - { - indexed: false, - internalType: 'string', - name: 'staticATokenSymbol', - type: 'string', - }, - ], - name: 'Initialized', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - inputs: [], - name: 'ASSET', - outputs: [ - { - internalType: 'contract IERC20', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'ATOKEN', - outputs: [ - { - internalType: 'contract IERC20', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'EIP712_REVISION', - outputs: [ - { - internalType: 'bytes', - name: '', - type: 'bytes', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'INCENTIVES_CONTROLLER', - outputs: [ - { - internalType: 'contract IAaveIncentivesController', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'LENDING_POOL', - outputs: [ - { - internalType: 'contract ILendingPool', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'METADEPOSIT_TYPEHASH', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'METAWITHDRAWAL_TYPEHASH', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'PERMIT_TYPEHASH', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'REWARD_TOKEN', - outputs: [ - { - internalType: 'contract IERC20', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'STATIC_ATOKEN_LM_REVISION', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'UNDERLYING_ASSET_ADDRESS', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: '_nonces', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - { - internalType: 'bool', - name: 'forceUpdate', - type: 'bool', - }, - ], - name: 'claimRewards', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'onBehalfOf', - type: 'address', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - { - internalType: 'bool', - name: 'forceUpdate', - type: 'bool', - }, - ], - name: 'claimRewardsOnBehalf', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bool', - name: 'forceUpdate', - type: 'bool', - }, - ], - name: 'claimRewardsToSelf', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'collectAndUpdateRewards', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'uint16', - name: 'referralCode', - type: 'uint16', - }, - { - internalType: 'bool', - name: 'fromUnderlying', - type: 'bool', - }, - ], - name: 'deposit', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'dynamicBalanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'dynamicToStaticAmount', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getAccRewardsPerToken', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'user', - type: 'address', - }, - ], - name: 'getClaimableRewards', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getDomainSeparator', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getIncentivesController', - outputs: [ - { - internalType: 'contract IAaveIncentivesController', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getLastRewardBlock', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getLifetimeRewards', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getLifetimeRewardsClaimed', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getTotalClaimableRewards', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'user', - type: 'address', - }, - ], - name: 'getUnclaimedRewards', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'contract ILendingPool', - name: 'pool', - type: 'address', - }, - { - internalType: 'address', - name: 'aToken', - type: 'address', - }, - { - internalType: 'string', - name: 'staticATokenName', - type: 'string', - }, - { - internalType: 'string', - name: 'staticATokenSymbol', - type: 'string', - }, - ], - name: 'initialize', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'isImplementation', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'depositor', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - internalType: 'uint16', - name: 'referralCode', - type: 'uint16', - }, - { - internalType: 'bool', - name: 'fromUnderlying', - type: 'bool', - }, - { - internalType: 'uint256', - name: 'deadline', - type: 'uint256', - }, - { - components: [ - { - internalType: 'uint8', - name: 'v', - type: 'uint8', - }, - { - internalType: 'bytes32', - name: 'r', - type: 'bytes32', - }, - { - internalType: 'bytes32', - name: 's', - type: 'bytes32', - }, - ], - internalType: 'struct IStaticATokenLM.SignatureParams', - name: 'sigParams', - type: 'tuple', - }, - ], - name: 'metaDeposit', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'staticAmount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'dynamicAmount', - type: 'uint256', - }, - { - internalType: 'bool', - name: 'toUnderlying', - type: 'bool', - }, - { - internalType: 'uint256', - name: 'deadline', - type: 'uint256', - }, - { - components: [ - { - internalType: 'uint8', - name: 'v', - type: 'uint8', - }, - { - internalType: 'bytes32', - name: 'r', - type: 'bytes32', - }, - { - internalType: 'bytes32', - name: 's', - type: 'bytes32', - }, - ], - internalType: 'struct IStaticATokenLM.SignatureParams', - name: 'sigParams', - type: 'tuple', - }, - ], - name: 'metaWithdraw', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'deadline', - type: 'uint256', - }, - { - internalType: 'uint8', - name: 'v', - type: 'uint8', - }, - { - internalType: 'bytes32', - name: 'r', - type: 'bytes32', - }, - { - internalType: 'bytes32', - name: 's', - type: 'bytes32', - }, - ], - name: 'permit', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'rate', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'staticToDynamicAmount', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'bool', - name: 'toUnderlying', - type: 'bool', - }, - ], - name: 'withdraw', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'bool', - name: 'toUnderlying', - type: 'bool', - }, - ], - name: 'withdrawDynamicAmount', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type BalancerWrappedAaveToken = typeof balancerWrappedAaveTokenAbi; -export type BalancerWrappedAaveTokenContract = GetContractReturnType; - -export class BalancerWrappedAaveToken__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: balancerWrappedAaveTokenAbi, publicClient: client }); - } -} diff --git a/src/apps/balancer-v2/contracts/viem/index.ts b/src/apps/balancer-v2/contracts/viem/index.ts index c9d01e568..06beb6f88 100644 --- a/src/apps/balancer-v2/contracts/viem/index.ts +++ b/src/apps/balancer-v2/contracts/viem/index.ts @@ -12,10 +12,8 @@ export type { BalancerMerkleOrchard } from './BalancerMerkleOrchard'; export type { BalancerMerkleRedeem } from './BalancerMerkleRedeem'; export type { BalancerPool } from './BalancerPool'; export type { BalancerStablePhantomPool } from './BalancerStablePhantomPool'; -export type { BalancerStaticAToken } from './BalancerStaticAToken'; export type { BalancerVault } from './BalancerVault'; export type { BalancerVeBal } from './BalancerVeBal'; -export type { BalancerWrappedAaveToken } from './BalancerWrappedAaveToken'; export { BalancerBoostedPool__factory } from './BalancerBoostedPool'; export { BalancerChildChainGaugeFactory__factory } from './BalancerChildChainGaugeFactory'; @@ -27,7 +25,5 @@ export { BalancerMerkleOrchard__factory } from './BalancerMerkleOrchard'; export { BalancerMerkleRedeem__factory } from './BalancerMerkleRedeem'; export { BalancerPool__factory } from './BalancerPool'; export { BalancerStablePhantomPool__factory } from './BalancerStablePhantomPool'; -export { BalancerStaticAToken__factory } from './BalancerStaticAToken'; export { BalancerVault__factory } from './BalancerVault'; export { BalancerVeBal__factory } from './BalancerVeBal'; -export { BalancerWrappedAaveToken__factory } from './BalancerWrappedAaveToken'; diff --git a/src/apps/balancer-v2/ethereum/balancer-v2.wrapped-aave.token-fetcher.ts b/src/apps/balancer-v2/ethereum/balancer-v2.wrapped-aave.token-fetcher.ts deleted file mode 100644 index dcbabf34c..000000000 --- a/src/apps/balancer-v2/ethereum/balancer-v2.wrapped-aave.token-fetcher.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; - -import { BalancerV2ViemContractFactory } from '../contracts'; -import { BalancerWrappedAaveToken } from '../contracts/viem'; - -@PositionTemplate() -export class EthereumBalancerV2WrappedAaveTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Wrapped Aave'; - - isExcludedFromExplore = true; - isExcludedFromTvl = true; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(BalancerV2ViemContractFactory) protected readonly contractFactory: BalancerV2ViemContractFactory, - ) { - super(appToolkit); - } - - async getAddresses() { - return [ - '0x02d60b84491589974263d922d9cc7a3152618ef6', // Wrapped aDAI - '0xd093fa4fb80d09bb30817fdcd442d4d02ed3e5de', // Wrapped aUSDC - '0xf8fd466f12e236f4c96f7cce6c79eadb819abf58', // Wrapped aUSDT - ]; - } - - getContract(address: string) { - return this.contractFactory.balancerWrappedAaveToken({ address, network: this.network }); - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.ATOKEN(), network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } -} diff --git a/src/apps/balancer-v2/polygon/balancer-v2.static-yield.token-fetcher.ts b/src/apps/balancer-v2/polygon/balancer-v2.static-yield.token-fetcher.ts deleted file mode 100644 index 7fd8f51a4..000000000 --- a/src/apps/balancer-v2/polygon/balancer-v2.static-yield.token-fetcher.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { BalancerV2StaticYieldTokenFetcher } from '../common/balancer-v2.static-yield.token-fetcher'; - -@PositionTemplate() -export class PolygonBalancerV2StaticYieldTokenFetcher extends BalancerV2StaticYieldTokenFetcher { - groupLabel = 'Static Yield'; - - staticYieldTokenAddresses = [ - '0xee029120c72b0607344f35b17cdd90025e647b00', // amDAI - '0x221836a597948dce8f3568e044ff123108acc42a', // amUSDC - '0x19c60a251e525fa88cd6f3768416a8024e98fc19', // amUSDT - ]; -} diff --git a/src/apps/bancor-v3/bancor-v3.module.ts b/src/apps/bancor-v3/bancor-v3.module.ts index e9dccbbfb..364d5675e 100644 --- a/src/apps/bancor-v3/bancor-v3.module.ts +++ b/src/apps/bancor-v3/bancor-v3.module.ts @@ -3,7 +3,6 @@ import { Module } from '@nestjs/common'; import { AbstractApp } from '~app/app.dynamic-module'; import { BancorV3ViemContractFactory } from './contracts'; -import { EthereumBancorV3BntPoolTokenFetcher } from './ethereum/bancor-v3.bnt-pool.token-fetcher'; import { EthereumBancorV3FarmContractPositionFetcher } from './ethereum/bancor-v3.farm.contract-position-fetcher'; import { EthereumBancorV3PoolTokenFetcher } from './ethereum/bancor-v3.pool.token-fetcher'; @@ -12,7 +11,6 @@ import { EthereumBancorV3PoolTokenFetcher } from './ethereum/bancor-v3.pool.toke BancorV3ViemContractFactory, EthereumBancorV3FarmContractPositionFetcher, EthereumBancorV3PoolTokenFetcher, - EthereumBancorV3BntPoolTokenFetcher, ], }) export class BancorV3AppModule extends AbstractApp() {} diff --git a/src/apps/bancor-v3/ethereum/bancor-v3.bnt-pool.token-fetcher.ts b/src/apps/bancor-v3/ethereum/bancor-v3.bnt-pool.token-fetcher.ts deleted file mode 100644 index 9051f8985..000000000 --- a/src/apps/bancor-v3/ethereum/bancor-v3.bnt-pool.token-fetcher.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { ETH_ADDR_ALIAS, ZERO_ADDRESS } from '~app-toolkit/constants/address'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { - DefaultAppTokenDefinition, - DefaultAppTokenDataProps, - GetUnderlyingTokensParams, - GetPricePerShareParams, -} from '~position/template/app-token.template.types'; - -import { BancorV3ViemContractFactory } from '../contracts'; -import { PoolToken } from '../contracts/viem'; - -@PositionTemplate() -export class EthereumBancorV3BntPoolTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Pools'; - - bntPoolAddress = '0x02651e355d26f3506c1e644ba393fdd9ac95eaca'; - bntPoolTokenAddress = '0xab05cf7c6c3a288cd36326e4f7b8600e7268e344'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(BancorV3ViemContractFactory) protected readonly contractFactory: BancorV3ViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.poolToken({ address, network: this.network }); - } - - async getAddresses() { - return [this.bntPoolTokenAddress]; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - const underlyingTokenAddressRaw = await contract.read.reserveToken(); - const underlyingTokenAddress = underlyingTokenAddressRaw.toLowerCase().replace(ETH_ADDR_ALIAS, ZERO_ADDRESS); - return [{ address: underlyingTokenAddress, network: this.network }]; - } - - async getPricePerShare({ - multicall, - appToken, - }: GetPricePerShareParams) { - const bntPoolContract = this.contractFactory.bntPool({ - address: this.bntPoolAddress, - network: this.network, - }); - - const ratioRaw = await multicall - .wrap(bntPoolContract) - .read.poolTokenToUnderlying([BigInt(10 ** appToken.tokens[0].decimals)]); - const ratio = Number(ratioRaw) / 10 ** appToken.tokens[0].decimals; - - return [ratio]; - } -} diff --git a/src/apps/concentrator/concentrator.module.ts b/src/apps/concentrator/concentrator.module.ts index 96a4b1fcf..87304eb81 100644 --- a/src/apps/concentrator/concentrator.module.ts +++ b/src/apps/concentrator/concentrator.module.ts @@ -3,11 +3,9 @@ import { Module } from '@nestjs/common'; import { AbstractApp } from '~app/app.dynamic-module'; import { ConcentratorViemContractFactory } from './contracts'; -import { EthereumConcentratorAbcCvxTokenFetcher } from './ethereum/concentrator.abc.token-fetcher'; import { EthereumConcentratorAcrvVaultContractPositionFetcher } from './ethereum/concentrator.acrv-vault.contract-position-fetcher'; import { EthereumConcentratorAfrxethVaultContractPositionFetcher } from './ethereum/concentrator.afrxeth-vault.contract-position-fetcher'; import { EthereumConcentratorAfxsVaultContractPositionFetcher } from './ethereum/concentrator.afxs-vault.contract-position-fetcher'; -import { EthereumConcentratorCompounderTokenFetcher } from './ethereum/concentrator.compounder.token-fetcher'; import { EthereumConcentratorLegacyVaultContractPositionFetcher } from './ethereum/concentrator.legacy-vault.contract-position-fetcher'; import { EthereumConcentratorVestingContractPositionFetcher } from './ethereum/concentrator.vesting.contract-position-fetcher'; import { EthereumConcentratorVotingEscrowContractPositionFetcher } from './ethereum/concentrator.voting-escrow.contract-position-fetcher'; @@ -15,10 +13,8 @@ import { EthereumConcentratorVotingEscrowContractPositionFetcher } from './ether @Module({ providers: [ ConcentratorViemContractFactory, - EthereumConcentratorAbcCvxTokenFetcher, EthereumConcentratorAcrvVaultContractPositionFetcher, EthereumConcentratorAfxsVaultContractPositionFetcher, - EthereumConcentratorCompounderTokenFetcher, EthereumConcentratorLegacyVaultContractPositionFetcher, EthereumConcentratorAfrxethVaultContractPositionFetcher, EthereumConcentratorVotingEscrowContractPositionFetcher, diff --git a/src/apps/concentrator/ethereum/concentrator.abc.token-fetcher.ts b/src/apps/concentrator/ethereum/concentrator.abc.token-fetcher.ts deleted file mode 100644 index e501e71a8..000000000 --- a/src/apps/concentrator/ethereum/concentrator.abc.token-fetcher.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetPricePerShareParams, GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; - -import { ConcentratorViemContractFactory } from '../contracts'; -import { AbcCvx } from '../contracts/viem'; - -@PositionTemplate() -export class EthereumConcentratorAbcCvxTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'abcCVX'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(ConcentratorViemContractFactory) protected readonly contractFactory: ConcentratorViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.abcCvx({ address, network: this.network }); - } - - getAddresses() { - return ['0xdec800c2b17c9673570fdf54450dc1bd79c8e359']; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [ - { address: await contract.read.curveLpToken(), network: this.network }, - { address: await contract.read.debtToken(), network: this.network }, - ]; - } - - async getPricePerShare({ contract }: GetPricePerShareParams) { - const supply = await contract.read.totalSupply(); - const reserves = await Promise.all([contract.read.totalCurveLpToken(), contract.read.totalDebtToken()]); - return reserves.map(r => Number(r) / Number(supply)); - } -} diff --git a/src/apps/concentrator/ethereum/concentrator.compounder.token-fetcher.ts b/src/apps/concentrator/ethereum/concentrator.compounder.token-fetcher.ts deleted file mode 100644 index 95dc24eee..000000000 --- a/src/apps/concentrator/ethereum/concentrator.compounder.token-fetcher.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetPricePerShareParams, GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; - -import { ConcentratorViemContractFactory } from '../contracts'; -import { AladdinConcentratorCompounder } from '../contracts/viem'; - -@PositionTemplate() -export class EthereumConcentratorCompounderTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Compounder'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(ConcentratorViemContractFactory) protected readonly contractFactory: ConcentratorViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.aladdinConcentratorCompounder({ address, network: this.network }); - } - - getAddresses() { - return [ - '0x2b95a1dcc3d405535f9ed33c219ab38e8d7e0884', // aCRV - '0xb15ad6113264094fd9bf2238729410a07ebe5aba', // afrxETH - '0xdaf03d70fe637b91ba6e521a32e1fb39256d3ec9', // aFXS - '0x43e54c2e7b3e294de3a155785f52ab49d87b9922', // asdCRV - ]; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.asset(), network: this.network }]; - } - - async getPricePerShare({ appToken, contract }: GetPricePerShareParams) { - const reserveRaw = await contract.read.totalAssets(); - const reserve = Number(reserveRaw) / 10 ** appToken.tokens[0].decimals; - const pricePerShare = appToken.supply > 0 ? reserve / appToken.supply : 0; - return [pricePerShare]; - } -} diff --git a/src/apps/dfx/common/dfx.curve.token-fetcher.ts b/src/apps/dfx/common/dfx.curve.token-fetcher.ts deleted file mode 100644 index ecde40e47..000000000 --- a/src/apps/dfx/common/dfx.curve.token-fetcher.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { getLabelFromToken } from '~app-toolkit/helpers/presentation/image.present'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { - GetDisplayPropsParams, - GetPricePerShareParams, - GetUnderlyingTokensParams, -} from '~position/template/app-token.template.types'; - -import { DfxViemContractFactory } from '../contracts'; -import { DfxCurve } from '../contracts/viem'; - -export abstract class DfxCurveTokenFetcher extends AppTokenTemplatePositionFetcher { - abstract poolAddresses: string[]; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(DfxViemContractFactory) protected readonly contractFactory: DfxViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.dfxCurve({ network: this.network, address }); - } - - async getAddresses() { - return this.poolAddresses; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [ - { address: await contract.read.numeraires([BigInt(0)]), network: this.network }, - { address: await contract.read.numeraires([BigInt(1)]), network: this.network }, - ]; - } - - async getPricePerShare({ contract, appToken }: GetPricePerShareParams) { - const liquidity = await contract.read.liquidity(); - const reserves = liquidity[1].map(reserveRaw => Number(reserveRaw) / 10 ** 18); // DFX report all token liquidity in 10**18 - - return reserves.map(r => r / appToken.supply); - } - - async getLabel({ appToken }: GetDisplayPropsParams) { - return appToken.tokens.map(v => getLabelFromToken(v)).join(' / '); - } -} diff --git a/src/apps/dfx/dfx.module.ts b/src/apps/dfx/dfx.module.ts index 13ca0658f..49d4dc5f3 100644 --- a/src/apps/dfx/dfx.module.ts +++ b/src/apps/dfx/dfx.module.ts @@ -3,19 +3,15 @@ import { Module } from '@nestjs/common'; import { AbstractApp } from '~app/app.dynamic-module'; import { DfxViemContractFactory } from './contracts'; -import { EthereumDfxCurveTokenFetcher } from './ethereum/dfx.curve.token-fetcher'; import { EthereumDfxStakingContractPositionFetcher } from './ethereum/dfx.staking.contract-position-fetcher'; -import { PolygonDfxCurveTokenFetcher } from './polygon/dfx.curve.token-fetcher'; import { PolygonDfxStakingContractPositionFetcher } from './polygon/dfx.staking.contract-position-fetcher'; @Module({ providers: [ DfxViemContractFactory, // Ethereum - EthereumDfxCurveTokenFetcher, EthereumDfxStakingContractPositionFetcher, // Polygon - PolygonDfxCurveTokenFetcher, PolygonDfxStakingContractPositionFetcher, ], }) diff --git a/src/apps/dfx/ethereum/dfx.curve.token-fetcher.ts b/src/apps/dfx/ethereum/dfx.curve.token-fetcher.ts deleted file mode 100644 index 240d2291e..000000000 --- a/src/apps/dfx/ethereum/dfx.curve.token-fetcher.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { DfxCurveTokenFetcher } from '../common/dfx.curve.token-fetcher'; - -@PositionTemplate() -export class EthereumDfxCurveTokenFetcher extends DfxCurveTokenFetcher { - groupLabel = 'DFX Curves'; - poolAddresses = [ - '0xa6c0cbcaebd93ad3c6c94412ec06aaa37870216d', // cadc-Usdc - '0x1a4ffe0dcbdb4d551cfca61a5626afd190731347', // eurs-Usdc - '0x2bab29a12a9527a179da88f422cdaaa223a90bd5', // xsgd-Usdc - '0xe9669516e09f5710023566458f329cce6437aaac', // nzds-Usdc - '0xc574a613a3900e4314da13eb2287f13689a5b64d', // tryb-Usdc - '0xdd39379ab7c93b9baae29e6ec03795d0bc99a889', // xidr-Usdc - ]; -} diff --git a/src/apps/dfx/polygon/dfx.curve.token-fetcher.ts b/src/apps/dfx/polygon/dfx.curve.token-fetcher.ts deleted file mode 100644 index 3a66f8a97..000000000 --- a/src/apps/dfx/polygon/dfx.curve.token-fetcher.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { DfxCurveTokenFetcher } from '../common/dfx.curve.token-fetcher'; - -@PositionTemplate() -export class PolygonDfxCurveTokenFetcher extends DfxCurveTokenFetcher { - groupLabel = 'DFX Curves'; - poolAddresses = [ - '0x288ab1b113c666abb097bb2ba51b8f3759d7729e', // cadc-Usdc - '0xb72d390e07f40d37d42dfcc43e954ae7c738ad44', // eurs-Usdc - '0x8e3e9cb46e593ec0caf4a1dcd6df3a79a87b1fd7', // xsgd-Usdc - '0x931d6a6cc3f992beee80a1a14a6530d34104b000', // nzds-Usdc - '0xea75cd0b12a8b48f5bddad37ceb15f8cb3d2cc75', // tryb-Usdc - ]; -} diff --git a/src/apps/dinero/assets/0x04c154b66cb340f3ae24111cc767e0184ed00cc6.png b/src/apps/dinero/assets/0x04c154b66cb340f3ae24111cc767e0184ed00cc6.png deleted file mode 100644 index f2008b44e..000000000 Binary files a/src/apps/dinero/assets/0x04c154b66cb340f3ae24111cc767e0184ed00cc6.png and /dev/null differ diff --git a/src/apps/dinero/assets/0x9ba021b0a9b958b5e75ce9f6dff97c7ee52cb3e6.png b/src/apps/dinero/assets/0x9ba021b0a9b958b5e75ce9f6dff97c7ee52cb3e6.png deleted file mode 100644 index 65e8c71fe..000000000 Binary files a/src/apps/dinero/assets/0x9ba021b0a9b958b5e75ce9f6dff97c7ee52cb3e6.png and /dev/null differ diff --git a/src/apps/dinero/assets/logo.png b/src/apps/dinero/assets/logo.png deleted file mode 100644 index 84c09cbde..000000000 Binary files a/src/apps/dinero/assets/logo.png and /dev/null differ diff --git a/src/apps/dinero/contracts/abis/dinero-apxeth.json b/src/apps/dinero/contracts/abis/dinero-apxeth.json deleted file mode 100644 index 38bad4e9b..000000000 --- a/src/apps/dinero/contracts/abis/dinero-apxeth.json +++ /dev/null @@ -1,1161 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "_asset", - "type": "address" - }, - { - "internalType": "address", - "name": "_platform", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "ExceedsMax", - "type": "error" - }, - { - "inputs": [], - "name": "NoRewards", - "type": "error" - }, - { - "inputs": [], - "name": "NotPirexEth", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroAddress", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "assets", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Harvest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferStarted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - } - ], - "name": "PlatformFeeUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "_platform", - "type": "address" - } - ], - "name": "PlatformUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "_pirexEth", - "type": "address" - } - ], - "name": "SetPirexEth", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "assets", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "name": "Withdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "penalty", - "type": "uint256" - } - ], - "name": "WithdrawalPenaltyUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "acceptOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "asset", - "outputs": [ - { - "internalType": "contract ERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "assetsPerShare", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "name": "convertToAssets", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "assets", - "type": "uint256" - } - ], - "name": "convertToShares", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "assets", - "type": "uint256" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "deposit", - "outputs": [ - { - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "earned", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "harvest", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "lastTimeRewardApplicable", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastUpdateTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "maxDeposit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "maxMint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "maxRedeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "maxWithdraw", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "shares", - "type": "uint256" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "assets", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "notifyRewardAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pendingOwner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "periodFinish", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "permit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pirexEth", - "outputs": [ - { - "internalType": "contract IPirexEth", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "platform", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "platformFee", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "assets", - "type": "uint256" - } - ], - "name": "previewDeposit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "name": "previewMint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "name": "previewRedeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "assets", - "type": "uint256" - } - ], - "name": "previewWithdraw", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "shares", - "type": "uint256" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "assets", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "rewardPerToken", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rewardPerTokenPaid", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rewardPerTokenStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rewardRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rewards", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_pirexEth", - "type": "address" - } - ], - "name": "setPirexEth", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_platform", - "type": "address" - } - ], - "name": "setPlatform", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - } - ], - "name": "setPlatformFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "penalty", - "type": "uint256" - } - ], - "name": "setWithdrawalPenalty", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalAssets", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalStaked", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "assets", - "type": "uint256" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "withdraw", - "outputs": [ - { - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "withdrawalPenalty", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/src/apps/dinero/contracts/abis/dinero-pxeth.json b/src/apps/dinero/contracts/abis/dinero-pxeth.json deleted file mode 100644 index 3b44b3ad1..000000000 --- a/src/apps/dinero/contracts/abis/dinero-pxeth.json +++ /dev/null @@ -1,778 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "_admin", - "type": "address" - }, - { - "internalType": "uint48", - "name": "_initialDelay", - "type": "uint48" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "EmptyString", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroAddress", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroAmount", - "type": "error" - }, - { - "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": [], - "name": "DefaultAdminDelayChangeCanceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint48", - "name": "newDelay", - "type": "uint48" - }, - { - "indexed": false, - "internalType": "uint48", - "name": "effectSchedule", - "type": "uint48" - } - ], - "name": "DefaultAdminDelayChangeScheduled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "DefaultAdminTransferCanceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint48", - "name": "acceptSchedule", - "type": "uint48" - } - ], - "name": "DefaultAdminTransferScheduled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "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" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "acceptDefaultAdminTransfer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "beginDefaultAdminTransfer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_from", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "cancelDefaultAdminTransfer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint48", - "name": "newDelay", - "type": "uint48" - } - ], - "name": "changeDefaultAdminDelay", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "defaultAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "defaultAdminDelay", - "outputs": [ - { - "internalType": "uint48", - "name": "", - "type": "uint48" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "defaultAdminDelayIncreaseWait", - "outputs": [ - { - "internalType": "uint48", - "name": "", - "type": "uint48" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_from", - "type": "address" - }, - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "operatorApprove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pendingDefaultAdmin", - "outputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - }, - { - "internalType": "uint48", - "name": "schedule", - "type": "uint48" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pendingDefaultAdminDelay", - "outputs": [ - { - "internalType": "uint48", - "name": "newDelay", - "type": "uint48" - }, - { - "internalType": "uint48", - "name": "schedule", - "type": "uint48" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "permit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "rollbackDefaultAdminDelay", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/dinero/contracts/index.ts b/src/apps/dinero/contracts/index.ts deleted file mode 100644 index 5dcfebdf6..000000000 --- a/src/apps/dinero/contracts/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * from './viem.contract-factory'; diff --git a/src/apps/dinero/contracts/viem.contract-factory.ts b/src/apps/dinero/contracts/viem.contract-factory.ts deleted file mode 100644 index 952ab1356..000000000 --- a/src/apps/dinero/contracts/viem.contract-factory.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Injectable, Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { Network } from '~types/network.interface'; - -import { DineroApxeth__factory, DineroPxeth__factory } from './viem'; - -type ContractOpts = { address: string; network: Network }; - -@Injectable() -export class DineroViemContractFactory { - constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - - dineroApxeth({ address, network }: ContractOpts) { - return DineroApxeth__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - dineroPxeth({ address, network }: ContractOpts) { - return DineroPxeth__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } -} diff --git a/src/apps/dinero/contracts/viem/DineroApxeth.ts b/src/apps/dinero/contracts/viem/DineroApxeth.ts deleted file mode 100644 index 8760eeed4..000000000 --- a/src/apps/dinero/contracts/viem/DineroApxeth.ts +++ /dev/null @@ -1,1175 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const dineroApxethAbi = [ - { - inputs: [ - { - internalType: 'address', - name: '_asset', - type: 'address', - }, - { - internalType: 'address', - name: '_platform', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - inputs: [], - name: 'ExceedsMax', - type: 'error', - }, - { - inputs: [], - name: 'NoRewards', - type: 'error', - }, - { - inputs: [], - name: 'NotPirexEth', - type: 'error', - }, - { - inputs: [], - name: 'ZeroAddress', - type: 'error', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'caller', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'Deposit', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'caller', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Harvest', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipTransferStarted', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipTransferred', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'fee', - type: 'uint256', - }, - ], - name: 'PlatformFeeUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: '_platform', - type: 'address', - }, - ], - name: 'PlatformUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'reward', - type: 'uint256', - }, - ], - name: 'RewardAdded', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: '_pirexEth', - type: 'address', - }, - ], - name: 'SetPirexEth', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'caller', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'receiver', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'Withdraw', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'penalty', - type: 'uint256', - }, - ], - name: 'WithdrawalPenaltyUpdated', - type: 'event', - }, - { - inputs: [], - name: 'DOMAIN_SEPARATOR', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'acceptOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'asset', - outputs: [ - { - internalType: 'contract ERC20', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'assetsPerShare', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'convertToAssets', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - name: 'convertToShares', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - ], - name: 'deposit', - outputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'earned', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'harvest', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'lastTimeRewardApplicable', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'lastUpdateTime', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'maxDeposit', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'maxMint', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - ], - name: 'maxRedeem', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - ], - name: 'maxWithdraw', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - ], - name: 'mint', - outputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'nonces', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'notifyRewardAmount', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'owner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'pendingOwner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'periodFinish', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'deadline', - type: 'uint256', - }, - { - internalType: 'uint8', - name: 'v', - type: 'uint8', - }, - { - internalType: 'bytes32', - name: 'r', - type: 'bytes32', - }, - { - internalType: 'bytes32', - name: 's', - type: 'bytes32', - }, - ], - name: 'permit', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'pirexEth', - outputs: [ - { - internalType: 'contract IPirexEth', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'platform', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'platformFee', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - name: 'previewDeposit', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'previewMint', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'previewRedeem', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - name: 'previewWithdraw', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - ], - name: 'redeem', - outputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'renounceOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'rewardPerToken', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'rewardPerTokenPaid', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'rewardPerTokenStored', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'rewardRate', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'rewards', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_pirexEth', - type: 'address', - }, - ], - name: 'setPirexEth', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_platform', - type: 'address', - }, - ], - name: 'setPlatform', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'fee', - type: 'uint256', - }, - ], - name: 'setPlatformFee', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'penalty', - type: 'uint256', - }, - ], - name: 'setWithdrawalPenalty', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalAssets', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalStaked', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'from', - type: 'address', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'transferOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - ], - name: 'withdraw', - outputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'withdrawalPenalty', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, -] as const; - -export type DineroApxeth = typeof dineroApxethAbi; -export type DineroApxethContract = GetContractReturnType; - -export class DineroApxeth__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: dineroApxethAbi, publicClient: client }); - } -} diff --git a/src/apps/dinero/contracts/viem/DineroPxeth.ts b/src/apps/dinero/contracts/viem/DineroPxeth.ts deleted file mode 100644 index 8c4f6e83a..000000000 --- a/src/apps/dinero/contracts/viem/DineroPxeth.ts +++ /dev/null @@ -1,792 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const dineroPxethAbi = [ - { - inputs: [ - { - internalType: 'address', - name: '_admin', - type: 'address', - }, - { - internalType: 'uint48', - name: '_initialDelay', - type: 'uint48', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - inputs: [], - name: 'EmptyString', - type: 'error', - }, - { - inputs: [], - name: 'ZeroAddress', - type: 'error', - }, - { - inputs: [], - name: 'ZeroAmount', - type: 'error', - }, - { - 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: [], - name: 'DefaultAdminDelayChangeCanceled', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint48', - name: 'newDelay', - type: 'uint48', - }, - { - indexed: false, - internalType: 'uint48', - name: 'effectSchedule', - type: 'uint48', - }, - ], - name: 'DefaultAdminDelayChangeScheduled', - type: 'event', - }, - { - anonymous: false, - inputs: [], - name: 'DefaultAdminTransferCanceled', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'newAdmin', - type: 'address', - }, - { - indexed: false, - internalType: 'uint48', - name: 'acceptSchedule', - type: 'uint48', - }, - ], - name: 'DefaultAdminTransferScheduled', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'bytes32', - name: 'previousAdminRole', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'bytes32', - name: 'newAdminRole', - type: 'bytes32', - }, - ], - name: 'RoleAdminChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'address', - name: 'account', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'sender', - type: 'address', - }, - ], - name: 'RoleGranted', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'address', - name: 'account', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'sender', - type: 'address', - }, - ], - name: 'RoleRevoked', - 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', - }, - { - inputs: [], - name: 'DEFAULT_ADMIN_ROLE', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'DOMAIN_SEPARATOR', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'acceptDefaultAdminTransfer', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newAdmin', - type: 'address', - }, - ], - name: 'beginDefaultAdminTransfer', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_from', - type: 'address', - }, - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'burn', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'cancelDefaultAdminTransfer', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint48', - name: 'newDelay', - type: 'uint48', - }, - ], - name: 'changeDefaultAdminDelay', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'defaultAdmin', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'defaultAdminDelay', - outputs: [ - { - internalType: 'uint48', - name: '', - type: 'uint48', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'defaultAdminDelayIncreaseWait', - outputs: [ - { - internalType: 'uint48', - name: '', - type: 'uint48', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - ], - name: 'getRoleAdmin', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'grantRole', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'hasRole', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_to', - type: 'address', - }, - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'mint', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'nonces', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_from', - type: 'address', - }, - { - internalType: 'address', - name: '_to', - type: 'address', - }, - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'operatorApprove', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'owner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'pendingDefaultAdmin', - outputs: [ - { - internalType: 'address', - name: 'newAdmin', - type: 'address', - }, - { - internalType: 'uint48', - name: 'schedule', - type: 'uint48', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'pendingDefaultAdminDelay', - outputs: [ - { - internalType: 'uint48', - name: 'newDelay', - type: 'uint48', - }, - { - internalType: 'uint48', - name: 'schedule', - type: 'uint48', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'deadline', - type: 'uint256', - }, - { - internalType: 'uint8', - name: 'v', - type: 'uint8', - }, - { - internalType: 'bytes32', - name: 'r', - type: 'bytes32', - }, - { - internalType: 'bytes32', - name: 's', - type: 'bytes32', - }, - ], - name: 'permit', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'renounceRole', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'revokeRole', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'rollbackDefaultAdminDelay', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes4', - name: 'interfaceId', - type: 'bytes4', - }, - ], - name: 'supportsInterface', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'from', - type: 'address', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type DineroPxeth = typeof dineroPxethAbi; -export type DineroPxethContract = GetContractReturnType; - -export class DineroPxeth__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: dineroPxethAbi, publicClient: client }); - } -} diff --git a/src/apps/dinero/contracts/viem/index.ts b/src/apps/dinero/contracts/viem/index.ts deleted file mode 100644 index bd051a32d..000000000 --- a/src/apps/dinero/contracts/viem/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -export type { DineroApxeth } from './DineroApxeth'; -export type { DineroPxeth } from './DineroPxeth'; - -export { DineroApxeth__factory } from './DineroApxeth'; -export { DineroPxeth__factory } from './DineroPxeth'; diff --git a/src/apps/dinero/dinero.module.ts b/src/apps/dinero/dinero.module.ts deleted file mode 100644 index 73a4a0ac2..000000000 --- a/src/apps/dinero/dinero.module.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Module } from '@nestjs/common'; - -import { AbstractApp } from '~app/app.dynamic-module'; - -import { DineroViemContractFactory } from './contracts'; -import { EthereumDineroApxethTokenFetcher } from './ethereum/dinero.apxeth.token-fetcher'; -import { EthereumDineroPirexEthTokenFetcher } from './ethereum/dinero.pxeth.token-fetcher'; - -@Module({ - providers: [DineroViemContractFactory, EthereumDineroPirexEthTokenFetcher, EthereumDineroApxethTokenFetcher], -}) -export class DineroAppModule extends AbstractApp() { } diff --git a/src/apps/dinero/ethereum/dinero.apxeth.token-fetcher.ts b/src/apps/dinero/ethereum/dinero.apxeth.token-fetcher.ts deleted file mode 100644 index 398387247..000000000 --- a/src/apps/dinero/ethereum/dinero.apxeth.token-fetcher.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { getTokenImg } from '~app-toolkit/helpers/presentation/image.present'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetUnderlyingTokensParams, GetPricePerShareParams } from '~position/template/app-token.template.types'; - -import { DineroViemContractFactory } from '../contracts'; -import { DineroApxeth } from '../contracts/viem/DineroApxeth'; - -@PositionTemplate() -export class EthereumDineroApxethTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'apxETH'; - - isExcludedFromTvl = true; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(DineroViemContractFactory) protected readonly dineroContractFactory: DineroViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.dineroContractFactory.dineroApxeth({ address, network: this.network }); - } - - async getAddresses(): Promise { - return ['0x9ba021b0a9b958b5e75ce9f6dff97c7ee52cb3e6']; - } - - async getImages({ appToken }) { - return [getTokenImg(appToken.address, this.network)]; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.asset(), network: this.network }]; - } - - async getPricePerShare({ contract }: GetPricePerShareParams) { - const totalSupply = await contract.read.totalSupply(); - const totalAssets = await contract.read.totalAssets(); - return Number(totalSupply) == 0 ? [1] : [Number(totalAssets) / Number(totalSupply)]; - } -} diff --git a/src/apps/dinero/ethereum/dinero.pxeth.token-fetcher.ts b/src/apps/dinero/ethereum/dinero.pxeth.token-fetcher.ts deleted file mode 100644 index 40c9b40dd..000000000 --- a/src/apps/dinero/ethereum/dinero.pxeth.token-fetcher.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { getTokenImg } from '~app-toolkit/helpers/presentation/image.present'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; - -import { DineroViemContractFactory } from '../contracts'; -import { DineroPxeth } from '../contracts/viem/DineroPxeth'; - -@PositionTemplate() -export class EthereumDineroPirexEthTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'pxETH'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(DineroViemContractFactory) protected readonly dineroContractFactory: DineroViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.dineroContractFactory.dineroPxeth({ address, network: this.network }); - } - - async getAddresses() { - return ['0x04c154b66cb340f3ae24111cc767e0184ed00cc6']; - } - - async getImages({ appToken }) { - return [getTokenImg(appToken.address, this.network)]; - } - - async getUnderlyingTokenDefinitions() { - return [{ address: '0x0000000000000000000000000000000000000000', network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } -} diff --git a/src/apps/euler/assets/logo.png b/src/apps/euler/assets/logo.png deleted file mode 100644 index d124e8878..000000000 Binary files a/src/apps/euler/assets/logo.png and /dev/null differ diff --git a/src/apps/euler/common/euler.api.staking-registry.ts b/src/apps/euler/common/euler.api.staking-registry.ts deleted file mode 100644 index 35147ddce..000000000 --- a/src/apps/euler/common/euler.api.staking-registry.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { Inject, Injectable } from '@nestjs/common'; -import axios from 'axios'; - -import { EulerTokenDefinitionsResolver } from '~apps/euler/common/euler.token-definition-resolver'; -import { CacheOnInterval } from '~cache/cache-on-interval.decorator'; -import { Network } from '~types'; - -const IPFS_HASH_MAPPING = { - // [Network.ETHEREUM_MAINNET]: 'k51qzi5uqu5dhglpppd2ls4cc7mu34ik70ecsvfdyahjipjcuj03lw8iz8rvqm', - [Network.ETHEREUM_MAINNET]: 'k51qzi5uqu5dm889k8q7u1jsgt4an0st16gwkrcvqftofp3qqfeuo4r27ejq0o', -}; - -interface IpfsName { - value: string; -} - -interface GetFarmDefinitionsProps { - network: Network; -} - -interface Market { - underlying: string; - eulDistribution?: { - gauges?: { - amount: string; - APR: number; - }; - staking?: { - contractAddress: string; - staked: { - amount: string; - valueETH: number; - valueUSD: number; - }; - rewardRate: string; - APR: number; - periodFinish: number; - }; - }; -} - -interface EulerActivatedMarkets { - markets: Market[]; -} - -@Injectable() -export class EulerApiStakingRegistry { - constructor( - @Inject(EulerTokenDefinitionsResolver) protected readonly tokenCacheManager: EulerTokenDefinitionsResolver, - ) {} - - @CacheOnInterval({ - key: `studio:euler:single-staking-farm:staking-definitions-data`, - timeout: 5 * 60 * 1000, - }) - private getStakingDefinitionsData(opts?: GetFarmDefinitionsProps) { - const ipfsHash = IPFS_HASH_MAPPING[opts?.network || Network.ETHEREUM_MAINNET]; - return axios - .get(`https://name.web3.storage/name/${ipfsHash}`) - .then(ipfs => - axios - .get( - `https://${ipfs.data.value.replace('/ipfs/', '')}.ipfs.w3s.link/EulerActivatedMarkets.json`, - ) - .then(v => v.data.markets), - ); - } - - async getStakingDefinitions(opts?: GetFarmDefinitionsProps) { - const stakingDefinitions = await this.getStakingDefinitionsData(opts); - - return Promise.all( - stakingDefinitions - .filter(market => market.eulDistribution?.staking) - .map(async ({ underlying, eulDistribution }) => { - const market = await this.tokenCacheManager.getMarketByUnderlying(underlying); - - return { - tokenAddress: underlying, - eTokenAddress: market?.eTokenAddress ?? null, - vaultAddress: eulDistribution?.staking?.contractAddress ?? '', - apr: eulDistribution?.staking?.APR ?? null, - }; - }), - ); - } -} diff --git a/src/apps/euler/common/euler.d-token.token-fetcher.ts b/src/apps/euler/common/euler.d-token.token-fetcher.ts deleted file mode 100644 index 3123a73cc..000000000 --- a/src/apps/euler/common/euler.d-token.token-fetcher.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { - GetUnderlyingTokensParams, - GetAddressesParams, - GetDataPropsParams, - DefaultAppTokenDataProps, -} from '~position/template/app-token.template.types'; - -import { EulerViemContractFactory } from '../contracts'; -import { EulerDtokenContract } from '../contracts/viem'; - -import { EulerTokenDefinition, EulerTokenDefinitionsResolver, EulerTokenType } from './euler.token-definition-resolver'; - -export abstract class EulerDTokenTokenFetcher extends AppTokenTemplatePositionFetcher< - EulerDtokenContract, - DefaultAppTokenDataProps, - EulerTokenDefinition -> { - isDebt = true; - abstract tokenType: EulerTokenType; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(EulerTokenDefinitionsResolver) - private readonly tokenDefinitionsResolver: EulerTokenDefinitionsResolver, - @Inject(EulerViemContractFactory) protected readonly contractFactory: EulerViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.eulerDtokenContract({ network: this.network, address }); - } - - async getDefinitions(): Promise { - return this.tokenDefinitionsResolver.getTokenDefinitions(this.tokenType); - } - - async getAddresses({ definitions }: GetAddressesParams): Promise { - return definitions.map(v => v.address); - } - - async getSymbol({ address }): Promise { - const market = await this.tokenDefinitionsResolver.getMarket(address, this.tokenType); - return `D${market!.symbol}`; - } - - async getUnderlyingTokenDefinitions({ - definition, - }: GetUnderlyingTokensParams) { - return [{ address: definition.underlyingTokenAddress, network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } - - async getApy({ appToken }: GetDataPropsParams) { - const market = await this.tokenDefinitionsResolver.getMarket(appToken.address, this.tokenType); - return (Number(market!.borrowAPY) * 100) / 1e27; - } -} diff --git a/src/apps/euler/common/euler.e-token.token-fetcher.ts b/src/apps/euler/common/euler.e-token.token-fetcher.ts deleted file mode 100644 index 956aac8bb..000000000 --- a/src/apps/euler/common/euler.e-token.token-fetcher.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { Inject } from '@nestjs/common'; -import { ethers } from 'ethers'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { - GetUnderlyingTokensParams, - GetAddressesParams, - GetDataPropsParams, - DefaultAppTokenDataProps, - GetPricePerShareParams, -} from '~position/template/app-token.template.types'; - -import { EulerViemContractFactory } from '../contracts'; -import { EulerEtokenContract } from '../contracts/viem'; - -import { EulerTokenDefinition, EulerTokenDefinitionsResolver, EulerTokenType } from './euler.token-definition-resolver'; - -export abstract class EulerETokenTokenFetcher extends AppTokenTemplatePositionFetcher< - EulerEtokenContract, - DefaultAppTokenDataProps, - EulerTokenDefinition -> { - abstract tokenType: EulerTokenType; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(EulerTokenDefinitionsResolver) - private readonly tokenDefinitionsResolver: EulerTokenDefinitionsResolver, - @Inject(EulerViemContractFactory) protected readonly contractFactory: EulerViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.eulerEtokenContract({ network: this.network, address }); - } - - async getDefinitions(): Promise { - return this.tokenDefinitionsResolver.getTokenDefinitions(this.tokenType); - } - - async getAddresses({ definitions }: GetAddressesParams): Promise { - return definitions.map(v => v.address); - } - - async getUnderlyingTokenDefinitions({ - definition, - }: GetUnderlyingTokensParams) { - return [{ address: definition.underlyingTokenAddress, network: this.network }]; - } - - async getSymbol({ address }): Promise { - const market = await this.tokenDefinitionsResolver.getMarket(address, this.tokenType); - return `E${market!.symbol}`; - } - - async getPricePerShare({ contract, multicall, appToken }: GetPricePerShareParams) { - const oneUnit = ethers.BigNumber.from(10).pow(18).toString(); - const pricePerShareRaw = await multicall.wrap(contract).read.convertBalanceToUnderlying([BigInt(oneUnit)]); - const pricePerShare = Number(pricePerShareRaw) / 10 ** appToken.tokens[0].decimals; - return [pricePerShare]; - } - - async getLiquidity({ appToken }: GetDataPropsParams) { - return (this.isDebt ? -1 : 1) * appToken.price * appToken.supply; - } - - async getReserves({ appToken }: GetDataPropsParams) { - return [appToken.pricePerShare[0] * appToken.supply]; - } - - async getApy({ appToken }: GetDataPropsParams) { - const market = await this.tokenDefinitionsResolver.getMarket(appToken.address, this.tokenType); - return (Number(market!.supplyAPY) * 100) / 1e27; - } -} diff --git a/src/apps/euler/common/euler.p-token.token-fetcher.ts b/src/apps/euler/common/euler.p-token.token-fetcher.ts deleted file mode 100644 index 98811cbc3..000000000 --- a/src/apps/euler/common/euler.p-token.token-fetcher.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { - GetUnderlyingTokensParams, - GetAddressesParams, - DefaultAppTokenDataProps, -} from '~position/template/app-token.template.types'; - -import { EulerViemContractFactory } from '../contracts'; -import { EulerPtokenContract } from '../contracts/viem'; - -import { EulerTokenDefinition, EulerTokenDefinitionsResolver, EulerTokenType } from './euler.token-definition-resolver'; - -export abstract class EulerPTokenTokenFetcher extends AppTokenTemplatePositionFetcher< - EulerPtokenContract, - DefaultAppTokenDataProps, - EulerTokenDefinition -> { - abstract tokenType: EulerTokenType; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(EulerTokenDefinitionsResolver) - private readonly tokenDefinitionsResolver: EulerTokenDefinitionsResolver, - @Inject(EulerViemContractFactory) protected readonly contractFactory: EulerViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.eulerPtokenContract({ network: this.network, address }); - } - - async getDefinitions(): Promise { - return this.tokenDefinitionsResolver.getTokenDefinitions(this.tokenType); - } - - async getAddresses({ definitions }: GetAddressesParams): Promise { - return definitions.map(v => v.address); - } - - async getUnderlyingTokenDefinitions({ - definition, - }: GetUnderlyingTokensParams) { - return [{ address: definition.underlyingTokenAddress, network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } - - async getSymbol({ address }): Promise { - const market = await this.tokenDefinitionsResolver.getMarket(address, this.tokenType); - return `P${market!.symbol}`; - } -} diff --git a/src/apps/euler/common/euler.token-definition-resolver.ts b/src/apps/euler/common/euler.token-definition-resolver.ts deleted file mode 100644 index 292274f1d..000000000 --- a/src/apps/euler/common/euler.token-definition-resolver.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { Inject, Injectable } from '@nestjs/common'; -import { gql } from 'graphql-request'; -import _ from 'lodash'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { ZERO_ADDRESS } from '~app-toolkit/constants/address'; -import { gqlFetch } from '~app-toolkit/helpers/the-graph.helper'; - -export type EulerTokenDefinition = { - address: string; - underlyingTokenAddress: string; -}; - -interface EulerMarketsResponse { - eulerMarketStore: { - markets: { - id: string; - interestRate: string; - borrowAPY: string; - supplyAPY: string; - totalSupply: string; - twap: string; - name: string; - symbol: string; - decimals: string; - dTokenAddress: string; - eTokenAddress: string; - pTokenAddress: string; - }[]; - }; -} - -export const MARKET_QUERY = gql` - { - eulerMarketStore(id: "euler-market-store") { - markets(first: 1000) { - id - interestRate - borrowAPY - supplyAPY - totalSupply - twap - name - symbol - decimals - dTokenAddress - eTokenAddress - pTokenAddress - } - } - } -`; - -export enum EulerTokenType { - D_TOKEN = 'dTokenAddress', - E_TOKEN = 'eTokenAddress', - P_TOKEN = 'pTokenAddress', -} - -const brokenMarketAddress = ['0x31c8eacbffdd875c74b94b077895bd78cf1e64a3']; // RAD - -@Injectable() -export class EulerTokenDefinitionsResolver { - constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - - private async getTokenDefinitionsData() { - const data = await gqlFetch({ - endpoint: `https://api.thegraph.com/subgraphs/name/euler-xyz/euler-mainnet?source=zapper`, - query: MARKET_QUERY, - }); - - const marketRaw = data.eulerMarketStore.markets; - - return marketRaw.filter(x => !brokenMarketAddress.includes(x.id)); - } - - async getTokenDefinitions(tokenType: EulerTokenType) { - const definitionsData = await this.getTokenDefinitionsData(); - - const tokenDefinitions = definitionsData.map(market => { - if (market[tokenType] === ZERO_ADDRESS) return null; - return { - address: market[tokenType].toLowerCase(), - underlyingTokenAddress: market.id.toLowerCase(), - }; - }); - - return _.compact(tokenDefinitions); - } - - async getMarket(tokenAddress: string, tokenType: EulerTokenType) { - const definitionsData = await this.getTokenDefinitionsData(); - - return definitionsData.find(x => x[tokenType].toLowerCase() === tokenAddress); - } - - async getMarketByUnderlying(tokenAddress: string) { - const definitionsData = await this.getTokenDefinitionsData(); - - return definitionsData.find(x => x.id.toLowerCase() === tokenAddress); - } -} diff --git a/src/apps/euler/contracts/abis/euler-dtoken-contract.json b/src/apps/euler/contracts/abis/euler-dtoken-contract.json deleted file mode 100644 index 3d10ae7aa..000000000 --- a/src/apps/euler/contracts/abis/euler-dtoken-contract.json +++ /dev/null @@ -1,1193 +0,0 @@ -[ - { - "stateMutability": "nonpayable", - "inputs": [ - { - "type": "bytes32", - "internalType": "bytes32", - "name": "moduleGitCommit_" - } - ], - "type": "constructor" - }, - { - "type": "event", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address", - "indexed": true - }, - { - "indexed": true, - "internalType": "address", - "type": "address", - "name": "spender" - }, - { - "name": "value", - "internalType": "uint256", - "indexed": false, - "type": "uint256" - } - ], - "name": "Approval", - "anonymous": false - }, - { - "inputs": [ - { - "internalType": "address", - "indexed": true, - "type": "address", - "name": "underlying" - }, - { - "type": "uint256", - "internalType": "uint256", - "indexed": false, - "name": "totalBalances" - }, - { - "name": "totalBorrows", - "type": "uint256", - "internalType": "uint256", - "indexed": false - }, - { - "internalType": "uint96", - "indexed": false, - "type": "uint96", - "name": "reserveBalance" - }, - { - "name": "poolSize", - "type": "uint256", - "internalType": "uint256", - "indexed": false - }, - { - "name": "interestAccumulator", - "indexed": false, - "internalType": "uint256", - "type": "uint256" - }, - { - "name": "interestRate", - "type": "int96", - "internalType": "int96", - "indexed": false - }, - { - "name": "timestamp", - "indexed": false, - "internalType": "uint256", - "type": "uint256" - } - ], - "type": "event", - "anonymous": false, - "name": "AssetStatus" - }, - { - "anonymous": false, - "name": "Borrow", - "inputs": [ - { - "name": "underlying", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "type": "address", - "internalType": "address", - "indexed": true, - "name": "account" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256", - "indexed": false - } - ], - "type": "event" - }, - { - "name": "DelegateAverageLiquidity", - "anonymous": false, - "inputs": [ - { - "name": "account", - "indexed": true, - "internalType": "address", - "type": "address" - }, - { - "name": "delegate", - "indexed": true, - "internalType": "address", - "type": "address" - } - ], - "type": "event" - }, - { - "name": "Deposit", - "anonymous": false, - "type": "event", - "inputs": [ - { - "name": "underlying", - "type": "address", - "internalType": "address", - "indexed": true - }, - { - "type": "address", - "indexed": true, - "internalType": "address", - "name": "account" - }, - { - "internalType": "uint256", - "indexed": false, - "type": "uint256", - "name": "amount" - } - ] - }, - { - "type": "event", - "inputs": [ - { - "type": "address", - "indexed": true, - "internalType": "address", - "name": "underlying" - }, - { - "type": "address", - "internalType": "address", - "indexed": true, - "name": "account" - } - ], - "name": "EnterMarket", - "anonymous": false - }, - { - "anonymous": false, - "name": "ExitMarket", - "inputs": [ - { - "type": "address", - "indexed": true, - "internalType": "address", - "name": "underlying" - }, - { - "type": "address", - "internalType": "address", - "indexed": true, - "name": "account" - } - ], - "type": "event" - }, - { - "name": "Genesis", - "anonymous": false, - "type": "event", - "inputs": [] - }, - { - "type": "event", - "inputs": [ - { - "name": "underlying", - "indexed": true, - "internalType": "address", - "type": "address" - }, - { - "name": "recipient", - "internalType": "address", - "indexed": true, - "type": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "name": "GovConvertReserves", - "anonymous": false - }, - { - "type": "event", - "inputs": [ - { - "type": "address", - "indexed": true, - "internalType": "address", - "name": "underlying" - }, - { - "internalType": "struct Storage.AssetConfig", - "indexed": false, - "type": "tuple", - "name": "newConfig", - "components": [ - { - "internalType": "address", - "type": "address", - "name": "eTokenAddress" - }, - { - "type": "bool", - "internalType": "bool", - "name": "borrowIsolated" - }, - { - "internalType": "uint32", - "type": "uint32", - "name": "collateralFactor" - }, - { - "name": "borrowFactor", - "internalType": "uint32", - "type": "uint32" - }, - { - "internalType": "uint24", - "type": "uint24", - "name": "twapWindow" - } - ] - } - ], - "name": "GovSetAssetConfig", - "anonymous": false - }, - { - "name": "GovSetIRM", - "anonymous": false, - "type": "event", - "inputs": [ - { - "name": "underlying", - "indexed": true, - "internalType": "address", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "type": "uint256", - "name": "interestRateModel" - }, - { - "indexed": false, - "internalType": "bytes", - "type": "bytes", - "name": "resetParams" - } - ] - }, - { - "name": "GovSetPricingConfig", - "anonymous": false, - "inputs": [ - { - "name": "underlying", - "type": "address", - "internalType": "address", - "indexed": true - }, - { - "type": "uint16", - "indexed": false, - "internalType": "uint16", - "name": "newPricingType" - }, - { - "type": "uint32", - "internalType": "uint32", - "indexed": false, - "name": "newPricingParameter" - } - ], - "type": "event" - }, - { - "type": "event", - "inputs": [ - { - "name": "underlying", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newReserveFee", - "indexed": false, - "internalType": "uint32", - "type": "uint32" - } - ], - "anonymous": false, - "name": "GovSetReserveFee" - }, - { - "anonymous": false, - "name": "InstallerInstallModule", - "inputs": [ - { - "type": "uint256", - "indexed": true, - "internalType": "uint256", - "name": "moduleId" - }, - { - "indexed": true, - "internalType": "address", - "type": "address", - "name": "moduleImpl" - }, - { - "name": "moduleGitCommit", - "internalType": "bytes32", - "indexed": false, - "type": "bytes32" - } - ], - "type": "event" - }, - { - "type": "event", - "inputs": [ - { - "indexed": true, - "internalType": "address", - "type": "address", - "name": "newGovernorAdmin" - } - ], - "anonymous": false, - "name": "InstallerSetGovernorAdmin" - }, - { - "inputs": [ - { - "name": "newUpgradeAdmin", - "type": "address", - "internalType": "address", - "indexed": true - } - ], - "type": "event", - "anonymous": false, - "name": "InstallerSetUpgradeAdmin" - }, - { - "type": "event", - "inputs": [ - { - "internalType": "address", - "indexed": true, - "type": "address", - "name": "liquidator" - }, - { - "name": "violator", - "internalType": "address", - "indexed": true, - "type": "address" - }, - { - "type": "address", - "indexed": true, - "internalType": "address", - "name": "underlying" - }, - { - "type": "address", - "internalType": "address", - "indexed": false, - "name": "collateral" - }, - { - "name": "repay", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "type": "uint256", - "internalType": "uint256", - "indexed": false, - "name": "yield" - }, - { - "name": "healthScore", - "type": "uint256", - "internalType": "uint256", - "indexed": false - }, - { - "name": "baseDiscount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "type": "uint256", - "internalType": "uint256", - "indexed": false, - "name": "discount" - } - ], - "anonymous": false, - "name": "Liquidation" - }, - { - "type": "event", - "inputs": [ - { - "internalType": "address", - "indexed": true, - "type": "address", - "name": "underlying" - }, - { - "type": "address", - "internalType": "address", - "indexed": true, - "name": "eToken" - }, - { - "type": "address", - "internalType": "address", - "indexed": true, - "name": "dToken" - } - ], - "name": "MarketActivated", - "anonymous": false - }, - { - "name": "PTokenActivated", - "anonymous": false, - "inputs": [ - { - "type": "address", - "internalType": "address", - "indexed": true, - "name": "underlying" - }, - { - "name": "pToken", - "type": "address", - "internalType": "address", - "indexed": true - } - ], - "type": "event" - }, - { - "anonymous": false, - "name": "PTokenUnWrap", - "inputs": [ - { - "name": "underlying", - "internalType": "address", - "indexed": true, - "type": "address" - }, - { - "type": "address", - "indexed": true, - "internalType": "address", - "name": "account" - }, - { - "internalType": "uint256", - "indexed": false, - "type": "uint256", - "name": "amount" - } - ], - "type": "event" - }, - { - "name": "PTokenWrap", - "anonymous": false, - "inputs": [ - { - "name": "underlying", - "type": "address", - "internalType": "address", - "indexed": true - }, - { - "indexed": true, - "internalType": "address", - "type": "address", - "name": "account" - }, - { - "type": "uint256", - "internalType": "uint256", - "indexed": false, - "name": "amount" - } - ], - "type": "event" - }, - { - "anonymous": false, - "name": "ProxyCreated", - "type": "event", - "inputs": [ - { - "type": "address", - "indexed": true, - "internalType": "address", - "name": "proxy" - }, - { - "indexed": false, - "internalType": "uint256", - "type": "uint256", - "name": "moduleId" - } - ] - }, - { - "name": "Repay", - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "type": "address", - "name": "underlying" - }, - { - "name": "account", - "indexed": true, - "internalType": "address", - "type": "address" - }, - { - "name": "amount", - "internalType": "uint256", - "indexed": false, - "type": "uint256" - } - ], - "type": "event" - }, - { - "name": "RequestBorrow", - "anonymous": false, - "type": "event", - "inputs": [ - { - "name": "account", - "internalType": "address", - "indexed": true, - "type": "address" - }, - { - "name": "amount", - "internalType": "uint256", - "indexed": false, - "type": "uint256" - } - ] - }, - { - "name": "RequestBurn", - "anonymous": false, - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address", - "indexed": true - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "type": "event" - }, - { - "type": "event", - "inputs": [ - { - "indexed": true, - "internalType": "address", - "type": "address", - "name": "account" - }, - { - "name": "amount", - "indexed": false, - "internalType": "uint256", - "type": "uint256" - } - ], - "name": "RequestDeposit", - "anonymous": false - }, - { - "inputs": [ - { - "internalType": "address", - "indexed": true, - "type": "address", - "name": "liquidator" - }, - { - "name": "violator", - "type": "address", - "internalType": "address", - "indexed": true - }, - { - "name": "underlying", - "type": "address", - "internalType": "address", - "indexed": true - }, - { - "name": "collateral", - "indexed": false, - "internalType": "address", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "type": "uint256", - "name": "repay" - }, - { - "type": "uint256", - "internalType": "uint256", - "indexed": false, - "name": "minYield" - } - ], - "type": "event", - "anonymous": false, - "name": "RequestLiquidate" - }, - { - "inputs": [ - { - "type": "address", - "internalType": "address", - "indexed": true, - "name": "account" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256", - "indexed": false - } - ], - "type": "event", - "name": "RequestMint", - "anonymous": false - }, - { - "name": "RequestRepay", - "anonymous": false, - "inputs": [ - { - "internalType": "address", - "indexed": true, - "type": "address", - "name": "account" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "type": "event" - }, - { - "anonymous": false, - "name": "RequestSwap", - "inputs": [ - { - "indexed": true, - "internalType": "address", - "type": "address", - "name": "accountIn" - }, - { - "name": "accountOut", - "type": "address", - "internalType": "address", - "indexed": true - }, - { - "internalType": "address", - "indexed": true, - "type": "address", - "name": "underlyingIn" - }, - { - "internalType": "address", - "indexed": false, - "type": "address", - "name": "underlyingOut" - }, - { - "type": "uint256", - "indexed": false, - "internalType": "uint256", - "name": "amount" - }, - { - "name": "swapType", - "internalType": "uint256", - "indexed": false, - "type": "uint256" - } - ], - "type": "event" - }, - { - "inputs": [ - { - "type": "address", - "internalType": "address", - "indexed": true, - "name": "from" - }, - { - "name": "to", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "internalType": "uint256", - "indexed": false, - "type": "uint256", - "name": "amount" - } - ], - "type": "event", - "name": "RequestTransferDToken", - "anonymous": false - }, - { - "name": "RequestTransferEToken", - "anonymous": false, - "inputs": [ - { - "name": "from", - "type": "address", - "internalType": "address", - "indexed": true - }, - { - "name": "to", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "internalType": "uint256", - "indexed": false, - "type": "uint256" - } - ], - "type": "event" - }, - { - "anonymous": false, - "name": "RequestWithdraw", - "type": "event", - "inputs": [ - { - "name": "account", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "type": "uint256", - "indexed": false, - "internalType": "uint256", - "name": "amount" - } - ] - }, - { - "anonymous": false, - "name": "TrackAverageLiquidity", - "inputs": [ - { - "type": "address", - "indexed": true, - "internalType": "address", - "name": "account" - } - ], - "type": "event" - }, - { - "name": "Transfer", - "anonymous": false, - "type": "event", - "inputs": [ - { - "name": "from", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "type": "address", - "internalType": "address", - "indexed": true, - "name": "to" - }, - { - "type": "uint256", - "indexed": false, - "internalType": "uint256", - "name": "value" - } - ] - }, - { - "inputs": [ - { - "internalType": "address", - "indexed": true, - "type": "address", - "name": "account" - } - ], - "type": "event", - "anonymous": false, - "name": "UnTrackAverageLiquidity" - }, - { - "inputs": [ - { - "name": "underlying", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "type": "address", - "indexed": true, - "internalType": "address", - "name": "account" - }, - { - "type": "uint256", - "indexed": false, - "internalType": "uint256", - "name": "amount" - } - ], - "type": "event", - "anonymous": false, - "name": "Withdraw" - }, - { - "inputs": [ - { - "name": "subAccountId", - "internalType": "uint256", - "type": "uint256" - }, - { - "type": "address", - "internalType": "address", - "name": "spender" - }, - { - "type": "uint256", - "internalType": "uint256", - "name": "amount" - } - ], - "outputs": [ - { - "name": "", - "internalType": "bool", - "type": "bool" - } - ], - "type": "function", - "name": "approveDebt", - "stateMutability": "nonpayable" - }, - { - "type": "function", - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "inputs": [ - { - "type": "address", - "internalType": "address", - "name": "account" - } - ], - "stateMutability": "view", - "name": "balanceOf" - }, - { - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "internalType": "uint256", - "type": "uint256", - "name": "" - } - ], - "type": "function", - "name": "balanceOfExact", - "stateMutability": "view" - }, - { - "inputs": [ - { - "internalType": "uint256", - "type": "uint256", - "name": "subAccountId" - }, - { - "type": "uint256", - "internalType": "uint256", - "name": "amount" - } - ], - "outputs": [], - "type": "function", - "name": "borrow", - "stateMutability": "nonpayable" - }, - { - "name": "debtAllowance", - "stateMutability": "view", - "outputs": [ - { - "internalType": "uint256", - "type": "uint256", - "name": "" - } - ], - "inputs": [ - { - "name": "holder", - "internalType": "address", - "type": "address" - }, - { - "name": "spender", - "type": "address", - "internalType": "address" - } - ], - "type": "function" - }, - { - "outputs": [ - { - "name": "", - "type": "uint8", - "internalType": "uint8" - } - ], - "inputs": [], - "type": "function", - "name": "decimals", - "stateMutability": "pure" - }, - { - "name": "moduleGitCommit", - "stateMutability": "view", - "outputs": [ - { - "internalType": "bytes32", - "type": "bytes32", - "name": "" - } - ], - "inputs": [], - "type": "function" - }, - { - "name": "moduleId", - "stateMutability": "view", - "outputs": [ - { - "type": "uint256", - "internalType": "uint256", - "name": "" - } - ], - "inputs": [], - "type": "function" - }, - { - "name": "name", - "stateMutability": "view", - "outputs": [ - { - "type": "string", - "internalType": "string", - "name": "" - } - ], - "inputs": [], - "type": "function" - }, - { - "type": "function", - "inputs": [ - { - "type": "uint256", - "internalType": "uint256", - "name": "subAccountId" - }, - { - "name": "amount", - "internalType": "uint256", - "type": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable", - "name": "repay" - }, - { - "name": "symbol", - "stateMutability": "view", - "outputs": [ - { - "internalType": "string", - "type": "string", - "name": "" - } - ], - "inputs": [], - "type": "function" - }, - { - "type": "function", - "inputs": [], - "outputs": [ - { - "name": "", - "internalType": "uint256", - "type": "uint256" - } - ], - "stateMutability": "view", - "name": "totalSupply" - }, - { - "stateMutability": "view", - "name": "totalSupplyExact", - "type": "function", - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "inputs": [] - }, - { - "stateMutability": "nonpayable", - "name": "transfer", - "type": "function", - "outputs": [ - { - "type": "bool", - "internalType": "bool", - "name": "" - } - ], - "inputs": [ - { - "internalType": "address", - "type": "address", - "name": "to" - }, - { - "type": "uint256", - "internalType": "uint256", - "name": "amount" - } - ] - }, - { - "stateMutability": "nonpayable", - "name": "transferFrom", - "type": "function", - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "inputs": [ - { - "name": "from", - "type": "address", - "internalType": "address" - }, - { - "name": "to", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "internalType": "uint256", - "type": "uint256" - } - ] - } -] diff --git a/src/apps/euler/contracts/abis/euler-etoken-contract.json b/src/apps/euler/contracts/abis/euler-etoken-contract.json deleted file mode 100644 index c6f19bc1c..000000000 --- a/src/apps/euler/contracts/abis/euler-etoken-contract.json +++ /dev/null @@ -1,1348 +0,0 @@ -[ - { - "stateMutability": "nonpayable", - "inputs": [ - { - "internalType": "bytes32", - "type": "bytes32", - "name": "moduleGitCommit_" - } - ], - "type": "constructor" - }, - { - "name": "Approval", - "anonymous": false, - "type": "event", - "inputs": [ - { - "name": "owner", - "internalType": "address", - "indexed": true, - "type": "address" - }, - { - "name": "spender", - "internalType": "address", - "indexed": true, - "type": "address" - }, - { - "type": "uint256", - "indexed": false, - "internalType": "uint256", - "name": "value" - } - ] - }, - { - "anonymous": false, - "name": "AssetStatus", - "inputs": [ - { - "type": "address", - "indexed": true, - "internalType": "address", - "name": "underlying" - }, - { - "internalType": "uint256", - "indexed": false, - "type": "uint256", - "name": "totalBalances" - }, - { - "internalType": "uint256", - "indexed": false, - "type": "uint256", - "name": "totalBorrows" - }, - { - "indexed": false, - "internalType": "uint96", - "type": "uint96", - "name": "reserveBalance" - }, - { - "type": "uint256", - "internalType": "uint256", - "indexed": false, - "name": "poolSize" - }, - { - "name": "interestAccumulator", - "type": "uint256", - "internalType": "uint256", - "indexed": false - }, - { - "indexed": false, - "internalType": "int96", - "type": "int96", - "name": "interestRate" - }, - { - "name": "timestamp", - "type": "uint256", - "internalType": "uint256", - "indexed": false - } - ], - "type": "event" - }, - { - "name": "Borrow", - "anonymous": false, - "type": "event", - "inputs": [ - { - "name": "underlying", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "type": "address", - "indexed": true, - "internalType": "address", - "name": "account" - }, - { - "name": "amount", - "indexed": false, - "internalType": "uint256", - "type": "uint256" - } - ] - }, - { - "type": "event", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address", - "indexed": true - }, - { - "type": "address", - "internalType": "address", - "indexed": true, - "name": "delegate" - } - ], - "name": "DelegateAverageLiquidity", - "anonymous": false - }, - { - "anonymous": false, - "name": "Deposit", - "type": "event", - "inputs": [ - { - "name": "underlying", - "type": "address", - "internalType": "address", - "indexed": true - }, - { - "indexed": true, - "internalType": "address", - "type": "address", - "name": "account" - }, - { - "type": "uint256", - "indexed": false, - "internalType": "uint256", - "name": "amount" - } - ] - }, - { - "type": "event", - "inputs": [ - { - "name": "underlying", - "type": "address", - "internalType": "address", - "indexed": true - }, - { - "type": "address", - "internalType": "address", - "indexed": true, - "name": "account" - } - ], - "name": "EnterMarket", - "anonymous": false - }, - { - "type": "event", - "inputs": [ - { - "name": "underlying", - "type": "address", - "internalType": "address", - "indexed": true - }, - { - "indexed": true, - "internalType": "address", - "type": "address", - "name": "account" - } - ], - "name": "ExitMarket", - "anonymous": false - }, - { - "name": "Genesis", - "anonymous": false, - "inputs": [], - "type": "event" - }, - { - "name": "GovConvertReserves", - "anonymous": false, - "type": "event", - "inputs": [ - { - "name": "underlying", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "recipient", - "internalType": "address", - "indexed": true, - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "type": "uint256", - "name": "amount" - } - ] - }, - { - "inputs": [ - { - "type": "address", - "internalType": "address", - "indexed": true, - "name": "underlying" - }, - { - "indexed": false, - "internalType": "struct Storage.AssetConfig", - "type": "tuple", - "name": "newConfig", - "components": [ - { - "name": "eTokenAddress", - "type": "address", - "internalType": "address" - }, - { - "name": "borrowIsolated", - "internalType": "bool", - "type": "bool" - }, - { - "internalType": "uint32", - "type": "uint32", - "name": "collateralFactor" - }, - { - "internalType": "uint32", - "type": "uint32", - "name": "borrowFactor" - }, - { - "internalType": "uint24", - "type": "uint24", - "name": "twapWindow" - } - ] - } - ], - "type": "event", - "name": "GovSetAssetConfig", - "anonymous": false - }, - { - "name": "GovSetIRM", - "anonymous": false, - "inputs": [ - { - "name": "underlying", - "indexed": true, - "internalType": "address", - "type": "address" - }, - { - "type": "uint256", - "internalType": "uint256", - "indexed": false, - "name": "interestRateModel" - }, - { - "name": "resetParams", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - } - ], - "type": "event" - }, - { - "inputs": [ - { - "name": "underlying", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "indexed": false, - "internalType": "uint16", - "type": "uint16", - "name": "newPricingType" - }, - { - "name": "newPricingParameter", - "type": "uint32", - "indexed": false, - "internalType": "uint32" - } - ], - "type": "event", - "name": "GovSetPricingConfig", - "anonymous": false - }, - { - "anonymous": false, - "name": "GovSetReserveFee", - "inputs": [ - { - "indexed": true, - "internalType": "address", - "type": "address", - "name": "underlying" - }, - { - "indexed": false, - "internalType": "uint32", - "type": "uint32", - "name": "newReserveFee" - } - ], - "type": "event" - }, - { - "anonymous": false, - "name": "InstallerInstallModule", - "inputs": [ - { - "name": "moduleId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "internalType": "address", - "indexed": true, - "type": "address", - "name": "moduleImpl" - }, - { - "internalType": "bytes32", - "indexed": false, - "type": "bytes32", - "name": "moduleGitCommit" - } - ], - "type": "event" - }, - { - "inputs": [ - { - "type": "address", - "indexed": true, - "internalType": "address", - "name": "newGovernorAdmin" - } - ], - "type": "event", - "name": "InstallerSetGovernorAdmin", - "anonymous": false - }, - { - "name": "InstallerSetUpgradeAdmin", - "anonymous": false, - "type": "event", - "inputs": [ - { - "type": "address", - "internalType": "address", - "indexed": true, - "name": "newUpgradeAdmin" - } - ] - }, - { - "inputs": [ - { - "name": "liquidator", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "type": "address", - "indexed": true, - "internalType": "address", - "name": "violator" - }, - { - "indexed": true, - "internalType": "address", - "type": "address", - "name": "underlying" - }, - { - "name": "collateral", - "internalType": "address", - "indexed": false, - "type": "address" - }, - { - "type": "uint256", - "indexed": false, - "internalType": "uint256", - "name": "repay" - }, - { - "type": "uint256", - "indexed": false, - "internalType": "uint256", - "name": "yield" - }, - { - "name": "healthScore", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "baseDiscount", - "indexed": false, - "internalType": "uint256", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "type": "uint256", - "name": "discount" - } - ], - "type": "event", - "anonymous": false, - "name": "Liquidation" - }, - { - "type": "event", - "inputs": [ - { - "indexed": true, - "internalType": "address", - "type": "address", - "name": "underlying" - }, - { - "name": "eToken", - "indexed": true, - "internalType": "address", - "type": "address" - }, - { - "name": "dToken", - "internalType": "address", - "indexed": true, - "type": "address" - } - ], - "anonymous": false, - "name": "MarketActivated" - }, - { - "type": "event", - "inputs": [ - { - "internalType": "address", - "indexed": true, - "type": "address", - "name": "underlying" - }, - { - "name": "pToken", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false, - "name": "PTokenActivated" - }, - { - "inputs": [ - { - "name": "underlying", - "internalType": "address", - "indexed": true, - "type": "address" - }, - { - "name": "account", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "type": "uint256", - "indexed": false, - "internalType": "uint256", - "name": "amount" - } - ], - "type": "event", - "name": "PTokenUnWrap", - "anonymous": false - }, - { - "anonymous": false, - "name": "PTokenWrap", - "inputs": [ - { - "name": "underlying", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "type": "address", - "internalType": "address", - "indexed": true, - "name": "account" - }, - { - "type": "uint256", - "internalType": "uint256", - "indexed": false, - "name": "amount" - } - ], - "type": "event" - }, - { - "type": "event", - "inputs": [ - { - "type": "address", - "internalType": "address", - "indexed": true, - "name": "proxy" - }, - { - "name": "moduleId", - "internalType": "uint256", - "indexed": false, - "type": "uint256" - } - ], - "name": "ProxyCreated", - "anonymous": false - }, - { - "inputs": [ - { - "internalType": "address", - "indexed": true, - "type": "address", - "name": "underlying" - }, - { - "type": "address", - "internalType": "address", - "indexed": true, - "name": "account" - }, - { - "indexed": false, - "internalType": "uint256", - "type": "uint256", - "name": "amount" - } - ], - "type": "event", - "anonymous": false, - "name": "Repay" - }, - { - "inputs": [ - { - "indexed": true, - "internalType": "address", - "type": "address", - "name": "account" - }, - { - "indexed": false, - "internalType": "uint256", - "type": "uint256", - "name": "amount" - } - ], - "type": "event", - "name": "RequestBorrow", - "anonymous": false - }, - { - "inputs": [ - { - "type": "address", - "indexed": true, - "internalType": "address", - "name": "account" - }, - { - "type": "uint256", - "indexed": false, - "internalType": "uint256", - "name": "amount" - } - ], - "type": "event", - "name": "RequestBurn", - "anonymous": false - }, - { - "type": "event", - "inputs": [ - { - "internalType": "address", - "indexed": true, - "type": "address", - "name": "account" - }, - { - "type": "uint256", - "indexed": false, - "internalType": "uint256", - "name": "amount" - } - ], - "anonymous": false, - "name": "RequestDeposit" - }, - { - "type": "event", - "inputs": [ - { - "name": "liquidator", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "violator", - "internalType": "address", - "indexed": true, - "type": "address" - }, - { - "name": "underlying", - "type": "address", - "internalType": "address", - "indexed": true - }, - { - "internalType": "address", - "indexed": false, - "type": "address", - "name": "collateral" - }, - { - "indexed": false, - "internalType": "uint256", - "type": "uint256", - "name": "repay" - }, - { - "type": "uint256", - "indexed": false, - "internalType": "uint256", - "name": "minYield" - } - ], - "name": "RequestLiquidate", - "anonymous": false - }, - { - "name": "RequestMint", - "anonymous": false, - "type": "event", - "inputs": [ - { - "name": "account", - "internalType": "address", - "indexed": true, - "type": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ] - }, - { - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address", - "indexed": true - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "type": "event", - "anonymous": false, - "name": "RequestRepay" - }, - { - "inputs": [ - { - "name": "accountIn", - "internalType": "address", - "indexed": true, - "type": "address" - }, - { - "internalType": "address", - "indexed": true, - "type": "address", - "name": "accountOut" - }, - { - "name": "underlyingIn", - "internalType": "address", - "indexed": true, - "type": "address" - }, - { - "name": "underlyingOut", - "indexed": false, - "internalType": "address", - "type": "address" - }, - { - "internalType": "uint256", - "indexed": false, - "type": "uint256", - "name": "amount" - }, - { - "type": "uint256", - "internalType": "uint256", - "indexed": false, - "name": "swapType" - } - ], - "type": "event", - "name": "RequestSwap", - "anonymous": false - }, - { - "type": "event", - "inputs": [ - { - "name": "from", - "type": "address", - "internalType": "address", - "indexed": true - }, - { - "name": "to", - "type": "address", - "internalType": "address", - "indexed": true - }, - { - "type": "uint256", - "indexed": false, - "internalType": "uint256", - "name": "amount" - } - ], - "name": "RequestTransferDToken", - "anonymous": false - }, - { - "inputs": [ - { - "type": "address", - "internalType": "address", - "indexed": true, - "name": "from" - }, - { - "name": "to", - "type": "address", - "internalType": "address", - "indexed": true - }, - { - "name": "amount", - "internalType": "uint256", - "indexed": false, - "type": "uint256" - } - ], - "type": "event", - "name": "RequestTransferEToken", - "anonymous": false - }, - { - "anonymous": false, - "name": "RequestWithdraw", - "inputs": [ - { - "type": "address", - "indexed": true, - "internalType": "address", - "name": "account" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "type": "event" - }, - { - "name": "TrackAverageLiquidity", - "anonymous": false, - "type": "event", - "inputs": [ - { - "name": "account", - "internalType": "address", - "indexed": true, - "type": "address" - } - ] - }, - { - "anonymous": false, - "name": "Transfer", - "type": "event", - "inputs": [ - { - "indexed": true, - "internalType": "address", - "type": "address", - "name": "from" - }, - { - "name": "to", - "indexed": true, - "internalType": "address", - "type": "address" - }, - { - "name": "value", - "type": "uint256", - "internalType": "uint256", - "indexed": false - } - ] - }, - { - "name": "UnTrackAverageLiquidity", - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "type": "address", - "name": "account" - } - ], - "type": "event" - }, - { - "anonymous": false, - "name": "Withdraw", - "type": "event", - "inputs": [ - { - "indexed": true, - "internalType": "address", - "type": "address", - "name": "underlying" - }, - { - "type": "address", - "internalType": "address", - "indexed": true, - "name": "account" - }, - { - "name": "amount", - "indexed": false, - "internalType": "uint256", - "type": "uint256" - } - ] - }, - { - "type": "function", - "inputs": [ - { - "name": "holder", - "type": "address", - "internalType": "address" - }, - { - "name": "spender", - "internalType": "address", - "type": "address" - } - ], - "outputs": [ - { - "type": "uint256", - "internalType": "uint256", - "name": "" - } - ], - "stateMutability": "view", - "name": "allowance" - }, - { - "stateMutability": "nonpayable", - "name": "approve", - "type": "function", - "inputs": [ - { - "internalType": "address", - "type": "address", - "name": "spender" - }, - { - "type": "uint256", - "internalType": "uint256", - "name": "amount" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ] - }, - { - "outputs": [ - { - "internalType": "bool", - "type": "bool", - "name": "" - } - ], - "inputs": [ - { - "name": "subAccountId", - "internalType": "uint256", - "type": "uint256" - }, - { - "internalType": "address", - "type": "address", - "name": "spender" - }, - { - "type": "uint256", - "internalType": "uint256", - "name": "amount" - } - ], - "type": "function", - "name": "approveSubAccount", - "stateMutability": "nonpayable" - }, - { - "type": "function", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view", - "name": "balanceOf" - }, - { - "name": "balanceOfUnderlying", - "stateMutability": "view", - "outputs": [ - { - "internalType": "uint256", - "type": "uint256", - "name": "" - } - ], - "inputs": [ - { - "name": "account", - "internalType": "address", - "type": "address" - } - ], - "type": "function" - }, - { - "stateMutability": "nonpayable", - "name": "burn", - "type": "function", - "outputs": [], - "inputs": [ - { - "name": "subAccountId", - "internalType": "uint256", - "type": "uint256" - }, - { - "type": "uint256", - "internalType": "uint256", - "name": "amount" - } - ] - }, - { - "name": "convertBalanceToUnderlying", - "stateMutability": "view", - "inputs": [ - { - "name": "balance", - "internalType": "uint256", - "type": "uint256" - } - ], - "outputs": [ - { - "internalType": "uint256", - "type": "uint256", - "name": "" - } - ], - "type": "function" - }, - { - "stateMutability": "view", - "name": "convertUnderlyingToBalance", - "type": "function", - "inputs": [ - { - "name": "underlyingAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "internalType": "uint256", - "type": "uint256" - } - ] - }, - { - "inputs": [], - "outputs": [ - { - "name": "", - "internalType": "uint8", - "type": "uint8" - } - ], - "type": "function", - "name": "decimals", - "stateMutability": "pure" - }, - { - "type": "function", - "inputs": [ - { - "name": "subAccountId", - "type": "uint256", - "internalType": "uint256" - }, - { - "internalType": "uint256", - "type": "uint256", - "name": "amount" - } - ], - "outputs": [], - "stateMutability": "nonpayable", - "name": "deposit" - }, - { - "name": "mint", - "stateMutability": "nonpayable", - "inputs": [ - { - "type": "uint256", - "internalType": "uint256", - "name": "subAccountId" - }, - { - "name": "amount", - "internalType": "uint256", - "type": "uint256" - } - ], - "outputs": [], - "type": "function" - }, - { - "stateMutability": "view", - "name": "moduleGitCommit", - "type": "function", - "inputs": [], - "outputs": [ - { - "internalType": "bytes32", - "type": "bytes32", - "name": "" - } - ] - }, - { - "stateMutability": "view", - "name": "moduleId", - "type": "function", - "outputs": [ - { - "type": "uint256", - "internalType": "uint256", - "name": "" - } - ], - "inputs": [] - }, - { - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "type": "function", - "name": "name", - "stateMutability": "view" - }, - { - "stateMutability": "view", - "name": "reserveBalance", - "type": "function", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "inputs": [], - "outputs": [ - { - "name": "", - "internalType": "uint256", - "type": "uint256" - } - ], - "type": "function", - "name": "reserveBalanceUnderlying", - "stateMutability": "view" - }, - { - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "type": "function", - "name": "symbol", - "stateMutability": "view" - }, - { - "inputs": [], - "outputs": [ - { - "type": "uint256", - "internalType": "uint256", - "name": "" - } - ], - "type": "function", - "name": "totalSupply", - "stateMutability": "view" - }, - { - "type": "function", - "outputs": [ - { - "internalType": "uint256", - "type": "uint256", - "name": "" - } - ], - "inputs": [], - "stateMutability": "view", - "name": "totalSupplyUnderlying" - }, - { - "name": "touch", - "stateMutability": "nonpayable", - "inputs": [], - "outputs": [], - "type": "function" - }, - { - "stateMutability": "nonpayable", - "name": "transfer", - "type": "function", - "outputs": [ - { - "internalType": "bool", - "type": "bool", - "name": "" - } - ], - "inputs": [ - { - "name": "to", - "internalType": "address", - "type": "address" - }, - { - "type": "uint256", - "internalType": "uint256", - "name": "amount" - } - ] - }, - { - "type": "function", - "outputs": [ - { - "name": "", - "internalType": "bool", - "type": "bool" - } - ], - "inputs": [ - { - "name": "from", - "type": "address", - "internalType": "address" - }, - { - "name": "to", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "internalType": "uint256", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "name": "transferFrom" - }, - { - "type": "function", - "inputs": [ - { - "internalType": "address", - "type": "address", - "name": "from" - }, - { - "name": "to", - "internalType": "address", - "type": "address" - } - ], - "outputs": [ - { - "internalType": "bool", - "type": "bool", - "name": "" - } - ], - "stateMutability": "nonpayable", - "name": "transferFromMax" - }, - { - "stateMutability": "nonpayable", - "name": "withdraw", - "type": "function", - "inputs": [ - { - "internalType": "uint256", - "type": "uint256", - "name": "subAccountId" - }, - { - "name": "amount", - "internalType": "uint256", - "type": "uint256" - } - ], - "outputs": [] - } -] diff --git a/src/apps/euler/contracts/abis/euler-ptoken-contract.json b/src/apps/euler/contracts/abis/euler-ptoken-contract.json deleted file mode 100644 index 626d0c70a..000000000 --- a/src/apps/euler/contracts/abis/euler-ptoken-contract.json +++ /dev/null @@ -1,310 +0,0 @@ -[ - { - "inputs": [ - { - "name": "euler_", - "type": "address", - "internalType": "address" - }, - { - "name": "underlying_", - "type": "address", - "internalType": "address" - } - ], - "type": "constructor", - "stateMutability": "nonpayable" - }, - { - "anonymous": false, - "name": "Approval", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address", - "indexed": true - }, - { - "name": "spender", - "indexed": true, - "internalType": "address", - "type": "address" - }, - { - "name": "value", - "internalType": "uint256", - "indexed": false, - "type": "uint256" - } - ], - "type": "event" - }, - { - "inputs": [ - { - "name": "from", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "to", - "indexed": true, - "internalType": "address", - "type": "address" - }, - { - "name": "value", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "type": "event", - "name": "Transfer", - "anonymous": false - }, - { - "name": "allowance", - "stateMutability": "view", - "outputs": [ - { - "type": "uint256", - "internalType": "uint256", - "name": "" - } - ], - "inputs": [ - { - "internalType": "address", - "type": "address", - "name": "holder" - }, - { - "internalType": "address", - "type": "address", - "name": "spender" - } - ], - "type": "function" - }, - { - "stateMutability": "nonpayable", - "name": "approve", - "type": "function", - "inputs": [ - { - "type": "address", - "internalType": "address", - "name": "spender" - }, - { - "internalType": "uint256", - "type": "uint256", - "name": "amount" - } - ], - "outputs": [ - { - "internalType": "bool", - "type": "bool", - "name": "" - } - ] - }, - { - "name": "balanceOf", - "stateMutability": "view", - "outputs": [ - { - "internalType": "uint256", - "type": "uint256", - "name": "" - } - ], - "inputs": [ - { - "name": "who", - "type": "address", - "internalType": "address" - } - ], - "type": "function" - }, - { - "name": "claimSurplus", - "stateMutability": "nonpayable", - "inputs": [ - { - "name": "who", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "type": "function" - }, - { - "inputs": [], - "outputs": [ - { - "type": "uint8", - "internalType": "uint8", - "name": "" - } - ], - "type": "function", - "name": "decimals", - "stateMutability": "view" - }, - { - "name": "forceUnwrap", - "stateMutability": "nonpayable", - "inputs": [ - { - "type": "address", - "internalType": "address", - "name": "who" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "type": "function" - }, - { - "name": "name", - "stateMutability": "view", - "inputs": [], - "outputs": [ - { - "name": "", - "internalType": "string", - "type": "string" - } - ], - "type": "function" - }, - { - "stateMutability": "view", - "name": "symbol", - "type": "function", - "inputs": [], - "outputs": [ - { - "name": "", - "internalType": "string", - "type": "string" - } - ] - }, - { - "stateMutability": "view", - "name": "totalSupply", - "type": "function", - "outputs": [ - { - "internalType": "uint256", - "type": "uint256", - "name": "" - } - ], - "inputs": [] - }, - { - "inputs": [ - { - "name": "recipient", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "internalType": "bool", - "type": "bool" - } - ], - "type": "function", - "name": "transfer", - "stateMutability": "nonpayable" - }, - { - "inputs": [ - { - "internalType": "address", - "type": "address", - "name": "from" - }, - { - "internalType": "address", - "type": "address", - "name": "recipient" - }, - { - "name": "amount", - "internalType": "uint256", - "type": "uint256" - } - ], - "outputs": [ - { - "internalType": "bool", - "type": "bool", - "name": "" - } - ], - "type": "function", - "name": "transferFrom", - "stateMutability": "nonpayable" - }, - { - "type": "function", - "outputs": [ - { - "name": "", - "internalType": "address", - "type": "address" - } - ], - "inputs": [], - "stateMutability": "view", - "name": "underlying" - }, - { - "outputs": [], - "inputs": [ - { - "internalType": "uint256", - "type": "uint256", - "name": "amount" - } - ], - "type": "function", - "name": "unwrap", - "stateMutability": "nonpayable" - }, - { - "name": "wrap", - "stateMutability": "nonpayable", - "inputs": [ - { - "type": "uint256", - "internalType": "uint256", - "name": "amount" - } - ], - "outputs": [], - "type": "function" - } -] diff --git a/src/apps/euler/contracts/abis/euler-staking-rewards-contract.json b/src/apps/euler/contracts/abis/euler-staking-rewards-contract.json deleted file mode 100644 index 0f44bd24a..000000000 --- a/src/apps/euler/contracts/abis/euler-staking-rewards-contract.json +++ /dev/null @@ -1,310 +0,0 @@ -[ - { - "inputs": [ - { "internalType": "address", "name": "_owner", "type": "address" }, - { "internalType": "address", "name": "_rewardsDistribution", "type": "address" }, - { "internalType": "address", "name": "_rewardsToken", "type": "address" }, - { "internalType": "address", "name": "_stakingToken", "type": "address" } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "oldOwner", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "newOwner", "type": "address" } - ], - "name": "OwnerChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "address", "name": "newOwner", "type": "address" }], - "name": "OwnerNominated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "bool", "name": "isPaused", "type": "bool" }], - "name": "PauseChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "token", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "Recovered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256", "name": "reward", "type": "uint256" }], - "name": "RewardAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "reward", "type": "uint256" } - ], - "name": "RewardPaid", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256", "name": "newDuration", "type": "uint256" }], - "name": "RewardsDurationUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "Staked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "Withdrawn", - "type": "event" - }, - { "inputs": [], "name": "acceptOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "earned", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "subAccountId", "type": "uint256" }], - "name": "exit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { "inputs": [], "name": "exit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { "inputs": [], "name": "getReward", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "getRewardForDuration", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastPauseTime", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastTimeRewardApplicable", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastUpdateTime", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_owner", "type": "address" }], - "name": "nominateNewOwner", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "nominatedOwner", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "reward", "type": "uint256" }], - "name": "notifyRewardAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "periodFinish", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "tokenAddress", "type": "address" }, - { "internalType": "uint256", "name": "tokenAmount", "type": "uint256" } - ], - "name": "recoverERC20", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "rewardPerToken", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rewardPerTokenStored", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rewardRate", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "rewards", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rewardsDistribution", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rewardsDuration", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rewardsToken", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "bool", "name": "_paused", "type": "bool" }], - "name": "setPaused", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_rewardsDistribution", "type": "address" }], - "name": "setRewardsDistribution", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_rewardsDuration", "type": "uint256" }], - "name": "setRewardsDuration", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "subAccountId", "type": "uint256" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "stake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], - "name": "stake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "stakingToken", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "userRewardPerTokenPaid", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "subAccountId", "type": "uint256" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/euler/contracts/index.ts b/src/apps/euler/contracts/index.ts deleted file mode 100644 index 5dcfebdf6..000000000 --- a/src/apps/euler/contracts/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * from './viem.contract-factory'; diff --git a/src/apps/euler/contracts/viem.contract-factory.ts b/src/apps/euler/contracts/viem.contract-factory.ts deleted file mode 100644 index af0227142..000000000 --- a/src/apps/euler/contracts/viem.contract-factory.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Injectable, Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { Network } from '~types/network.interface'; - -import { - EulerDtokenContract__factory, - EulerEtokenContract__factory, - EulerPtokenContract__factory, - EulerStakingRewardsContract__factory, -} from './viem'; - -type ContractOpts = { address: string; network: Network }; - -@Injectable() -export class EulerViemContractFactory { - constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - - eulerDtokenContract({ address, network }: ContractOpts) { - return EulerDtokenContract__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - eulerEtokenContract({ address, network }: ContractOpts) { - return EulerEtokenContract__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - eulerPtokenContract({ address, network }: ContractOpts) { - return EulerPtokenContract__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - eulerStakingRewardsContract({ address, network }: ContractOpts) { - return EulerStakingRewardsContract__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } -} diff --git a/src/apps/euler/contracts/viem/EulerDtokenContract.ts b/src/apps/euler/contracts/viem/EulerDtokenContract.ts deleted file mode 100644 index c8af02e50..000000000 --- a/src/apps/euler/contracts/viem/EulerDtokenContract.ts +++ /dev/null @@ -1,1207 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const eulerDtokenContractAbi = [ - { - stateMutability: 'nonpayable', - inputs: [ - { - type: 'bytes32', - internalType: 'bytes32', - name: 'moduleGitCommit_', - }, - ], - type: 'constructor', - }, - { - type: 'event', - inputs: [ - { - name: 'owner', - type: 'address', - internalType: 'address', - indexed: true, - }, - { - indexed: true, - internalType: 'address', - type: 'address', - name: 'spender', - }, - { - name: 'value', - internalType: 'uint256', - indexed: false, - type: 'uint256', - }, - ], - name: 'Approval', - anonymous: false, - }, - { - inputs: [ - { - internalType: 'address', - indexed: true, - type: 'address', - name: 'underlying', - }, - { - type: 'uint256', - internalType: 'uint256', - indexed: false, - name: 'totalBalances', - }, - { - name: 'totalBorrows', - type: 'uint256', - internalType: 'uint256', - indexed: false, - }, - { - internalType: 'uint96', - indexed: false, - type: 'uint96', - name: 'reserveBalance', - }, - { - name: 'poolSize', - type: 'uint256', - internalType: 'uint256', - indexed: false, - }, - { - name: 'interestAccumulator', - indexed: false, - internalType: 'uint256', - type: 'uint256', - }, - { - name: 'interestRate', - type: 'int96', - internalType: 'int96', - indexed: false, - }, - { - name: 'timestamp', - indexed: false, - internalType: 'uint256', - type: 'uint256', - }, - ], - type: 'event', - anonymous: false, - name: 'AssetStatus', - }, - { - anonymous: false, - name: 'Borrow', - inputs: [ - { - name: 'underlying', - type: 'address', - indexed: true, - internalType: 'address', - }, - { - type: 'address', - internalType: 'address', - indexed: true, - name: 'account', - }, - { - name: 'amount', - type: 'uint256', - internalType: 'uint256', - indexed: false, - }, - ], - type: 'event', - }, - { - name: 'DelegateAverageLiquidity', - anonymous: false, - inputs: [ - { - name: 'account', - indexed: true, - internalType: 'address', - type: 'address', - }, - { - name: 'delegate', - indexed: true, - internalType: 'address', - type: 'address', - }, - ], - type: 'event', - }, - { - name: 'Deposit', - anonymous: false, - type: 'event', - inputs: [ - { - name: 'underlying', - type: 'address', - internalType: 'address', - indexed: true, - }, - { - type: 'address', - indexed: true, - internalType: 'address', - name: 'account', - }, - { - internalType: 'uint256', - indexed: false, - type: 'uint256', - name: 'amount', - }, - ], - }, - { - type: 'event', - inputs: [ - { - type: 'address', - indexed: true, - internalType: 'address', - name: 'underlying', - }, - { - type: 'address', - internalType: 'address', - indexed: true, - name: 'account', - }, - ], - name: 'EnterMarket', - anonymous: false, - }, - { - anonymous: false, - name: 'ExitMarket', - inputs: [ - { - type: 'address', - indexed: true, - internalType: 'address', - name: 'underlying', - }, - { - type: 'address', - internalType: 'address', - indexed: true, - name: 'account', - }, - ], - type: 'event', - }, - { - name: 'Genesis', - anonymous: false, - type: 'event', - inputs: [], - }, - { - type: 'event', - inputs: [ - { - name: 'underlying', - indexed: true, - internalType: 'address', - type: 'address', - }, - { - name: 'recipient', - internalType: 'address', - indexed: true, - type: 'address', - }, - { - name: 'amount', - type: 'uint256', - indexed: false, - internalType: 'uint256', - }, - ], - name: 'GovConvertReserves', - anonymous: false, - }, - { - type: 'event', - inputs: [ - { - type: 'address', - indexed: true, - internalType: 'address', - name: 'underlying', - }, - { - internalType: 'struct Storage.AssetConfig', - indexed: false, - type: 'tuple', - name: 'newConfig', - components: [ - { - internalType: 'address', - type: 'address', - name: 'eTokenAddress', - }, - { - type: 'bool', - internalType: 'bool', - name: 'borrowIsolated', - }, - { - internalType: 'uint32', - type: 'uint32', - name: 'collateralFactor', - }, - { - name: 'borrowFactor', - internalType: 'uint32', - type: 'uint32', - }, - { - internalType: 'uint24', - type: 'uint24', - name: 'twapWindow', - }, - ], - }, - ], - name: 'GovSetAssetConfig', - anonymous: false, - }, - { - name: 'GovSetIRM', - anonymous: false, - type: 'event', - inputs: [ - { - name: 'underlying', - indexed: true, - internalType: 'address', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - type: 'uint256', - name: 'interestRateModel', - }, - { - indexed: false, - internalType: 'bytes', - type: 'bytes', - name: 'resetParams', - }, - ], - }, - { - name: 'GovSetPricingConfig', - anonymous: false, - inputs: [ - { - name: 'underlying', - type: 'address', - internalType: 'address', - indexed: true, - }, - { - type: 'uint16', - indexed: false, - internalType: 'uint16', - name: 'newPricingType', - }, - { - type: 'uint32', - internalType: 'uint32', - indexed: false, - name: 'newPricingParameter', - }, - ], - type: 'event', - }, - { - type: 'event', - inputs: [ - { - name: 'underlying', - type: 'address', - indexed: true, - internalType: 'address', - }, - { - name: 'newReserveFee', - indexed: false, - internalType: 'uint32', - type: 'uint32', - }, - ], - anonymous: false, - name: 'GovSetReserveFee', - }, - { - anonymous: false, - name: 'InstallerInstallModule', - inputs: [ - { - type: 'uint256', - indexed: true, - internalType: 'uint256', - name: 'moduleId', - }, - { - indexed: true, - internalType: 'address', - type: 'address', - name: 'moduleImpl', - }, - { - name: 'moduleGitCommit', - internalType: 'bytes32', - indexed: false, - type: 'bytes32', - }, - ], - type: 'event', - }, - { - type: 'event', - inputs: [ - { - indexed: true, - internalType: 'address', - type: 'address', - name: 'newGovernorAdmin', - }, - ], - anonymous: false, - name: 'InstallerSetGovernorAdmin', - }, - { - inputs: [ - { - name: 'newUpgradeAdmin', - type: 'address', - internalType: 'address', - indexed: true, - }, - ], - type: 'event', - anonymous: false, - name: 'InstallerSetUpgradeAdmin', - }, - { - type: 'event', - inputs: [ - { - internalType: 'address', - indexed: true, - type: 'address', - name: 'liquidator', - }, - { - name: 'violator', - internalType: 'address', - indexed: true, - type: 'address', - }, - { - type: 'address', - indexed: true, - internalType: 'address', - name: 'underlying', - }, - { - type: 'address', - internalType: 'address', - indexed: false, - name: 'collateral', - }, - { - name: 'repay', - type: 'uint256', - indexed: false, - internalType: 'uint256', - }, - { - type: 'uint256', - internalType: 'uint256', - indexed: false, - name: 'yield', - }, - { - name: 'healthScore', - type: 'uint256', - internalType: 'uint256', - indexed: false, - }, - { - name: 'baseDiscount', - type: 'uint256', - indexed: false, - internalType: 'uint256', - }, - { - type: 'uint256', - internalType: 'uint256', - indexed: false, - name: 'discount', - }, - ], - anonymous: false, - name: 'Liquidation', - }, - { - type: 'event', - inputs: [ - { - internalType: 'address', - indexed: true, - type: 'address', - name: 'underlying', - }, - { - type: 'address', - internalType: 'address', - indexed: true, - name: 'eToken', - }, - { - type: 'address', - internalType: 'address', - indexed: true, - name: 'dToken', - }, - ], - name: 'MarketActivated', - anonymous: false, - }, - { - name: 'PTokenActivated', - anonymous: false, - inputs: [ - { - type: 'address', - internalType: 'address', - indexed: true, - name: 'underlying', - }, - { - name: 'pToken', - type: 'address', - internalType: 'address', - indexed: true, - }, - ], - type: 'event', - }, - { - anonymous: false, - name: 'PTokenUnWrap', - inputs: [ - { - name: 'underlying', - internalType: 'address', - indexed: true, - type: 'address', - }, - { - type: 'address', - indexed: true, - internalType: 'address', - name: 'account', - }, - { - internalType: 'uint256', - indexed: false, - type: 'uint256', - name: 'amount', - }, - ], - type: 'event', - }, - { - name: 'PTokenWrap', - anonymous: false, - inputs: [ - { - name: 'underlying', - type: 'address', - internalType: 'address', - indexed: true, - }, - { - indexed: true, - internalType: 'address', - type: 'address', - name: 'account', - }, - { - type: 'uint256', - internalType: 'uint256', - indexed: false, - name: 'amount', - }, - ], - type: 'event', - }, - { - anonymous: false, - name: 'ProxyCreated', - type: 'event', - inputs: [ - { - type: 'address', - indexed: true, - internalType: 'address', - name: 'proxy', - }, - { - indexed: false, - internalType: 'uint256', - type: 'uint256', - name: 'moduleId', - }, - ], - }, - { - name: 'Repay', - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - type: 'address', - name: 'underlying', - }, - { - name: 'account', - indexed: true, - internalType: 'address', - type: 'address', - }, - { - name: 'amount', - internalType: 'uint256', - indexed: false, - type: 'uint256', - }, - ], - type: 'event', - }, - { - name: 'RequestBorrow', - anonymous: false, - type: 'event', - inputs: [ - { - name: 'account', - internalType: 'address', - indexed: true, - type: 'address', - }, - { - name: 'amount', - internalType: 'uint256', - indexed: false, - type: 'uint256', - }, - ], - }, - { - name: 'RequestBurn', - anonymous: false, - inputs: [ - { - name: 'account', - type: 'address', - internalType: 'address', - indexed: true, - }, - { - name: 'amount', - type: 'uint256', - indexed: false, - internalType: 'uint256', - }, - ], - type: 'event', - }, - { - type: 'event', - inputs: [ - { - indexed: true, - internalType: 'address', - type: 'address', - name: 'account', - }, - { - name: 'amount', - indexed: false, - internalType: 'uint256', - type: 'uint256', - }, - ], - name: 'RequestDeposit', - anonymous: false, - }, - { - inputs: [ - { - internalType: 'address', - indexed: true, - type: 'address', - name: 'liquidator', - }, - { - name: 'violator', - type: 'address', - internalType: 'address', - indexed: true, - }, - { - name: 'underlying', - type: 'address', - internalType: 'address', - indexed: true, - }, - { - name: 'collateral', - indexed: false, - internalType: 'address', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - type: 'uint256', - name: 'repay', - }, - { - type: 'uint256', - internalType: 'uint256', - indexed: false, - name: 'minYield', - }, - ], - type: 'event', - anonymous: false, - name: 'RequestLiquidate', - }, - { - inputs: [ - { - type: 'address', - internalType: 'address', - indexed: true, - name: 'account', - }, - { - name: 'amount', - type: 'uint256', - internalType: 'uint256', - indexed: false, - }, - ], - type: 'event', - name: 'RequestMint', - anonymous: false, - }, - { - name: 'RequestRepay', - anonymous: false, - inputs: [ - { - internalType: 'address', - indexed: true, - type: 'address', - name: 'account', - }, - { - name: 'amount', - type: 'uint256', - indexed: false, - internalType: 'uint256', - }, - ], - type: 'event', - }, - { - anonymous: false, - name: 'RequestSwap', - inputs: [ - { - indexed: true, - internalType: 'address', - type: 'address', - name: 'accountIn', - }, - { - name: 'accountOut', - type: 'address', - internalType: 'address', - indexed: true, - }, - { - internalType: 'address', - indexed: true, - type: 'address', - name: 'underlyingIn', - }, - { - internalType: 'address', - indexed: false, - type: 'address', - name: 'underlyingOut', - }, - { - type: 'uint256', - indexed: false, - internalType: 'uint256', - name: 'amount', - }, - { - name: 'swapType', - internalType: 'uint256', - indexed: false, - type: 'uint256', - }, - ], - type: 'event', - }, - { - inputs: [ - { - type: 'address', - internalType: 'address', - indexed: true, - name: 'from', - }, - { - name: 'to', - type: 'address', - indexed: true, - internalType: 'address', - }, - { - internalType: 'uint256', - indexed: false, - type: 'uint256', - name: 'amount', - }, - ], - type: 'event', - name: 'RequestTransferDToken', - anonymous: false, - }, - { - name: 'RequestTransferEToken', - anonymous: false, - inputs: [ - { - name: 'from', - type: 'address', - internalType: 'address', - indexed: true, - }, - { - name: 'to', - type: 'address', - indexed: true, - internalType: 'address', - }, - { - name: 'amount', - internalType: 'uint256', - indexed: false, - type: 'uint256', - }, - ], - type: 'event', - }, - { - anonymous: false, - name: 'RequestWithdraw', - type: 'event', - inputs: [ - { - name: 'account', - type: 'address', - indexed: true, - internalType: 'address', - }, - { - type: 'uint256', - indexed: false, - internalType: 'uint256', - name: 'amount', - }, - ], - }, - { - anonymous: false, - name: 'TrackAverageLiquidity', - inputs: [ - { - type: 'address', - indexed: true, - internalType: 'address', - name: 'account', - }, - ], - type: 'event', - }, - { - name: 'Transfer', - anonymous: false, - type: 'event', - inputs: [ - { - name: 'from', - type: 'address', - indexed: true, - internalType: 'address', - }, - { - type: 'address', - internalType: 'address', - indexed: true, - name: 'to', - }, - { - type: 'uint256', - indexed: false, - internalType: 'uint256', - name: 'value', - }, - ], - }, - { - inputs: [ - { - internalType: 'address', - indexed: true, - type: 'address', - name: 'account', - }, - ], - type: 'event', - anonymous: false, - name: 'UnTrackAverageLiquidity', - }, - { - inputs: [ - { - name: 'underlying', - type: 'address', - indexed: true, - internalType: 'address', - }, - { - type: 'address', - indexed: true, - internalType: 'address', - name: 'account', - }, - { - type: 'uint256', - indexed: false, - internalType: 'uint256', - name: 'amount', - }, - ], - type: 'event', - anonymous: false, - name: 'Withdraw', - }, - { - inputs: [ - { - name: 'subAccountId', - internalType: 'uint256', - type: 'uint256', - }, - { - type: 'address', - internalType: 'address', - name: 'spender', - }, - { - type: 'uint256', - internalType: 'uint256', - name: 'amount', - }, - ], - outputs: [ - { - name: '', - internalType: 'bool', - type: 'bool', - }, - ], - type: 'function', - name: 'approveDebt', - stateMutability: 'nonpayable', - }, - { - type: 'function', - outputs: [ - { - name: '', - type: 'uint256', - internalType: 'uint256', - }, - ], - inputs: [ - { - type: 'address', - internalType: 'address', - name: 'account', - }, - ], - stateMutability: 'view', - name: 'balanceOf', - }, - { - inputs: [ - { - name: 'account', - type: 'address', - internalType: 'address', - }, - ], - outputs: [ - { - internalType: 'uint256', - type: 'uint256', - name: '', - }, - ], - type: 'function', - name: 'balanceOfExact', - stateMutability: 'view', - }, - { - inputs: [ - { - internalType: 'uint256', - type: 'uint256', - name: 'subAccountId', - }, - { - type: 'uint256', - internalType: 'uint256', - name: 'amount', - }, - ], - outputs: [], - type: 'function', - name: 'borrow', - stateMutability: 'nonpayable', - }, - { - name: 'debtAllowance', - stateMutability: 'view', - outputs: [ - { - internalType: 'uint256', - type: 'uint256', - name: '', - }, - ], - inputs: [ - { - name: 'holder', - internalType: 'address', - type: 'address', - }, - { - name: 'spender', - type: 'address', - internalType: 'address', - }, - ], - type: 'function', - }, - { - outputs: [ - { - name: '', - type: 'uint8', - internalType: 'uint8', - }, - ], - inputs: [], - type: 'function', - name: 'decimals', - stateMutability: 'pure', - }, - { - name: 'moduleGitCommit', - stateMutability: 'view', - outputs: [ - { - internalType: 'bytes32', - type: 'bytes32', - name: '', - }, - ], - inputs: [], - type: 'function', - }, - { - name: 'moduleId', - stateMutability: 'view', - outputs: [ - { - type: 'uint256', - internalType: 'uint256', - name: '', - }, - ], - inputs: [], - type: 'function', - }, - { - name: 'name', - stateMutability: 'view', - outputs: [ - { - type: 'string', - internalType: 'string', - name: '', - }, - ], - inputs: [], - type: 'function', - }, - { - type: 'function', - inputs: [ - { - type: 'uint256', - internalType: 'uint256', - name: 'subAccountId', - }, - { - name: 'amount', - internalType: 'uint256', - type: 'uint256', - }, - ], - outputs: [], - stateMutability: 'nonpayable', - name: 'repay', - }, - { - name: 'symbol', - stateMutability: 'view', - outputs: [ - { - internalType: 'string', - type: 'string', - name: '', - }, - ], - inputs: [], - type: 'function', - }, - { - type: 'function', - inputs: [], - outputs: [ - { - name: '', - internalType: 'uint256', - type: 'uint256', - }, - ], - stateMutability: 'view', - name: 'totalSupply', - }, - { - stateMutability: 'view', - name: 'totalSupplyExact', - type: 'function', - outputs: [ - { - name: '', - type: 'uint256', - internalType: 'uint256', - }, - ], - inputs: [], - }, - { - stateMutability: 'nonpayable', - name: 'transfer', - type: 'function', - outputs: [ - { - type: 'bool', - internalType: 'bool', - name: '', - }, - ], - inputs: [ - { - internalType: 'address', - type: 'address', - name: 'to', - }, - { - type: 'uint256', - internalType: 'uint256', - name: 'amount', - }, - ], - }, - { - stateMutability: 'nonpayable', - name: 'transferFrom', - type: 'function', - outputs: [ - { - name: '', - type: 'bool', - internalType: 'bool', - }, - ], - inputs: [ - { - name: 'from', - type: 'address', - internalType: 'address', - }, - { - name: 'to', - type: 'address', - internalType: 'address', - }, - { - name: 'amount', - internalType: 'uint256', - type: 'uint256', - }, - ], - }, -] as const; - -export type EulerDtokenContract = typeof eulerDtokenContractAbi; -export type EulerDtokenContractContract = GetContractReturnType; - -export class EulerDtokenContract__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: eulerDtokenContractAbi, publicClient: client }); - } -} diff --git a/src/apps/euler/contracts/viem/EulerEtokenContract.ts b/src/apps/euler/contracts/viem/EulerEtokenContract.ts deleted file mode 100644 index 3cce494d3..000000000 --- a/src/apps/euler/contracts/viem/EulerEtokenContract.ts +++ /dev/null @@ -1,1362 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const eulerEtokenContractAbi = [ - { - stateMutability: 'nonpayable', - inputs: [ - { - internalType: 'bytes32', - type: 'bytes32', - name: 'moduleGitCommit_', - }, - ], - type: 'constructor', - }, - { - name: 'Approval', - anonymous: false, - type: 'event', - inputs: [ - { - name: 'owner', - internalType: 'address', - indexed: true, - type: 'address', - }, - { - name: 'spender', - internalType: 'address', - indexed: true, - type: 'address', - }, - { - type: 'uint256', - indexed: false, - internalType: 'uint256', - name: 'value', - }, - ], - }, - { - anonymous: false, - name: 'AssetStatus', - inputs: [ - { - type: 'address', - indexed: true, - internalType: 'address', - name: 'underlying', - }, - { - internalType: 'uint256', - indexed: false, - type: 'uint256', - name: 'totalBalances', - }, - { - internalType: 'uint256', - indexed: false, - type: 'uint256', - name: 'totalBorrows', - }, - { - indexed: false, - internalType: 'uint96', - type: 'uint96', - name: 'reserveBalance', - }, - { - type: 'uint256', - internalType: 'uint256', - indexed: false, - name: 'poolSize', - }, - { - name: 'interestAccumulator', - type: 'uint256', - internalType: 'uint256', - indexed: false, - }, - { - indexed: false, - internalType: 'int96', - type: 'int96', - name: 'interestRate', - }, - { - name: 'timestamp', - type: 'uint256', - internalType: 'uint256', - indexed: false, - }, - ], - type: 'event', - }, - { - name: 'Borrow', - anonymous: false, - type: 'event', - inputs: [ - { - name: 'underlying', - type: 'address', - indexed: true, - internalType: 'address', - }, - { - type: 'address', - indexed: true, - internalType: 'address', - name: 'account', - }, - { - name: 'amount', - indexed: false, - internalType: 'uint256', - type: 'uint256', - }, - ], - }, - { - type: 'event', - inputs: [ - { - name: 'account', - type: 'address', - internalType: 'address', - indexed: true, - }, - { - type: 'address', - internalType: 'address', - indexed: true, - name: 'delegate', - }, - ], - name: 'DelegateAverageLiquidity', - anonymous: false, - }, - { - anonymous: false, - name: 'Deposit', - type: 'event', - inputs: [ - { - name: 'underlying', - type: 'address', - internalType: 'address', - indexed: true, - }, - { - indexed: true, - internalType: 'address', - type: 'address', - name: 'account', - }, - { - type: 'uint256', - indexed: false, - internalType: 'uint256', - name: 'amount', - }, - ], - }, - { - type: 'event', - inputs: [ - { - name: 'underlying', - type: 'address', - internalType: 'address', - indexed: true, - }, - { - type: 'address', - internalType: 'address', - indexed: true, - name: 'account', - }, - ], - name: 'EnterMarket', - anonymous: false, - }, - { - type: 'event', - inputs: [ - { - name: 'underlying', - type: 'address', - internalType: 'address', - indexed: true, - }, - { - indexed: true, - internalType: 'address', - type: 'address', - name: 'account', - }, - ], - name: 'ExitMarket', - anonymous: false, - }, - { - name: 'Genesis', - anonymous: false, - inputs: [], - type: 'event', - }, - { - name: 'GovConvertReserves', - anonymous: false, - type: 'event', - inputs: [ - { - name: 'underlying', - type: 'address', - indexed: true, - internalType: 'address', - }, - { - name: 'recipient', - internalType: 'address', - indexed: true, - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - type: 'uint256', - name: 'amount', - }, - ], - }, - { - inputs: [ - { - type: 'address', - internalType: 'address', - indexed: true, - name: 'underlying', - }, - { - indexed: false, - internalType: 'struct Storage.AssetConfig', - type: 'tuple', - name: 'newConfig', - components: [ - { - name: 'eTokenAddress', - type: 'address', - internalType: 'address', - }, - { - name: 'borrowIsolated', - internalType: 'bool', - type: 'bool', - }, - { - internalType: 'uint32', - type: 'uint32', - name: 'collateralFactor', - }, - { - internalType: 'uint32', - type: 'uint32', - name: 'borrowFactor', - }, - { - internalType: 'uint24', - type: 'uint24', - name: 'twapWindow', - }, - ], - }, - ], - type: 'event', - name: 'GovSetAssetConfig', - anonymous: false, - }, - { - name: 'GovSetIRM', - anonymous: false, - inputs: [ - { - name: 'underlying', - indexed: true, - internalType: 'address', - type: 'address', - }, - { - type: 'uint256', - internalType: 'uint256', - indexed: false, - name: 'interestRateModel', - }, - { - name: 'resetParams', - type: 'bytes', - indexed: false, - internalType: 'bytes', - }, - ], - type: 'event', - }, - { - inputs: [ - { - name: 'underlying', - type: 'address', - indexed: true, - internalType: 'address', - }, - { - indexed: false, - internalType: 'uint16', - type: 'uint16', - name: 'newPricingType', - }, - { - name: 'newPricingParameter', - type: 'uint32', - indexed: false, - internalType: 'uint32', - }, - ], - type: 'event', - name: 'GovSetPricingConfig', - anonymous: false, - }, - { - anonymous: false, - name: 'GovSetReserveFee', - inputs: [ - { - indexed: true, - internalType: 'address', - type: 'address', - name: 'underlying', - }, - { - indexed: false, - internalType: 'uint32', - type: 'uint32', - name: 'newReserveFee', - }, - ], - type: 'event', - }, - { - anonymous: false, - name: 'InstallerInstallModule', - inputs: [ - { - name: 'moduleId', - type: 'uint256', - indexed: true, - internalType: 'uint256', - }, - { - internalType: 'address', - indexed: true, - type: 'address', - name: 'moduleImpl', - }, - { - internalType: 'bytes32', - indexed: false, - type: 'bytes32', - name: 'moduleGitCommit', - }, - ], - type: 'event', - }, - { - inputs: [ - { - type: 'address', - indexed: true, - internalType: 'address', - name: 'newGovernorAdmin', - }, - ], - type: 'event', - name: 'InstallerSetGovernorAdmin', - anonymous: false, - }, - { - name: 'InstallerSetUpgradeAdmin', - anonymous: false, - type: 'event', - inputs: [ - { - type: 'address', - internalType: 'address', - indexed: true, - name: 'newUpgradeAdmin', - }, - ], - }, - { - inputs: [ - { - name: 'liquidator', - type: 'address', - indexed: true, - internalType: 'address', - }, - { - type: 'address', - indexed: true, - internalType: 'address', - name: 'violator', - }, - { - indexed: true, - internalType: 'address', - type: 'address', - name: 'underlying', - }, - { - name: 'collateral', - internalType: 'address', - indexed: false, - type: 'address', - }, - { - type: 'uint256', - indexed: false, - internalType: 'uint256', - name: 'repay', - }, - { - type: 'uint256', - indexed: false, - internalType: 'uint256', - name: 'yield', - }, - { - name: 'healthScore', - type: 'uint256', - indexed: false, - internalType: 'uint256', - }, - { - name: 'baseDiscount', - indexed: false, - internalType: 'uint256', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - type: 'uint256', - name: 'discount', - }, - ], - type: 'event', - anonymous: false, - name: 'Liquidation', - }, - { - type: 'event', - inputs: [ - { - indexed: true, - internalType: 'address', - type: 'address', - name: 'underlying', - }, - { - name: 'eToken', - indexed: true, - internalType: 'address', - type: 'address', - }, - { - name: 'dToken', - internalType: 'address', - indexed: true, - type: 'address', - }, - ], - anonymous: false, - name: 'MarketActivated', - }, - { - type: 'event', - inputs: [ - { - internalType: 'address', - indexed: true, - type: 'address', - name: 'underlying', - }, - { - name: 'pToken', - type: 'address', - indexed: true, - internalType: 'address', - }, - ], - anonymous: false, - name: 'PTokenActivated', - }, - { - inputs: [ - { - name: 'underlying', - internalType: 'address', - indexed: true, - type: 'address', - }, - { - name: 'account', - type: 'address', - indexed: true, - internalType: 'address', - }, - { - type: 'uint256', - indexed: false, - internalType: 'uint256', - name: 'amount', - }, - ], - type: 'event', - name: 'PTokenUnWrap', - anonymous: false, - }, - { - anonymous: false, - name: 'PTokenWrap', - inputs: [ - { - name: 'underlying', - type: 'address', - indexed: true, - internalType: 'address', - }, - { - type: 'address', - internalType: 'address', - indexed: true, - name: 'account', - }, - { - type: 'uint256', - internalType: 'uint256', - indexed: false, - name: 'amount', - }, - ], - type: 'event', - }, - { - type: 'event', - inputs: [ - { - type: 'address', - internalType: 'address', - indexed: true, - name: 'proxy', - }, - { - name: 'moduleId', - internalType: 'uint256', - indexed: false, - type: 'uint256', - }, - ], - name: 'ProxyCreated', - anonymous: false, - }, - { - inputs: [ - { - internalType: 'address', - indexed: true, - type: 'address', - name: 'underlying', - }, - { - type: 'address', - internalType: 'address', - indexed: true, - name: 'account', - }, - { - indexed: false, - internalType: 'uint256', - type: 'uint256', - name: 'amount', - }, - ], - type: 'event', - anonymous: false, - name: 'Repay', - }, - { - inputs: [ - { - indexed: true, - internalType: 'address', - type: 'address', - name: 'account', - }, - { - indexed: false, - internalType: 'uint256', - type: 'uint256', - name: 'amount', - }, - ], - type: 'event', - name: 'RequestBorrow', - anonymous: false, - }, - { - inputs: [ - { - type: 'address', - indexed: true, - internalType: 'address', - name: 'account', - }, - { - type: 'uint256', - indexed: false, - internalType: 'uint256', - name: 'amount', - }, - ], - type: 'event', - name: 'RequestBurn', - anonymous: false, - }, - { - type: 'event', - inputs: [ - { - internalType: 'address', - indexed: true, - type: 'address', - name: 'account', - }, - { - type: 'uint256', - indexed: false, - internalType: 'uint256', - name: 'amount', - }, - ], - anonymous: false, - name: 'RequestDeposit', - }, - { - type: 'event', - inputs: [ - { - name: 'liquidator', - type: 'address', - indexed: true, - internalType: 'address', - }, - { - name: 'violator', - internalType: 'address', - indexed: true, - type: 'address', - }, - { - name: 'underlying', - type: 'address', - internalType: 'address', - indexed: true, - }, - { - internalType: 'address', - indexed: false, - type: 'address', - name: 'collateral', - }, - { - indexed: false, - internalType: 'uint256', - type: 'uint256', - name: 'repay', - }, - { - type: 'uint256', - indexed: false, - internalType: 'uint256', - name: 'minYield', - }, - ], - name: 'RequestLiquidate', - anonymous: false, - }, - { - name: 'RequestMint', - anonymous: false, - type: 'event', - inputs: [ - { - name: 'account', - internalType: 'address', - indexed: true, - type: 'address', - }, - { - name: 'amount', - type: 'uint256', - indexed: false, - internalType: 'uint256', - }, - ], - }, - { - inputs: [ - { - name: 'account', - type: 'address', - internalType: 'address', - indexed: true, - }, - { - name: 'amount', - type: 'uint256', - indexed: false, - internalType: 'uint256', - }, - ], - type: 'event', - anonymous: false, - name: 'RequestRepay', - }, - { - inputs: [ - { - name: 'accountIn', - internalType: 'address', - indexed: true, - type: 'address', - }, - { - internalType: 'address', - indexed: true, - type: 'address', - name: 'accountOut', - }, - { - name: 'underlyingIn', - internalType: 'address', - indexed: true, - type: 'address', - }, - { - name: 'underlyingOut', - indexed: false, - internalType: 'address', - type: 'address', - }, - { - internalType: 'uint256', - indexed: false, - type: 'uint256', - name: 'amount', - }, - { - type: 'uint256', - internalType: 'uint256', - indexed: false, - name: 'swapType', - }, - ], - type: 'event', - name: 'RequestSwap', - anonymous: false, - }, - { - type: 'event', - inputs: [ - { - name: 'from', - type: 'address', - internalType: 'address', - indexed: true, - }, - { - name: 'to', - type: 'address', - internalType: 'address', - indexed: true, - }, - { - type: 'uint256', - indexed: false, - internalType: 'uint256', - name: 'amount', - }, - ], - name: 'RequestTransferDToken', - anonymous: false, - }, - { - inputs: [ - { - type: 'address', - internalType: 'address', - indexed: true, - name: 'from', - }, - { - name: 'to', - type: 'address', - internalType: 'address', - indexed: true, - }, - { - name: 'amount', - internalType: 'uint256', - indexed: false, - type: 'uint256', - }, - ], - type: 'event', - name: 'RequestTransferEToken', - anonymous: false, - }, - { - anonymous: false, - name: 'RequestWithdraw', - inputs: [ - { - type: 'address', - indexed: true, - internalType: 'address', - name: 'account', - }, - { - name: 'amount', - type: 'uint256', - indexed: false, - internalType: 'uint256', - }, - ], - type: 'event', - }, - { - name: 'TrackAverageLiquidity', - anonymous: false, - type: 'event', - inputs: [ - { - name: 'account', - internalType: 'address', - indexed: true, - type: 'address', - }, - ], - }, - { - anonymous: false, - name: 'Transfer', - type: 'event', - inputs: [ - { - indexed: true, - internalType: 'address', - type: 'address', - name: 'from', - }, - { - name: 'to', - indexed: true, - internalType: 'address', - type: 'address', - }, - { - name: 'value', - type: 'uint256', - internalType: 'uint256', - indexed: false, - }, - ], - }, - { - name: 'UnTrackAverageLiquidity', - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - type: 'address', - name: 'account', - }, - ], - type: 'event', - }, - { - anonymous: false, - name: 'Withdraw', - type: 'event', - inputs: [ - { - indexed: true, - internalType: 'address', - type: 'address', - name: 'underlying', - }, - { - type: 'address', - internalType: 'address', - indexed: true, - name: 'account', - }, - { - name: 'amount', - indexed: false, - internalType: 'uint256', - type: 'uint256', - }, - ], - }, - { - type: 'function', - inputs: [ - { - name: 'holder', - type: 'address', - internalType: 'address', - }, - { - name: 'spender', - internalType: 'address', - type: 'address', - }, - ], - outputs: [ - { - type: 'uint256', - internalType: 'uint256', - name: '', - }, - ], - stateMutability: 'view', - name: 'allowance', - }, - { - stateMutability: 'nonpayable', - name: 'approve', - type: 'function', - inputs: [ - { - internalType: 'address', - type: 'address', - name: 'spender', - }, - { - type: 'uint256', - internalType: 'uint256', - name: 'amount', - }, - ], - outputs: [ - { - name: '', - type: 'bool', - internalType: 'bool', - }, - ], - }, - { - outputs: [ - { - internalType: 'bool', - type: 'bool', - name: '', - }, - ], - inputs: [ - { - name: 'subAccountId', - internalType: 'uint256', - type: 'uint256', - }, - { - internalType: 'address', - type: 'address', - name: 'spender', - }, - { - type: 'uint256', - internalType: 'uint256', - name: 'amount', - }, - ], - type: 'function', - name: 'approveSubAccount', - stateMutability: 'nonpayable', - }, - { - type: 'function', - inputs: [ - { - name: 'account', - type: 'address', - internalType: 'address', - }, - ], - outputs: [ - { - name: '', - type: 'uint256', - internalType: 'uint256', - }, - ], - stateMutability: 'view', - name: 'balanceOf', - }, - { - name: 'balanceOfUnderlying', - stateMutability: 'view', - outputs: [ - { - internalType: 'uint256', - type: 'uint256', - name: '', - }, - ], - inputs: [ - { - name: 'account', - internalType: 'address', - type: 'address', - }, - ], - type: 'function', - }, - { - stateMutability: 'nonpayable', - name: 'burn', - type: 'function', - outputs: [], - inputs: [ - { - name: 'subAccountId', - internalType: 'uint256', - type: 'uint256', - }, - { - type: 'uint256', - internalType: 'uint256', - name: 'amount', - }, - ], - }, - { - name: 'convertBalanceToUnderlying', - stateMutability: 'view', - inputs: [ - { - name: 'balance', - internalType: 'uint256', - type: 'uint256', - }, - ], - outputs: [ - { - internalType: 'uint256', - type: 'uint256', - name: '', - }, - ], - type: 'function', - }, - { - stateMutability: 'view', - name: 'convertUnderlyingToBalance', - type: 'function', - inputs: [ - { - name: 'underlyingAmount', - type: 'uint256', - internalType: 'uint256', - }, - ], - outputs: [ - { - name: '', - internalType: 'uint256', - type: 'uint256', - }, - ], - }, - { - inputs: [], - outputs: [ - { - name: '', - internalType: 'uint8', - type: 'uint8', - }, - ], - type: 'function', - name: 'decimals', - stateMutability: 'pure', - }, - { - type: 'function', - inputs: [ - { - name: 'subAccountId', - type: 'uint256', - internalType: 'uint256', - }, - { - internalType: 'uint256', - type: 'uint256', - name: 'amount', - }, - ], - outputs: [], - stateMutability: 'nonpayable', - name: 'deposit', - }, - { - name: 'mint', - stateMutability: 'nonpayable', - inputs: [ - { - type: 'uint256', - internalType: 'uint256', - name: 'subAccountId', - }, - { - name: 'amount', - internalType: 'uint256', - type: 'uint256', - }, - ], - outputs: [], - type: 'function', - }, - { - stateMutability: 'view', - name: 'moduleGitCommit', - type: 'function', - inputs: [], - outputs: [ - { - internalType: 'bytes32', - type: 'bytes32', - name: '', - }, - ], - }, - { - stateMutability: 'view', - name: 'moduleId', - type: 'function', - outputs: [ - { - type: 'uint256', - internalType: 'uint256', - name: '', - }, - ], - inputs: [], - }, - { - inputs: [], - outputs: [ - { - name: '', - type: 'string', - internalType: 'string', - }, - ], - type: 'function', - name: 'name', - stateMutability: 'view', - }, - { - stateMutability: 'view', - name: 'reserveBalance', - type: 'function', - inputs: [], - outputs: [ - { - name: '', - type: 'uint256', - internalType: 'uint256', - }, - ], - }, - { - inputs: [], - outputs: [ - { - name: '', - internalType: 'uint256', - type: 'uint256', - }, - ], - type: 'function', - name: 'reserveBalanceUnderlying', - stateMutability: 'view', - }, - { - inputs: [], - outputs: [ - { - name: '', - type: 'string', - internalType: 'string', - }, - ], - type: 'function', - name: 'symbol', - stateMutability: 'view', - }, - { - inputs: [], - outputs: [ - { - type: 'uint256', - internalType: 'uint256', - name: '', - }, - ], - type: 'function', - name: 'totalSupply', - stateMutability: 'view', - }, - { - type: 'function', - outputs: [ - { - internalType: 'uint256', - type: 'uint256', - name: '', - }, - ], - inputs: [], - stateMutability: 'view', - name: 'totalSupplyUnderlying', - }, - { - name: 'touch', - stateMutability: 'nonpayable', - inputs: [], - outputs: [], - type: 'function', - }, - { - stateMutability: 'nonpayable', - name: 'transfer', - type: 'function', - outputs: [ - { - internalType: 'bool', - type: 'bool', - name: '', - }, - ], - inputs: [ - { - name: 'to', - internalType: 'address', - type: 'address', - }, - { - type: 'uint256', - internalType: 'uint256', - name: 'amount', - }, - ], - }, - { - type: 'function', - outputs: [ - { - name: '', - internalType: 'bool', - type: 'bool', - }, - ], - inputs: [ - { - name: 'from', - type: 'address', - internalType: 'address', - }, - { - name: 'to', - type: 'address', - internalType: 'address', - }, - { - name: 'amount', - internalType: 'uint256', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - name: 'transferFrom', - }, - { - type: 'function', - inputs: [ - { - internalType: 'address', - type: 'address', - name: 'from', - }, - { - name: 'to', - internalType: 'address', - type: 'address', - }, - ], - outputs: [ - { - internalType: 'bool', - type: 'bool', - name: '', - }, - ], - stateMutability: 'nonpayable', - name: 'transferFromMax', - }, - { - stateMutability: 'nonpayable', - name: 'withdraw', - type: 'function', - inputs: [ - { - internalType: 'uint256', - type: 'uint256', - name: 'subAccountId', - }, - { - name: 'amount', - internalType: 'uint256', - type: 'uint256', - }, - ], - outputs: [], - }, -] as const; - -export type EulerEtokenContract = typeof eulerEtokenContractAbi; -export type EulerEtokenContractContract = GetContractReturnType; - -export class EulerEtokenContract__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: eulerEtokenContractAbi, publicClient: client }); - } -} diff --git a/src/apps/euler/contracts/viem/EulerPtokenContract.ts b/src/apps/euler/contracts/viem/EulerPtokenContract.ts deleted file mode 100644 index 78a8e805f..000000000 --- a/src/apps/euler/contracts/viem/EulerPtokenContract.ts +++ /dev/null @@ -1,324 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const eulerPtokenContractAbi = [ - { - inputs: [ - { - name: 'euler_', - type: 'address', - internalType: 'address', - }, - { - name: 'underlying_', - type: 'address', - internalType: 'address', - }, - ], - type: 'constructor', - stateMutability: 'nonpayable', - }, - { - anonymous: false, - name: 'Approval', - inputs: [ - { - name: 'owner', - type: 'address', - internalType: 'address', - indexed: true, - }, - { - name: 'spender', - indexed: true, - internalType: 'address', - type: 'address', - }, - { - name: 'value', - internalType: 'uint256', - indexed: false, - type: 'uint256', - }, - ], - type: 'event', - }, - { - inputs: [ - { - name: 'from', - type: 'address', - indexed: true, - internalType: 'address', - }, - { - name: 'to', - indexed: true, - internalType: 'address', - type: 'address', - }, - { - name: 'value', - type: 'uint256', - indexed: false, - internalType: 'uint256', - }, - ], - type: 'event', - name: 'Transfer', - anonymous: false, - }, - { - name: 'allowance', - stateMutability: 'view', - outputs: [ - { - type: 'uint256', - internalType: 'uint256', - name: '', - }, - ], - inputs: [ - { - internalType: 'address', - type: 'address', - name: 'holder', - }, - { - internalType: 'address', - type: 'address', - name: 'spender', - }, - ], - type: 'function', - }, - { - stateMutability: 'nonpayable', - name: 'approve', - type: 'function', - inputs: [ - { - type: 'address', - internalType: 'address', - name: 'spender', - }, - { - internalType: 'uint256', - type: 'uint256', - name: 'amount', - }, - ], - outputs: [ - { - internalType: 'bool', - type: 'bool', - name: '', - }, - ], - }, - { - name: 'balanceOf', - stateMutability: 'view', - outputs: [ - { - internalType: 'uint256', - type: 'uint256', - name: '', - }, - ], - inputs: [ - { - name: 'who', - type: 'address', - internalType: 'address', - }, - ], - type: 'function', - }, - { - name: 'claimSurplus', - stateMutability: 'nonpayable', - inputs: [ - { - name: 'who', - type: 'address', - internalType: 'address', - }, - ], - outputs: [], - type: 'function', - }, - { - inputs: [], - outputs: [ - { - type: 'uint8', - internalType: 'uint8', - name: '', - }, - ], - type: 'function', - name: 'decimals', - stateMutability: 'view', - }, - { - name: 'forceUnwrap', - stateMutability: 'nonpayable', - inputs: [ - { - type: 'address', - internalType: 'address', - name: 'who', - }, - { - name: 'amount', - type: 'uint256', - internalType: 'uint256', - }, - ], - outputs: [], - type: 'function', - }, - { - name: 'name', - stateMutability: 'view', - inputs: [], - outputs: [ - { - name: '', - internalType: 'string', - type: 'string', - }, - ], - type: 'function', - }, - { - stateMutability: 'view', - name: 'symbol', - type: 'function', - inputs: [], - outputs: [ - { - name: '', - internalType: 'string', - type: 'string', - }, - ], - }, - { - stateMutability: 'view', - name: 'totalSupply', - type: 'function', - outputs: [ - { - internalType: 'uint256', - type: 'uint256', - name: '', - }, - ], - inputs: [], - }, - { - inputs: [ - { - name: 'recipient', - type: 'address', - internalType: 'address', - }, - { - name: 'amount', - type: 'uint256', - internalType: 'uint256', - }, - ], - outputs: [ - { - name: '', - internalType: 'bool', - type: 'bool', - }, - ], - type: 'function', - name: 'transfer', - stateMutability: 'nonpayable', - }, - { - inputs: [ - { - internalType: 'address', - type: 'address', - name: 'from', - }, - { - internalType: 'address', - type: 'address', - name: 'recipient', - }, - { - name: 'amount', - internalType: 'uint256', - type: 'uint256', - }, - ], - outputs: [ - { - internalType: 'bool', - type: 'bool', - name: '', - }, - ], - type: 'function', - name: 'transferFrom', - stateMutability: 'nonpayable', - }, - { - type: 'function', - outputs: [ - { - name: '', - internalType: 'address', - type: 'address', - }, - ], - inputs: [], - stateMutability: 'view', - name: 'underlying', - }, - { - outputs: [], - inputs: [ - { - internalType: 'uint256', - type: 'uint256', - name: 'amount', - }, - ], - type: 'function', - name: 'unwrap', - stateMutability: 'nonpayable', - }, - { - name: 'wrap', - stateMutability: 'nonpayable', - inputs: [ - { - type: 'uint256', - internalType: 'uint256', - name: 'amount', - }, - ], - outputs: [], - type: 'function', - }, -] as const; - -export type EulerPtokenContract = typeof eulerPtokenContractAbi; -export type EulerPtokenContractContract = GetContractReturnType; - -export class EulerPtokenContract__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: eulerPtokenContractAbi, publicClient: client }); - } -} diff --git a/src/apps/euler/contracts/viem/EulerStakingRewardsContract.ts b/src/apps/euler/contracts/viem/EulerStakingRewardsContract.ts deleted file mode 100644 index f4fa8243d..000000000 --- a/src/apps/euler/contracts/viem/EulerStakingRewardsContract.ts +++ /dev/null @@ -1,652 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const eulerStakingRewardsContractAbi = [ - { - inputs: [ - { - internalType: 'address', - name: '_owner', - type: 'address', - }, - { - internalType: 'address', - name: '_rewardsDistribution', - type: 'address', - }, - { - internalType: 'address', - name: '_rewardsToken', - type: 'address', - }, - { - internalType: 'address', - name: '_stakingToken', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'oldOwner', - type: 'address', - }, - { - indexed: false, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnerChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnerNominated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'bool', - name: 'isPaused', - type: 'bool', - }, - ], - name: 'PauseChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'token', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Recovered', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'reward', - type: 'uint256', - }, - ], - name: 'RewardAdded', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'user', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'reward', - type: 'uint256', - }, - ], - name: 'RewardPaid', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'newDuration', - type: 'uint256', - }, - ], - name: 'RewardsDurationUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'user', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Staked', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'user', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Withdrawn', - type: 'event', - }, - { - inputs: [], - name: 'acceptOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'earned', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'subAccountId', - type: 'uint256', - }, - ], - name: 'exit', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'exit', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'getReward', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'getRewardForDuration', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'lastPauseTime', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'lastTimeRewardApplicable', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'lastUpdateTime', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_owner', - type: 'address', - }, - ], - name: 'nominateNewOwner', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'nominatedOwner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'reward', - type: 'uint256', - }, - ], - name: 'notifyRewardAmount', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'owner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'paused', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'periodFinish', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'tokenAddress', - type: 'address', - }, - { - internalType: 'uint256', - name: 'tokenAmount', - type: 'uint256', - }, - ], - name: 'recoverERC20', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'rewardPerToken', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'rewardPerTokenStored', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'rewardRate', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'rewards', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'rewardsDistribution', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'rewardsDuration', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'rewardsToken', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bool', - name: '_paused', - type: 'bool', - }, - ], - name: 'setPaused', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_rewardsDistribution', - type: 'address', - }, - ], - name: 'setRewardsDistribution', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_rewardsDuration', - type: 'uint256', - }, - ], - name: 'setRewardsDuration', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'subAccountId', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'stake', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'stake', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'stakingToken', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'userRewardPerTokenPaid', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'withdraw', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'subAccountId', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'withdraw', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type EulerStakingRewardsContract = typeof eulerStakingRewardsContractAbi; -export type EulerStakingRewardsContractContract = GetContractReturnType; - -export class EulerStakingRewardsContract__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: eulerStakingRewardsContractAbi, publicClient: client }); - } -} diff --git a/src/apps/euler/contracts/viem/index.ts b/src/apps/euler/contracts/viem/index.ts deleted file mode 100644 index 3fee9bf21..000000000 --- a/src/apps/euler/contracts/viem/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -export type { EulerDtokenContract } from './EulerDtokenContract'; -export type { EulerEtokenContract } from './EulerEtokenContract'; -export type { EulerPtokenContract } from './EulerPtokenContract'; -export type { EulerStakingRewardsContract } from './EulerStakingRewardsContract'; - -export { EulerDtokenContract__factory } from './EulerDtokenContract'; -export { EulerEtokenContract__factory } from './EulerEtokenContract'; -export { EulerPtokenContract__factory } from './EulerPtokenContract'; -export { EulerStakingRewardsContract__factory } from './EulerStakingRewardsContract'; diff --git a/src/apps/euler/ethereum/euler.d-token.token-fetcher.ts b/src/apps/euler/ethereum/euler.d-token.token-fetcher.ts deleted file mode 100644 index 39cbfd879..000000000 --- a/src/apps/euler/ethereum/euler.d-token.token-fetcher.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { EulerDTokenTokenFetcher } from '../common/euler.d-token.token-fetcher'; -import { EulerTokenType } from '../common/euler.token-definition-resolver'; - -@PositionTemplate() -export class EthereumEulerDTokenTokenFetcher extends EulerDTokenTokenFetcher { - groupLabel = 'Lending'; - tokenType = EulerTokenType.D_TOKEN; - isDebt = true; -} diff --git a/src/apps/euler/ethereum/euler.e-token.token-fetcher.ts b/src/apps/euler/ethereum/euler.e-token.token-fetcher.ts deleted file mode 100644 index 60bfe362e..000000000 --- a/src/apps/euler/ethereum/euler.e-token.token-fetcher.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { EulerETokenTokenFetcher } from '../common/euler.e-token.token-fetcher'; -import { EulerTokenType } from '../common/euler.token-definition-resolver'; - -@PositionTemplate() -export class EthereumEulerETokenTokenFetcher extends EulerETokenTokenFetcher { - groupLabel = 'Lending'; - tokenType = EulerTokenType.E_TOKEN; - isDebt = false; -} diff --git a/src/apps/euler/ethereum/euler.p-token.token-fetcher.ts b/src/apps/euler/ethereum/euler.p-token.token-fetcher.ts deleted file mode 100644 index 1c7fa3923..000000000 --- a/src/apps/euler/ethereum/euler.p-token.token-fetcher.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { EulerPTokenTokenFetcher } from '../common/euler.p-token.token-fetcher'; -import { EulerTokenType } from '../common/euler.token-definition-resolver'; - -@PositionTemplate() -export class EthereumEulerPTokenTokenFetcher extends EulerPTokenTokenFetcher { - groupLabel = 'Lending'; - tokenType = EulerTokenType.P_TOKEN; -} diff --git a/src/apps/euler/ethereum/euler.position-presenter.ts b/src/apps/euler/ethereum/euler.position-presenter.ts deleted file mode 100644 index 3ae855dfa..000000000 --- a/src/apps/euler/ethereum/euler.position-presenter.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { PresenterTemplate } from '~app-toolkit/decorators/presenter-template.decorator'; -import { PresentationConfig } from '~app/app.interface'; -import { PositionPresenterTemplate } from '~position/template/position-presenter.template'; - -@PresenterTemplate() -export class EthereumEulerPositionPresenter extends PositionPresenterTemplate { - explorePresentationConfig?: PresentationConfig = { - tabs: [ - { - label: 'Lending', - viewType: 'split', - views: [ - { - viewType: 'list', - label: 'Supply', - groupIds: ['e-token'], - }, - { - viewType: 'list', - label: 'Borrow', - groupIds: ['d-token'], - }, - ], - }, - { viewType: 'list', label: 'Farms', groupIds: ['single-staking-farm'] }, - ], - }; -} diff --git a/src/apps/euler/ethereum/euler.single-staking-farm.contract-position-fetcher.ts b/src/apps/euler/ethereum/euler.single-staking-farm.contract-position-fetcher.ts deleted file mode 100644 index 5bb92e4fa..000000000 --- a/src/apps/euler/ethereum/euler.single-staking-farm.contract-position-fetcher.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { EulerApiStakingRegistry } from '~apps/euler/common/euler.api.staking-registry'; -import { EulerViemContractFactory } from '~apps/euler/contracts'; -import { GetDataPropsParams, GetTokenBalancesParams } from '~position/template/contract-position.template.types'; -import { - SingleStakingFarmDataProps, - SingleStakingFarmDefinition, - SingleStakingFarmTemplateContractPositionFetcher, -} from '~position/template/single-staking.template.contract-position-fetcher'; - -import { EulerStakingRewardsContract } from '../contracts/viem'; - -@PositionTemplate() -export class EthereumEulerSingleStakingFarmContractPositionFetcher extends SingleStakingFarmTemplateContractPositionFetcher { - groupLabel = 'Farms'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(EulerViemContractFactory) protected readonly contractFactory: EulerViemContractFactory, - @Inject(EulerApiStakingRegistry) protected readonly stakingCacheManager: EulerApiStakingRegistry, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.eulerStakingRewardsContract({ address, network: this.network }); - } - - async getFarmDefinitions(): Promise { - const multicall = this.appToolkit.getViemMulticall(this.network); - const markets = await this.stakingCacheManager.getStakingDefinitions({ network: this.network }); - - return await Promise.all( - markets.map(async market => { - const vaultContract = this.contractFactory.eulerStakingRewardsContract({ - address: market.vaultAddress.toLowerCase(), - network: this.network, - }); - const [stakedTokenAddress, rewardTokenAddress] = await Promise.all([ - multicall.wrap(vaultContract).read.stakingToken(), - multicall.wrap(vaultContract).read.rewardsToken(), - ]); - - return { - address: market.vaultAddress, - stakedTokenAddress, - rewardTokenAddresses: [rewardTokenAddress], - }; - }), - ); - } - - getRewardRates({ contract }: GetDataPropsParams) { - return contract.read.rewardRate(); - } - - async getIsActive({ - contract, - }: GetDataPropsParams< - EulerStakingRewardsContract, - SingleStakingFarmDataProps, - SingleStakingFarmDefinition - >): Promise { - return (await contract.read.periodFinish()) > Math.floor(Date.now() / 1000); - } - - getStakedTokenBalance({ - address, - contract, - }: GetTokenBalancesParams) { - return contract.read.balanceOf([address]); - } - - getRewardTokenBalances({ - address, - contract, - }: GetTokenBalancesParams) { - return contract.read.earned([address]); - } -} diff --git a/src/apps/euler/euler.module.ts b/src/apps/euler/euler.module.ts deleted file mode 100644 index 658c906a4..000000000 --- a/src/apps/euler/euler.module.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Module } from '@nestjs/common'; - -import { AbstractApp } from '~app/app.dynamic-module'; -import { EulerApiStakingRegistry } from '~apps/euler/common/euler.api.staking-registry'; - -import { EulerTokenDefinitionsResolver } from './common/euler.token-definition-resolver'; -import { EulerViemContractFactory } from './contracts'; -import { EthereumEulerDTokenTokenFetcher } from './ethereum/euler.d-token.token-fetcher'; -import { EthereumEulerETokenTokenFetcher } from './ethereum/euler.e-token.token-fetcher'; -import { EthereumEulerPTokenTokenFetcher } from './ethereum/euler.p-token.token-fetcher'; -import { EthereumEulerPositionPresenter } from './ethereum/euler.position-presenter'; -import { EthereumEulerSingleStakingFarmContractPositionFetcher } from './ethereum/euler.single-staking-farm.contract-position-fetcher'; - -@Module({ - providers: [ - EthereumEulerDTokenTokenFetcher, - EthereumEulerETokenTokenFetcher, - EthereumEulerPTokenTokenFetcher, - EthereumEulerPositionPresenter, - EthereumEulerSingleStakingFarmContractPositionFetcher, - EulerViemContractFactory, - EulerTokenDefinitionsResolver, - EulerApiStakingRegistry, - ], -}) -export class EulerAppModule extends AbstractApp() {} diff --git a/src/apps/furucombo/polygon/furucombo.fund.token-fetcher.ts b/src/apps/furucombo/polygon/furucombo.fund.token-fetcher.ts index fd08995ae..d8d860025 100644 --- a/src/apps/furucombo/polygon/furucombo.fund.token-fetcher.ts +++ b/src/apps/furucombo/polygon/furucombo.fund.token-fetcher.ts @@ -25,15 +25,9 @@ interface FurucomboFund { name: string; token: { address: string; - symbol: string; - decimals: number; - name: string; }; stakingToken: { address: string; - symbol: string; - decimals: number; - name: string; }; liquidity: string; apy: string; diff --git a/src/apps/gains-network/common/gains-network.g-token.token-fetcher.ts b/src/apps/gains-network/common/gains-network.g-token.token-fetcher.ts deleted file mode 100644 index cf1ba6f28..000000000 --- a/src/apps/gains-network/common/gains-network.g-token.token-fetcher.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetPricePerShareParams, GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; - -import { GainsNetworkViemContractFactory } from '../contracts'; -import { GainsNetworkGToken } from '../contracts/viem'; - -export abstract class GainsNetworkGTokenTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'gTokens'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(GainsNetworkViemContractFactory) protected readonly contractFactory: GainsNetworkViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.gainsNetworkGToken({ network: this.network, address }); - } - - async getAddresses() { - return ['0xd85e038593d7a098614721eae955ec2022b9b91b']; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.asset(), network: this.network }]; - } - - async getPricePerShare({ contract, appToken }: GetPricePerShareParams) { - const pricePerShareRaw = await contract.read.shareToAssetsPrice(); - const pricePerShare = Number(pricePerShareRaw) / 10 ** appToken.decimals; - - return [pricePerShare]; - } -} diff --git a/src/apps/gains-network/contracts/abis/gains-network-g-token.json b/src/apps/gains-network/contracts/abis/gains-network-g-token.json index 6106c5337..5ce3e2369 100644 --- a/src/apps/gains-network/contracts/abis/gains-network-g-token.json +++ b/src/apps/gains-network/contracts/abis/gains-network-g-token.json @@ -2,12 +2,42 @@ { "anonymous": false, "inputs": [ - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, - { "indexed": true, "internalType": "uint256", "name": "newEpoch", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "prevPositiveOpenPnl", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "newPositiveOpenPnl", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "newEpochPositiveOpenPnl", "type": "uint256" }, - { "indexed": false, "internalType": "int256", "name": "newAccPnlPerTokenUsed", "type": "int256" } + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newEpoch", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "prevPositiveOpenPnl", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newPositiveOpenPnl", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newEpochPositiveOpenPnl", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "newAccPnlPerTokenUsed", + "type": "int256" + } ], "name": "AccPnlPerTokenUsedUpdated", "type": "event" @@ -15,8 +45,18 @@ { "anonymous": false, "inputs": [ - { "indexed": false, "internalType": "string", "name": "name", "type": "string" }, - { "indexed": false, "internalType": "address", "name": "newValue", "type": "address" } + { + "indexed": false, + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "indexed": false, + "internalType": "address", + "name": "newValue", + "type": "address" + } ], "name": "AddressParamUpdated", "type": "event" @@ -24,9 +64,24 @@ { "anonymous": false, "inputs": [ - { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } ], "name": "Approval", "type": "event" @@ -34,10 +89,30 @@ { "anonymous": false, "inputs": [ - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "assets", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "assetsLessDeplete", "type": "uint256" } + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "assetsLessDeplete", + "type": "uint256" + } ], "name": "AssetsReceived", "type": "event" @@ -45,26 +120,68 @@ { "anonymous": false, "inputs": [ - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "receiver", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "assets", "type": "uint256" } + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } ], "name": "AssetsSent", "type": "event" }, { "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256", "name": "newValue", "type": "uint256" }], + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "newValue", + "type": "uint256" + } + ], "name": "CurrentMaxSupplyUpdated", "type": "event" }, - { "anonymous": false, "inputs": [], "name": "DailyAccPnlDeltaReset", "type": "event" }, + { + "anonymous": false, + "inputs": [], + "name": "DailyAccPnlDeltaReset", + "type": "event" + }, { "anonymous": false, "inputs": [ - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "assets", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "amountGns", "type": "uint256" } + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountGns", + "type": "uint256" + } ], "name": "Depleted", "type": "event" @@ -72,10 +189,30 @@ { "anonymous": false, "inputs": [ - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "assets", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "shares", "type": "uint256" } + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } ], "name": "Deposit", "type": "event" @@ -83,17 +220,56 @@ { "anonymous": false, "inputs": [ - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "depositId", "type": "uint256" }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "depositId", + "type": "uint256" + }, { "components": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "uint256", "name": "shares", "type": "uint256" }, - { "internalType": "uint256", "name": "assetsDeposited", "type": "uint256" }, - { "internalType": "uint256", "name": "assetsDiscount", "type": "uint256" }, - { "internalType": "uint256", "name": "atTimestamp", "type": "uint256" }, - { "internalType": "uint256", "name": "lockDuration", "type": "uint256" } + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "assetsDeposited", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "assetsDiscount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "atTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lockDuration", + "type": "uint256" + } ], "indexed": false, "internalType": "struct IGToken.LockedDeposit", @@ -107,18 +283,62 @@ { "anonymous": false, "inputs": [ - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "receiver", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "depositId", "type": "uint256" }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "depositId", + "type": "uint256" + }, { "components": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "uint256", "name": "shares", "type": "uint256" }, - { "internalType": "uint256", "name": "assetsDeposited", "type": "uint256" }, - { "internalType": "uint256", "name": "assetsDiscount", "type": "uint256" }, - { "internalType": "uint256", "name": "atTimestamp", "type": "uint256" }, - { "internalType": "uint256", "name": "lockDuration", "type": "uint256" } + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "assetsDeposited", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "assetsDiscount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "atTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lockDuration", + "type": "uint256" + } ], "indexed": false, "internalType": "struct IGToken.LockedDeposit", @@ -134,8 +354,16 @@ "inputs": [ { "components": [ - { "internalType": "address", "name": "addr", "type": "address" }, - { "internalType": "bytes", "name": "signature", "type": "bytes" } + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } ], "indexed": false, "internalType": "struct GToken.GnsPriceProvider", @@ -148,25 +376,57 @@ }, { "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint8", "name": "version", "type": "uint8" }], + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], "name": "Initialized", "type": "event" }, { "anonymous": false, "inputs": [ - { "indexed": false, "internalType": "string", "name": "name", "type": "string" }, - { "indexed": false, "internalType": "uint256", "name": "newValue", "type": "uint256" } + { + "indexed": false, + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newValue", + "type": "uint256" + } ], "name": "NumberParamUpdated", "type": "event" }, - { "anonymous": false, "inputs": [], "name": "OpenTradesPnlFeedCallFailed", "type": "event" }, + { + "anonymous": false, + "inputs": [], + "name": "OpenTradesPnlFeedCallFailed", + "type": "event" + }, { "anonymous": false, "inputs": [ - { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } ], "name": "OwnershipTransferred", "type": "event" @@ -174,9 +434,24 @@ { "anonymous": false, "inputs": [ - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "assets", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "amountGns", "type": "uint256" } + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountGns", + "type": "uint256" + } ], "name": "Refilled", "type": "event" @@ -184,24 +459,56 @@ { "anonymous": false, "inputs": [ - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "assets", "type": "uint256" } + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } ], "name": "RewardDistributed", "type": "event" }, { "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256", "name": "newValue", "type": "uint256" }], + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "newValue", + "type": "uint256" + } + ], "name": "ShareToAssetsPriceUpdated", "type": "event" }, { "anonymous": false, "inputs": [ - { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } ], "name": "Transfer", "type": "event" @@ -209,11 +516,36 @@ { "anonymous": false, "inputs": [ - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "receiver", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "assets", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "shares", "type": "uint256" } + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } ], "name": "Withdraw", "type": "event" @@ -221,29 +553,86 @@ { "anonymous": false, "inputs": [ - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "shares", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "currEpoch", "type": "uint256" }, - { "indexed": true, "internalType": "uint256", "name": "unlockEpoch", "type": "uint256" } + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "currEpoch", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "unlockEpoch", + "type": "uint256" + } ], "name": "WithdrawCanceled", "type": "event" }, { "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256[2]", "name": "newValue", "type": "uint256[2]" }], + "inputs": [ + { + "indexed": false, + "internalType": "uint256[2]", + "name": "newValue", + "type": "uint256[2]" + } + ], "name": "WithdrawLockThresholdsPUpdated", "type": "event" }, { "anonymous": false, "inputs": [ - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "shares", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "currEpoch", "type": "uint256" }, - { "indexed": true, "internalType": "uint256", "name": "unlockEpoch", "type": "uint256" } + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "currEpoch", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "unlockEpoch", + "type": "uint256" + } ], "name": "WithdrawRequested", "type": "event" @@ -251,91 +640,191 @@ { "inputs": [], "name": "MIN_LOCK_DURATION", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "accPnlPerToken", - "outputs": [{ "internalType": "int256", "name": "", "type": "int256" }], + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "accPnlPerTokenUsed", - "outputs": [{ "internalType": "int256", "name": "", "type": "int256" }], + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "accRewardsPerToken", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "admin", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "spender", "type": "address" } + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } ], "name": "allowance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } ], "name": "approve", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "asset", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "assetsToDeplete", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "availableAssets", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [ - { "internalType": "uint256", "name": "shares", "type": "uint256" }, - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "uint256", "name": "unlockEpoch", "type": "uint256" } + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "unlockEpoch", + "type": "uint256" + } ], "name": "cancelWithdrawRequest", "outputs": [], @@ -345,92 +834,190 @@ { "inputs": [], "name": "collateralizationP", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { - "inputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], "name": "convertToAssets", - "outputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { - "inputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], "name": "convertToShares", - "outputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "currentBalanceDai", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "currentEpoch", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "currentEpochPositiveOpenPnl", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "currentEpochStart", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "currentMaxSupply", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "dailyAccPnlDelta", - "outputs": [{ "internalType": "int256", "name": "", "type": "int256" }], + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "dailyMintedGns", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } ], "name": "decreaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], "name": "deplete", "outputs": [], "stateMutability": "nonpayable", @@ -438,44 +1025,112 @@ }, { "inputs": [ - { "internalType": "uint256", "name": "assets", "type": "uint256" }, - { "internalType": "address", "name": "receiver", "type": "address" } + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } ], "name": "deposit", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ - { "internalType": "uint256", "name": "assets", "type": "uint256" }, - { "internalType": "uint256", "name": "lockDuration", "type": "uint256" }, - { "internalType": "address", "name": "receiver", "type": "address" } + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lockDuration", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } ], "name": "depositWithDiscountAndLock", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], "name": "distributeReward", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [{ "internalType": "uint256", "name": "depositId", "type": "uint256" }], + "inputs": [ + { + "internalType": "uint256", + "name": "depositId", + "type": "uint256" + } + ], "name": "getLockedDeposit", "outputs": [ { "components": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "uint256", "name": "shares", "type": "uint256" }, - { "internalType": "uint256", "name": "assetsDeposited", "type": "uint256" }, - { "internalType": "uint256", "name": "assetsDiscount", "type": "uint256" }, - { "internalType": "uint256", "name": "atTimestamp", "type": "uint256" }, - { "internalType": "uint256", "name": "lockDuration", "type": "uint256" } + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "assetsDeposited", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "assetsDiscount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "atTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lockDuration", + "type": "uint256" + } ], "internalType": "struct IGToken.LockedDeposit", "name": "", @@ -489,8 +1144,16 @@ "inputs": [], "name": "gnsPriceProvider", "outputs": [ - { "internalType": "address", "name": "addr", "type": "address" }, - { "internalType": "bytes", "name": "signature", "type": "bytes" } + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } ], "stateMutability": "view", "type": "function" @@ -498,45 +1161,119 @@ { "inputs": [], "name": "gnsToken", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "gnsTokenToAssetsPrice", - "outputs": [{ "internalType": "uint256", "name": "price", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "price", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "addedValue", "type": "uint256" } + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } ], "name": "increaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ - { "internalType": "string", "name": "_name", "type": "string" }, - { "internalType": "string", "name": "_symbol", "type": "string" }, + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, { "components": [ - { "internalType": "address", "name": "asset", "type": "address" }, - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "manager", "type": "address" }, - { "internalType": "address", "name": "admin", "type": "address" }, - { "internalType": "address", "name": "gnsToken", "type": "address" }, - { "internalType": "address", "name": "lockedDepositNft", "type": "address" }, - { "internalType": "address", "name": "pnlHandler", "type": "address" }, - { "internalType": "address", "name": "openTradesPnlFeed", "type": "address" }, + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "manager", + "type": "address" + }, + { + "internalType": "address", + "name": "admin", + "type": "address" + }, + { + "internalType": "address", + "name": "gnsToken", + "type": "address" + }, + { + "internalType": "address", + "name": "lockedDepositNft", + "type": "address" + }, + { + "internalType": "address", + "name": "pnlHandler", + "type": "address" + }, + { + "internalType": "address", + "name": "openTradesPnlFeed", + "type": "address" + }, { "components": [ - { "internalType": "address", "name": "addr", "type": "address" }, - { "internalType": "bytes", "name": "signature", "type": "bytes" } + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } ], "internalType": "struct GToken.GnsPriceProvider", "name": "gnsPriceProvider", @@ -547,15 +1284,51 @@ "name": "_contractAddresses", "type": "tuple" }, - { "internalType": "uint256", "name": "_MIN_LOCK_DURATION", "type": "uint256" }, - { "internalType": "uint256", "name": "_maxAccOpenPnlDelta", "type": "uint256" }, - { "internalType": "uint256", "name": "_maxDailyAccPnlDelta", "type": "uint256" }, - { "internalType": "uint256[2]", "name": "_withdrawLockThresholdsP", "type": "uint256[2]" }, - { "internalType": "uint256", "name": "_maxSupplyIncreaseDailyP", "type": "uint256" }, - { "internalType": "uint256", "name": "_lossesBurnP", "type": "uint256" }, - { "internalType": "uint256", "name": "_maxGnsSupplyMintDailyP", "type": "uint256" }, - { "internalType": "uint256", "name": "_maxDiscountP", "type": "uint256" }, - { "internalType": "uint256", "name": "_maxDiscountThresholdP", "type": "uint256" } + { + "internalType": "uint256", + "name": "_MIN_LOCK_DURATION", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxAccOpenPnlDelta", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxDailyAccPnlDelta", + "type": "uint256" + }, + { + "internalType": "uint256[2]", + "name": "_withdrawLockThresholdsP", + "type": "uint256[2]" + }, + { + "internalType": "uint256", + "name": "_maxSupplyIncreaseDailyP", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_lossesBurnP", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxGnsSupplyMintDailyP", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxDiscountP", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxDiscountThresholdP", + "type": "uint256" + } ], "name": "initialize", "outputs": [], @@ -565,51 +1338,119 @@ { "inputs": [], "name": "lastDailyAccPnlDeltaReset", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "lastDailyMintedGnsReset", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "lastMaxSupplyUpdate", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [ - { "internalType": "uint256", "name": "collatP", "type": "uint256" }, - { "internalType": "uint256", "name": "lockDuration", "type": "uint256" } + { + "internalType": "uint256", + "name": "collatP", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lockDuration", + "type": "uint256" + } ], "name": "lockDiscountP", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "lockedDepositNft", - "outputs": [{ "internalType": "contract INft", "name": "", "type": "address" }], + "outputs": [ + { + "internalType": "contract INft", + "name": "", + "type": "address" + } + ], "stateMutability": "view", "type": "function" }, { - "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "name": "lockedDeposits", "outputs": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "uint256", "name": "shares", "type": "uint256" }, - { "internalType": "uint256", "name": "assetsDeposited", "type": "uint256" }, - { "internalType": "uint256", "name": "assetsDiscount", "type": "uint256" }, - { "internalType": "uint256", "name": "atTimestamp", "type": "uint256" }, - { "internalType": "uint256", "name": "lockDuration", "type": "uint256" } + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "assetsDeposited", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "assetsDiscount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "atTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lockDuration", + "type": "uint256" + } ], "stateMutability": "view", "type": "function" @@ -617,21 +1458,41 @@ { "inputs": [], "name": "lockedDepositsCount", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "lossesBurnP", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [ - { "internalType": "uint256", "name": "shares", "type": "uint256" }, - { "internalType": "address", "name": "owner", "type": "address" } + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } ], "name": "makeWithdrawRequest", "outputs": [], @@ -641,168 +1502,376 @@ { "inputs": [], "name": "manager", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "maxAccOpenPnlDelta", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "maxAccPnlPerToken", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "maxDailyAccPnlDelta", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { - "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }], + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], "name": "maxDeposit", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "maxDiscountP", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "maxDiscountThresholdP", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "maxGnsSupplyMintDailyP", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], "name": "maxMint", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { - "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }], + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], "name": "maxRedeem", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "maxSupplyIncreaseDailyP", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { - "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }], + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], "name": "maxWithdraw", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [ - { "internalType": "uint256", "name": "shares", "type": "uint256" }, - { "internalType": "address", "name": "receiver", "type": "address" } + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } ], "name": "mint", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ - { "internalType": "uint256", "name": "shares", "type": "uint256" }, - { "internalType": "uint256", "name": "lockDuration", "type": "uint256" }, - { "internalType": "address", "name": "receiver", "type": "address" } + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lockDuration", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } ], "name": "mintWithDiscountAndLock", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "openTradesPnlFeed", - "outputs": [{ "internalType": "contract IOpenTradesPnlFeed", "name": "", "type": "address" }], + "outputs": [ + { + "internalType": "contract IOpenTradesPnlFeed", + "name": "", + "type": "address" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "pnlHandler", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], "stateMutability": "view", "type": "function" }, { - "inputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], "name": "previewDeposit", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { - "inputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], "name": "previewMint", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { - "inputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], "name": "previewRedeem", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { - "inputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], "name": "previewWithdraw", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [ - { "internalType": "uint256", "name": "assets", "type": "uint256" }, - { "internalType": "address", "name": "user", "type": "address" } + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + } ], "name": "receiveAssets", "outputs": [], @@ -811,27 +1880,65 @@ }, { "inputs": [ - { "internalType": "uint256", "name": "shares", "type": "uint256" }, - { "internalType": "address", "name": "receiver", "type": "address" }, - { "internalType": "address", "name": "owner", "type": "address" } + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } ], "name": "redeem", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], "name": "refill", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ - { "internalType": "uint256", "name": "assets", "type": "uint256" }, - { "internalType": "address", "name": "receiver", "type": "address" } + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } ], "name": "sendAssets", "outputs": [], @@ -841,131 +1948,265 @@ { "inputs": [], "name": "shareToAssetsPrice", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "symbol", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalAssets", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalClosedPnl", - "outputs": [{ "internalType": "int256", "name": "", "type": "int256" }], + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalDepleted", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalDepletedGns", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalDeposited", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalDiscounts", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalLiability", - "outputs": [{ "internalType": "int256", "name": "", "type": "int256" }], + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalLockedDiscounts", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalRefilled", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalRefilledGns", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalRewards", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { - "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }], + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], "name": "totalSharesBeingWithdrawn", - "outputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalSupply", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [ - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } ], "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ - { "internalType": "address", "name": "from", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } ], "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", @@ -995,14 +2236,28 @@ { "inputs": [], "name": "tvl", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [ - { "internalType": "uint256", "name": "depositId", "type": "uint256" }, - { "internalType": "address", "name": "receiver", "type": "address" } + { + "internalType": "uint256", + "name": "depositId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } ], "name": "unlockDeposit", "outputs": [], @@ -1011,16 +2266,36 @@ }, { "inputs": [ - { "internalType": "uint256", "name": "prevPositiveOpenPnl", "type": "uint256" }, - { "internalType": "uint256", "name": "newPositiveOpenPnl", "type": "uint256" } + { + "internalType": "uint256", + "name": "prevPositiveOpenPnl", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "newPositiveOpenPnl", + "type": "uint256" + } ], "name": "updateAccPnlPerTokenUsed", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [{ "internalType": "address", "name": "newValue", "type": "address" }], + "inputs": [ + { + "internalType": "address", + "name": "newValue", + "type": "address" + } + ], "name": "updateAdmin", "outputs": [], "stateMutability": "nonpayable", @@ -1030,8 +2305,16 @@ "inputs": [ { "components": [ - { "internalType": "address", "name": "addr", "type": "address" }, - { "internalType": "bytes", "name": "signature", "type": "bytes" } + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } ], "internalType": "struct GToken.GnsPriceProvider", "name": "newValue", @@ -1044,77 +2327,143 @@ "type": "function" }, { - "inputs": [{ "internalType": "uint256", "name": "newValue", "type": "uint256" }], + "inputs": [ + { + "internalType": "uint256", + "name": "newValue", + "type": "uint256" + } + ], "name": "updateLossesBurnP", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [{ "internalType": "address", "name": "newValue", "type": "address" }], + "inputs": [ + { + "internalType": "address", + "name": "newValue", + "type": "address" + } + ], "name": "updateManager", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [{ "internalType": "uint256", "name": "newValue", "type": "uint256" }], + "inputs": [ + { + "internalType": "uint256", + "name": "newValue", + "type": "uint256" + } + ], "name": "updateMaxAccOpenPnlDelta", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [{ "internalType": "uint256", "name": "newValue", "type": "uint256" }], + "inputs": [ + { + "internalType": "uint256", + "name": "newValue", + "type": "uint256" + } + ], "name": "updateMaxDailyAccPnlDelta", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [{ "internalType": "uint256", "name": "newValue", "type": "uint256" }], + "inputs": [ + { + "internalType": "uint256", + "name": "newValue", + "type": "uint256" + } + ], "name": "updateMaxDiscountP", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [{ "internalType": "uint256", "name": "newValue", "type": "uint256" }], + "inputs": [ + { + "internalType": "uint256", + "name": "newValue", + "type": "uint256" + } + ], "name": "updateMaxDiscountThresholdP", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [{ "internalType": "uint256", "name": "newValue", "type": "uint256" }], + "inputs": [ + { + "internalType": "uint256", + "name": "newValue", + "type": "uint256" + } + ], "name": "updateMaxGnsSupplyMintDailyP", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [{ "internalType": "uint256", "name": "newValue", "type": "uint256" }], + "inputs": [ + { + "internalType": "uint256", + "name": "newValue", + "type": "uint256" + } + ], "name": "updateMaxSupplyIncreaseDailyP", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [{ "internalType": "address", "name": "newValue", "type": "address" }], + "inputs": [ + { + "internalType": "address", + "name": "newValue", + "type": "address" + } + ], "name": "updateOpenTradesPnlFeed", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [{ "internalType": "address", "name": "newValue", "type": "address" }], + "inputs": [ + { + "internalType": "address", + "name": "newValue", + "type": "address" + } + ], "name": "updatePnlHandler", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [{ "internalType": "uint256[2]", "name": "newValue", "type": "uint256[2]" }], + "inputs": [ + { + "internalType": "uint256[2]", + "name": "newValue", + "type": "uint256[2]" + } + ], "name": "updateWithdrawLockThresholdsP", "outputs": [], "stateMutability": "nonpayable", @@ -1122,36 +2471,86 @@ }, { "inputs": [ - { "internalType": "uint256", "name": "assets", "type": "uint256" }, - { "internalType": "address", "name": "receiver", "type": "address" }, - { "internalType": "address", "name": "owner", "type": "address" } + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } ], "name": "withdraw", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "withdrawEpochsTimelock", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { - "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "name": "withdrawLockThresholdsP", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [ - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "uint256", "name": "", "type": "uint256" } + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } ], "name": "withdrawRequests", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" } diff --git a/src/apps/gains-network/gains-network.module.ts b/src/apps/gains-network/gains-network.module.ts index 3f5e37a27..cc03041a8 100644 --- a/src/apps/gains-network/gains-network.module.ts +++ b/src/apps/gains-network/gains-network.module.ts @@ -6,7 +6,6 @@ import { ArbitrumGainsNetworkLockedContractPositionFetcher } from './arbitrum/ga import { ArbitrumGainsNetworkStakingV2ContractPositionFetcher } from './arbitrum/gains-network.staking-v2.contract-position-fetcher'; import { ArbitrumGainsNetworkStakingContractPositionFetcher } from './arbitrum/gains-network.staking.contract-position-fetcher'; import { GainsNetworkViemContractFactory } from './contracts'; -import { PolygonGainsNetworkGTokenTokenFetcher } from './polygon/gains-network.g-token.token-fetcher'; import { PolygonGainsNetworkLockedContractPositionFetcher } from './polygon/gains-network.locked.contract-position-fetcher'; import { PolygonGainsNetworkStakingV2ContractPositionFetcher } from './polygon/gains-network.staking-v2.contract-position-fetcher'; import { PolygonGainsNetworkStakingContractPositionFetcher } from './polygon/gains-network.staking.contract-position-fetcher'; @@ -20,7 +19,6 @@ import { PolygonGainsNetworkStakingContractPositionFetcher } from './polygon/gai ArbitrumGainsNetworkStakingV2ContractPositionFetcher, // Polygon PolygonGainsNetworkStakingContractPositionFetcher, - PolygonGainsNetworkGTokenTokenFetcher, PolygonGainsNetworkLockedContractPositionFetcher, PolygonGainsNetworkStakingV2ContractPositionFetcher, ], diff --git a/src/apps/gains-network/polygon/gains-network.g-token.token-fetcher.ts b/src/apps/gains-network/polygon/gains-network.g-token.token-fetcher.ts deleted file mode 100644 index 0d9974770..000000000 --- a/src/apps/gains-network/polygon/gains-network.g-token.token-fetcher.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { GainsNetworkGTokenTokenFetcher } from '../common/gains-network.g-token.token-fetcher'; - -@PositionTemplate() -export class PolygonGainsNetworkGTokenTokenFetcher extends GainsNetworkGTokenTokenFetcher { - async getAddresses() { - return ['0x91993f2101cc758d0deb7279d41e880f7defe827']; - } -} diff --git a/src/apps/klima/contracts/abis/klima-distributor.json b/src/apps/klima/contracts/abis/klima-distributor.json deleted file mode 100644 index 14179eec1..000000000 --- a/src/apps/klima/contracts/abis/klima-distributor.json +++ /dev/null @@ -1,139 +0,0 @@ -[ - { - "inputs": [ - { "internalType": "address", "name": "_treasury", "type": "address" }, - { "internalType": "address", "name": "_klima", "type": "address" }, - { "internalType": "uint256", "name": "_epochLength", "type": "uint256" }, - { "internalType": "uint256", "name": "_nextEpochBlock", "type": "uint256" } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "inputs": [], - "name": "KLIMA", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_recipient", "type": "address" }, - { "internalType": "uint256", "name": "_rewardRate", "type": "uint256" } - ], - "name": "addRecipient", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "name": "adjustments", - "outputs": [ - { "internalType": "bool", "name": "add", "type": "bool" }, - { "internalType": "uint256", "name": "rate", "type": "uint256" }, - { "internalType": "uint256", "name": "target", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "distribute", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "epochLength", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "name": "info", - "outputs": [ - { "internalType": "uint256", "name": "rate", "type": "uint256" }, - { "internalType": "address", "name": "recipient", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "nextEpochBlock", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_rate", "type": "uint256" }], - "name": "nextRewardAt", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_recipient", "type": "address" }], - "name": "nextRewardFor", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "policy", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { "inputs": [], "name": "pullPolicy", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [{ "internalType": "address", "name": "newPolicy_", "type": "address" }], - "name": "pushPolicy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "_index", "type": "uint256" }, - { "internalType": "address", "name": "_recipient", "type": "address" } - ], - "name": "removeRecipient", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { "inputs": [], "name": "renouncePolicy", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { "internalType": "uint256", "name": "_index", "type": "uint256" }, - { "internalType": "bool", "name": "_add", "type": "bool" }, - { "internalType": "uint256", "name": "_rate", "type": "uint256" }, - { "internalType": "uint256", "name": "_target", "type": "uint256" } - ], - "name": "setAdjustment", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "treasury", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - } -] diff --git a/src/apps/klima/contracts/abis/klima-s-klima.json b/src/apps/klima/contracts/abis/klima-s-klima.json deleted file mode 100644 index 4ecbf5cd0..000000000 --- a/src/apps/klima/contracts/abis/klima-s-klima.json +++ /dev/null @@ -1,303 +0,0 @@ -[ - { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "uint256", "name": "epoch", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "rebase", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "index", "type": "uint256" } - ], - "name": "LogRebase", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "address", "name": "stakingContract", "type": "address" }], - "name": "LogStakingContractUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "uint256", "name": "epoch", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "timestamp", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "totalSupply", "type": "uint256" } - ], - "name": "LogSupply", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } - ], - "name": "OwnershipPulled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } - ], - "name": "OwnershipPushed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "INDEX", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PERMIT_TYPEHASH", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "owner_", "type": "address" }, - { "internalType": "address", "name": "spender", "type": "address" } - ], - "name": "allowance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "approve", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "gons", "type": "uint256" }], - "name": "balanceForGons", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "who", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "circulatingSupply", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } - ], - "name": "decreaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], - "name": "gonsForBalance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "addedValue", "type": "uint256" } - ], - "name": "increaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "index", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "stakingContract_", "type": "address" }], - "name": "initialize", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initializer", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "manager", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }], - "name": "nonces", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { "internalType": "uint256", "name": "deadline", "type": "uint256" }, - { "internalType": "uint8", "name": "v", "type": "uint8" }, - { "internalType": "bytes32", "name": "r", "type": "bytes32" }, - { "internalType": "bytes32", "name": "s", "type": "bytes32" } - ], - "name": "permit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { "inputs": [], "name": "pullManagement", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [{ "internalType": "address", "name": "newOwner_", "type": "address" }], - "name": "pushManagement", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "profit_", "type": "uint256" }, - { "internalType": "uint256", "name": "epoch_", "type": "uint256" } - ], - "name": "rebase", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "name": "rebases", - "outputs": [ - { "internalType": "uint256", "name": "epoch", "type": "uint256" }, - { "internalType": "uint256", "name": "rebase", "type": "uint256" }, - { "internalType": "uint256", "name": "totalStakedBefore", "type": "uint256" }, - { "internalType": "uint256", "name": "totalStakedAfter", "type": "uint256" }, - { "internalType": "uint256", "name": "amountRebased", "type": "uint256" }, - { "internalType": "uint256", "name": "index", "type": "uint256" }, - { "internalType": "uint256", "name": "blockNumberOccured", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { "inputs": [], "name": "renounceManagement", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [{ "internalType": "uint256", "name": "_INDEX", "type": "uint256" }], - "name": "setIndex", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "stakingContract", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "from", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/klima/contracts/abis/klima-ws-klima.json b/src/apps/klima/contracts/abis/klima-ws-klima.json deleted file mode 100644 index a88b16de6..000000000 --- a/src/apps/klima/contracts/abis/klima-ws-klima.json +++ /dev/null @@ -1,158 +0,0 @@ -[ - { - "inputs": [{ "internalType": "address", "name": "_sKLIMA", "type": "address" }], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "spender", "type": "address" } - ], - "name": "allowance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "approve", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } - ], - "name": "decreaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "addedValue", "type": "uint256" } - ], - "name": "increaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "sKLIMA", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_amount", "type": "uint256" }], - "name": "sKLIMATowKLIMA", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "sender", "type": "address" }, - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_amount", "type": "uint256" }], - "name": "unwrap", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_amount", "type": "uint256" }], - "name": "wKLIMATosKLIMA", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_amount", "type": "uint256" }], - "name": "wrap", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/klima/contracts/viem.contract-factory.ts b/src/apps/klima/contracts/viem.contract-factory.ts index 1a9bea8bd..5b1d67fda 100644 --- a/src/apps/klima/contracts/viem.contract-factory.ts +++ b/src/apps/klima/contracts/viem.contract-factory.ts @@ -3,12 +3,7 @@ import { Injectable, Inject } from '@nestjs/common'; import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; import { Network } from '~types/network.interface'; -import { - KlimaBondDepository__factory, - KlimaDistributor__factory, - KlimaSKlima__factory, - KlimaWsKlima__factory, -} from './viem'; +import { KlimaBondDepository__factory } from './viem'; type ContractOpts = { address: string; network: Network }; @@ -19,13 +14,4 @@ export class KlimaViemContractFactory { klimaBondDepository({ address, network }: ContractOpts) { return KlimaBondDepository__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } - klimaDistributor({ address, network }: ContractOpts) { - return KlimaDistributor__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - klimaSKlima({ address, network }: ContractOpts) { - return KlimaSKlima__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - klimaWsKlima({ address, network }: ContractOpts) { - return KlimaWsKlima__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } } diff --git a/src/apps/klima/contracts/viem/KlimaDistributor.ts b/src/apps/klima/contracts/viem/KlimaDistributor.ts deleted file mode 100644 index 0f449b18c..000000000 --- a/src/apps/klima/contracts/viem/KlimaDistributor.ts +++ /dev/null @@ -1,321 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const klimaDistributorAbi = [ - { - inputs: [ - { - internalType: 'address', - name: '_treasury', - type: 'address', - }, - { - internalType: 'address', - name: '_klima', - type: 'address', - }, - { - internalType: 'uint256', - name: '_epochLength', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_nextEpochBlock', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipTransferred', - type: 'event', - }, - { - inputs: [], - name: 'KLIMA', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: '_rewardRate', - type: 'uint256', - }, - ], - name: 'addRecipient', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'adjustments', - outputs: [ - { - internalType: 'bool', - name: 'add', - type: 'bool', - }, - { - internalType: 'uint256', - name: 'rate', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'target', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'distribute', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'epochLength', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'info', - outputs: [ - { - internalType: 'uint256', - name: 'rate', - type: 'uint256', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'nextEpochBlock', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_rate', - type: 'uint256', - }, - ], - name: 'nextRewardAt', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_recipient', - type: 'address', - }, - ], - name: 'nextRewardFor', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'policy', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'pullPolicy', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newPolicy_', - type: 'address', - }, - ], - name: 'pushPolicy', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_index', - type: 'uint256', - }, - { - internalType: 'address', - name: '_recipient', - type: 'address', - }, - ], - name: 'removeRecipient', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'renouncePolicy', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_index', - type: 'uint256', - }, - { - internalType: 'bool', - name: '_add', - type: 'bool', - }, - { - internalType: 'uint256', - name: '_rate', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_target', - type: 'uint256', - }, - ], - name: 'setAdjustment', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'treasury', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, -] as const; - -export type KlimaDistributor = typeof klimaDistributorAbi; -export type KlimaDistributorContract = GetContractReturnType; - -export class KlimaDistributor__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: klimaDistributorAbi, publicClient: client }); - } -} diff --git a/src/apps/klima/contracts/viem/KlimaSKlima.ts b/src/apps/klima/contracts/viem/KlimaSKlima.ts deleted file mode 100644 index a3ab395bc..000000000 --- a/src/apps/klima/contracts/viem/KlimaSKlima.ts +++ /dev/null @@ -1,734 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const klimaSKlimaAbi = [ - { - inputs: [], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'uint256', - name: 'epoch', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'rebase', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'index', - type: 'uint256', - }, - ], - name: 'LogRebase', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'stakingContract', - type: 'address', - }, - ], - name: 'LogStakingContractUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'uint256', - name: 'epoch', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'timestamp', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'totalSupply', - type: 'uint256', - }, - ], - name: 'LogSupply', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipPulled', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipPushed', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - inputs: [], - name: 'DOMAIN_SEPARATOR', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'INDEX', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'PERMIT_TYPEHASH', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner_', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'gons', - type: 'uint256', - }, - ], - name: 'balanceForGons', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'who', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'circulatingSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'gonsForBalance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'index', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'stakingContract_', - type: 'address', - }, - ], - name: 'initialize', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'initializer', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'manager', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - ], - name: 'nonces', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'deadline', - type: 'uint256', - }, - { - internalType: 'uint8', - name: 'v', - type: 'uint8', - }, - { - internalType: 'bytes32', - name: 'r', - type: 'bytes32', - }, - { - internalType: 'bytes32', - name: 's', - type: 'bytes32', - }, - ], - name: 'permit', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'pullManagement', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newOwner_', - type: 'address', - }, - ], - name: 'pushManagement', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'profit_', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'epoch_', - type: 'uint256', - }, - ], - name: 'rebase', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'rebases', - outputs: [ - { - internalType: 'uint256', - name: 'epoch', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'rebase', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'totalStakedBefore', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'totalStakedAfter', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'amountRebased', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'index', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'blockNumberOccured', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'renounceManagement', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_INDEX', - type: 'uint256', - }, - ], - name: 'setIndex', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'stakingContract', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'from', - type: 'address', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type KlimaSKlima = typeof klimaSKlimaAbi; -export type KlimaSKlimaContract = GetContractReturnType; - -export class KlimaSKlima__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: klimaSKlimaAbi, publicClient: client }); - } -} diff --git a/src/apps/klima/contracts/viem/KlimaWsKlima.ts b/src/apps/klima/contracts/viem/KlimaWsKlima.ts deleted file mode 100644 index f7f6ef14a..000000000 --- a/src/apps/klima/contracts/viem/KlimaWsKlima.ts +++ /dev/null @@ -1,386 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const klimaWsKlimaAbi = [ - { - inputs: [ - { - internalType: 'address', - name: '_sKLIMA', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'sKLIMA', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'sKLIMATowKLIMA', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'unwrap', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'wKLIMATosKLIMA', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'wrap', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type KlimaWsKlima = typeof klimaWsKlimaAbi; -export type KlimaWsKlimaContract = GetContractReturnType; - -export class KlimaWsKlima__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: klimaWsKlimaAbi, publicClient: client }); - } -} diff --git a/src/apps/klima/contracts/viem/index.ts b/src/apps/klima/contracts/viem/index.ts index 8a5607236..2d206d5c1 100644 --- a/src/apps/klima/contracts/viem/index.ts +++ b/src/apps/klima/contracts/viem/index.ts @@ -3,11 +3,5 @@ /* eslint-disable */ export type { KlimaBondDepository } from './KlimaBondDepository'; -export type { KlimaDistributor } from './KlimaDistributor'; -export type { KlimaSKlima } from './KlimaSKlima'; -export type { KlimaWsKlima } from './KlimaWsKlima'; export { KlimaBondDepository__factory } from './KlimaBondDepository'; -export { KlimaDistributor__factory } from './KlimaDistributor'; -export { KlimaSKlima__factory } from './KlimaSKlima'; -export { KlimaWsKlima__factory } from './KlimaWsKlima'; diff --git a/src/apps/klima/klima.module.ts b/src/apps/klima/klima.module.ts index 2e99bbda5..eed66d485 100644 --- a/src/apps/klima/klima.module.ts +++ b/src/apps/klima/klima.module.ts @@ -4,16 +4,12 @@ import { AbstractApp } from '~app/app.dynamic-module'; import { KlimaViemContractFactory } from './contracts'; import { PolygonKlimaBondContractPositionFetcher } from './polygon/klima.bond.contract-position-fetcher'; -import { PolygonKlimaSKlimaTokenFetcher } from './polygon/klima.s-klima.token-fetcher'; -import { PolygonKlimaWsKlimaTokenFetcher } from './polygon/klima.ws-klima.token-fetcher'; @Module({ providers: [ KlimaViemContractFactory, // Polygon PolygonKlimaBondContractPositionFetcher, - PolygonKlimaSKlimaTokenFetcher, - PolygonKlimaWsKlimaTokenFetcher, ], }) export class KlimaAppModule extends AbstractApp() {} diff --git a/src/apps/klima/polygon/klima.s-klima.token-fetcher.ts b/src/apps/klima/polygon/klima.s-klima.token-fetcher.ts deleted file mode 100644 index a62760ff2..000000000 --- a/src/apps/klima/polygon/klima.s-klima.token-fetcher.ts +++ /dev/null @@ -1,120 +0,0 @@ -import { Inject } from '@nestjs/common'; -import axios from 'axios'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { Cache } from '~cache/cache.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import type { - DefaultAppTokenDataProps, - GetAddressesParams, - GetDataPropsParams, - GetDefinitionsParams, - GetUnderlyingTokensParams, -} from '~position/template/app-token.template.types'; - -import { KlimaViemContractFactory } from '../contracts'; -import { KlimaSKlima } from '../contracts/viem'; - -export const API_BASE_URL = 'https://www.klimadao.finance/api'; -export const EPOCH_INTERVAL = 11_520; -export const FALLBACK_BLOCK_RATE = 2.3; - -export type SKlimaTokenDefinition = { - address: string; - underlyingAddress: string; - reserve: number; - apy: number; -}; - -@PositionTemplate() -export class PolygonKlimaSKlimaTokenFetcher extends AppTokenTemplatePositionFetcher< - KlimaSKlima, - DefaultAppTokenDataProps, - SKlimaTokenDefinition -> { - groupLabel = 'sKLIMA'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(KlimaViemContractFactory) protected readonly contractFactory: KlimaViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.klimaSKlima({ address, network: this.network }); - } - - async getAddresses({ definitions }: GetAddressesParams) { - return definitions.map(v => v.address); - } - - async getUnderlyingTokenDefinitions({ definition }: GetUnderlyingTokensParams) { - return [{ address: definition.underlyingAddress, network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } - - async getLiquidity({ - definition, - appToken: { tokens }, - }: GetDataPropsParams) { - return definition.reserve * tokens[0].price; - } - - async getReserves({ definition }: GetDataPropsParams) { - return [definition.reserve]; - } - - async getApy({ definition }: GetDataPropsParams) { - return definition.apy * 100; - } - - async getDefinitions({ multicall }: GetDefinitionsParams) { - const address = '0xb0c22d8d350c67420f06f48936654f567c73e8c8'; - const reserveAddress = '0x25d28a24ceb6f81015bb0b2007d795acac411b4d'; - const underlyingAddress = '0x4e78011ce80ee02d2c3e649fb657e45898257815'; - const distributorAddress = '0x4cc7584c3f8faabf734374ef129df17c3517e9cb'; - - const sKlima = multicall.wrap(this.getContract(address)); - const distributor = multicall.wrap( - this.contractFactory.klimaDistributor({ address: distributorAddress, network: this.network }), - ); - const underlyingToken = multicall.wrap( - this.appToolkit.globalViemContracts.erc20({ address: underlyingAddress, network: this.network }), - ); - - const [info, circulatingSupply, decimals, reserveRaw, blockRate] = await Promise.all([ - distributor.read.info([BigInt(0)]), - sKlima.read.circulatingSupply(), - underlyingToken.read.decimals(), - underlyingToken.read.balanceOf([reserveAddress]), - this.getBlockRate(), - ]); - - const stakingReward = await distributor.read.nextRewardAt([info[0]]); - const stakingRebase = Number(stakingReward) / Number(circulatingSupply); - const rebasesPerDay = 86_400 / (blockRate * EPOCH_INTERVAL); - return [ - { - address, - underlyingAddress, - reserve: Number(reserveRaw) / 10 ** decimals, - apy: Math.pow(1 + stakingRebase, 365 * rebasesPerDay) - 1, - }, - ]; - } - - @Cache({ key: `studio:klima:block-rate`, ttl: 5 * 60 }) - private async getBlockRate() { - try { - const { data } = await axios.get<{ blockRate30Day: string }>(`${API_BASE_URL}/block-rate`); - return Number(data.blockRate30Day); - } catch { - return FALLBACK_BLOCK_RATE; - } - } -} diff --git a/src/apps/klima/polygon/klima.ws-klima.token-fetcher.ts b/src/apps/klima/polygon/klima.ws-klima.token-fetcher.ts deleted file mode 100644 index cda39b480..000000000 --- a/src/apps/klima/polygon/klima.ws-klima.token-fetcher.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetPricePerShareParams, GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; - -import { KlimaViemContractFactory } from '../contracts'; -import { KlimaWsKlima } from '../contracts/viem'; - -@PositionTemplate() -export class PolygonKlimaWsKlimaTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'wsKLIMA'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(KlimaViemContractFactory) protected readonly contractFactory: KlimaViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.klimaWsKlima({ address, network: this.network }); - } - - async getAddresses() { - return ['0x6f370dba99e32a3cad959b341120db3c9e280ba6']; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.sKLIMA(), network: this.network }]; - } - - async getPricePerShare({ appToken, multicall }: GetPricePerShareParams) { - const reserveRaw = await multicall - .wrap(this.appToolkit.globalViemContracts.erc20(appToken.tokens[0])) - .read.balanceOf([appToken.address]); - - const reserve = Number(reserveRaw) / 10 ** appToken.tokens[0].decimals; - const pricePerShare = reserve / appToken.supply; - return [pricePerShare]; - } -} diff --git a/src/apps/lemma-finance/lemma-finance.module.ts b/src/apps/lemma-finance/lemma-finance.module.ts index 5b06a3dd9..51f464a90 100644 --- a/src/apps/lemma-finance/lemma-finance.module.ts +++ b/src/apps/lemma-finance/lemma-finance.module.ts @@ -6,7 +6,6 @@ import { LemmaFinanceViemContractFactory } from './contracts'; import { OptimismLemmaFinanceSynthTokenFetcher } from './optimism/lemma-finance.synth.token-fetcher'; import { OptimismLemmaFinanceUsdlTokenFetcher } from './optimism/lemma-finance.usdl.token-fetcher'; import { OptimismLemmaFinanceXSynthTokenFetcher } from './optimism/lemma-finance.x-synth.token-fetcher'; -import { OptimismLemmaFinanceXUsdlTokenFetcher } from './optimism/lemma-finance.x-usdl.token-fetcher'; @Module({ providers: [ @@ -15,7 +14,6 @@ import { OptimismLemmaFinanceXUsdlTokenFetcher } from './optimism/lemma-finance. OptimismLemmaFinanceSynthTokenFetcher, OptimismLemmaFinanceUsdlTokenFetcher, OptimismLemmaFinanceXSynthTokenFetcher, - OptimismLemmaFinanceXUsdlTokenFetcher, ], }) export class LemmaFinanceAppModule extends AbstractApp() {} diff --git a/src/apps/lemma-finance/optimism/lemma-finance.x-usdl.token-fetcher.ts b/src/apps/lemma-finance/optimism/lemma-finance.x-usdl.token-fetcher.ts deleted file mode 100644 index f873d7276..000000000 --- a/src/apps/lemma-finance/optimism/lemma-finance.x-usdl.token-fetcher.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetPricePerShareParams } from '~position/template/app-token.template.types'; - -import { LemmaFinanceViemContractFactory } from '../contracts'; -import { LemmaXUsdl } from '../contracts/viem'; - -@PositionTemplate() -export class OptimismLemmaFinanceXUsdlTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'xUSDL'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(LemmaFinanceViemContractFactory) protected readonly contractFactory: LemmaFinanceViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.lemmaXUsdl({ address, network: this.network }); - } - - async getAddresses() { - return ['0x252ea7e68a27390ce0d53851192839a39ab8b38c']; - } - - async getUnderlyingTokenDefinitions() { - return [{ address: '0x96f2539d3684dbde8b3242a51a73b66360a5b541', network: this.network }]; - } - - async getPricePerShare({ contract, appToken }: GetPricePerShareParams) { - const pricePerShareRaw = await contract.read.assetsPerShare(); - const pricePerShare = Number(pricePerShareRaw) / 10 ** appToken.decimals; - return [1 / pricePerShare]; - } -} diff --git a/src/apps/llama-airforce/contracts/abis/llama-airforce-union-vault-pirex.json b/src/apps/llama-airforce/contracts/abis/llama-airforce-union-vault-pirex.json deleted file mode 100644 index 8616eeb15..000000000 --- a/src/apps/llama-airforce/contracts/abis/llama-airforce-union-vault-pirex.json +++ /dev/null @@ -1,560 +0,0 @@ -[ - { - "inputs": [{ "internalType": "address", "name": "pxCvx", "type": "address" }], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { "inputs": [], "name": "AlreadySet", "type": "error" }, - { "inputs": [], "name": "ExceedsMax", "type": "error" }, - { "inputs": [], "name": "ZeroAddress", "type": "error" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "assets", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Harvest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - } - ], - "name": "PlatformFeeUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_platform", - "type": "address" - } - ], - "name": "PlatformUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_strategy", - "type": "address" - } - ], - "name": "StrategySet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "assets", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "name": "Withdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "penalty", - "type": "uint256" - } - ], - "name": "WithdrawalPenaltyUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "FEE_DENOMINATOR", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_PLATFORM_FEE", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_WITHDRAWAL_PENALTY", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "address", "name": "", "type": "address" } - ], - "name": "allowance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "approve", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "asset", - "outputs": [{ "internalType": "contract ERC20", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], - "name": "convertToAssets", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], - "name": "convertToShares", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "assets", "type": "uint256" }, - { "internalType": "address", "name": "receiver", "type": "address" } - ], - "name": "deposit", - "outputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "harvest", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "maxDeposit", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "maxMint", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }], - "name": "maxRedeem", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }], - "name": "maxWithdraw", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "shares", "type": "uint256" }, - { "internalType": "address", "name": "receiver", "type": "address" } - ], - "name": "mint", - "outputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "nonces", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "value", "type": "uint256" }, - { "internalType": "uint256", "name": "deadline", "type": "uint256" }, - { "internalType": "uint8", "name": "v", "type": "uint8" }, - { "internalType": "bytes32", "name": "r", "type": "bytes32" }, - { "internalType": "bytes32", "name": "s", "type": "bytes32" } - ], - "name": "permit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "platform", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "platformFee", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], - "name": "previewDeposit", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], - "name": "previewMint", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], - "name": "previewRedeem", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], - "name": "previewWithdraw", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "shares", "type": "uint256" }, - { "internalType": "address", "name": "receiver", "type": "address" }, - { "internalType": "address", "name": "owner", "type": "address" } - ], - "name": "redeem", - "outputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_platform", "type": "address" }], - "name": "setPlatform", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "fee", "type": "uint256" }], - "name": "setPlatformFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_strategy", "type": "address" }], - "name": "setStrategy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "penalty", "type": "uint256" }], - "name": "setWithdrawalPenalty", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "strategy", - "outputs": [ - { - "internalType": "contract UnionPirexStaking", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalAssets", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "from", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "assets", "type": "uint256" }, - { "internalType": "address", "name": "receiver", "type": "address" }, - { "internalType": "address", "name": "owner", "type": "address" } - ], - "name": "withdraw", - "outputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "withdrawalPenalty", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - } -] diff --git a/src/apps/llama-airforce/contracts/abis/llama-airforce-union-vault.json b/src/apps/llama-airforce/contracts/abis/llama-airforce-union-vault.json deleted file mode 100644 index ea9614cb0..000000000 --- a/src/apps/llama-airforce/contracts/abis/llama-airforce-union-vault.json +++ /dev/null @@ -1,494 +0,0 @@ -[ - { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256", "name": "_incentive", "type": "uint256" }], - "name": "CallerIncentiveUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "_from", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "_to", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "_value", "type": "uint256" } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "_caller", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "_value", "type": "uint256" } - ], - "name": "Harvest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256", "name": "_fee", "type": "uint256" }], - "name": "PlatformFeeUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": true, "internalType": "address", "name": "_platform", "type": "address" }], - "name": "PlatformUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "_from", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "_to", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "_value", "type": "uint256" } - ], - "name": "Withdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256", "name": "_penalty", "type": "uint256" }], - "name": "WithdrawalPenaltyUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "CRVETH_CRV_INDEX", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "CRVETH_ETH_INDEX", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "CRV_TOKEN", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "CURVE_CRV_ETH_POOL", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "CURVE_CVXCRV_CRV_POOL", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "CURVE_CVX_ETH_POOL", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "CVXCRV_CRV_INDEX", - "outputs": [{ "internalType": "int128", "name": "", "type": "int128" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "CVXCRV_CVXCRV_INDEX", - "outputs": [{ "internalType": "int128", "name": "", "type": "int128" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "CVXCRV_STAKING_CONTRACT", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "CVXCRV_TOKEN", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "CVXETH_CVX_INDEX", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "CVXETH_ETH_INDEX", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "CVX_TOKEN", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "FEE_DENOMINATOR", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_CALL_INCENTIVE", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_PLATFORM_FEE", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_WITHDRAWAL_PENALTY", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "spender", "type": "address" } - ], - "name": "allowance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "approve", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "user", "type": "address" }], - "name": "balanceOfUnderlying", - "outputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "callIncentive", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } - ], - "name": "decreaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_to", "type": "address" }, - { "internalType": "uint256", "name": "_amount", "type": "uint256" } - ], - "name": "deposit", - "outputs": [{ "internalType": "uint256", "name": "_shares", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_to", "type": "address" }], - "name": "depositAll", - "outputs": [{ "internalType": "uint256", "name": "_shares", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { "inputs": [], "name": "harvest", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "addedValue", "type": "uint256" } - ], - "name": "increaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "outstanding3CrvRewards", - "outputs": [{ "internalType": "uint256", "name": "total", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "outstandingCrvRewards", - "outputs": [{ "internalType": "uint256", "name": "total", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "outstandingCvxRewards", - "outputs": [{ "internalType": "uint256", "name": "total", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "platform", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "platformFee", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { "inputs": [], "name": "setApprovals", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [{ "internalType": "uint256", "name": "_incentive", "type": "uint256" }], - "name": "setCallIncentive", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_platform", "type": "address" }], - "name": "setPlatform", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_fee", "type": "uint256" }], - "name": "setPlatformFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_penalty", "type": "uint256" }], - "name": "setWithdrawalPenalty", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalUnderlying", - "outputs": [{ "internalType": "uint256", "name": "total", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "sender", "type": "address" }, - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "underlying", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_to", "type": "address" }, - { "internalType": "uint256", "name": "_shares", "type": "uint256" } - ], - "name": "withdraw", - "outputs": [{ "internalType": "uint256", "name": "withdrawn", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_to", "type": "address" }], - "name": "withdrawAll", - "outputs": [{ "internalType": "uint256", "name": "withdrawn", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_to", "type": "address" }, - { "internalType": "enum ClaimZaps.Option", "name": "option", "type": "uint8" }, - { "internalType": "uint256", "name": "minAmountOut", "type": "uint256" } - ], - "name": "withdrawAllAs", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_to", "type": "address" }, - { "internalType": "enum ClaimZaps.Option", "name": "option", "type": "uint8" } - ], - "name": "withdrawAllAs", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_to", "type": "address" }, - { "internalType": "uint256", "name": "_shares", "type": "uint256" }, - { "internalType": "enum ClaimZaps.Option", "name": "option", "type": "uint8" } - ], - "name": "withdrawAs", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_to", "type": "address" }, - { "internalType": "uint256", "name": "_shares", "type": "uint256" }, - { "internalType": "enum ClaimZaps.Option", "name": "option", "type": "uint8" }, - { "internalType": "uint256", "name": "minAmountOut", "type": "uint256" } - ], - "name": "withdrawAs", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "withdrawalPenalty", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { "stateMutability": "payable", "type": "receive" } -] diff --git a/src/apps/llama-airforce/contracts/viem.contract-factory.ts b/src/apps/llama-airforce/contracts/viem.contract-factory.ts index 4735a9123..8da0ccaaf 100644 --- a/src/apps/llama-airforce/contracts/viem.contract-factory.ts +++ b/src/apps/llama-airforce/contracts/viem.contract-factory.ts @@ -3,11 +3,7 @@ import { Injectable, Inject } from '@nestjs/common'; import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; import { Network } from '~types/network.interface'; -import { - LlamaAirforceMerkleDistributor__factory, - LlamaAirforceUnionVault__factory, - LlamaAirforceUnionVaultPirex__factory, -} from './viem'; +import { LlamaAirforceMerkleDistributor__factory } from './viem'; type ContractOpts = { address: string; network: Network }; @@ -18,10 +14,4 @@ export class LlamaAirforceViemContractFactory { llamaAirforceMerkleDistributor({ address, network }: ContractOpts) { return LlamaAirforceMerkleDistributor__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } - llamaAirforceUnionVault({ address, network }: ContractOpts) { - return LlamaAirforceUnionVault__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - llamaAirforceUnionVaultPirex({ address, network }: ContractOpts) { - return LlamaAirforceUnionVaultPirex__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } } diff --git a/src/apps/llama-airforce/contracts/viem/LlamaAirforceUnionVault.ts b/src/apps/llama-airforce/contracts/viem/LlamaAirforceUnionVault.ts deleted file mode 100644 index e8b8a8903..000000000 --- a/src/apps/llama-airforce/contracts/viem/LlamaAirforceUnionVault.ts +++ /dev/null @@ -1,1069 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const llamaAirforceUnionVaultAbi = [ - { - inputs: [], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: '_incentive', - type: 'uint256', - }, - ], - name: 'CallerIncentiveUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: '_from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: '_to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: '_value', - type: 'uint256', - }, - ], - name: 'Deposit', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: '_caller', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: '_value', - type: 'uint256', - }, - ], - name: 'Harvest', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipTransferred', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: '_fee', - type: 'uint256', - }, - ], - name: 'PlatformFeeUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: '_platform', - type: 'address', - }, - ], - name: 'PlatformUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: '_from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: '_to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: '_value', - type: 'uint256', - }, - ], - name: 'Withdraw', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: '_penalty', - type: 'uint256', - }, - ], - name: 'WithdrawalPenaltyUpdated', - type: 'event', - }, - { - inputs: [], - name: 'CRVETH_CRV_INDEX', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'CRVETH_ETH_INDEX', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'CRV_TOKEN', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'CURVE_CRV_ETH_POOL', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'CURVE_CVXCRV_CRV_POOL', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'CURVE_CVX_ETH_POOL', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'CVXCRV_CRV_INDEX', - outputs: [ - { - internalType: 'int128', - name: '', - type: 'int128', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'CVXCRV_CVXCRV_INDEX', - outputs: [ - { - internalType: 'int128', - name: '', - type: 'int128', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'CVXCRV_STAKING_CONTRACT', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'CVXCRV_TOKEN', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'CVXETH_CVX_INDEX', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'CVXETH_ETH_INDEX', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'CVX_TOKEN', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'FEE_DENOMINATOR', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'MAX_CALL_INCENTIVE', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'MAX_PLATFORM_FEE', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'MAX_WITHDRAWAL_PENALTY', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'user', - type: 'address', - }, - ], - name: 'balanceOfUnderlying', - outputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'callIncentive', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_to', - type: 'address', - }, - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'deposit', - outputs: [ - { - internalType: 'uint256', - name: '_shares', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_to', - type: 'address', - }, - ], - name: 'depositAll', - outputs: [ - { - internalType: 'uint256', - name: '_shares', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'harvest', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'outstanding3CrvRewards', - outputs: [ - { - internalType: 'uint256', - name: 'total', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'outstandingCrvRewards', - outputs: [ - { - internalType: 'uint256', - name: 'total', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'outstandingCvxRewards', - outputs: [ - { - internalType: 'uint256', - name: 'total', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'owner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'platform', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'platformFee', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'renounceOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'setApprovals', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_incentive', - type: 'uint256', - }, - ], - name: 'setCallIncentive', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_platform', - type: 'address', - }, - ], - name: 'setPlatform', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_fee', - type: 'uint256', - }, - ], - name: 'setPlatformFee', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_penalty', - type: 'uint256', - }, - ], - name: 'setWithdrawalPenalty', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalUnderlying', - outputs: [ - { - internalType: 'uint256', - name: 'total', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'transferOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'underlying', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_to', - type: 'address', - }, - { - internalType: 'uint256', - name: '_shares', - type: 'uint256', - }, - ], - name: 'withdraw', - outputs: [ - { - internalType: 'uint256', - name: 'withdrawn', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_to', - type: 'address', - }, - ], - name: 'withdrawAll', - outputs: [ - { - internalType: 'uint256', - name: 'withdrawn', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_to', - type: 'address', - }, - { - internalType: 'enum ClaimZaps.Option', - name: 'option', - type: 'uint8', - }, - { - internalType: 'uint256', - name: 'minAmountOut', - type: 'uint256', - }, - ], - name: 'withdrawAllAs', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_to', - type: 'address', - }, - { - internalType: 'enum ClaimZaps.Option', - name: 'option', - type: 'uint8', - }, - ], - name: 'withdrawAllAs', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_to', - type: 'address', - }, - { - internalType: 'uint256', - name: '_shares', - type: 'uint256', - }, - { - internalType: 'enum ClaimZaps.Option', - name: 'option', - type: 'uint8', - }, - ], - name: 'withdrawAs', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_to', - type: 'address', - }, - { - internalType: 'uint256', - name: '_shares', - type: 'uint256', - }, - { - internalType: 'enum ClaimZaps.Option', - name: 'option', - type: 'uint8', - }, - { - internalType: 'uint256', - name: 'minAmountOut', - type: 'uint256', - }, - ], - name: 'withdrawAs', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'withdrawalPenalty', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - stateMutability: 'payable', - type: 'receive', - }, -] as const; - -export type LlamaAirforceUnionVault = typeof llamaAirforceUnionVaultAbi; -export type LlamaAirforceUnionVaultContract = GetContractReturnType; - -export class LlamaAirforceUnionVault__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: llamaAirforceUnionVaultAbi, publicClient: client }); - } -} diff --git a/src/apps/llama-airforce/contracts/viem/LlamaAirforceUnionVaultPirex.ts b/src/apps/llama-airforce/contracts/viem/LlamaAirforceUnionVaultPirex.ts deleted file mode 100644 index e52978905..000000000 --- a/src/apps/llama-airforce/contracts/viem/LlamaAirforceUnionVaultPirex.ts +++ /dev/null @@ -1,1002 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const llamaAirforceUnionVaultPirexAbi = [ - { - inputs: [ - { - internalType: 'address', - name: 'pxCvx', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - inputs: [], - name: 'AlreadySet', - type: 'error', - }, - { - inputs: [], - name: 'ExceedsMax', - type: 'error', - }, - { - inputs: [], - name: 'ZeroAddress', - type: 'error', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'caller', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'Deposit', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'caller', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Harvest', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipTransferred', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'fee', - type: 'uint256', - }, - ], - name: 'PlatformFeeUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: '_platform', - type: 'address', - }, - ], - name: 'PlatformUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: '_strategy', - type: 'address', - }, - ], - name: 'StrategySet', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'caller', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'receiver', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'Withdraw', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'penalty', - type: 'uint256', - }, - ], - name: 'WithdrawalPenaltyUpdated', - type: 'event', - }, - { - inputs: [], - name: 'DOMAIN_SEPARATOR', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'FEE_DENOMINATOR', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'MAX_PLATFORM_FEE', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'MAX_WITHDRAWAL_PENALTY', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'asset', - outputs: [ - { - internalType: 'contract ERC20', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'convertToAssets', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - name: 'convertToShares', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - ], - name: 'deposit', - outputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'harvest', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'maxDeposit', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'maxMint', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - ], - name: 'maxRedeem', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - ], - name: 'maxWithdraw', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - ], - name: 'mint', - outputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'nonces', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'owner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'deadline', - type: 'uint256', - }, - { - internalType: 'uint8', - name: 'v', - type: 'uint8', - }, - { - internalType: 'bytes32', - name: 'r', - type: 'bytes32', - }, - { - internalType: 'bytes32', - name: 's', - type: 'bytes32', - }, - ], - name: 'permit', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'platform', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'platformFee', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - name: 'previewDeposit', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'previewMint', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'previewRedeem', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - name: 'previewWithdraw', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - ], - name: 'redeem', - outputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'renounceOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_platform', - type: 'address', - }, - ], - name: 'setPlatform', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'fee', - type: 'uint256', - }, - ], - name: 'setPlatformFee', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_strategy', - type: 'address', - }, - ], - name: 'setStrategy', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'penalty', - type: 'uint256', - }, - ], - name: 'setWithdrawalPenalty', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'strategy', - outputs: [ - { - internalType: 'contract UnionPirexStaking', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalAssets', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'from', - type: 'address', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'transferOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - ], - name: 'withdraw', - outputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'withdrawalPenalty', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, -] as const; - -export type LlamaAirforceUnionVaultPirex = typeof llamaAirforceUnionVaultPirexAbi; -export type LlamaAirforceUnionVaultPirexContract = GetContractReturnType; - -export class LlamaAirforceUnionVaultPirex__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: llamaAirforceUnionVaultPirexAbi, publicClient: client }); - } -} diff --git a/src/apps/llama-airforce/contracts/viem/index.ts b/src/apps/llama-airforce/contracts/viem/index.ts index e2a089c89..0e33a7958 100644 --- a/src/apps/llama-airforce/contracts/viem/index.ts +++ b/src/apps/llama-airforce/contracts/viem/index.ts @@ -3,9 +3,5 @@ /* eslint-disable */ export type { LlamaAirforceMerkleDistributor } from './LlamaAirforceMerkleDistributor'; -export type { LlamaAirforceUnionVaultPirex } from './LlamaAirforceUnionVaultPirex'; -export type { LlamaAirforceUnionVault } from './LlamaAirforceUnionVault'; export { LlamaAirforceMerkleDistributor__factory } from './LlamaAirforceMerkleDistributor'; -export { LlamaAirforceUnionVaultPirex__factory } from './LlamaAirforceUnionVaultPirex'; -export { LlamaAirforceUnionVault__factory } from './LlamaAirforceUnionVault'; diff --git a/src/apps/llama-airforce/ethereum/llama-airforce.vault.token-fetcher.ts b/src/apps/llama-airforce/ethereum/llama-airforce.vault.token-fetcher.ts deleted file mode 100644 index 5a793390e..000000000 --- a/src/apps/llama-airforce/ethereum/llama-airforce.vault.token-fetcher.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { getLabelFromToken } from '~app-toolkit/helpers/presentation/image.present'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { - GetDisplayPropsParams, - GetPricePerShareParams, - GetUnderlyingTokensParams, -} from '~position/template/app-token.template.types'; - -import { LlamaAirforceViemContractFactory } from '../contracts'; -import { LlamaAirforceUnionVault } from '../contracts/viem'; - -@PositionTemplate() -export class EthereumLlamaAirforceVaultTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Vaults'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(LlamaAirforceViemContractFactory) protected readonly contractFactory: LlamaAirforceViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.llamaAirforceUnionVault({ address, network: this.network }); - } - - getAddresses() { - return [ - '0x83507cc8c8b67ed48badd1f59f684d5d02884c81', // uCRV - '0x4ebad8dbd4edbd74db0278714fbd67ebc76b89b7', // uCRV V2 - '0xde2bef0a01845257b4aef2a2eaa48f6eaeafa8b7', // uCRV V3 - '0xf964b0e3ffdea659c44a5a52bc0b82a24b89ce0e', // uFXS - '0x3a886455e5b33300a31c5e77bac01e76c0c7b29c', // uFXS V2 - '0x8659fc767cad6005de79af65dafe4249c57927af', // uCVX - '0xd6fc1ecd9965ba9cac895654979564a291c74c29', // uauraBAL - '0x8c4eb0fc6805ee7337ac126f89a807271a88dd67', // uauraBAL v2 - ]; - } - - async getUnderlyingTokenDefinitions({ - address, - contract, - multicall, - }: GetUnderlyingTokensParams) { - if (address === '0x8659fc767cad6005de79af65dafe4249c57927af') { - const pirexContract = this.contractFactory.llamaAirforceUnionVaultPirex({ address, network: this.network }); - return [{ address: await multicall.wrap(pirexContract).read.asset(), network: this.network }]; - } - - return [{ address: await contract.read.underlying(), network: this.network }]; - } - - async getPricePerShare({ contract, appToken, multicall }: GetPricePerShareParams) { - if (appToken.address === '0x8659fc767cad6005de79af65dafe4249c57927af') { - const pirexContract = this.contractFactory.llamaAirforceUnionVaultPirex({ - address: appToken.address, - network: this.network, - }); - - const reserveRaw = await multicall.wrap(pirexContract).read.totalAssets(); - const reserve = Number(reserveRaw) / 10 ** appToken.tokens[0].decimals; - const pricePerShare = reserve / appToken.supply; - return [pricePerShare]; - } - - const reserveRaw = await contract.read.totalUnderlying(); - const reserve = Number(reserveRaw) / 10 ** appToken.tokens[0].decimals; - const pricePerShare = reserve / appToken.supply; - return [pricePerShare]; - } - - async getLabel({ appToken }: GetDisplayPropsParams) { - return `${getLabelFromToken(appToken.tokens[0])} Pounder`; - } -} diff --git a/src/apps/llama-airforce/llama-airforce.module.ts b/src/apps/llama-airforce/llama-airforce.module.ts index 94ae3d840..c936e3f20 100644 --- a/src/apps/llama-airforce/llama-airforce.module.ts +++ b/src/apps/llama-airforce/llama-airforce.module.ts @@ -5,7 +5,6 @@ import { AbstractApp } from '~app/app.dynamic-module'; import { LlamaAirforceViemContractFactory } from './contracts'; import { EthereumLlamaAirforceAirdropContractPositionFetcher } from './ethereum/llama-airforce.airdrop.contract-position-fetcher'; import { EthereumLlamaAirforceMerkleCache } from './ethereum/llama-airforce.merkle-cache'; -import { EthereumLlamaAirforceVaultTokenFetcher } from './ethereum/llama-airforce.vault.token-fetcher'; @Module({ providers: [ @@ -13,7 +12,6 @@ import { EthereumLlamaAirforceVaultTokenFetcher } from './ethereum/llama-airforc // Ethereum EthereumLlamaAirforceMerkleCache, EthereumLlamaAirforceAirdropContractPositionFetcher, - EthereumLlamaAirforceVaultTokenFetcher, ], }) export class LlamaAirforceAppModule extends AbstractApp() {} diff --git a/src/apps/meshswap/assets/logo.png b/src/apps/meshswap/assets/logo.png deleted file mode 100644 index 4e0346c3d..000000000 Binary files a/src/apps/meshswap/assets/logo.png and /dev/null differ diff --git a/src/apps/meshswap/contracts/abis/meshswap-single-pool-factory.json b/src/apps/meshswap/contracts/abis/meshswap-single-pool-factory.json deleted file mode 100644 index a29924569..000000000 --- a/src/apps/meshswap/contracts/abis/meshswap-single-pool-factory.json +++ /dev/null @@ -1,569 +0,0 @@ -[ - { - "constant": false, - "inputs": [{ "name": "newOperator", "type": "address" }], - "name": "changeOperator", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "user", "type": "address" }, - { "name": "amount", "type": "uint256" } - ], - "name": "sendReward", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "token", "type": "address" }, - { "name": "user", "type": "address" }, - { "name": "insurance", "type": "address" } - ], - "name": "transferDebt", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "name": "newInterestRateModel", "type": "address" }], - "name": "changeInterestRateModel", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "plusPoolFactory", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "nativeWithdrawer", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "token", "type": "address" }, - { "name": "newReserveFactor", "type": "uint256" } - ], - "name": "setPoolReserveFactor", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "name": "idx", "type": "uint256" }], - "name": "getPoolAddressByIndex", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "token", "type": "address" }, - { "name": "user", "type": "address" }, - { "name": "amount", "type": "uint256" } - ], - "name": "repay", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "token", "type": "address" }, - { "name": "plusPoolAddress", "type": "address" }, - { "name": "amount", "type": "uint256" } - ], - "name": "repayInsurance", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getPlusPoolFactory", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { "name": "token", "type": "address" }, - { "name": "user", "type": "address" }, - { "name": "poolAddress", "type": "address" } - ], - "name": "borrowBalanceInfo", - "outputs": [ - { "name": "", "type": "uint256" }, - { "name": "", "type": "uint256" } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "pools", "type": "address[]" }, - { "name": "rate", "type": "uint256[]" } - ], - "name": "changeMiningRate", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "token", "type": "address" }, - { "name": "user", "type": "address" }, - { "name": "poolAddress", "type": "address" } - ], - "name": "borrowBalanceCurrent", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "name": "", "type": "uint256" }], - "name": "singlePools", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "token", "type": "address" }, - { "name": "user", "type": "address" }, - { "name": "amount", "type": "uint256" } - ], - "name": "borrow", - "outputs": [ - { "name": "", "type": "uint256" }, - { "name": "", "type": "uint256" } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "name": "", "type": "address" }], - "name": "singlePoolVault", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "version", - "outputs": [{ "name": "", "type": "string" }], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalMined", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "operator", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "governance", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "tokenAddress", "type": "address" }, - { "name": "b", "type": "bool" } - ], - "name": "setWithdrawActive", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "name": "_nextOwner", "type": "address" }], - "name": "changeNextOwner", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "changeOwner", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "mining", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "name": "", "type": "address" }], - "name": "singlePoolExist", - "outputs": [{ "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "nextOwner", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getTotalMined", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "name": "newNativeWithdrawer", "type": "address" }], - "name": "changeNativeWithdrawer", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getPoolCount", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "name": "token", "type": "address" }], - "name": "createPool", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "name": "newSinglePoolImpl", "type": "address" }], - "name": "setSinglePoolImpl", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { "name": "token", "type": "address" }, - { "name": "user", "type": "address" }, - { "name": "poolAddress", "type": "address" } - ], - "name": "borrowBalanceStored", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "entered", - "outputs": [{ "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "WETH", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "tokenAddress", "type": "address" }, - { "name": "b", "type": "bool" } - ], - "name": "setDepositActive", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "lastMined", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "admin", "type": "address" }, - { "name": "token", "type": "address" }, - { "name": "reduceAmount", "type": "uint256" } - ], - "name": "reducePoolReserves", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "name": "newPlusPoolFactory", "type": "address" }], - "name": "setPlusPoolFactory", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "singlePoolImpl", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "tokenAddress", "type": "address" }, - { "name": "newInterestRateModel", "type": "address" } - ], - "name": "setPoolInterestRateModel", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "_owner", "type": "address" }, - { "name": "_governance", "type": "address" }, - { "name": "_singlePoolImpl", "type": "address" }, - { "name": "_interestRateModel", "type": "address" } - ], - "name": "__SinglePoolFactory_init", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "mesh", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "updateTotalMined", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "name": "token", "type": "address" }], - "name": "getPoolAddressByToken", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { "payable": true, "stateMutability": "payable", "type": "fallback" }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "name": "nextOwner", "type": "address" }], - "name": "ChangeNextOwner", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "name": "owner", "type": "address" }], - "name": "ChangeOwner", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "name": "newOperator", "type": "address" }], - "name": "ChangeOperator", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "name": "newInterestRateModel", "type": "address" }], - "name": "ChangeInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "name": "newNativeWithdrawer", "type": "address" }], - "name": "ChangeNativeWithdrawer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "name": "token", "type": "address" }, - { "indexed": false, "name": "pool", "type": "address" }, - { "indexed": false, "name": "exid", "type": "uint256" } - ], - "name": "CreatePool", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "name": "poolAddress", "type": "address" }, - { "indexed": false, "name": "b", "type": "bool" } - ], - "name": "SetDepositActive", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "name": "poolAddress", "type": "address" }, - { "indexed": false, "name": "b", "type": "bool" } - ], - "name": "SetWithdrawActive", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "name": "pool", "type": "address" }, - { "indexed": false, "name": "newInterestRateModel", "type": "address" } - ], - "name": "SetPoolInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "name": "_mining", "type": "uint256" }], - "name": "ChangeMiningRate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "name": "_lastMined", "type": "uint256" }, - { "indexed": false, "name": "_totalMined", "type": "uint256" } - ], - "name": "UpdateLastMined", - "type": "event" - } -] diff --git a/src/apps/meshswap/contracts/abis/meshswap-single-pool.json b/src/apps/meshswap/contracts/abis/meshswap-single-pool.json deleted file mode 100644 index f247117b7..000000000 --- a/src/apps/meshswap/contracts/abis/meshswap-single-pool.json +++ /dev/null @@ -1,734 +0,0 @@ -[ - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [{ "name": "", "type": "string" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "initPool", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "_spender", "type": "address" }, - { "name": "_value", "type": "uint256" } - ], - "name": "approve", - "outputs": [{ "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "user", "type": "address" }, - { "name": "plusPoolAddress", "type": "address" }, - { "name": "insurance", "type": "address" } - ], - "name": "transferDebt", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "name": "newReserveFactor", "type": "uint256" }], - "name": "setReserveFactor", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "_from", "type": "address" }, - { "name": "_to", "type": "address" }, - { "name": "_value", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [{ "name": "", "type": "uint8" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "name": "", "type": "address" }], - "name": "poolTotalBorrows", - "outputs": [ - { "name": "principal", "type": "uint256" }, - { "name": "interestIndex", "type": "uint256" } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "name": "_mining", "type": "uint256" }], - "name": "changeMiningRate", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactor", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "singlePoolFactory", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "name": "withdrawAmount", "type": "uint256" }], - "name": "withdrawToken", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "version", - "outputs": [{ "name": "", "type": "string" }], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "name": "", "type": "address" }], - "name": "userRewardSum", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "name": "poolAddress", "type": "address" }], - "name": "borrowBalancePoolTotal", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "name": "depositAmount", "type": "uint256" }], - "name": "depositToken", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "mining", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "user", "type": "address" }, - { "name": "borrowAmount", "type": "uint256" }, - { "name": "plusPoolAddress", "type": "address" } - ], - "name": "borrow", - "outputs": [ - { "name": "", "type": "uint256" }, - { "name": "", "type": "uint256" } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "admin", "type": "address" }, - { "name": "reduceAmount", "type": "uint256" } - ], - "name": "reduceReserves", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "name": "", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { "name": "account", "type": "address" }, - { "name": "poolAddress", "type": "address" } - ], - "name": "borrowBalanceStored", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "name": "addAmount", "type": "uint256" }], - "name": "addReserves", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "name": "newInterestRateModel", "type": "address" }], - "name": "setInterestRateModel", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "miningIndex", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [{ "name": "", "type": "string" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "entered", - "outputs": [{ "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "_to", "type": "address" }, - { "name": "_value", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "lastMined", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "withdrawActive", - "outputs": [{ "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "claimReward", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "updateMiningIndex", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "name": "b", "type": "bool" }], - "name": "setDepositActive", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "name": "withdrawTokens", "type": "uint256" }], - "name": "withdrawETHByAmount", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "depositActive", - "outputs": [{ "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "name": "withdrawTokens", "type": "uint256" }], - "name": "withdrawTokenByAmount", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { "name": "", "type": "address" }, - { "name": "", "type": "address" } - ], - "name": "allowance", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "user", "type": "address" }, - { "name": "repayAmount", "type": "uint256" }, - { "name": "plusPoolAddress", "type": "address" }, - { "name": "spender", "type": "address" } - ], - "name": "repayToken", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { "name": "account", "type": "address" }, - { "name": "poolAddress", "type": "address" } - ], - "name": "borrowBalanceInfo", - "outputs": [ - { "name": "", "type": "uint256" }, - { "name": "", "type": "uint256" } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "account", "type": "address" }, - { "name": "poolAddress", "type": "address" } - ], - "name": "borrowBalanceCurrent", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "name": "", "type": "address" }], - "name": "userLastIndex", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "_singlePoolFactoryAddress", "type": "address" }, - { "name": "_token", "type": "address" }, - { "name": "_interestRateModelAddress", "type": "address" } - ], - "name": "__SinglePool_init", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "name": "withdrawAmount", "type": "uint256" }], - "name": "withdrawETH", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "depositETH", - "outputs": [], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "name": "b", "type": "bool" }], - "name": "setWithdrawActive", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "token", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { "payable": true, "stateMutability": "payable", "type": "fallback" }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "name": "_mining", "type": "uint256" }], - "name": "ChangeMiningRate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "name": "lastMined", "type": "uint256" }, - { "indexed": false, "name": "miningIndex", "type": "uint256" } - ], - "name": "UpdateMiningIndex", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "name": "user", "type": "address" }, - { "indexed": false, "name": "amount", "type": "uint256" }, - { "indexed": false, "name": "lastIndex", "type": "uint256" }, - { "indexed": false, "name": "rewardSum", "type": "uint256" } - ], - "name": "GiveReward", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "name": "cashPrior", "type": "uint256" }, - { "indexed": false, "name": "interestAccumulated", "type": "uint256" }, - { "indexed": false, "name": "borrowIndex", "type": "uint256" }, - { "indexed": false, "name": "totalBorrows", "type": "uint256" }, - { "indexed": false, "name": "totalReserves", "type": "uint256" } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "name": "user", "type": "address" }, - { "indexed": false, "name": "depositAmount", "type": "uint256" }, - { "indexed": false, "name": "depositTokens", "type": "uint256" }, - { "indexed": false, "name": "totalAmount", "type": "uint256" }, - { "indexed": false, "name": "totalSupply", "type": "uint256" } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "name": "user", "type": "address" }, - { "indexed": false, "name": "withdrawAmount", "type": "uint256" }, - { "indexed": false, "name": "withdrawTokens", "type": "uint256" }, - { "indexed": false, "name": "totalAmount", "type": "uint256" }, - { "indexed": false, "name": "totalSupply", "type": "uint256" } - ], - "name": "Withdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "name": "user", "type": "address" }, - { "indexed": false, "name": "plusPoolAddress", "type": "address" }, - { "indexed": false, "name": "borrowAmount", "type": "uint256" }, - { "indexed": false, "name": "accountBorrows", "type": "uint256" }, - { "indexed": false, "name": "totalBorrows", "type": "uint256" } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "name": "user", "type": "address" }, - { "indexed": false, "name": "plusPoolAddress", "type": "address" }, - { "indexed": false, "name": "repayAmount", "type": "uint256" }, - { "indexed": false, "name": "accountBorrows", "type": "uint256" }, - { "indexed": false, "name": "totalBorrows", "type": "uint256" } - ], - "name": "Repay", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "name": "user", "type": "address" }, - { "indexed": false, "name": "plusPoolAddress", "type": "address" }, - { "indexed": false, "name": "insurance", "type": "address" }, - { "indexed": false, "name": "userDebt", "type": "uint256" }, - { "indexed": false, "name": "insuranceDebtBefore", "type": "uint256" }, - { "indexed": false, "name": "insuranceDebt", "type": "uint256" }, - { "indexed": false, "name": "borrowIndex", "type": "uint256" } - ], - "name": "TransferDebt", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "name": "oldReserveFactor", "type": "uint256" }, - { "indexed": false, "name": "newReserveFactor", "type": "uint256" } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "name": "user", "type": "address" }, - { "indexed": false, "name": "addAmount", "type": "uint256" }, - { "indexed": false, "name": "newTotalReserves", "type": "uint256" } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "name": "admin", "type": "address" }, - { "indexed": false, "name": "reduceAmount", "type": "uint256" }, - { "indexed": false, "name": "newTotalReserves", "type": "uint256" } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "name": "oldInterestRateModel", "type": "address" }, - { "indexed": false, "name": "newInterestRateModel", "type": "address" } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "name": "from", "type": "address" }, - { "indexed": true, "name": "to", "type": "address" }, - { "indexed": false, "name": "amount", "type": "uint256" } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "name": "holder", "type": "address" }, - { "indexed": true, "name": "spender", "type": "address" }, - { "indexed": false, "name": "amount", "type": "uint256" } - ], - "name": "Approval", - "type": "event" - } -] diff --git a/src/apps/meshswap/contracts/index.ts b/src/apps/meshswap/contracts/index.ts deleted file mode 100644 index 5dcfebdf6..000000000 --- a/src/apps/meshswap/contracts/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * from './viem.contract-factory'; diff --git a/src/apps/meshswap/contracts/viem.contract-factory.ts b/src/apps/meshswap/contracts/viem.contract-factory.ts deleted file mode 100644 index e23cbb25b..000000000 --- a/src/apps/meshswap/contracts/viem.contract-factory.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Injectable, Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { Network } from '~types/network.interface'; - -import { MeshswapSinglePool__factory, MeshswapSinglePoolFactory__factory } from './viem'; - -type ContractOpts = { address: string; network: Network }; - -@Injectable() -export class MeshswapViemContractFactory { - constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - - meshswapSinglePool({ address, network }: ContractOpts) { - return MeshswapSinglePool__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - meshswapSinglePoolFactory({ address, network }: ContractOpts) { - return MeshswapSinglePoolFactory__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } -} diff --git a/src/apps/meshswap/contracts/viem/MeshswapSinglePool.ts b/src/apps/meshswap/contracts/viem/MeshswapSinglePool.ts deleted file mode 100644 index 32e40b21c..000000000 --- a/src/apps/meshswap/contracts/viem/MeshswapSinglePool.ts +++ /dev/null @@ -1,1357 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const meshswapSinglePoolAbi = [ - { - constant: true, - inputs: [], - name: 'name', - outputs: [ - { - name: '', - type: 'string', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [], - name: 'initPool', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: '_spender', - type: 'address', - }, - { - name: '_value', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'user', - type: 'address', - }, - { - name: 'plusPoolAddress', - type: 'address', - }, - { - name: 'insurance', - type: 'address', - }, - ], - name: 'transferDebt', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'totalSupply', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'exchangeRateStored', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'newReserveFactor', - type: 'uint256', - }, - ], - name: 'setReserveFactor', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: '_from', - type: 'address', - }, - { - name: '_to', - type: 'address', - }, - { - name: '_value', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'decimals', - outputs: [ - { - name: '', - type: 'uint8', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - name: '', - type: 'address', - }, - ], - name: 'poolTotalBorrows', - outputs: [ - { - name: 'principal', - type: 'uint256', - }, - { - name: 'interestIndex', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'getCash', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: '_mining', - type: 'uint256', - }, - ], - name: 'changeMiningRate', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'reserveFactor', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'totalBorrows', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'singlePoolFactory', - outputs: [ - { - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'withdrawAmount', - type: 'uint256', - }, - ], - name: 'withdrawToken', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'version', - outputs: [ - { - name: '', - type: 'string', - }, - ], - payable: false, - stateMutability: 'pure', - type: 'function', - }, - { - constant: true, - inputs: [ - { - name: '', - type: 'address', - }, - ], - name: 'userRewardSum', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - name: 'poolAddress', - type: 'address', - }, - ], - name: 'borrowBalancePoolTotal', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'depositAmount', - type: 'uint256', - }, - ], - name: 'depositToken', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'mining', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'accrualBlockNumber', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'user', - type: 'address', - }, - { - name: 'borrowAmount', - type: 'uint256', - }, - { - name: 'plusPoolAddress', - type: 'address', - }, - ], - name: 'borrow', - outputs: [ - { - name: '', - type: 'uint256', - }, - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'admin', - type: 'address', - }, - { - name: 'reduceAmount', - type: 'uint256', - }, - ], - name: 'reduceReserves', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [ - { - name: '', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - name: 'account', - type: 'address', - }, - { - name: 'poolAddress', - type: 'address', - }, - ], - name: 'borrowBalanceStored', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [], - name: 'totalBorrowsCurrent', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'addAmount', - type: 'uint256', - }, - ], - name: 'addReserves', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: true, - stateMutability: 'payable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'newInterestRateModel', - type: 'address', - }, - ], - name: 'setInterestRateModel', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'miningIndex', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'totalReserves', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'symbol', - outputs: [ - { - name: '', - type: 'string', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [], - name: 'accrueInterest', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'entered', - outputs: [ - { - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: '_to', - type: 'address', - }, - { - name: '_value', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'borrowIndex', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'supplyRatePerBlock', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'lastMined', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'withdrawActive', - outputs: [ - { - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [], - name: 'claimReward', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [], - name: 'exchangeRateCurrent', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [], - name: 'updateMiningIndex', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'b', - type: 'bool', - }, - ], - name: 'setDepositActive', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'withdrawTokens', - type: 'uint256', - }, - ], - name: 'withdrawETHByAmount', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'depositActive', - outputs: [ - { - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'withdrawTokens', - type: 'uint256', - }, - ], - name: 'withdrawTokenByAmount', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [ - { - name: '', - type: 'address', - }, - { - name: '', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'user', - type: 'address', - }, - { - name: 'repayAmount', - type: 'uint256', - }, - { - name: 'plusPoolAddress', - type: 'address', - }, - { - name: 'spender', - type: 'address', - }, - ], - name: 'repayToken', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [ - { - name: 'account', - type: 'address', - }, - { - name: 'poolAddress', - type: 'address', - }, - ], - name: 'borrowBalanceInfo', - outputs: [ - { - name: '', - type: 'uint256', - }, - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'account', - type: 'address', - }, - { - name: 'poolAddress', - type: 'address', - }, - ], - name: 'borrowBalanceCurrent', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [ - { - name: '', - type: 'address', - }, - ], - name: 'userLastIndex', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: '_singlePoolFactoryAddress', - type: 'address', - }, - { - name: '_token', - type: 'address', - }, - { - name: '_interestRateModelAddress', - type: 'address', - }, - ], - name: '__SinglePool_init', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'withdrawAmount', - type: 'uint256', - }, - ], - name: 'withdrawETH', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'interestRateModel', - outputs: [ - { - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [], - name: 'depositETH', - outputs: [], - payable: true, - stateMutability: 'payable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'b', - type: 'bool', - }, - ], - name: 'setWithdrawActive', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'borrowRatePerBlock', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'token', - outputs: [ - { - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - payable: true, - stateMutability: 'payable', - type: 'fallback', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - name: '_mining', - type: 'uint256', - }, - ], - name: 'ChangeMiningRate', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - name: 'lastMined', - type: 'uint256', - }, - { - indexed: false, - name: 'miningIndex', - type: 'uint256', - }, - ], - name: 'UpdateMiningIndex', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - name: 'user', - type: 'address', - }, - { - indexed: false, - name: 'amount', - type: 'uint256', - }, - { - indexed: false, - name: 'lastIndex', - type: 'uint256', - }, - { - indexed: false, - name: 'rewardSum', - type: 'uint256', - }, - ], - name: 'GiveReward', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - name: 'cashPrior', - type: 'uint256', - }, - { - indexed: false, - name: 'interestAccumulated', - type: 'uint256', - }, - { - indexed: false, - name: 'borrowIndex', - type: 'uint256', - }, - { - indexed: false, - name: 'totalBorrows', - type: 'uint256', - }, - { - indexed: false, - name: 'totalReserves', - type: 'uint256', - }, - ], - name: 'AccrueInterest', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - name: 'user', - type: 'address', - }, - { - indexed: false, - name: 'depositAmount', - type: 'uint256', - }, - { - indexed: false, - name: 'depositTokens', - type: 'uint256', - }, - { - indexed: false, - name: 'totalAmount', - type: 'uint256', - }, - { - indexed: false, - name: 'totalSupply', - type: 'uint256', - }, - ], - name: 'Deposit', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - name: 'user', - type: 'address', - }, - { - indexed: false, - name: 'withdrawAmount', - type: 'uint256', - }, - { - indexed: false, - name: 'withdrawTokens', - type: 'uint256', - }, - { - indexed: false, - name: 'totalAmount', - type: 'uint256', - }, - { - indexed: false, - name: 'totalSupply', - type: 'uint256', - }, - ], - name: 'Withdraw', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - name: 'user', - type: 'address', - }, - { - indexed: false, - name: 'plusPoolAddress', - type: 'address', - }, - { - indexed: false, - name: 'borrowAmount', - type: 'uint256', - }, - { - indexed: false, - name: 'accountBorrows', - type: 'uint256', - }, - { - indexed: false, - name: 'totalBorrows', - type: 'uint256', - }, - ], - name: 'Borrow', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - name: 'user', - type: 'address', - }, - { - indexed: false, - name: 'plusPoolAddress', - type: 'address', - }, - { - indexed: false, - name: 'repayAmount', - type: 'uint256', - }, - { - indexed: false, - name: 'accountBorrows', - type: 'uint256', - }, - { - indexed: false, - name: 'totalBorrows', - type: 'uint256', - }, - ], - name: 'Repay', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - name: 'user', - type: 'address', - }, - { - indexed: false, - name: 'plusPoolAddress', - type: 'address', - }, - { - indexed: false, - name: 'insurance', - type: 'address', - }, - { - indexed: false, - name: 'userDebt', - type: 'uint256', - }, - { - indexed: false, - name: 'insuranceDebtBefore', - type: 'uint256', - }, - { - indexed: false, - name: 'insuranceDebt', - type: 'uint256', - }, - { - indexed: false, - name: 'borrowIndex', - type: 'uint256', - }, - ], - name: 'TransferDebt', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - name: 'oldReserveFactor', - type: 'uint256', - }, - { - indexed: false, - name: 'newReserveFactor', - type: 'uint256', - }, - ], - name: 'NewReserveFactor', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - name: 'user', - type: 'address', - }, - { - indexed: false, - name: 'addAmount', - type: 'uint256', - }, - { - indexed: false, - name: 'newTotalReserves', - type: 'uint256', - }, - ], - name: 'ReservesAdded', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - name: 'admin', - type: 'address', - }, - { - indexed: false, - name: 'reduceAmount', - type: 'uint256', - }, - { - indexed: false, - name: 'newTotalReserves', - type: 'uint256', - }, - ], - name: 'ReservesReduced', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - name: 'oldInterestRateModel', - type: 'address', - }, - { - indexed: false, - name: 'newInterestRateModel', - type: 'address', - }, - ], - name: 'NewMarketInterestRateModel', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - name: 'from', - type: 'address', - }, - { - indexed: true, - name: 'to', - type: 'address', - }, - { - indexed: false, - name: 'amount', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - name: 'holder', - type: 'address', - }, - { - indexed: true, - name: 'spender', - type: 'address', - }, - { - indexed: false, - name: 'amount', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, -] as const; - -export type MeshswapSinglePool = typeof meshswapSinglePoolAbi; -export type MeshswapSinglePoolContract = GetContractReturnType; - -export class MeshswapSinglePool__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: meshswapSinglePoolAbi, publicClient: client }); - } -} diff --git a/src/apps/meshswap/contracts/viem/MeshswapSinglePoolFactory.ts b/src/apps/meshswap/contracts/viem/MeshswapSinglePoolFactory.ts deleted file mode 100644 index 6e2d2119c..000000000 --- a/src/apps/meshswap/contracts/viem/MeshswapSinglePoolFactory.ts +++ /dev/null @@ -1,994 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const meshswapSinglePoolFactoryAbi = [ - { - constant: false, - inputs: [ - { - name: 'newOperator', - type: 'address', - }, - ], - name: 'changeOperator', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'user', - type: 'address', - }, - { - name: 'amount', - type: 'uint256', - }, - ], - name: 'sendReward', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'token', - type: 'address', - }, - { - name: 'user', - type: 'address', - }, - { - name: 'insurance', - type: 'address', - }, - ], - name: 'transferDebt', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'newInterestRateModel', - type: 'address', - }, - ], - name: 'changeInterestRateModel', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'plusPoolFactory', - outputs: [ - { - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'nativeWithdrawer', - outputs: [ - { - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'token', - type: 'address', - }, - { - name: 'newReserveFactor', - type: 'uint256', - }, - ], - name: 'setPoolReserveFactor', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [ - { - name: 'idx', - type: 'uint256', - }, - ], - name: 'getPoolAddressByIndex', - outputs: [ - { - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'token', - type: 'address', - }, - { - name: 'user', - type: 'address', - }, - { - name: 'amount', - type: 'uint256', - }, - ], - name: 'repay', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: true, - stateMutability: 'payable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'token', - type: 'address', - }, - { - name: 'plusPoolAddress', - type: 'address', - }, - { - name: 'amount', - type: 'uint256', - }, - ], - name: 'repayInsurance', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: true, - stateMutability: 'payable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'getPlusPoolFactory', - outputs: [ - { - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - name: 'token', - type: 'address', - }, - { - name: 'user', - type: 'address', - }, - { - name: 'poolAddress', - type: 'address', - }, - ], - name: 'borrowBalanceInfo', - outputs: [ - { - name: '', - type: 'uint256', - }, - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'pools', - type: 'address[]', - }, - { - name: 'rate', - type: 'uint256[]', - }, - ], - name: 'changeMiningRate', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'token', - type: 'address', - }, - { - name: 'user', - type: 'address', - }, - { - name: 'poolAddress', - type: 'address', - }, - ], - name: 'borrowBalanceCurrent', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [ - { - name: '', - type: 'uint256', - }, - ], - name: 'singlePools', - outputs: [ - { - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'token', - type: 'address', - }, - { - name: 'user', - type: 'address', - }, - { - name: 'amount', - type: 'uint256', - }, - ], - name: 'borrow', - outputs: [ - { - name: '', - type: 'uint256', - }, - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [ - { - name: '', - type: 'address', - }, - ], - name: 'singlePoolVault', - outputs: [ - { - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'version', - outputs: [ - { - name: '', - type: 'string', - }, - ], - payable: false, - stateMutability: 'pure', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'totalMined', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'operator', - outputs: [ - { - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'governance', - outputs: [ - { - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'tokenAddress', - type: 'address', - }, - { - name: 'b', - type: 'bool', - }, - ], - name: 'setWithdrawActive', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: '_nextOwner', - type: 'address', - }, - ], - name: 'changeNextOwner', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [], - name: 'changeOwner', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'mining', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - name: '', - type: 'address', - }, - ], - name: 'singlePoolExist', - outputs: [ - { - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'nextOwner', - outputs: [ - { - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'getTotalMined', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'newNativeWithdrawer', - type: 'address', - }, - ], - name: 'changeNativeWithdrawer', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'owner', - outputs: [ - { - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'getPoolCount', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'token', - type: 'address', - }, - ], - name: 'createPool', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'newSinglePoolImpl', - type: 'address', - }, - ], - name: 'setSinglePoolImpl', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [ - { - name: 'token', - type: 'address', - }, - { - name: 'user', - type: 'address', - }, - { - name: 'poolAddress', - type: 'address', - }, - ], - name: 'borrowBalanceStored', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'entered', - outputs: [ - { - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'WETH', - outputs: [ - { - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'tokenAddress', - type: 'address', - }, - { - name: 'b', - type: 'bool', - }, - ], - name: 'setDepositActive', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'lastMined', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'admin', - type: 'address', - }, - { - name: 'token', - type: 'address', - }, - { - name: 'reduceAmount', - type: 'uint256', - }, - ], - name: 'reducePoolReserves', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'newPlusPoolFactory', - type: 'address', - }, - ], - name: 'setPlusPoolFactory', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'singlePoolImpl', - outputs: [ - { - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'tokenAddress', - type: 'address', - }, - { - name: 'newInterestRateModel', - type: 'address', - }, - ], - name: 'setPoolInterestRateModel', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: '_owner', - type: 'address', - }, - { - name: '_governance', - type: 'address', - }, - { - name: '_singlePoolImpl', - type: 'address', - }, - { - name: '_interestRateModel', - type: 'address', - }, - ], - name: '__SinglePoolFactory_init', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'interestRateModel', - outputs: [ - { - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'mesh', - outputs: [ - { - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [], - name: 'updateTotalMined', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [ - { - name: 'token', - type: 'address', - }, - ], - name: 'getPoolAddressByToken', - outputs: [ - { - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - payable: true, - stateMutability: 'payable', - type: 'fallback', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - name: 'nextOwner', - type: 'address', - }, - ], - name: 'ChangeNextOwner', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - name: 'owner', - type: 'address', - }, - ], - name: 'ChangeOwner', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - name: 'newOperator', - type: 'address', - }, - ], - name: 'ChangeOperator', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - name: 'newInterestRateModel', - type: 'address', - }, - ], - name: 'ChangeInterestRateModel', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - name: 'newNativeWithdrawer', - type: 'address', - }, - ], - name: 'ChangeNativeWithdrawer', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - name: 'token', - type: 'address', - }, - { - indexed: false, - name: 'pool', - type: 'address', - }, - { - indexed: false, - name: 'exid', - type: 'uint256', - }, - ], - name: 'CreatePool', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - name: 'poolAddress', - type: 'address', - }, - { - indexed: false, - name: 'b', - type: 'bool', - }, - ], - name: 'SetDepositActive', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - name: 'poolAddress', - type: 'address', - }, - { - indexed: false, - name: 'b', - type: 'bool', - }, - ], - name: 'SetWithdrawActive', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - name: 'pool', - type: 'address', - }, - { - indexed: false, - name: 'newInterestRateModel', - type: 'address', - }, - ], - name: 'SetPoolInterestRateModel', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - name: '_mining', - type: 'uint256', - }, - ], - name: 'ChangeMiningRate', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - name: '_lastMined', - type: 'uint256', - }, - { - indexed: false, - name: '_totalMined', - type: 'uint256', - }, - ], - name: 'UpdateLastMined', - type: 'event', - }, -] as const; - -export type MeshswapSinglePoolFactory = typeof meshswapSinglePoolFactoryAbi; -export type MeshswapSinglePoolFactoryContract = GetContractReturnType; - -export class MeshswapSinglePoolFactory__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: meshswapSinglePoolFactoryAbi, publicClient: client }); - } -} diff --git a/src/apps/meshswap/contracts/viem/index.ts b/src/apps/meshswap/contracts/viem/index.ts deleted file mode 100644 index d75940175..000000000 --- a/src/apps/meshswap/contracts/viem/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -export type { MeshswapSinglePoolFactory } from './MeshswapSinglePoolFactory'; -export type { MeshswapSinglePool } from './MeshswapSinglePool'; - -export { MeshswapSinglePoolFactory__factory } from './MeshswapSinglePoolFactory'; -export { MeshswapSinglePool__factory } from './MeshswapSinglePool'; diff --git a/src/apps/meshswap/meshswap.module.ts b/src/apps/meshswap/meshswap.module.ts deleted file mode 100644 index dce64cc53..000000000 --- a/src/apps/meshswap/meshswap.module.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Module } from '@nestjs/common'; - -import { AbstractApp } from '~app/app.dynamic-module'; -import { UniswapV2ViemContractFactory } from '~apps/uniswap-v2/contracts'; - -import { MeshswapViemContractFactory } from './contracts'; -import { PolygonMeshswapPoolTokenFetcher } from './polygon/meshswap.pool.token-fetcher'; -import { PolygonMeshswapSupplyTokenFetcher } from './polygon/meshswap.supply.token-fetcher'; - -@Module({ - providers: [ - MeshswapViemContractFactory, - UniswapV2ViemContractFactory, - PolygonMeshswapPoolTokenFetcher, - PolygonMeshswapSupplyTokenFetcher, - ], -}) -export class MeshswapAppModule extends AbstractApp() {} diff --git a/src/apps/meshswap/polygon/meshswap.pool.token-fetcher.ts b/src/apps/meshswap/polygon/meshswap.pool.token-fetcher.ts deleted file mode 100644 index 116be07ed..000000000 --- a/src/apps/meshswap/polygon/meshswap.pool.token-fetcher.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { UniswapV2DefaultPoolOnChainTemplateTokenFetcher } from '~apps/uniswap-v2/common/uniswap-v2.default.pool.on-chain.template.token-fetcher'; - -@PositionTemplate() -export class PolygonMeshswapPoolTokenFetcher extends UniswapV2DefaultPoolOnChainTemplateTokenFetcher { - groupLabel = 'Pools'; - factoryAddress = '0x9f3044f7f9fc8bc9ed615d54845b4577b833282d'; -} diff --git a/src/apps/meshswap/polygon/meshswap.supply.token-fetcher.ts b/src/apps/meshswap/polygon/meshswap.supply.token-fetcher.ts deleted file mode 100644 index b1dd7014a..000000000 --- a/src/apps/meshswap/polygon/meshswap.supply.token-fetcher.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { Inject } from '@nestjs/common'; -import _ from 'lodash'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { - GetDataPropsParams, - GetDisplayPropsParams, - GetPricePerShareParams, - GetUnderlyingTokensParams, -} from '~position/template/app-token.template.types'; - -import { MeshswapViemContractFactory } from '../contracts'; -import { MeshswapSinglePool } from '../contracts/viem'; - -@PositionTemplate() -export class PolygonMeshswapSupplyTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Supply'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(MeshswapViemContractFactory) private readonly contractFactory: MeshswapViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.meshswapSinglePool({ network: this.network, address }); - } - - async getAddresses(): Promise { - const multicall = this.appToolkit.getViemMulticall(this.network); - const singlePoolFactoryContract = this.contractFactory.meshswapSinglePoolFactory({ - network: this.network, - address: '0x504722a6eabb3d1573bada9abd585ae177d52e7a', - }); - - const poolCountRaw = await multicall.wrap(singlePoolFactoryContract).read.getPoolCount(); - const poolCount = Number(poolCountRaw); - - const poolAddresses = await Promise.all( - _.range(0, poolCount).map(async index => { - return await multicall.wrap(singlePoolFactoryContract).read.getPoolAddressByIndex([BigInt(index)]); - }), - ); - return poolAddresses; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.token(), network: this.network }]; - } - - async getPricePerShare({ contract }: GetPricePerShareParams): Promise { - const exchangeRateRaw = await contract.read.exchangeRateStored(); - const exchangeRate = Number(exchangeRateRaw) / 10 ** 18; - return [exchangeRate]; - } - - async getLabel({ contract }: GetDisplayPropsParams): Promise { - return contract.read.name(); - } - - async getLiquidity({ appToken, contract }: GetDataPropsParams) { - const cashRaw = await contract.read.getCash(); - const borrowAmountRaw = await contract.read.totalBorrows(); - const cash = Number(cashRaw) / 10 ** appToken.decimals; - const borrowAmount = Number(borrowAmountRaw) / 10 ** appToken.decimals; - - return borrowAmount + cash; - } -} diff --git a/src/apps/mux/arbitrum/mux.mux.token-fetcher.ts b/src/apps/mux/arbitrum/mux.mux.token-fetcher.ts deleted file mode 100644 index f1276d9c4..000000000 --- a/src/apps/mux/arbitrum/mux.mux.token-fetcher.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { getAppAssetImage } from '~app-toolkit/helpers/presentation/image.present'; -import { Erc20 } from '~contract/contracts/viem'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; - -import { MuxViemContractFactory } from '../contracts'; - -@PositionTemplate() -export class ArbitrumMuxMuxTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'MUX'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(MuxViemContractFactory) protected readonly contractFactory: MuxViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.appToolkit.globalViemContracts.erc20({ address, network: this.network }); - } - - async getAddresses() { - return ['0x8bb2ac0dcf1e86550534cee5e9c8ded4269b679b']; - } - - async getUnderlyingTokenDefinitions() { - return [{ address: '0x4e352cf164e64adcbad318c3a1e222e9eba4ce42', network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } - - async getImages() { - return [getAppAssetImage('mux', 'MUX')]; - } -} diff --git a/src/apps/mux/mux.module.ts b/src/apps/mux/mux.module.ts index 646f41246..d51c6970f 100644 --- a/src/apps/mux/mux.module.ts +++ b/src/apps/mux/mux.module.ts @@ -7,7 +7,6 @@ import { OptimismMuxPerpContractPositionFetcher } from '~apps/mux/optimism/mux.p import { ArbitrumMuxFarmContractPositionFetcher } from './arbitrum/mux.farm.contract-position-fetcher'; import { ArbitrumMuxMlpTokenFetcher } from './arbitrum/mux.mlp.token-fetcher'; import { ArbitrumMuxMuxLpStakingContractPositionFetcher } from './arbitrum/mux.mux-lp-staking.contract-position-fetcher'; -import { ArbitrumMuxMuxTokenFetcher } from './arbitrum/mux.mux.token-fetcher'; import { ArbitrumMuxPerpContractPositionFetcher } from './arbitrum/mux.perp.contract-position-fetcher'; import { ArbitrumMuxVeMuxContractPositionFetcher } from './arbitrum/mux.ve-mux.contract-position-fetcher'; import { AvalancheMuxMlpTokenFetcher } from './avalanche/mux.mlp.token-fetcher'; @@ -25,7 +24,6 @@ import { FantomMuxPerpContractPositionFetcher } from './fantom/mux.perp.contract ArbitrumMuxFarmContractPositionFetcher, ArbitrumMuxPerpContractPositionFetcher, ArbitrumMuxMlpTokenFetcher, - ArbitrumMuxMuxTokenFetcher, ArbitrumMuxMuxLpStakingContractPositionFetcher, ArbitrumMuxVeMuxContractPositionFetcher, // Avalanche diff --git a/src/apps/olympus/contracts/abis/olympus-g-ohm-token.json b/src/apps/olympus/contracts/abis/olympus-g-ohm-token.json deleted file mode 100644 index 0f7e0627d..000000000 --- a/src/apps/olympus/contracts/abis/olympus-g-ohm-token.json +++ /dev/null @@ -1,269 +0,0 @@ -[ - { - "inputs": [ - { "internalType": "address", "name": "_migrator", "type": "address" }, - { "internalType": "address", "name": "_sOHM", "type": "address" } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "delegator", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "fromDelegate", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "toDelegate", "type": "address" } - ], - "name": "DelegateChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "delegate", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "previousBalance", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "newBalance", "type": "uint256" } - ], - "name": "DelegateVotesChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "spender", "type": "address" } - ], - "name": "allowance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "approve", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "approved", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_amount", "type": "uint256" }], - "name": "balanceFrom", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_amount", "type": "uint256" }], - "name": "balanceTo", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_from", "type": "address" }, - { "internalType": "uint256", "name": "_amount", "type": "uint256" } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "name": "checkpoints", - "outputs": [ - { "internalType": "uint256", "name": "fromBlock", "type": "uint256" }, - { "internalType": "uint256", "name": "votes", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } - ], - "name": "decreaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "delegatee", "type": "address" }], - "name": "delegate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "delegates", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "getCurrentVotes", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "account", "type": "address" }, - { "internalType": "uint256", "name": "blockNumber", "type": "uint256" } - ], - "name": "getPriorVotes", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "addedValue", "type": "uint256" } - ], - "name": "increaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "index", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_staking", "type": "address" }, - { "internalType": "address", "name": "_sOHM", "type": "address" } - ], - "name": "migrate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "migrated", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_to", "type": "address" }, - { "internalType": "uint256", "name": "_amount", "type": "uint256" } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "numCheckpoints", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "sOHM", - "outputs": [{ "internalType": "contract IsOHM", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "sender", "type": "address" }, - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/olympus/contracts/abis/olympus-s-ohm-token.json b/src/apps/olympus/contracts/abis/olympus-s-ohm-token.json deleted file mode 100644 index c46b3a7aa..000000000 --- a/src/apps/olympus/contracts/abis/olympus-s-ohm-token.json +++ /dev/null @@ -1,303 +0,0 @@ -[ - { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "uint256", "name": "epoch", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "rebase", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "index", "type": "uint256" } - ], - "name": "LogRebase", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "address", "name": "stakingContract", "type": "address" }], - "name": "LogStakingContractUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "uint256", "name": "epoch", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "totalSupply", "type": "uint256" } - ], - "name": "LogSupply", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "owner_", "type": "address" }, - { "internalType": "address", "name": "spender", "type": "address" } - ], - "name": "allowance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "approve", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "gons", "type": "uint256" }], - "name": "balanceForGons", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "who", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { "internalType": "address", "name": "debtor", "type": "address" }, - { "internalType": "bool", "name": "add", "type": "bool" } - ], - "name": "changeDebt", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "circulatingSupply", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "debtBalances", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } - ], - "name": "decreaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], - "name": "fromG", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "gOHM", - "outputs": [{ "internalType": "contract IgOHM", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], - "name": "gonsForBalance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "addedValue", "type": "uint256" } - ], - "name": "increaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "index", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_stakingContract", "type": "address" }, - { "internalType": "address", "name": "_treasury", "type": "address" } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }], - "name": "nonces", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "value", "type": "uint256" }, - { "internalType": "uint256", "name": "deadline", "type": "uint256" }, - { "internalType": "uint8", "name": "v", "type": "uint8" }, - { "internalType": "bytes32", "name": "r", "type": "bytes32" }, - { "internalType": "bytes32", "name": "s", "type": "bytes32" } - ], - "name": "permit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "profit_", "type": "uint256" }, - { "internalType": "uint256", "name": "epoch_", "type": "uint256" } - ], - "name": "rebase", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "name": "rebases", - "outputs": [ - { "internalType": "uint256", "name": "epoch", "type": "uint256" }, - { "internalType": "uint256", "name": "rebase", "type": "uint256" }, - { "internalType": "uint256", "name": "totalStakedBefore", "type": "uint256" }, - { "internalType": "uint256", "name": "totalStakedAfter", "type": "uint256" }, - { "internalType": "uint256", "name": "amountRebased", "type": "uint256" }, - { "internalType": "uint256", "name": "index", "type": "uint256" }, - { "internalType": "uint256", "name": "blockNumberOccured", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_index", "type": "uint256" }], - "name": "setIndex", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_gOHM", "type": "address" }], - "name": "setgOHM", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "stakingContract", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], - "name": "toG", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "from", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "treasury", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - } -] diff --git a/src/apps/olympus/contracts/abis/olympus-s-ohm-v-1-token.json b/src/apps/olympus/contracts/abis/olympus-s-ohm-v-1-token.json deleted file mode 100644 index 4ecbf5cd0..000000000 --- a/src/apps/olympus/contracts/abis/olympus-s-ohm-v-1-token.json +++ /dev/null @@ -1,303 +0,0 @@ -[ - { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "uint256", "name": "epoch", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "rebase", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "index", "type": "uint256" } - ], - "name": "LogRebase", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "address", "name": "stakingContract", "type": "address" }], - "name": "LogStakingContractUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "uint256", "name": "epoch", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "timestamp", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "totalSupply", "type": "uint256" } - ], - "name": "LogSupply", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } - ], - "name": "OwnershipPulled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } - ], - "name": "OwnershipPushed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "INDEX", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PERMIT_TYPEHASH", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "owner_", "type": "address" }, - { "internalType": "address", "name": "spender", "type": "address" } - ], - "name": "allowance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "approve", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "gons", "type": "uint256" }], - "name": "balanceForGons", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "who", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "circulatingSupply", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } - ], - "name": "decreaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], - "name": "gonsForBalance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "addedValue", "type": "uint256" } - ], - "name": "increaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "index", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "stakingContract_", "type": "address" }], - "name": "initialize", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initializer", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "manager", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }], - "name": "nonces", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { "internalType": "uint256", "name": "deadline", "type": "uint256" }, - { "internalType": "uint8", "name": "v", "type": "uint8" }, - { "internalType": "bytes32", "name": "r", "type": "bytes32" }, - { "internalType": "bytes32", "name": "s", "type": "bytes32" } - ], - "name": "permit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { "inputs": [], "name": "pullManagement", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [{ "internalType": "address", "name": "newOwner_", "type": "address" }], - "name": "pushManagement", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "profit_", "type": "uint256" }, - { "internalType": "uint256", "name": "epoch_", "type": "uint256" } - ], - "name": "rebase", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "name": "rebases", - "outputs": [ - { "internalType": "uint256", "name": "epoch", "type": "uint256" }, - { "internalType": "uint256", "name": "rebase", "type": "uint256" }, - { "internalType": "uint256", "name": "totalStakedBefore", "type": "uint256" }, - { "internalType": "uint256", "name": "totalStakedAfter", "type": "uint256" }, - { "internalType": "uint256", "name": "amountRebased", "type": "uint256" }, - { "internalType": "uint256", "name": "index", "type": "uint256" }, - { "internalType": "uint256", "name": "blockNumberOccured", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { "inputs": [], "name": "renounceManagement", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [{ "internalType": "uint256", "name": "_INDEX", "type": "uint256" }], - "name": "setIndex", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "stakingContract", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "from", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/olympus/contracts/abis/olympus-ws-ohm-v-1-token.json b/src/apps/olympus/contracts/abis/olympus-ws-ohm-v-1-token.json deleted file mode 100644 index cc4447899..000000000 --- a/src/apps/olympus/contracts/abis/olympus-ws-ohm-v-1-token.json +++ /dev/null @@ -1,158 +0,0 @@ -[ - { - "inputs": [{ "internalType": "address", "name": "_sOHM", "type": "address" }], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "spender", "type": "address" } - ], - "name": "allowance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "approve", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } - ], - "name": "decreaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "addedValue", "type": "uint256" } - ], - "name": "increaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "sOHM", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_amount", "type": "uint256" }], - "name": "sOHMTowOHM", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "sender", "type": "address" }, - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_amount", "type": "uint256" }], - "name": "unwrap", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_amount", "type": "uint256" }], - "name": "wOHMTosOHM", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_amount", "type": "uint256" }], - "name": "wrap", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/olympus/contracts/viem.contract-factory.ts b/src/apps/olympus/contracts/viem.contract-factory.ts index ed57226f1..bad36039b 100644 --- a/src/apps/olympus/contracts/viem.contract-factory.ts +++ b/src/apps/olympus/contracts/viem.contract-factory.ts @@ -5,13 +5,9 @@ import { Network } from '~types/network.interface'; import { OlympusBoostedLiquidityManager__factory, - OlympusGOhmToken__factory, OlympusLiquidityRegistry__factory, - OlympusSOhmToken__factory, - OlympusSOhmV1Token__factory, OlympusV1BondDepository__factory, OlympusV2BondDepository__factory, - OlympusWsOhmV1Token__factory, OlympusZapperZap__factory, } from './viem'; @@ -24,27 +20,15 @@ export class OlympusViemContractFactory { olympusBoostedLiquidityManager({ address, network }: ContractOpts) { return OlympusBoostedLiquidityManager__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } - olympusGOhmToken({ address, network }: ContractOpts) { - return OlympusGOhmToken__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } olympusLiquidityRegistry({ address, network }: ContractOpts) { return OlympusLiquidityRegistry__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } - olympusSOhmToken({ address, network }: ContractOpts) { - return OlympusSOhmToken__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - olympusSOhmV1Token({ address, network }: ContractOpts) { - return OlympusSOhmV1Token__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } olympusV1BondDepository({ address, network }: ContractOpts) { return OlympusV1BondDepository__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } olympusV2BondDepository({ address, network }: ContractOpts) { return OlympusV2BondDepository__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } - olympusWsOhmV1Token({ address, network }: ContractOpts) { - return OlympusWsOhmV1Token__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } olympusZapperZap({ address, network }: ContractOpts) { return OlympusZapperZap__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } diff --git a/src/apps/olympus/contracts/viem/OlympusGOhmToken.ts b/src/apps/olympus/contracts/viem/OlympusGOhmToken.ts deleted file mode 100644 index 7df107e2a..000000000 --- a/src/apps/olympus/contracts/viem/OlympusGOhmToken.ts +++ /dev/null @@ -1,619 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const olympusGOhmTokenAbi = [ - { - inputs: [ - { - internalType: 'address', - name: '_migrator', - type: 'address', - }, - { - internalType: 'address', - name: '_sOHM', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'delegator', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'fromDelegate', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'toDelegate', - type: 'address', - }, - ], - name: 'DelegateChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'delegate', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'previousBalance', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'newBalance', - type: 'uint256', - }, - ], - name: 'DelegateVotesChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'approved', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'balanceFrom', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'balanceTo', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_from', - type: 'address', - }, - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'burn', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'checkpoints', - outputs: [ - { - internalType: 'uint256', - name: 'fromBlock', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'votes', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'delegatee', - type: 'address', - }, - ], - name: 'delegate', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'delegates', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'getCurrentVotes', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - { - internalType: 'uint256', - name: 'blockNumber', - type: 'uint256', - }, - ], - name: 'getPriorVotes', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'index', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_staking', - type: 'address', - }, - { - internalType: 'address', - name: '_sOHM', - type: 'address', - }, - ], - name: 'migrate', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'migrated', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_to', - type: 'address', - }, - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'mint', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'numCheckpoints', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'sOHM', - outputs: [ - { - internalType: 'contract IsOHM', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type OlympusGOhmToken = typeof olympusGOhmTokenAbi; -export type OlympusGOhmTokenContract = GetContractReturnType; - -export class OlympusGOhmToken__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: olympusGOhmTokenAbi, publicClient: client }); - } -} diff --git a/src/apps/olympus/contracts/viem/OlympusSOhmToken.ts b/src/apps/olympus/contracts/viem/OlympusSOhmToken.ts deleted file mode 100644 index 3e26193ec..000000000 --- a/src/apps/olympus/contracts/viem/OlympusSOhmToken.ts +++ /dev/null @@ -1,723 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const olympusSOhmTokenAbi = [ - { - inputs: [], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'uint256', - name: 'epoch', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'rebase', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'index', - type: 'uint256', - }, - ], - name: 'LogRebase', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'stakingContract', - type: 'address', - }, - ], - name: 'LogStakingContractUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'uint256', - name: 'epoch', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'totalSupply', - type: 'uint256', - }, - ], - name: 'LogSupply', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - inputs: [], - name: 'DOMAIN_SEPARATOR', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner_', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'gons', - type: 'uint256', - }, - ], - name: 'balanceForGons', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'who', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'address', - name: 'debtor', - type: 'address', - }, - { - internalType: 'bool', - name: 'add', - type: 'bool', - }, - ], - name: 'changeDebt', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'circulatingSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'debtBalances', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'fromG', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'gOHM', - outputs: [ - { - internalType: 'contract IgOHM', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'gonsForBalance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'index', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_stakingContract', - type: 'address', - }, - { - internalType: 'address', - name: '_treasury', - type: 'address', - }, - ], - name: 'initialize', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - ], - name: 'nonces', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'deadline', - type: 'uint256', - }, - { - internalType: 'uint8', - name: 'v', - type: 'uint8', - }, - { - internalType: 'bytes32', - name: 'r', - type: 'bytes32', - }, - { - internalType: 'bytes32', - name: 's', - type: 'bytes32', - }, - ], - name: 'permit', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'profit_', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'epoch_', - type: 'uint256', - }, - ], - name: 'rebase', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'rebases', - outputs: [ - { - internalType: 'uint256', - name: 'epoch', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'rebase', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'totalStakedBefore', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'totalStakedAfter', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'amountRebased', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'index', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'blockNumberOccured', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_index', - type: 'uint256', - }, - ], - name: 'setIndex', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_gOHM', - type: 'address', - }, - ], - name: 'setgOHM', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'stakingContract', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'toG', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'from', - type: 'address', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'treasury', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, -] as const; - -export type OlympusSOhmToken = typeof olympusSOhmTokenAbi; -export type OlympusSOhmTokenContract = GetContractReturnType; - -export class OlympusSOhmToken__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: olympusSOhmTokenAbi, publicClient: client }); - } -} diff --git a/src/apps/olympus/contracts/viem/OlympusSOhmV1Token.ts b/src/apps/olympus/contracts/viem/OlympusSOhmV1Token.ts deleted file mode 100644 index 5387583a6..000000000 --- a/src/apps/olympus/contracts/viem/OlympusSOhmV1Token.ts +++ /dev/null @@ -1,734 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const olympusSOhmV1TokenAbi = [ - { - inputs: [], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'uint256', - name: 'epoch', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'rebase', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'index', - type: 'uint256', - }, - ], - name: 'LogRebase', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'stakingContract', - type: 'address', - }, - ], - name: 'LogStakingContractUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'uint256', - name: 'epoch', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'timestamp', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'totalSupply', - type: 'uint256', - }, - ], - name: 'LogSupply', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipPulled', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipPushed', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - inputs: [], - name: 'DOMAIN_SEPARATOR', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'INDEX', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'PERMIT_TYPEHASH', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner_', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'gons', - type: 'uint256', - }, - ], - name: 'balanceForGons', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'who', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'circulatingSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'gonsForBalance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'index', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'stakingContract_', - type: 'address', - }, - ], - name: 'initialize', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'initializer', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'manager', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - ], - name: 'nonces', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'deadline', - type: 'uint256', - }, - { - internalType: 'uint8', - name: 'v', - type: 'uint8', - }, - { - internalType: 'bytes32', - name: 'r', - type: 'bytes32', - }, - { - internalType: 'bytes32', - name: 's', - type: 'bytes32', - }, - ], - name: 'permit', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'pullManagement', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newOwner_', - type: 'address', - }, - ], - name: 'pushManagement', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'profit_', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'epoch_', - type: 'uint256', - }, - ], - name: 'rebase', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'rebases', - outputs: [ - { - internalType: 'uint256', - name: 'epoch', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'rebase', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'totalStakedBefore', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'totalStakedAfter', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'amountRebased', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'index', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'blockNumberOccured', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'renounceManagement', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_INDEX', - type: 'uint256', - }, - ], - name: 'setIndex', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'stakingContract', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'from', - type: 'address', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type OlympusSOhmV1Token = typeof olympusSOhmV1TokenAbi; -export type OlympusSOhmV1TokenContract = GetContractReturnType; - -export class OlympusSOhmV1Token__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: olympusSOhmV1TokenAbi, publicClient: client }); - } -} diff --git a/src/apps/olympus/contracts/viem/OlympusWsOhmV1Token.ts b/src/apps/olympus/contracts/viem/OlympusWsOhmV1Token.ts deleted file mode 100644 index 18aba1b41..000000000 --- a/src/apps/olympus/contracts/viem/OlympusWsOhmV1Token.ts +++ /dev/null @@ -1,386 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const olympusWsOhmV1TokenAbi = [ - { - inputs: [ - { - internalType: 'address', - name: '_sOHM', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'sOHM', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'sOHMTowOHM', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'unwrap', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'wOHMTosOHM', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'wrap', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type OlympusWsOhmV1Token = typeof olympusWsOhmV1TokenAbi; -export type OlympusWsOhmV1TokenContract = GetContractReturnType; - -export class OlympusWsOhmV1Token__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: olympusWsOhmV1TokenAbi, publicClient: client }); - } -} diff --git a/src/apps/olympus/contracts/viem/index.ts b/src/apps/olympus/contracts/viem/index.ts index 66e7ad4c4..af70b36df 100644 --- a/src/apps/olympus/contracts/viem/index.ts +++ b/src/apps/olympus/contracts/viem/index.ts @@ -3,21 +3,13 @@ /* eslint-disable */ export type { OlympusBoostedLiquidityManager } from './OlympusBoostedLiquidityManager'; -export type { OlympusGOhmToken } from './OlympusGOhmToken'; export type { OlympusLiquidityRegistry } from './OlympusLiquidityRegistry'; -export type { OlympusSOhmToken } from './OlympusSOhmToken'; -export type { OlympusSOhmV1Token } from './OlympusSOhmV1Token'; export type { OlympusV1BondDepository } from './OlympusV1BondDepository'; export type { OlympusV2BondDepository } from './OlympusV2BondDepository'; -export type { OlympusWsOhmV1Token } from './OlympusWsOhmV1Token'; export type { OlympusZapperZap } from './OlympusZapperZap'; export { OlympusBoostedLiquidityManager__factory } from './OlympusBoostedLiquidityManager'; -export { OlympusGOhmToken__factory } from './OlympusGOhmToken'; export { OlympusLiquidityRegistry__factory } from './OlympusLiquidityRegistry'; -export { OlympusSOhmToken__factory } from './OlympusSOhmToken'; -export { OlympusSOhmV1Token__factory } from './OlympusSOhmV1Token'; export { OlympusV1BondDepository__factory } from './OlympusV1BondDepository'; export { OlympusV2BondDepository__factory } from './OlympusV2BondDepository'; -export { OlympusWsOhmV1Token__factory } from './OlympusWsOhmV1Token'; export { OlympusZapperZap__factory } from './OlympusZapperZap'; diff --git a/src/apps/olympus/ethereum/olympus.g-ohm.token-fetcher.ts b/src/apps/olympus/ethereum/olympus.g-ohm.token-fetcher.ts deleted file mode 100644 index b3ded3be6..000000000 --- a/src/apps/olympus/ethereum/olympus.g-ohm.token-fetcher.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { Inject } from '@nestjs/common'; -import { BigNumber } from 'ethers'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { - GetDataPropsParams, - GetPricePerShareParams, - GetUnderlyingTokensParams, -} from '~position/template/app-token.template.types'; - -import { OlympusViemContractFactory } from '../contracts'; -import { OlympusGOhmToken } from '../contracts/viem'; - -@PositionTemplate() -export class EthereumOlympusGOhmTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'gOHM'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(OlympusViemContractFactory) protected readonly contractFactory: OlympusViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.olympusGOhmToken({ address, network: this.network }); - } - - async getAddresses() { - return ['0x0ab87046fbb341d058f17cbc4c1133f25a20a52f']; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.sOHM(), network: this.network }]; - } - - async getPricePerShare({ contract, appToken }: GetPricePerShareParams) { - const oneOhm = BigNumber.from(1).mul(10).pow(appToken.tokens[0].decimals).toString(); - const [gOhmDecimalsRaw, gOhmConvertedAmountRaw] = await Promise.all([ - contract.read.decimals(), - contract.read.balanceTo([BigInt(oneOhm)]), - ]); - - const convertedAmount = Number(gOhmConvertedAmountRaw) / 10 ** gOhmDecimalsRaw; - const pricePerShare = 1 / convertedAmount; - return [pricePerShare]; - } - - async getLiquidity({ appToken, multicall }: GetDataPropsParams) { - const underlyingToken = appToken.tokens[0]; - const reserveAddress = '0xb63cac384247597756545b500253ff8e607a8020'; - const underlyingTokenContract = this.appToolkit.globalViemContracts.erc20({ - address: underlyingToken.address, - network: this.network, - }); - - const reserveRaw = await multicall.wrap(underlyingTokenContract).read.balanceOf([reserveAddress]); - const reserve = Number(reserveRaw) / 10 ** underlyingToken.decimals; - return reserve * underlyingToken.price; - } - - async getReserves({ appToken, multicall }: GetDataPropsParams) { - const underlyingToken = appToken.tokens[0]; - const reserveAddress = '0xb63cac384247597756545b500253ff8e607a8020'; - const underlyingTokenContract = this.appToolkit.globalViemContracts.erc20({ - address: underlyingToken.address, - network: this.network, - }); - - const reserveRaw = await multicall.wrap(underlyingTokenContract).read.balanceOf([reserveAddress]); - return [Number(reserveRaw) / 10 ** underlyingToken.decimals]; - } - - async getApy() { - return 0; - } -} diff --git a/src/apps/olympus/ethereum/olympus.s-ohm-v1.token-fetcher.ts b/src/apps/olympus/ethereum/olympus.s-ohm-v1.token-fetcher.ts deleted file mode 100644 index e3a2092a4..000000000 --- a/src/apps/olympus/ethereum/olympus.s-ohm-v1.token-fetcher.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetDataPropsParams } from '~position/template/app-token.template.types'; - -import { OlympusViemContractFactory } from '../contracts'; -import { OlympusSOhmV1Token } from '../contracts/viem'; - -@PositionTemplate() -export class EthereumOlympusSOhmV1TokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'sOHM v1'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(OlympusViemContractFactory) protected readonly contractFactory: OlympusViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.olympusSOhmV1Token({ address, network: this.network }); - } - - async getAddresses() { - return ['0x04f2694c8fcee23e8fd0dfea1d4f5bb8c352111f']; - } - - async getUnderlyingTokenDefinitions() { - return [{ address: '0x383518188c0c6d7730d91b2c03a03c837814a899', network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } - - async getLiquidity({ appToken, multicall }: GetDataPropsParams) { - const underlyingToken = appToken.tokens[0]; - const reserveAddress = '0xfd31c7d00ca47653c6ce64af53c1571f9c36566a'; - const underlyingTokenContract = this.appToolkit.globalViemContracts.erc20({ - address: underlyingToken.address, - network: this.network, - }); - - const reserveRaw = await multicall.wrap(underlyingTokenContract).read.balanceOf([reserveAddress]); - const reserve = Number(reserveRaw) / 10 ** underlyingToken.decimals; - return reserve * underlyingToken.price; - } - - async getReserves({ appToken, multicall }: GetDataPropsParams) { - const underlyingToken = appToken.tokens[0]; - const reserveAddress = '0xfd31c7d00ca47653c6ce64af53c1571f9c36566a'; - const underlyingTokenContract = this.appToolkit.globalViemContracts.erc20({ - address: underlyingToken.address, - network: this.network, - }); - - const reserveRaw = await multicall.wrap(underlyingTokenContract).read.balanceOf([reserveAddress]); - return [Number(reserveRaw) / 10 ** underlyingToken.decimals]; - } -} diff --git a/src/apps/olympus/ethereum/olympus.s-ohm.token-fetcher.ts b/src/apps/olympus/ethereum/olympus.s-ohm.token-fetcher.ts deleted file mode 100644 index 650199a30..000000000 --- a/src/apps/olympus/ethereum/olympus.s-ohm.token-fetcher.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetDataPropsParams } from '~position/template/app-token.template.types'; - -import { OlympusViemContractFactory } from '../contracts'; -import { OlympusSOhmToken } from '../contracts/viem'; - -@PositionTemplate() -export class EthereumOlympusSOhmTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'sOHM v2'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(OlympusViemContractFactory) protected readonly contractFactory: OlympusViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.olympusSOhmToken({ address, network: this.network }); - } - - async getAddresses() { - return ['0x04906695d6d12cf5459975d7c3c03356e4ccd460']; - } - - async getUnderlyingTokenDefinitions() { - return [{ address: '0x64aa3364f17a4d01c6f1751fd97c2bd3d7e7f1d5', network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } - - async getLiquidity({ appToken, multicall }: GetDataPropsParams) { - const underlyingToken = appToken.tokens[0]; - const reserveAddress = '0xb63cac384247597756545b500253ff8e607a8020'; - const underlyingTokenContract = this.appToolkit.globalViemContracts.erc20({ - address: underlyingToken.address, - network: this.network, - }); - - const reserveRaw = await multicall.wrap(underlyingTokenContract).read.balanceOf([reserveAddress]); - const reserve = Number(reserveRaw) / 10 ** underlyingToken.decimals; - return reserve * underlyingToken.price; - } - - async getReserves({ appToken, multicall }: GetDataPropsParams) { - const underlyingToken = appToken.tokens[0]; - const reserveAddress = '0xb63cac384247597756545b500253ff8e607a8020'; - const underlyingTokenContract = this.appToolkit.globalViemContracts.erc20({ - address: underlyingToken.address, - network: this.network, - }); - - const reserveRaw = await multicall.wrap(underlyingTokenContract).read.balanceOf([reserveAddress]); - return [Number(reserveRaw) / 10 ** underlyingToken.decimals]; - } -} diff --git a/src/apps/olympus/ethereum/olympus.ws-ohm-v1.token-fetcher.ts b/src/apps/olympus/ethereum/olympus.ws-ohm-v1.token-fetcher.ts deleted file mode 100644 index 5a1565f71..000000000 --- a/src/apps/olympus/ethereum/olympus.ws-ohm-v1.token-fetcher.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetPricePerShareParams, GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; - -import { OlympusViemContractFactory } from '../contracts'; -import { OlympusWsOhmV1Token } from '../contracts/viem'; - -@PositionTemplate() -export class EthereumOlympusWsOhmV1TokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'wsOHM v1'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(OlympusViemContractFactory) protected readonly contractFactory: OlympusViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.olympusWsOhmV1Token({ address, network: this.network }); - } - - async getAddresses() { - return ['0xca76543cf381ebbb277be79574059e32108e3e65']; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.sOHM(), network: this.network }]; - } - - async getPricePerShare({ appToken, multicall }: GetPricePerShareParams) { - const reserveRaw = await multicall - .wrap(this.appToolkit.globalViemContracts.erc20(appToken.tokens[0])) - .read.balanceOf([appToken.address]); - const reserve = Number(reserveRaw) / 10 ** appToken.tokens[0].decimals; - const pricePerShare = reserve / appToken.supply; - return [pricePerShare]; - } -} diff --git a/src/apps/olympus/olympus.module.ts b/src/apps/olympus/olympus.module.ts index 9519c9510..a30bad482 100644 --- a/src/apps/olympus/olympus.module.ts +++ b/src/apps/olympus/olympus.module.ts @@ -9,10 +9,6 @@ import { AvalancheOlympusWsOhmV1TokenFetcher } from './avalanche/olympus.ws-ohm- import { OlympusViemContractFactory } from './contracts'; import { EthereumOlympusBondContractPositionFetcher } from './ethereum/olympus.bond.contract-position-fetcher'; import { EthereumOlympusBleContractPositionFetcher } from './ethereum/olympus.boosted-liquidity.contract-position-fetcher'; -import { EthereumOlympusGOhmTokenFetcher } from './ethereum/olympus.g-ohm.token-fetcher'; -import { EthereumOlympusSOhmV1TokenFetcher } from './ethereum/olympus.s-ohm-v1.token-fetcher'; -import { EthereumOlympusSOhmTokenFetcher } from './ethereum/olympus.s-ohm.token-fetcher'; -import { EthereumOlympusWsOhmV1TokenFetcher } from './ethereum/olympus.ws-ohm-v1.token-fetcher'; import { FantomOlympusGOhmTokenFetcher } from './fantom/olympus.g-ohm.token-fetcher'; import { PolygonOlympusGOhmTokenFetcher } from './polygon/olympus.g-ohm.token-fetcher'; @@ -24,10 +20,6 @@ import { PolygonOlympusGOhmTokenFetcher } from './polygon/olympus.g-ohm.token-fe AvalancheOlympusWsOhmV1TokenFetcher, EthereumOlympusBleContractPositionFetcher, EthereumOlympusBondContractPositionFetcher, - EthereumOlympusGOhmTokenFetcher, - EthereumOlympusSOhmTokenFetcher, - EthereumOlympusSOhmV1TokenFetcher, - EthereumOlympusWsOhmV1TokenFetcher, FantomOlympusGOhmTokenFetcher, OlympusViemContractFactory, PolygonOlympusGOhmTokenFetcher, diff --git a/src/apps/ooki/arbitrum/ooki.lend.token-fetcher.ts b/src/apps/ooki/arbitrum/ooki.lend.token-fetcher.ts deleted file mode 100644 index 0d89137c4..000000000 --- a/src/apps/ooki/arbitrum/ooki.lend.token-fetcher.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetPricePerShareParams, GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; - -import { OokiViemContractFactory } from '../contracts'; -import { OokiIToken } from '../contracts/viem'; - -@PositionTemplate() -export class ArbitrumOokiLendTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Lending'; - - tokenRegistryAddress = '0x86003099131d83944d826f8016e09cc678789a30'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(OokiViemContractFactory) protected readonly contractFactory: OokiViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.ookiIToken({ address, network: this.network }); - } - - async getAddresses(): Promise { - const registryContract = this.contractFactory.ookiTokenRegistry({ - network: this.network, - address: this.tokenRegistryAddress, - }); - - const tokenAddresses = await registryContract.read.getTokens([BigInt(0), BigInt(100)]); - return tokenAddresses.map(v => v.token); - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.loanTokenAddress(), network: this.network }]; - } - - async getPricePerShare({ contract }: GetPricePerShareParams) { - const exchangeRateRaw = await contract.read.tokenPrice(); - const exchangeRate = Number(exchangeRateRaw) / 10 ** 18; - return [exchangeRate]; - } -} diff --git a/src/apps/ooki/assets/logo.png b/src/apps/ooki/assets/logo.png deleted file mode 100644 index b1156a595..000000000 Binary files a/src/apps/ooki/assets/logo.png and /dev/null differ diff --git a/src/apps/ooki/binance-smart-chain/ooki.lend.token-fetcher.ts b/src/apps/ooki/binance-smart-chain/ooki.lend.token-fetcher.ts deleted file mode 100644 index 95d04c8c2..000000000 --- a/src/apps/ooki/binance-smart-chain/ooki.lend.token-fetcher.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetPricePerShareParams, GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; - -import { OokiViemContractFactory } from '../contracts'; -import { OokiIToken } from '../contracts/viem'; - -@PositionTemplate() -export class BinanceSmartChainOokiLendTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Lending'; - - tokenRegistryAddress = '0x1be70f29d30bb1d325e5d76ee73109de3e50a57d'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(OokiViemContractFactory) protected readonly contractFactory: OokiViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.ookiIToken({ address, network: this.network }); - } - - async getAddresses(): Promise { - const registryContract = this.contractFactory.ookiTokenRegistry({ - network: this.network, - address: this.tokenRegistryAddress, - }); - - const tokenAddresses = await registryContract.read.getTokens([BigInt(0), BigInt(100)]); - return tokenAddresses.map(v => v.token); - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.loanTokenAddress(), network: this.network }]; - } - - async getPricePerShare({ contract }: GetPricePerShareParams) { - const exchangeRateRaw = await contract.read.tokenPrice(); - const exchangeRate = Number(exchangeRateRaw) / 10 ** 18; - return [exchangeRate]; - } -} diff --git a/src/apps/ooki/contracts/abis/ooki-i-token.json b/src/apps/ooki/contracts/abis/ooki-i-token.json deleted file mode 100644 index 94bd1f56b..000000000 --- a/src/apps/ooki/contracts/abis/ooki-i-token.json +++ /dev/null @@ -1,956 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "burner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokenAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "assetAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "price", - "type": "uint256" - } - ], - "name": "Burn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "loanToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "loanAmount", - "type": "uint256" - } - ], - "name": "FlashBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokenAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "assetAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "price", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "sig", - "type": "bytes4" - } - ], - "name": "_isPaused", - "outputs": [ - { - "internalType": "bool", - "name": "isPaused", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_owner", - "type": "address" - } - ], - "name": "assetBalanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "loanId", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "withdrawAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "initialLoanDuration", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "collateralTokenSent", - "type": "uint256" - }, - { - "internalType": "address", - "name": "collateralTokenAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "borrow", - "outputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "loanId", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "principal", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "collateral", - "type": "uint256" - } - ], - "internalType": "struct IToken.LoanOpenData", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "borrowInterestRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "burnAmount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [ - { - "internalType": "uint256", - "name": "loanAmountPaid", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "burnAmount", - "type": "uint256" - } - ], - "name": "burnToEther", - "outputs": [ - { - "internalType": "uint256", - "name": "loanAmountPaid", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newGuardian", - "type": "address" - } - ], - "name": "changeGuardian", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_user", - "type": "address" - } - ], - "name": "checkpointPrice", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "flashBorrow", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "getGuardian", - "outputs": [ - { - "internalType": "address", - "name": "guardian", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getPoolUtilization", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialPrice", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "loanParamsIds", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "loanTokenAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "loanId", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "leverageAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "loanTokenSent", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "collateralTokenSent", - "type": "uint256" - }, - { - "internalType": "address", - "name": "collateralTokenAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "trader", - "type": "address" - }, - { - "internalType": "bytes", - "name": "loanDataBytes", - "type": "bytes" - } - ], - "name": "marginTrade", - "outputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "loanId", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "principal", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "collateral", - "type": "uint256" - } - ], - "internalType": "struct IToken.LoanOpenData", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "depositAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "mintWithEther", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "nextBorrowInterestRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "int256", - "name": "supplyAmount", - "type": "int256" - } - ], - "name": "nextSupplyInterestRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "profitOf", - "outputs": [ - { - "internalType": "int256", - "name": "", - "type": "int256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_loanTokenAddress", - "type": "address" - } - ], - "name": "revokeApproval", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_newTarget", - "type": "address" - } - ], - "name": "setTarget", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "supplyInterestRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "sig", - "type": "bytes4" - } - ], - "name": "toggleFunctionPause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "sig", - "type": "bytes4" - } - ], - "name": "toggleFunctionUnPause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "tokenPrice", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalAssetBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalAssetSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "assetSupply", - "type": "uint256" - } - ], - "name": "totalSupplyInterestRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newFeePercent", - "type": "uint256" - } - ], - "name": "updateFlashBorrowFeePercent", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "settingsTarget", - "type": "address" - }, - { - "internalType": "bytes", - "name": "callData", - "type": "bytes" - } - ], - "name": "updateSettings", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/ooki/contracts/abis/ooki-token-registry.json b/src/apps/ooki/contracts/abis/ooki-token-registry.json deleted file mode 100644 index 1c8681f3f..000000000 --- a/src/apps/ooki/contracts/abis/ooki-token-registry.json +++ /dev/null @@ -1,55 +0,0 @@ -[ - { - "constant": true, - "inputs": [], - "name": "bZxContract", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "_start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_count", - "type": "uint256" - } - ], - "name": "getTokens", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "asset", - "type": "address" - } - ], - "internalType": "struct TokenRegistry.TokenMetadata[]", - "name": "metadata", - "type": "tuple[]" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } -] diff --git a/src/apps/ooki/contracts/index.ts b/src/apps/ooki/contracts/index.ts deleted file mode 100644 index 5dcfebdf6..000000000 --- a/src/apps/ooki/contracts/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * from './viem.contract-factory'; diff --git a/src/apps/ooki/contracts/viem.contract-factory.ts b/src/apps/ooki/contracts/viem.contract-factory.ts deleted file mode 100644 index bb10ba553..000000000 --- a/src/apps/ooki/contracts/viem.contract-factory.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Injectable, Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { Network } from '~types/network.interface'; - -import { OokiIToken__factory, OokiTokenRegistry__factory } from './viem'; - -type ContractOpts = { address: string; network: Network }; - -@Injectable() -export class OokiViemContractFactory { - constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - - ookiIToken({ address, network }: ContractOpts) { - return OokiIToken__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - ookiTokenRegistry({ address, network }: ContractOpts) { - return OokiTokenRegistry__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } -} diff --git a/src/apps/ooki/contracts/viem/OokiIToken.ts b/src/apps/ooki/contracts/viem/OokiIToken.ts deleted file mode 100644 index 8cffa7f4e..000000000 --- a/src/apps/ooki/contracts/viem/OokiIToken.ts +++ /dev/null @@ -1,970 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const ookiITokenAbi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'burner', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'tokenAmount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'assetAmount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'price', - type: 'uint256', - }, - ], - name: 'Burn', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'borrower', - type: 'address', - }, - { - indexed: false, - internalType: 'address', - name: 'target', - type: 'address', - }, - { - indexed: false, - internalType: 'address', - name: 'loanToken', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'loanAmount', - type: 'uint256', - }, - ], - name: 'FlashBorrow', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'minter', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'tokenAmount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'assetAmount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'price', - type: 'uint256', - }, - ], - name: 'Mint', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - inputs: [ - { - internalType: 'bytes4', - name: 'sig', - type: 'bytes4', - }, - ], - name: '_isPaused', - outputs: [ - { - internalType: 'bool', - name: 'isPaused', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_owner', - type: 'address', - }, - ], - name: 'assetBalanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'loanId', - type: 'bytes32', - }, - { - internalType: 'uint256', - name: 'withdrawAmount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'initialLoanDuration', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'collateralTokenSent', - type: 'uint256', - }, - { - internalType: 'address', - name: 'collateralTokenAddress', - type: 'address', - }, - { - internalType: 'address', - name: 'borrower', - type: 'address', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - { - internalType: 'bytes', - name: '', - type: 'bytes', - }, - ], - name: 'borrow', - outputs: [ - { - components: [ - { - internalType: 'bytes32', - name: 'loanId', - type: 'bytes32', - }, - { - internalType: 'uint256', - name: 'principal', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'collateral', - type: 'uint256', - }, - ], - internalType: 'struct IToken.LoanOpenData', - name: '', - type: 'tuple', - }, - ], - stateMutability: 'payable', - type: 'function', - }, - { - inputs: [], - name: 'borrowInterestRate', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - { - internalType: 'uint256', - name: 'burnAmount', - type: 'uint256', - }, - ], - name: 'burn', - outputs: [ - { - internalType: 'uint256', - name: 'loanAmountPaid', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address payable', - name: 'receiver', - type: 'address', - }, - { - internalType: 'uint256', - name: 'burnAmount', - type: 'uint256', - }, - ], - name: 'burnToEther', - outputs: [ - { - internalType: 'uint256', - name: 'loanAmountPaid', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newGuardian', - type: 'address', - }, - ], - name: 'changeGuardian', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_user', - type: 'address', - }, - ], - name: 'checkpointPrice', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'borrowAmount', - type: 'uint256', - }, - { - internalType: 'address', - name: 'borrower', - type: 'address', - }, - { - internalType: 'address', - name: 'target', - type: 'address', - }, - { - internalType: 'string', - name: 'signature', - type: 'string', - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - ], - name: 'flashBorrow', - outputs: [ - { - internalType: 'bytes', - name: '', - type: 'bytes', - }, - ], - stateMutability: 'payable', - type: 'function', - }, - { - inputs: [], - name: 'getGuardian', - outputs: [ - { - internalType: 'address', - name: 'guardian', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getPoolUtilization', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'initialPrice', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'loanParamsIds', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'loanTokenAddress', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'loanId', - type: 'bytes32', - }, - { - internalType: 'uint256', - name: 'leverageAmount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'loanTokenSent', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'collateralTokenSent', - type: 'uint256', - }, - { - internalType: 'address', - name: 'collateralTokenAddress', - type: 'address', - }, - { - internalType: 'address', - name: 'trader', - type: 'address', - }, - { - internalType: 'bytes', - name: 'loanDataBytes', - type: 'bytes', - }, - ], - name: 'marginTrade', - outputs: [ - { - components: [ - { - internalType: 'bytes32', - name: 'loanId', - type: 'bytes32', - }, - { - internalType: 'uint256', - name: 'principal', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'collateral', - type: 'uint256', - }, - ], - internalType: 'struct IToken.LoanOpenData', - name: '', - type: 'tuple', - }, - ], - stateMutability: 'payable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - { - internalType: 'uint256', - name: 'depositAmount', - type: 'uint256', - }, - ], - name: 'mint', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - ], - name: 'mintWithEther', - outputs: [], - stateMutability: 'payable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'borrowAmount', - type: 'uint256', - }, - ], - name: 'nextBorrowInterestRate', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'int256', - name: 'supplyAmount', - type: 'int256', - }, - ], - name: 'nextSupplyInterestRate', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'owner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'user', - type: 'address', - }, - ], - name: 'profitOf', - outputs: [ - { - internalType: 'int256', - name: '', - type: 'int256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_loanTokenAddress', - type: 'address', - }, - ], - name: 'revokeApproval', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_newTarget', - type: 'address', - }, - ], - name: 'setTarget', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'supplyInterestRate', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes4', - name: 'sig', - type: 'bytes4', - }, - ], - name: 'toggleFunctionPause', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes4', - name: 'sig', - type: 'bytes4', - }, - ], - name: 'toggleFunctionUnPause', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'tokenPrice', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalAssetBorrow', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalAssetSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'assetSupply', - type: 'uint256', - }, - ], - name: 'totalSupplyInterestRate', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'transferOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'newFeePercent', - type: 'uint256', - }, - ], - name: 'updateFlashBorrowFeePercent', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'settingsTarget', - type: 'address', - }, - { - internalType: 'bytes', - name: 'callData', - type: 'bytes', - }, - ], - name: 'updateSettings', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type OokiIToken = typeof ookiITokenAbi; -export type OokiITokenContract = GetContractReturnType; - -export class OokiIToken__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: ookiITokenAbi, publicClient: client }); - } -} diff --git a/src/apps/ooki/contracts/viem/OokiTokenRegistry.ts b/src/apps/ooki/contracts/viem/OokiTokenRegistry.ts deleted file mode 100644 index 0fbdcf24a..000000000 --- a/src/apps/ooki/contracts/viem/OokiTokenRegistry.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const ookiTokenRegistryAbi = [ - { - constant: true, - inputs: [], - name: 'bZxContract', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'uint256', - name: '_start', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_count', - type: 'uint256', - }, - ], - name: 'getTokens', - outputs: [ - { - components: [ - { - internalType: 'address', - name: 'token', - type: 'address', - }, - { - internalType: 'address', - name: 'asset', - type: 'address', - }, - ], - internalType: 'struct TokenRegistry.TokenMetadata[]', - name: 'metadata', - type: 'tuple[]', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, -] as const; - -export type OokiTokenRegistry = typeof ookiTokenRegistryAbi; -export type OokiTokenRegistryContract = GetContractReturnType; - -export class OokiTokenRegistry__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: ookiTokenRegistryAbi, publicClient: client }); - } -} diff --git a/src/apps/ooki/contracts/viem/index.ts b/src/apps/ooki/contracts/viem/index.ts deleted file mode 100644 index 9e0f79c25..000000000 --- a/src/apps/ooki/contracts/viem/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -export type { OokiIToken } from './OokiIToken'; -export type { OokiTokenRegistry } from './OokiTokenRegistry'; - -export { OokiIToken__factory } from './OokiIToken'; -export { OokiTokenRegistry__factory } from './OokiTokenRegistry'; diff --git a/src/apps/ooki/ethereum/ooki.lend.token-fetcher.ts b/src/apps/ooki/ethereum/ooki.lend.token-fetcher.ts deleted file mode 100644 index 521d3406d..000000000 --- a/src/apps/ooki/ethereum/ooki.lend.token-fetcher.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetPricePerShareParams, GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; - -import { OokiViemContractFactory } from '../contracts'; -import { OokiIToken } from '../contracts/viem'; - -@PositionTemplate() -export class EthereumOokiLendTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Lending'; - - tokenRegistryAddress = '0xf0e474592b455579fe580d610b846bdbb529c6f7'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(OokiViemContractFactory) protected readonly contractFactory: OokiViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.ookiIToken({ address, network: this.network }); - } - - async getAddresses(): Promise { - const registryContract = this.contractFactory.ookiTokenRegistry({ - network: this.network, - address: this.tokenRegistryAddress, - }); - - const tokenAddresses = await registryContract.read.getTokens([BigInt(0), BigInt(100)]); - return tokenAddresses.map(v => v.token); - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.loanTokenAddress(), network: this.network }]; - } - - async getPricePerShare({ contract }: GetPricePerShareParams) { - const exchangeRateRaw = await contract.read.tokenPrice(); - const exchangeRate = Number(exchangeRateRaw) / 10 ** 18; - return [exchangeRate]; - } -} diff --git a/src/apps/ooki/ooki.module.ts b/src/apps/ooki/ooki.module.ts deleted file mode 100644 index d81812440..000000000 --- a/src/apps/ooki/ooki.module.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Module } from '@nestjs/common'; - -import { AbstractApp } from '~app/app.dynamic-module'; - -import { ArbitrumOokiLendTokenFetcher } from './arbitrum/ooki.lend.token-fetcher'; -import { BinanceSmartChainOokiLendTokenFetcher } from './binance-smart-chain/ooki.lend.token-fetcher'; -import { OokiViemContractFactory } from './contracts'; -import { EthereumOokiLendTokenFetcher } from './ethereum/ooki.lend.token-fetcher'; -import { OptimismOokiLendTokenFetcher } from './optimism/ooki.lend.token-fetcher'; -import { PolygonOokiLendTokenFetcher } from './polygon/ooki.lend.token-fetcher'; - -@Module({ - providers: [ - ArbitrumOokiLendTokenFetcher, - BinanceSmartChainOokiLendTokenFetcher, - EthereumOokiLendTokenFetcher, - OptimismOokiLendTokenFetcher, - PolygonOokiLendTokenFetcher, - - OokiViemContractFactory, - ], -}) -export class OokiAppModule extends AbstractApp() {} diff --git a/src/apps/ooki/optimism/ooki.lend.token-fetcher.ts b/src/apps/ooki/optimism/ooki.lend.token-fetcher.ts deleted file mode 100644 index 5fc36aa4e..000000000 --- a/src/apps/ooki/optimism/ooki.lend.token-fetcher.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetPricePerShareParams, GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; - -import { OokiViemContractFactory } from '../contracts'; -import { OokiIToken } from '../contracts/viem'; - -@PositionTemplate() -export class OptimismOokiLendTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Lending'; - - tokenRegistryAddress = '0x22a2208eeedeb1e2156370fd1c1c081355c68f2b'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(OokiViemContractFactory) protected readonly contractFactory: OokiViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.ookiIToken({ address, network: this.network }); - } - - async getAddresses(): Promise { - const registryContract = this.contractFactory.ookiTokenRegistry({ - network: this.network, - address: this.tokenRegistryAddress, - }); - - const tokenAddresses = await registryContract.read.getTokens([BigInt(0), BigInt(100)]); - return tokenAddresses.map(v => v.token); - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.loanTokenAddress(), network: this.network }]; - } - - async getPricePerShare({ contract }: GetPricePerShareParams) { - const exchangeRateRaw = await contract.read.tokenPrice(); - const exchangeRate = Number(exchangeRateRaw) / 10 ** 18; - return [exchangeRate]; - } -} diff --git a/src/apps/ooki/polygon/ooki.lend.token-fetcher.ts b/src/apps/ooki/polygon/ooki.lend.token-fetcher.ts deleted file mode 100644 index 8dfad9050..000000000 --- a/src/apps/ooki/polygon/ooki.lend.token-fetcher.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetPricePerShareParams, GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; - -import { OokiViemContractFactory } from '../contracts'; -import { OokiIToken } from '../contracts/viem'; - -@PositionTemplate() -export class PolygonOokiLendTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Lending'; - - tokenRegistryAddress = '0x4b234781af34e9fd756c27a47675cbba19dc8765'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(OokiViemContractFactory) protected readonly contractFactory: OokiViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.ookiIToken({ address, network: this.network }); - } - - async getAddresses(): Promise { - const registryContract = this.contractFactory.ookiTokenRegistry({ - network: this.network, - address: this.tokenRegistryAddress, - }); - - const tokenAddresses = await registryContract.read.getTokens([BigInt(0), BigInt(100)]); - return tokenAddresses.map(v => v.token); - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.loanTokenAddress(), network: this.network }]; - } - - async getPricePerShare({ contract }: GetPricePerShareParams) { - const exchangeRateRaw = await contract.read.tokenPrice(); - const exchangeRate = Number(exchangeRateRaw) / 10 ** 18; - return [exchangeRate]; - } -} diff --git a/src/apps/plutus/arbitrum/plutus.plv-glp.token-fetcher.ts b/src/apps/plutus/arbitrum/plutus.plv-glp.token-fetcher.ts deleted file mode 100644 index 061e3a721..000000000 --- a/src/apps/plutus/arbitrum/plutus.plv-glp.token-fetcher.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { Inject } from '@nestjs/common'; -import { BigNumber } from 'ethers'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { - GetDataPropsParams, - GetPricePerShareParams, - GetUnderlyingTokensParams, -} from '~position/template/app-token.template.types'; - -import { PlutusViemContractFactory } from '../contracts'; -import { PlutusPlvGlp } from '../contracts/viem/PlutusPlvGlp'; - -@PositionTemplate() -export class ArbitrumPlutusPlvGlpTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'plvGLP'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(PlutusViemContractFactory) protected readonly contractFactory: PlutusViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.plutusPlvGlp({ address, network: this.network }); - } - - getAddresses() { - return ['0x5326e71ff593ecc2cf7acae5fe57582d6e74cff1']; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.asset(), network: this.network }]; - } - - async getPricePerShare({ contract }: GetPricePerShareParams) { - const oneUnit = BigNumber.from(10).pow(18).toString(); - const pricePerShareRaw = await contract.read.convertToAssets([BigInt(oneUnit)]); - const pricePerShare = Number(pricePerShareRaw) / 10 ** 18; - return [pricePerShare]; - } - - async getLiquidity({ appToken, contract }: GetDataPropsParams) { - const reserveRaw = await contract.read.totalAssets(); - const reserve = Number(reserveRaw) / 10 ** appToken.tokens[0].decimals; - const liquidity = reserve * appToken.tokens[0].price; - return liquidity; - } - - async getReserves({ appToken, contract }: GetDataPropsParams) { - const reserveRaw = await contract.read.totalAssets(); - const reserve = Number(reserveRaw) / 10 ** appToken.tokens[0].decimals; - return [reserve]; - } -} diff --git a/src/apps/plutus/plutus.module.ts b/src/apps/plutus/plutus.module.ts index 8c76d75c8..9fac4b75b 100644 --- a/src/apps/plutus/plutus.module.ts +++ b/src/apps/plutus/plutus.module.ts @@ -16,7 +16,6 @@ import { ArbitrumPlutusLockContractPositionFetcher } from './arbitrum/plutus.loc import { ArbitrumPlutusPlsDpxTokenFetcher } from './arbitrum/plutus.pls-dpx.token-fetcher'; import { ArbitrumPlutusPlsRdntTokenFetcher } from './arbitrum/plutus.pls-rdnt.token-fetcher'; import { ArbitrumPlutusPlsSpaTokenFetcher } from './arbitrum/plutus.pls-spa.token-fetcher'; -import { ArbitrumPlutusPlvGlpTokenFetcher } from './arbitrum/plutus.plv-glp.token-fetcher'; import { ArbitrumPlutusTgeClaimableContractPositionFetcher } from './arbitrum/plutus.tge-claimable.contract-position-fetcher'; import { ArbitrumPlutusVaultTokenFetcher } from './arbitrum/plutus.vault.token-fetcher'; import { PlutusViemContractFactory } from './contracts'; @@ -35,7 +34,6 @@ import { PlutusViemContractFactory } from './contracts'; ArbitrumPlutusFarmPlsLpContractPositionFetcher, ArbitrumPlutusLockContractPositionFetcher, ArbitrumPlutusVaultTokenFetcher, - ArbitrumPlutusPlvGlpTokenFetcher, ArbitrumPlutusTgeClaimableContractPositionFetcher, ArbitrumPlutusFarmPlsRdntContractPositionFetcher, // plsASSETs diff --git a/src/apps/qi-dao/contracts/abis/qi-dao-yield-token.json b/src/apps/qi-dao/contracts/abis/qi-dao-yield-token.json deleted file mode 100644 index e3b86da5f..000000000 --- a/src/apps/qi-dao/contracts/abis/qi-dao-yield-token.json +++ /dev/null @@ -1,314 +0,0 @@ -[ - { - "inputs": [ - { "internalType": "address", "name": "amToken", "type": "address" }, - { "internalType": "address", "name": "underlying", "type": "address" }, - { "internalType": "string", "name": "name", "type": "string" }, - { "internalType": "string", "name": "symbol", "type": "string" }, - { "internalType": "uint8", "name": "decimals", "type": "uint8" } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "AaveContract", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "LENDING_POOL", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "Token", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "aave", - "outputs": [{ "internalType": "address", "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": "account", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "claimAaveRewards", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } - ], - "name": "decreaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "depositFeeBP", - "outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "internalType": "uint256", "name": "_amount", "type": "uint256" }], - "name": "enter", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "harvestMaticIntoToken", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "addedValue", "type": "uint256" } - ], - "name": "increaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "internalType": "uint256", "name": "_share", "type": "uint256" }], - "name": "leave", - "outputs": [], - "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": "operator", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "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": "recipient", "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": "sender", "type": "address" }, - { "internalType": "address", "name": "recipient", "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": "treasury", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "uni", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "internalType": "uint16", "name": "_depositFee", "type": "uint16" }], - "name": "updateDepositFee", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "internalType": "address", "name": "_operator", "type": "address" }], - "name": "updateOperator", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "internalType": "address", "name": "_treasury", "type": "address" }], - "name": "updateTreasury", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "internalType": "address", "name": "_router", "type": "address" }], - "name": "updateUniV2Router", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "wMatic", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "weth", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - } -] diff --git a/src/apps/qi-dao/contracts/viem.contract-factory.ts b/src/apps/qi-dao/contracts/viem.contract-factory.ts index ddd07f61e..471bd77d1 100644 --- a/src/apps/qi-dao/contracts/viem.contract-factory.ts +++ b/src/apps/qi-dao/contracts/viem.contract-factory.ts @@ -10,7 +10,6 @@ import { QiDaoMasterChefV3__factory, QiDaoVaultInfo__factory, QiDaoVaultNft__factory, - QiDaoYieldToken__factory, } from './viem'; type ContractOpts = { address: string; network: Network }; @@ -37,7 +36,4 @@ export class QiDaoViemContractFactory { qiDaoVaultNft({ address, network }: ContractOpts) { return QiDaoVaultNft__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } - qiDaoYieldToken({ address, network }: ContractOpts) { - return QiDaoYieldToken__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } } diff --git a/src/apps/qi-dao/contracts/viem/QiDaoYieldToken.ts b/src/apps/qi-dao/contracts/viem/QiDaoYieldToken.ts deleted file mode 100644 index c864b56ac..000000000 --- a/src/apps/qi-dao/contracts/viem/QiDaoYieldToken.ts +++ /dev/null @@ -1,598 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const qiDaoYieldTokenAbi = [ - { - inputs: [ - { - internalType: 'address', - name: 'amToken', - type: 'address', - }, - { - internalType: 'address', - name: 'underlying', - type: 'address', - }, - { - internalType: 'string', - name: 'name', - type: 'string', - }, - { - internalType: 'string', - name: 'symbol', - type: 'string', - }, - { - internalType: 'uint8', - name: 'decimals', - type: 'uint8', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - constant: true, - inputs: [], - name: 'AaveContract', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'LENDING_POOL', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'Token', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'aave', - outputs: [ - { - internalType: 'address', - 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: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [], - name: 'claimAaveRewards', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'depositFeeBP', - outputs: [ - { - internalType: 'uint16', - name: '', - type: 'uint16', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'enter', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [], - name: 'harvestMaticIntoToken', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'uint256', - name: '_share', - type: 'uint256', - }, - ], - name: 'leave', - outputs: [], - 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: 'operator', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - 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: 'recipient', - 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: 'sender', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - 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: 'treasury', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'uni', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'uint16', - name: '_depositFee', - type: 'uint16', - }, - ], - name: 'updateDepositFee', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address', - name: '_operator', - type: 'address', - }, - ], - name: 'updateOperator', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address', - name: '_treasury', - type: 'address', - }, - ], - name: 'updateTreasury', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address', - name: '_router', - type: 'address', - }, - ], - name: 'updateUniV2Router', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'wMatic', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'weth', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, -] as const; - -export type QiDaoYieldToken = typeof qiDaoYieldTokenAbi; -export type QiDaoYieldTokenContract = GetContractReturnType; - -export class QiDaoYieldToken__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: qiDaoYieldTokenAbi, publicClient: client }); - } -} diff --git a/src/apps/qi-dao/contracts/viem/index.ts b/src/apps/qi-dao/contracts/viem/index.ts index f1bd37256..d5b908fc0 100644 --- a/src/apps/qi-dao/contracts/viem/index.ts +++ b/src/apps/qi-dao/contracts/viem/index.ts @@ -8,7 +8,6 @@ export type { QiDaoMasterChefV3 } from './QiDaoMasterChefV3'; export type { QiDaoMasterChef } from './QiDaoMasterChef'; export type { QiDaoVaultInfo } from './QiDaoVaultInfo'; export type { QiDaoVaultNft } from './QiDaoVaultNft'; -export type { QiDaoYieldToken } from './QiDaoYieldToken'; export { QiDaoAnchorVault__factory } from './QiDaoAnchorVault'; export { QiDaoEscrowedQi__factory } from './QiDaoEscrowedQi'; @@ -16,4 +15,3 @@ export { QiDaoMasterChefV3__factory } from './QiDaoMasterChefV3'; export { QiDaoMasterChef__factory } from './QiDaoMasterChef'; export { QiDaoVaultInfo__factory } from './QiDaoVaultInfo'; export { QiDaoVaultNft__factory } from './QiDaoVaultNft'; -export { QiDaoYieldToken__factory } from './QiDaoYieldToken'; diff --git a/src/apps/qi-dao/polygon/qi-dao.yield.token-fetcher.ts b/src/apps/qi-dao/polygon/qi-dao.yield.token-fetcher.ts deleted file mode 100644 index 881bba2f7..000000000 --- a/src/apps/qi-dao/polygon/qi-dao.yield.token-fetcher.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetUnderlyingTokensParams, GetPricePerShareParams } from '~position/template/app-token.template.types'; - -import { QiDaoViemContractFactory } from '../contracts'; -import { QiDaoYieldToken } from '../contracts/viem'; - -@PositionTemplate() -export class PolygonQiDaoYieldTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Yield Tokens'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(QiDaoViemContractFactory) protected readonly contractFactory: QiDaoViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.qiDaoYieldToken({ address, network: this.network }); - } - - async getAddresses() { - return [ - '0x22965e296d9a0cd0e917d6d70ef2573009f8a1bb', // camUSDC - '0x7068ea5255cb05931efa8026bd04b18f3deb8b0b', // camWMATIC - '0xe6c23289ba5a9f0ef31b8eb36241d5c800889b7b', // camDAI - '0x0470cd31c8fcc42671465880ba81d631f0b76c1d', // camWETH - '0xb3911259f435b28ec072e4ff6ff5a2c604fea0fb', // camUSDT - '0xea4040b21cb68afb94889cb60834b13427cfc4eb', // camAAVE - '0xba6273a78a23169e01317bd0f6338547f869e8df', // camWBTC - ]; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.Token(), network: this.network }]; - } - - async getPricePerShare({ appToken }: GetPricePerShareParams) { - const underlyingToken = appToken.tokens[0]; - const underlyingTokenContract = this.appToolkit.globalViemContracts.erc20({ - address: underlyingToken.address, - network: this.network, - }); - - const reserveRaw = await underlyingTokenContract.read.balanceOf([appToken.address]); - const reserve = Number(reserveRaw) / 10 ** underlyingToken.decimals; - const pricePerShare = reserve / appToken.supply; - - return [pricePerShare]; - } -} diff --git a/src/apps/qi-dao/qi-dao.module.ts b/src/apps/qi-dao/qi-dao.module.ts index 732fa5be9..1ca8e2437 100644 --- a/src/apps/qi-dao/qi-dao.module.ts +++ b/src/apps/qi-dao/qi-dao.module.ts @@ -18,7 +18,6 @@ import { PolygonQiDaoEscrowedQiContractPositionFetcher } from './polygon/qi-dao. import { PolygonQiDaoFarmV3ContractPositionFetcher } from './polygon/qi-dao.farm-v3.contract-position-fetcher'; import { PolygonQiDaoFarmContractPositionFetcher } from './polygon/qi-dao.farm.contract-position-fetcher'; import { PolygonQiDaoVaultPositionFetcher } from './polygon/qi-dao.vault.contract-position-fetcher'; -import { PolygonQiDaoYieldTokenFetcher } from './polygon/qi-dao.yield.token-fetcher'; @Module({ providers: [ @@ -46,7 +45,6 @@ import { PolygonQiDaoYieldTokenFetcher } from './polygon/qi-dao.yield.token-fetc PolygonQiDaoFarmContractPositionFetcher, PolygonQiDaoFarmV3ContractPositionFetcher, PolygonQiDaoVaultPositionFetcher, - PolygonQiDaoYieldTokenFetcher, ], }) export class QiDaoAppModule extends AbstractApp() {} diff --git a/src/apps/rigoblock/arbitrum/rigoblock.pool.contract-position-fetcher.ts b/src/apps/rigoblock/arbitrum/rigoblock.pool.contract-position-fetcher.ts deleted file mode 100644 index 2da5b1cad..000000000 --- a/src/apps/rigoblock/arbitrum/rigoblock.pool.contract-position-fetcher.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { RigoblockPoolContractPositionFetcher } from '../common/rigoblock.pool.contract-position-fetcher'; - -@PositionTemplate() -export class ArbitrumRigoblockPoolContractPositionFetcher extends RigoblockPoolContractPositionFetcher { - groupLabel = 'Smart Pools'; - - positionManagerAddress = '0xc36442b4a4522e871399cd717abdd847ab11fe88'; - factoryAddress = '0x1f98431c8ad98523631ae4a59f267346ea31f984'; -} diff --git a/src/apps/rigoblock/arbitrum/rigoblock.pool.token-fetcher.ts b/src/apps/rigoblock/arbitrum/rigoblock.pool.token-fetcher.ts deleted file mode 100644 index 28c400a27..000000000 --- a/src/apps/rigoblock/arbitrum/rigoblock.pool.token-fetcher.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { RigoblockPoolTokenFetcher } from '../common/rigoblock.pool.token-fetcher'; - -@PositionTemplate() -export class ArbitrumRigoblockPoolTokenFetcher extends RigoblockPoolTokenFetcher { - groupLabel = 'Smart Pools'; -} diff --git a/src/apps/rigoblock/assets/logo.png b/src/apps/rigoblock/assets/logo.png deleted file mode 100644 index 59e4adf73..000000000 Binary files a/src/apps/rigoblock/assets/logo.png and /dev/null differ diff --git a/src/apps/rigoblock/common/rigoblock.log-provider.ts b/src/apps/rigoblock/common/rigoblock.log-provider.ts deleted file mode 100644 index 4a6ce1e02..000000000 --- a/src/apps/rigoblock/common/rigoblock.log-provider.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { Inject, Injectable } from '@nestjs/common'; -import { duration } from 'moment'; - -import { Cache } from '~cache/cache.decorator'; -import { Network } from '~types'; - -import { RigoblockViemContractFactory } from '../contracts'; - -export enum PoolLogType { - REGISTERED = 'registered', - TOKEN_WHITELISTED = 'whitelisted', -} - -@Injectable() -export class RigoblockLogProvider { - constructor(@Inject(RigoblockViemContractFactory) private readonly contractFactory: RigoblockViemContractFactory) {} - - @Cache({ - key: ({ network, address, fromBlock }: { network: Network; fromBlock: number; address: string }) => - `rigoblock:${network}:rigoblock-logs:${address}:${fromBlock}:registered`, - ttl: duration(8, 'hours').asSeconds(), - }) - async getRigoblockRegisteredLogs({ - fromBlock, - network, - address, - }: { - address: string; - network: Network; - fromBlock: number; - }) { - const contract = this.contractFactory.poolRegistry({ network, address }); - const logs = await contract.getEvents.Registered({}, { fromBlock: BigInt(fromBlock) }); - return logs; - } - - @Cache({ - key: ({ network, address, fromBlock }: { network: Network; fromBlock: number; address: string }) => - `rigoblock:${network}:rigoblock-logs:${address}:${fromBlock}:whitelisted`, - ttl: duration(8, 'hours').asSeconds(), - }) - async getRigoblockWhitelistedLogs({ - fromBlock, - network, - address, - }: { - address: string; - network: Network; - fromBlock: number; - }) { - const contract = this.contractFactory.tokenWhitelist({ network, address }); - const logs = await contract.getEvents.Whitelisted({}, { fromBlock: BigInt(fromBlock) }); - return logs; - } -} diff --git a/src/apps/rigoblock/common/rigoblock.pool.contract-position-fetcher.ts b/src/apps/rigoblock/common/rigoblock.pool.contract-position-fetcher.ts deleted file mode 100644 index 33f99b8d4..000000000 --- a/src/apps/rigoblock/common/rigoblock.pool.contract-position-fetcher.ts +++ /dev/null @@ -1,149 +0,0 @@ -import { Inject } from '@nestjs/common'; -import { compact, range, sumBy } from 'lodash'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { UniswapV3LiquidityContractPositionBuilder } from '~apps/uniswap-v3/common/uniswap-v3.liquidity.contract-position-builder'; -import { UniswapV3LiquidityPositionDataProps } from '~apps/uniswap-v3/common/uniswap-v3.liquidity.contract-position-fetcher'; -import { UniswapV3ViemContractFactory } from '~apps/uniswap-v3/contracts'; -import { ContractPositionBalance } from '~position/position-balance.interface'; -import { MetaType } from '~position/position.interface'; -import { ContractPositionTemplatePositionFetcher } from '~position/template/contract-position.template.position-fetcher'; - -import { RigoblockViemContractFactory } from '../contracts'; -import { SmartPool } from '../contracts/viem'; - -export type UnderlyingLiquidityPositionTokens = { - address: string; - balance: number; - balanceRaw: string; - balanceUSD: number; -}; - -export type RigoblockLiquidityDataProps = { - liquidity: number; - liquidityPositions: UnderlyingLiquidityPositionTokens[]; -}; - -export type RigoblockPoolAppTokenDefinition = { - address: string; - label: string; - underlyingTokenBalances: ContractPositionBalance[]; -}; - -export abstract class RigoblockPoolContractPositionFetcher extends ContractPositionTemplatePositionFetcher< - SmartPool, - RigoblockLiquidityDataProps, - RigoblockPoolAppTokenDefinition -> { - abstract positionManagerAddress: string; - abstract groupLabel: string; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(RigoblockViemContractFactory) protected readonly rigoblockContractFactory: RigoblockViemContractFactory, - @Inject(UniswapV3ViemContractFactory) protected readonly contractFactory: UniswapV3ViemContractFactory, - @Inject(UniswapV3LiquidityContractPositionBuilder) - protected readonly uniswapV3LiquidityContractPositionBuilder: UniswapV3LiquidityContractPositionBuilder, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.rigoblockContractFactory.smartPool({ address, network: this.network }); - } - - async getDefinitions(): Promise { - const appTokens = await this.appToolkit.getAppTokenPositions({ - appId: this.appId, - network: this.network, - groupIds: ['pool'], - }); - - return await Promise.all( - appTokens.map(async pool => { - const underlyingTokenBalances = await this.getUnderlyingBalances(pool.address); - return { - address: pool.address, - label: pool.displayProps.label, - underlyingTokenBalances: underlyingTokenBalances, - }; - }), - ); - } - - // we define the liquidity position of a rigoblock pool - async getTokenDefinitions({ definition }) { - return definition.underlyingTokenBalances - .map(balance => { - return balance.tokens.map(token => { - return [ - { - metaType: MetaType.SUPPLIED, - address: token.address, - network: this.network, - }, - ]; - }); - }) - .flat(2); - } - - async getDataProps({ definition }): Promise { - const liquidityBalances = definition.underlyingTokenBalances; - const liquidityPositions: UnderlyingLiquidityPositionTokens[] = liquidityBalances - .map(balance => { - return balance.tokens.map(token => { - return { - address: token.address, - balance: token.balance, - balanceRaw: token.balanceRaw, - balanceUSD: token.balanceUSD, - }; - }); - }) - .flat(1); - const liquidity = sumBy(liquidityPositions, v => v.balanceUSD); - return { - liquidity: liquidity, - liquidityPositions: liquidityPositions, - }; - } - - async getLabel({ definition }) { - return definition.label; - } - - async getTokenBalancesPerPosition({ contractPosition }) { - const { dataProps } = contractPosition; - return dataProps.liquidityPositions.map(v => v.balanceRaw); - } - - async getUnderlyingBalances( - address: string, - ): Promise[]> { - // @TODO: Rely on contract positions when we can correctly index all pools - const multicall = this.appToolkit.getViemMulticall(this.network); - const tokenLoader = this.appToolkit.getTokenDependencySelector({ - tags: { network: this.network, context: `${this.appId}__template_balances` }, - }); - - const positionManager = this.contractFactory.uniswapV3PositionManager({ - address: this.positionManagerAddress, - network: this.network, - }); - - const numPositionsRaw = await positionManager.read.balanceOf([address]); - const balances = await Promise.all( - range(0, Number(numPositionsRaw)).map(async index => - this.uniswapV3LiquidityContractPositionBuilder.buildPosition({ - positionId: await multicall.wrap(positionManager).read.tokenOfOwnerByIndex([address, BigInt(index)]), - network: this.network, - multicall, - tokenLoader, - }), - ), - ); - - return compact(balances); - } -} diff --git a/src/apps/rigoblock/common/rigoblock.pool.pool-builders.ts b/src/apps/rigoblock/common/rigoblock.pool.pool-builders.ts deleted file mode 100644 index 322d8f452..000000000 --- a/src/apps/rigoblock/common/rigoblock.pool.pool-builders.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Network } from '~types'; - -export const POOL_BUILDERS: Partial< - Record< - Network, - { - registryAddress: string; - tokenWhitelistAddress: string; - blockNumber: number; - }[] - > -> = { - [Network.ETHEREUM_MAINNET]: [ - { - registryAddress: '0x06767e8090ba5c4eca89ed00c3a719909d503ed6', - tokenWhitelistAddress: '0xb43bad2638696f8bc82247b92bd56b8df37d89ab', - blockNumber: 15817831, - }, - ], - [Network.POLYGON_MAINNET]: [ - { - registryAddress: '0x06767e8090ba5c4eca89ed00c3a719909d503ed6', - tokenWhitelistAddress: '0xb43bad2638696f8bc82247b92bd56b8df37d89ab', - blockNumber: 34751673, - }, - ], - [Network.ARBITRUM_MAINNET]: [ - { - registryAddress: '0x06767e8090ba5c4eca89ed00c3a719909d503ed6', - tokenWhitelistAddress: '0xb43bad2638696f8bc82247b92bd56b8df37d89ab', - blockNumber: 32290603, - }, - ], - [Network.OPTIMISM_MAINNET]: [ - { - registryAddress: '0x06767e8090ba5c4eca89ed00c3a719909d503ed6', - tokenWhitelistAddress: '0xb43bad2638696f8bc82247b92bd56b8df37d89ab', - blockNumber: 31239008, - }, - ], -}; diff --git a/src/apps/rigoblock/common/rigoblock.pool.token-fetcher.ts b/src/apps/rigoblock/common/rigoblock.pool.token-fetcher.ts deleted file mode 100644 index 9bb6a1f75..000000000 --- a/src/apps/rigoblock/common/rigoblock.pool.token-fetcher.ts +++ /dev/null @@ -1,200 +0,0 @@ -import { parseBytes32String } from '@ethersproject/strings'; -import { Inject } from '@nestjs/common'; -import { compact } from 'lodash'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { ZERO_ADDRESS } from '~app-toolkit/constants/address'; -import { DefaultDataProps } from '~position/display.interface'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { - GetAddressesParams, - DefaultAppTokenDefinition, - GetDisplayPropsParams, - GetPricePerShareParams, - DefaultAppTokenDataProps, -} from '~position/template/app-token.template.types'; -import { BaseToken } from '~position/token.interface'; - -import { RigoblockViemContractFactory } from '../contracts'; -import { SmartPool } from '../contracts/viem'; - -import { PoolLogType, RigoblockLogProvider } from './rigoblock.log-provider'; -import { POOL_BUILDERS } from './rigoblock.pool.pool-builders'; - -type RigoblockSmartPoolDefinition = DefaultAppTokenDefinition & { - logType: PoolLogType; - address: string; - name: string; - tokenList?: WhitelistedTokenDefinition[]; -}; - -type WhitelistedTokenDefinition = DefaultAppTokenDefinition & { - logType?: PoolLogType; - address: string; -}; - -type RToken = BaseToken & { - hide: boolean; -}; - -export abstract class RigoblockPoolTokenFetcher extends AppTokenTemplatePositionFetcher< - SmartPool, - DefaultAppTokenDataProps, - RigoblockSmartPoolDefinition -> { - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(RigoblockViemContractFactory) private readonly contractFactory: RigoblockViemContractFactory, - @Inject(RigoblockLogProvider) private readonly logProvider: RigoblockLogProvider, - ) { - super(appToolkit); - } - - extraDefinitions: RigoblockSmartPoolDefinition[] = []; - - async getDefinitions(): Promise { - const poolBuilders = POOL_BUILDERS[this.network] ?? []; - // we query tracked tokens here to save redundant calls - const tokenList = await this.getTokenList(); - - // Get all logs for each pool builder contract - const builderLogs = await Promise.all( - poolBuilders.map(({ registryAddress, blockNumber }) => - this.logProvider.getRigoblockRegisteredLogs({ - fromBlock: blockNumber, - address: registryAddress.toLowerCase(), - network: this.network, - }), - ), - ); - - const definitions = await Promise.all( - builderLogs.flatMap(logs => - logs.map(async log => { - const poolAddress = log.args.pool!.toLowerCase(); - const name = log.args.name!.toLowerCase(); - - return { - logType: PoolLogType.REGISTERED, - address: poolAddress, - name: parseBytes32String(name), - tokenList, - }; - }), - ), - ); - - return [...definitions, ...this.extraDefinitions]; - } - - async getAddresses({ definitions }: GetAddressesParams): Promise { - return definitions.map(definition => definition.address); - } - - getContract(address: string) { - return this.contractFactory.smartPool({ address, network: this.network }); - } - - // whitelisted tokens are filtered by those that are not tracked - async getTokenList(): Promise { - const tokenList = [...new Set(await this.getTokenWhitelist())]; - tokenList.push({ address: ZERO_ADDRESS }); - const baseTokens = (await this.appToolkit.getBaseTokenPrices(this.network)) as RToken[]; - const trackedTokens = tokenList.map(token => { - const tokenFound = baseTokens.find(p => p.address === token.address && !p.hide); - if (!tokenFound) return null; - return token; - }); - return compact(trackedTokens); - } - - async getTokenWhitelist(): Promise { - const tokenBuilders = POOL_BUILDERS[this.network] ?? []; - - const tokenLogs = await Promise.all( - tokenBuilders.map(({ tokenWhitelistAddress, blockNumber }) => - this.logProvider.getRigoblockWhitelistedLogs({ - fromBlock: blockNumber, - address: tokenWhitelistAddress.toLowerCase(), - network: this.network, - }), - ), - ); - - return await Promise.all( - tokenLogs.flatMap(logs => - logs.map(async log => { - const tokenAddress = log.args.token!.toLowerCase(); - - return { - logType: PoolLogType.TOKEN_WHITELISTED, - address: tokenAddress, - }; - }), - ), - ); - } - - async getUnderlyingTokenDefinitions({ - multicall, - definition, - }: GetDisplayPropsParams) { - // this block returns only held tokens. However, it would require less RPC calls to just multicall - // all tokens and display in UI only tokens with positive balances. - const tokens = definition.tokenList; - if (!tokens || tokens?.length === 0) return []; - const heldTokens: WhitelistedTokenDefinition[] = []; - for (let i = 0; i !== tokens.length; i++) { - if (tokens[i].address !== ZERO_ADDRESS) { - const uTokenContract = this.appToolkit.globalViemContracts.erc20({ - address: tokens[i].address, - network: this.network, - }); - const poolTokenBalance = await multicall.wrap(uTokenContract).read.balanceOf([definition.address]); - if (poolTokenBalance && Number(poolTokenBalance) > 0) { - heldTokens[i] = tokens[i]; - } - } else { - const ethBalance = await multicall.wrap(multicall.contract).read.getEthBalance([definition.address]); - if (ethBalance && Number(ethBalance) > 0) { - heldTokens[i] = tokens[i]; - } - } - } - - return compact(heldTokens).map(x => ({ address: x.address.toLowerCase(), network: this.network })); - } - - async getPricePerShare({ - appToken, - multicall, - }: GetPricePerShareParams) { - if (appToken.supply === 0) return appToken.tokens.map(() => 0); - - const reserves = await Promise.all( - appToken.tokens.map(async token => { - if (token.address === ZERO_ADDRESS) { - const ethBalance = await multicall.wrap(multicall.contract).read.getEthBalance([appToken.address]); - return Number(ethBalance) / 10 ** 18; - } - const uTokenContract = this.appToolkit.globalViemContracts.erc20({ - address: token.address, - network: this.network, - }); - const reserveRaw = await multicall.wrap(uTokenContract).read.balanceOf([appToken.address]); - const reserve = Number(reserveRaw) / 10 ** token.decimals; - return reserve; - }), - ); - - return reserves.map(r => { - return r == 0 ? 0 : r / appToken.supply; - }); - } - - async getLabel({ - definition, - }: GetDisplayPropsParams): Promise { - return definition.name; - } -} diff --git a/src/apps/rigoblock/contracts/abis/governance.json b/src/apps/rigoblock/contracts/abis/governance.json deleted file mode 100644 index 7a51fc70f..000000000 --- a/src/apps/rigoblock/contracts/abis/governance.json +++ /dev/null @@ -1,318 +0,0 @@ -[ - { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "proposer", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "proposalId", "type": "uint256" }, - { - "components": [ - { "internalType": "address", "name": "target", "type": "address" }, - { "internalType": "bytes", "name": "data", "type": "bytes" }, - { "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "indexed": false, - "internalType": "struct IGovernanceVoting.ProposedAction[]", - "name": "actions", - "type": "tuple[]" - }, - { "indexed": false, "internalType": "uint256", "name": "startBlockOrTime", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "endBlockOrTime", "type": "uint256" }, - { "indexed": false, "internalType": "string", "name": "description", "type": "string" } - ], - "name": "ProposalCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256", "name": "proposalId", "type": "uint256" }], - "name": "ProposalExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "address", "name": "newStrategy", "type": "address" }], - "name": "StrategyUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "uint256", "name": "proposalThreshold", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "quorumThreshold", "type": "uint256" } - ], - "name": "ThresholdsUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": true, "internalType": "address", "name": "newImplementation", "type": "address" }], - "name": "Upgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "voter", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "proposalId", "type": "uint256" }, - { "indexed": false, "internalType": "enum IGovernanceVoting.VoteType", "name": "voteType", "type": "uint8" }, - { "indexed": false, "internalType": "uint256", "name": "votingPower", "type": "uint256" } - ], - "name": "VoteCast", - "type": "event" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "proposalId", "type": "uint256" }, - { "internalType": "enum IGovernanceVoting.VoteType", "name": "voteType", "type": "uint8" } - ], - "name": "castVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "proposalId", "type": "uint256" }, - { "internalType": "enum IGovernanceVoting.VoteType", "name": "voteType", "type": "uint8" }, - { "internalType": "uint8", "name": "v", "type": "uint8" }, - { "internalType": "bytes32", "name": "r", "type": "bytes32" }, - { "internalType": "bytes32", "name": "s", "type": "bytes32" } - ], - "name": "castVoteBySignature", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "proposalId", "type": "uint256" }], - "name": "execute", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "proposalId", "type": "uint256" }], - "name": "getActions", - "outputs": [ - { - "components": [ - { "internalType": "address", "name": "target", "type": "address" }, - { "internalType": "bytes", "name": "data", "type": "bytes" }, - { "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "internalType": "struct IGovernanceVoting.ProposedAction[]", - "name": "proposedActions", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "proposalId", "type": "uint256" }], - "name": "getProposalById", - "outputs": [ - { - "components": [ - { - "components": [ - { "internalType": "uint256", "name": "actionsLength", "type": "uint256" }, - { "internalType": "uint256", "name": "startBlockOrTime", "type": "uint256" }, - { "internalType": "uint256", "name": "endBlockOrTime", "type": "uint256" }, - { "internalType": "uint256", "name": "votesFor", "type": "uint256" }, - { "internalType": "uint256", "name": "votesAgainst", "type": "uint256" }, - { "internalType": "uint256", "name": "votesAbstain", "type": "uint256" }, - { "internalType": "bool", "name": "executed", "type": "bool" } - ], - "internalType": "struct IGovernanceState.Proposal", - "name": "proposal", - "type": "tuple" - }, - { - "components": [ - { "internalType": "address", "name": "target", "type": "address" }, - { "internalType": "bytes", "name": "data", "type": "bytes" }, - { "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "internalType": "struct IGovernanceVoting.ProposedAction[]", - "name": "proposedAction", - "type": "tuple[]" - } - ], - "internalType": "struct IGovernanceState.ProposalWrapper", - "name": "proposalWrapper", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "proposalId", "type": "uint256" }], - "name": "getProposalState", - "outputs": [{ "internalType": "enum IGovernanceState.ProposalState", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "proposalId", "type": "uint256" }, - { "internalType": "address", "name": "voter", "type": "address" } - ], - "name": "getReceipt", - "outputs": [ - { - "components": [ - { "internalType": "bool", "name": "hasVoted", "type": "bool" }, - { "internalType": "uint96", "name": "votes", "type": "uint96" }, - { "internalType": "enum IGovernanceVoting.VoteType", "name": "voteType", "type": "uint8" } - ], - "internalType": "struct IGovernanceState.Receipt", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "getVotingPower", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governanceParameters", - "outputs": [ - { - "components": [ - { - "components": [ - { "internalType": "address", "name": "strategy", "type": "address" }, - { "internalType": "uint256", "name": "proposalThreshold", "type": "uint256" }, - { "internalType": "uint256", "name": "quorumThreshold", "type": "uint256" }, - { "internalType": "enum IGovernanceState.TimeType", "name": "timeType", "type": "uint8" } - ], - "internalType": "struct IGovernanceState.GovernanceParameters", - "name": "params", - "type": "tuple" - }, - { "internalType": "string", "name": "name", "type": "string" }, - { "internalType": "string", "name": "version", "type": "string" } - ], - "internalType": "struct IGovernanceState.EnhancedParams", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { "inputs": [], "name": "initializeGovernance", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proposalCount", - "outputs": [{ "internalType": "uint256", "name": "count", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proposals", - "outputs": [ - { - "components": [ - { - "components": [ - { "internalType": "uint256", "name": "actionsLength", "type": "uint256" }, - { "internalType": "uint256", "name": "startBlockOrTime", "type": "uint256" }, - { "internalType": "uint256", "name": "endBlockOrTime", "type": "uint256" }, - { "internalType": "uint256", "name": "votesFor", "type": "uint256" }, - { "internalType": "uint256", "name": "votesAgainst", "type": "uint256" }, - { "internalType": "uint256", "name": "votesAbstain", "type": "uint256" }, - { "internalType": "bool", "name": "executed", "type": "bool" } - ], - "internalType": "struct IGovernanceState.Proposal", - "name": "proposal", - "type": "tuple" - }, - { - "components": [ - { "internalType": "address", "name": "target", "type": "address" }, - { "internalType": "bytes", "name": "data", "type": "bytes" }, - { "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "internalType": "struct IGovernanceVoting.ProposedAction[]", - "name": "proposedAction", - "type": "tuple[]" - } - ], - "internalType": "struct IGovernanceState.ProposalWrapper[]", - "name": "proposalWrapper", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { "internalType": "address", "name": "target", "type": "address" }, - { "internalType": "bytes", "name": "data", "type": "bytes" }, - { "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "internalType": "struct IGovernanceVoting.ProposedAction[]", - "name": "actions", - "type": "tuple[]" - }, - { "internalType": "string", "name": "description", "type": "string" } - ], - "name": "propose", - "outputs": [{ "internalType": "uint256", "name": "proposalId", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "newProposalThreshold", "type": "uint256" }, - { "internalType": "uint256", "name": "newQuorumThreshold", "type": "uint256" } - ], - "name": "updateThresholds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "newImplementation", "type": "address" }], - "name": "upgradeImplementation", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "newStrategy", "type": "address" }], - "name": "upgradeStrategy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "votingPeriod", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - } -] diff --git a/src/apps/rigoblock/contracts/abis/grg-vault.json b/src/apps/rigoblock/contracts/abis/grg-vault.json deleted file mode 100644 index 090d7d438..000000000 --- a/src/apps/rigoblock/contracts/abis/grg-vault.json +++ /dev/null @@ -1,215 +0,0 @@ -[ - { - "inputs": [ - { "internalType": "address", "name": "_grgProxyAddress", "type": "address" }, - { "internalType": "address", "name": "_grgTokenAddress", "type": "address" } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "target", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "caller", "type": "address" } - ], - "name": "AuthorizedAddressAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "target", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "caller", "type": "address" } - ], - "name": "AuthorizedAddressRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "staker", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "address", "name": "grgProxyAddress", "type": "address" }], - "name": "GrgProxySet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "address", "name": "sender", "type": "address" }], - "name": "InCatastrophicFailureMode", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "address", "name": "stakingProxyAddress", "type": "address" }], - "name": "StakingProxySet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "staker", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "Withdraw", - "type": "event" - }, - { - "inputs": [{ "internalType": "address", "name": "target", "type": "address" }], - "name": "addAuthorizedAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "name": "authorities", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "authorized", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "staker", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "balanceOfGrgVault", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "staker", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "depositFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "enterCatastrophicFailure", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getAuthorizedAddresses", - "outputs": [{ "internalType": "address[]", "name": "", "type": "address[]" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "grgAssetProxy", - "outputs": [{ "internalType": "contract IAssetProxy", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "isInCatastrophicFailure", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "target", "type": "address" }], - "name": "removeAuthorizedAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "target", "type": "address" }, - { "internalType": "uint256", "name": "index", "type": "uint256" } - ], - "name": "removeAuthorizedAddressAtIndex", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_grgProxyAddress", "type": "address" }], - "name": "setGrgProxy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_stakingProxyAddress", "type": "address" }], - "name": "setStakingProxy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "stakingProxyAddress", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "staker", "type": "address" }], - "name": "withdrawAllFrom", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "staker", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "withdrawFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/rigoblock/contracts/abis/pool-registry.json b/src/apps/rigoblock/contracts/abis/pool-registry.json deleted file mode 100644 index 3fd7e1f4a..000000000 --- a/src/apps/rigoblock/contracts/abis/pool-registry.json +++ /dev/null @@ -1,112 +0,0 @@ -[ - { - "inputs": [ - { "internalType": "address", "name": "newAuthority", "type": "address" }, - { "internalType": "address", "name": "newRigoblockDao", "type": "address" } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [{ "indexed": true, "internalType": "address", "name": "authority", "type": "address" }], - "name": "AuthorityChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "pool", "type": "address" }, - { "indexed": true, "internalType": "bytes32", "name": "key", "type": "bytes32" }, - { "indexed": false, "internalType": "bytes32", "name": "value", "type": "bytes32" } - ], - "name": "MetaChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "group", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "pool", "type": "address" }, - { "indexed": true, "internalType": "bytes32", "name": "name", "type": "bytes32" }, - { "indexed": true, "internalType": "bytes32", "name": "symbol", "type": "bytes32" }, - { "indexed": false, "internalType": "bytes32", "name": "id", "type": "bytes32" } - ], - "name": "Registered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": true, "internalType": "address", "name": "rigoblockDao", "type": "address" }], - "name": "RigoblockDaoChanged", - "type": "event" - }, - { - "inputs": [], - "name": "authority", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "pool", "type": "address" }, - { "internalType": "bytes32", "name": "key", "type": "bytes32" } - ], - "name": "getMeta", - "outputs": [{ "internalType": "bytes32", "name": "poolMeta", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "pool", "type": "address" }], - "name": "getPoolIdFromAddress", - "outputs": [{ "internalType": "bytes32", "name": "poolId", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "pool", "type": "address" }, - { "internalType": "string", "name": "name", "type": "string" }, - { "internalType": "string", "name": "symbol", "type": "string" }, - { "internalType": "bytes32", "name": "poolId", "type": "bytes32" } - ], - "name": "register", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "rigoblockDao", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "newAuthority", "type": "address" }], - "name": "setAuthority", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "pool", "type": "address" }, - { "internalType": "bytes32", "name": "key", "type": "bytes32" }, - { "internalType": "bytes32", "name": "value", "type": "bytes32" } - ], - "name": "setMeta", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "newRigoblockDao", "type": "address" }], - "name": "setRigoblockDao", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/rigoblock/contracts/abis/smart-pool.json b/src/apps/rigoblock/contracts/abis/smart-pool.json deleted file mode 100644 index 9b57e50ad..000000000 --- a/src/apps/rigoblock/contracts/abis/smart-pool.json +++ /dev/null @@ -1,407 +0,0 @@ -[ - { - "inputs": [{ "internalType": "address", "name": "authority", "type": "address" }], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "pool", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "kycProvider", "type": "address" } - ], - "name": "KycProviderSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "pool", "type": "address" }, - { "indexed": false, "internalType": "uint48", "name": "minimumPeriod", "type": "uint48" } - ], - "name": "MinimumPeriodChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "pool", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "who", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "feeCollector", "type": "address" } - ], - "name": "NewCollector", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "pool", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "who", "type": "address" }, - { "indexed": false, "internalType": "uint16", "name": "transactionFee", "type": "uint16" } - ], - "name": "NewFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "poolOperator", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "pool", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "unitaryValue", "type": "uint256" } - ], - "name": "NewNav", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "old", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "current", "type": "address" } - ], - "name": "NewOwner", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "group", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "baseToken", "type": "address" }, - { "indexed": false, "internalType": "string", "name": "name", "type": "string" }, - { "indexed": false, "internalType": "bytes8", "name": "symbol", "type": "bytes8" } - ], - "name": "PoolInitialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "pool", "type": "address" }, - { "indexed": false, "internalType": "uint16", "name": "spread", "type": "uint16" } - ], - "name": "SpreadChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "Transfer", - "type": "event" - }, - { "stateMutability": "payable", "type": "fallback" }, - { - "inputs": [], - "name": "VERSION", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "spender", "type": "address" } - ], - "name": "allowance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "approve", - "outputs": [{ "internalType": "bool", "name": "success", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "authority", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "who", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "amountIn", "type": "uint256" }, - { "internalType": "uint256", "name": "amountOutMin", "type": "uint256" } - ], - "name": "burn", - "outputs": [{ "internalType": "uint256", "name": "netRevenue", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "feeCollector", "type": "address" }], - "name": "changeFeeCollector", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint48", "name": "minPeriod", "type": "uint48" }], - "name": "changeMinPeriod", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint16", "name": "newSpread", "type": "uint16" }], - "name": "changeSpread", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getPool", - "outputs": [ - { - "components": [ - { "internalType": "string", "name": "name", "type": "string" }, - { "internalType": "string", "name": "symbol", "type": "string" }, - { "internalType": "uint8", "name": "decimals", "type": "uint8" }, - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "baseToken", "type": "address" } - ], - "internalType": "struct IRigoblockV3PoolState.ReturnedPool", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getPoolParams", - "outputs": [ - { - "components": [ - { "internalType": "uint48", "name": "minPeriod", "type": "uint48" }, - { "internalType": "uint16", "name": "spread", "type": "uint16" }, - { "internalType": "uint16", "name": "transactionFee", "type": "uint16" }, - { "internalType": "address", "name": "feeCollector", "type": "address" }, - { "internalType": "address", "name": "kycProvider", "type": "address" } - ], - "internalType": "struct IRigoblockV3PoolState.PoolParams", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getPoolStorage", - "outputs": [ - { - "components": [ - { "internalType": "string", "name": "name", "type": "string" }, - { "internalType": "string", "name": "symbol", "type": "string" }, - { "internalType": "uint8", "name": "decimals", "type": "uint8" }, - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "baseToken", "type": "address" } - ], - "internalType": "struct IRigoblockV3PoolState.ReturnedPool", - "name": "poolInitParams", - "type": "tuple" - }, - { - "components": [ - { "internalType": "uint48", "name": "minPeriod", "type": "uint48" }, - { "internalType": "uint16", "name": "spread", "type": "uint16" }, - { "internalType": "uint16", "name": "transactionFee", "type": "uint16" }, - { "internalType": "address", "name": "feeCollector", "type": "address" }, - { "internalType": "address", "name": "kycProvider", "type": "address" } - ], - "internalType": "struct IRigoblockV3PoolState.PoolParams", - "name": "poolVariables", - "type": "tuple" - }, - { - "components": [ - { "internalType": "uint256", "name": "unitaryValue", "type": "uint256" }, - { "internalType": "uint256", "name": "totalSupply", "type": "uint256" } - ], - "internalType": "struct IRigoblockV3PoolState.PoolTokens", - "name": "poolTokensInfo", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getPoolTokens", - "outputs": [ - { - "components": [ - { "internalType": "uint256", "name": "unitaryValue", "type": "uint256" }, - { "internalType": "uint256", "name": "totalSupply", "type": "uint256" } - ], - "internalType": "struct IRigoblockV3PoolState.PoolTokens", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "offset", "type": "uint256" }, - { "internalType": "uint256", "name": "length", "type": "uint256" } - ], - "name": "getStorageAt", - "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256[]", "name": "slots", "type": "uint256[]" }], - "name": "getStorageSlotsAt", - "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "who", "type": "address" }], - "name": "getUserAccount", - "outputs": [ - { - "components": [ - { "internalType": "uint208", "name": "userBalance", "type": "uint208" }, - { "internalType": "uint48", "name": "activation", "type": "uint48" } - ], - "internalType": "struct IRigoblockV3PoolState.UserAccount", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { "inputs": [], "name": "initializePool", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amountIn", "type": "uint256" }, - { "internalType": "uint256", "name": "amountOutMin", "type": "uint256" } - ], - "name": "mint", - "outputs": [{ "internalType": "uint256", "name": "recipientAmount", "type": "uint256" }], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "kycProvider", "type": "address" }], - "name": "setKycProvider", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], - "name": "setOwner", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint16", "name": "transactionFee", "type": "uint16" }], - "name": "setTransactionFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "unitaryValue", "type": "uint256" }], - "name": "setUnitaryValue", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "success", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "from", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "success", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { "stateMutability": "payable", "type": "receive" } -] diff --git a/src/apps/rigoblock/contracts/abis/staking.json b/src/apps/rigoblock/contracts/abis/staking.json deleted file mode 100644 index 7697b647c..000000000 --- a/src/apps/rigoblock/contracts/abis/staking.json +++ /dev/null @@ -1,659 +0,0 @@ -[ - { - "inputs": [ - { "internalType": "address", "name": "grgVault", "type": "address" }, - { "internalType": "address", "name": "poolRegistry", "type": "address" }, - { "internalType": "address", "name": "rigoToken", "type": "address" } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "target", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "caller", "type": "address" } - ], - "name": "AuthorizedAddressAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "target", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "caller", "type": "address" } - ], - "name": "AuthorizedAddressRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "string", "name": "reason", "type": "string" }], - "name": "CatchStringEvent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "uint256", "name": "epoch", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "numPoolsToFinalize", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "rewardsAvailable", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "totalFeesCollected", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "totalWeightedStake", "type": "uint256" } - ], - "name": "EpochEnded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "uint256", "name": "epoch", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "rewardsPaid", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "rewardsRemaining", "type": "uint256" } - ], - "name": "EpochFinalized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256", "name": "grgAmount", "type": "uint256" }], - "name": "GrgMintEvent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "staker", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, - { "indexed": false, "internalType": "uint8", "name": "fromStatus", "type": "uint8" }, - { "indexed": true, "internalType": "bytes32", "name": "fromPool", "type": "bytes32" }, - { "indexed": false, "internalType": "uint8", "name": "toStatus", "type": "uint8" }, - { "indexed": true, "internalType": "bytes32", "name": "toPool", "type": "bytes32" } - ], - "name": "MoveStake", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "poolId", "type": "bytes32" }, - { "indexed": false, "internalType": "uint32", "name": "oldOperatorShare", "type": "uint32" }, - { "indexed": false, "internalType": "uint32", "name": "newOperatorShare", "type": "uint32" } - ], - "name": "OperatorShareDecreased", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "uint256", "name": "epochDurationInSeconds", "type": "uint256" }, - { "indexed": false, "internalType": "uint32", "name": "rewardDelegatedStakeWeight", "type": "uint32" }, - { "indexed": false, "internalType": "uint256", "name": "minimumPoolStake", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "cobbDouglasAlphaNumerator", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "cobbDouglasAlphaDenominator", "type": "uint256" } - ], - "name": "ParamsSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "address", "name": "exchangeAddress", "type": "address" }], - "name": "PopAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "address", "name": "exchangeAddress", "type": "address" }], - "name": "PopRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "rbPoolAddress", "type": "address" }, - { "indexed": true, "internalType": "bytes32", "name": "poolId", "type": "bytes32" } - ], - "name": "RbPoolStakingPoolSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "bytes", "name": "reason", "type": "bytes" }], - "name": "ReturnDataEvent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "uint256", "name": "epoch", "type": "uint256" }, - { "indexed": true, "internalType": "bytes32", "name": "poolId", "type": "bytes32" }, - { "indexed": false, "internalType": "uint256", "name": "operatorReward", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "membersReward", "type": "uint256" } - ], - "name": "RewardsPaid", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "staker", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "Stake", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "bytes32", "name": "poolId", "type": "bytes32" }, - { "indexed": false, "internalType": "address", "name": "operator", "type": "address" }, - { "indexed": false, "internalType": "uint32", "name": "operatorShare", "type": "uint32" } - ], - "name": "StakingPoolCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "uint256", "name": "epoch", "type": "uint256" }, - { "indexed": true, "internalType": "bytes32", "name": "poolId", "type": "bytes32" } - ], - "name": "StakingPoolEarnedRewardsInEpoch", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "staker", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "Unstake", - "type": "event" - }, - { - "inputs": [{ "internalType": "address", "name": "target", "type": "address" }], - "name": "addAuthorizedAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "addr", "type": "address" }], - "name": "addPopAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "name": "aggregatedStatsByEpoch", - "outputs": [ - { "internalType": "uint256", "name": "rewardsAvailable", "type": "uint256" }, - { "internalType": "uint256", "name": "numPoolsToFinalize", "type": "uint256" }, - { "internalType": "uint256", "name": "totalFeesCollected", "type": "uint256" }, - { "internalType": "uint256", "name": "totalWeightedStake", "type": "uint256" }, - { "internalType": "uint256", "name": "totalRewardsFinalized", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "name": "authorities", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "authorized", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "cobbDouglasAlphaDenominator", - "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "cobbDouglasAlphaNumerator", - "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "poolId", "type": "bytes32" }, - { "internalType": "address", "name": "member", "type": "address" } - ], - "name": "computeRewardBalanceOfDelegator", - "outputs": [{ "internalType": "uint256", "name": "reward", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "poolId", "type": "bytes32" }], - "name": "computeRewardBalanceOfOperator", - "outputs": [{ "internalType": "uint256", "name": "reward", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "rigoblockPoolAddress", "type": "address" }], - "name": "createStakingPool", - "outputs": [{ "internalType": "bytes32", "name": "poolId", "type": "bytes32" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "poolAccount", "type": "address" }, - { "internalType": "uint256", "name": "popReward", "type": "uint256" } - ], - "name": "creditPopReward", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "currentEpoch", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "currentEpochStartTimeInSeconds", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "poolId", "type": "bytes32" }, - { "internalType": "uint32", "name": "newOperatorShare", "type": "uint32" } - ], - "name": "decreaseStakingPoolOperatorShare", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "endEpoch", - "outputs": [{ "internalType": "uint256", "name": "numPoolsToFinalize", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "epochDurationInSeconds", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "poolId", "type": "bytes32" }], - "name": "finalizePool", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getAuthorizedAddresses", - "outputs": [{ "internalType": "address[]", "name": "", "type": "address[]" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getCurrentEpochEarliestEndTimeInSeconds", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "enum IStructs.StakeStatus", "name": "stakeStatus", "type": "uint8" }], - "name": "getGlobalStakeByStatus", - "outputs": [ - { - "components": [ - { "internalType": "uint64", "name": "currentEpoch", "type": "uint64" }, - { "internalType": "uint96", "name": "currentEpochBalance", "type": "uint96" }, - { "internalType": "uint96", "name": "nextEpochBalance", "type": "uint96" } - ], - "internalType": "struct IStructs.StoredBalance", - "name": "balance", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getGrgContract", - "outputs": [{ "internalType": "contract IRigoToken", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getGrgVault", - "outputs": [{ "internalType": "contract IGrgVault", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "staker", "type": "address" }, - { "internalType": "enum IStructs.StakeStatus", "name": "stakeStatus", "type": "uint8" } - ], - "name": "getOwnerStakeByStatus", - "outputs": [ - { - "components": [ - { "internalType": "uint64", "name": "currentEpoch", "type": "uint64" }, - { "internalType": "uint96", "name": "currentEpochBalance", "type": "uint96" }, - { "internalType": "uint96", "name": "nextEpochBalance", "type": "uint96" } - ], - "internalType": "struct IStructs.StoredBalance", - "name": "balance", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getParams", - "outputs": [ - { "internalType": "uint256", "name": "_epochDurationInSeconds", "type": "uint256" }, - { "internalType": "uint32", "name": "_rewardDelegatedStakeWeight", "type": "uint32" }, - { "internalType": "uint256", "name": "_minimumPoolStake", "type": "uint256" }, - { "internalType": "uint32", "name": "_cobbDouglasAlphaNumerator", "type": "uint32" }, - { "internalType": "uint32", "name": "_cobbDouglasAlphaDenominator", "type": "uint32" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getPoolRegistry", - "outputs": [{ "internalType": "contract IPoolRegistry", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "staker", "type": "address" }, - { "internalType": "bytes32", "name": "poolId", "type": "bytes32" } - ], - "name": "getStakeDelegatedToPoolByOwner", - "outputs": [ - { - "components": [ - { "internalType": "uint64", "name": "currentEpoch", "type": "uint64" }, - { "internalType": "uint96", "name": "currentEpochBalance", "type": "uint96" }, - { "internalType": "uint96", "name": "nextEpochBalance", "type": "uint96" } - ], - "internalType": "struct IStructs.StoredBalance", - "name": "balance", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "poolId", "type": "bytes32" }], - "name": "getStakingPool", - "outputs": [ - { - "components": [ - { "internalType": "address", "name": "operator", "type": "address" }, - { "internalType": "address", "name": "stakingPal", "type": "address" }, - { "internalType": "uint32", "name": "operatorShare", "type": "uint32" }, - { "internalType": "uint32", "name": "stakingPalShare", "type": "uint32" } - ], - "internalType": "struct IStructs.Pool", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "poolId", "type": "bytes32" }], - "name": "getStakingPoolStatsThisEpoch", - "outputs": [ - { - "components": [ - { "internalType": "uint256", "name": "feesCollected", "type": "uint256" }, - { "internalType": "uint256", "name": "weightedStake", "type": "uint256" }, - { "internalType": "uint256", "name": "membersStake", "type": "uint256" } - ], - "internalType": "struct IStructs.PoolStats", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "staker", "type": "address" }], - "name": "getTotalStake", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "poolId", "type": "bytes32" }], - "name": "getTotalStakeDelegatedToPool", - "outputs": [ - { - "components": [ - { "internalType": "uint64", "name": "currentEpoch", "type": "uint64" }, - { "internalType": "uint96", "name": "currentEpochBalance", "type": "uint96" }, - { "internalType": "uint96", "name": "nextEpochBalance", "type": "uint96" } - ], - "internalType": "struct IStructs.StoredBalance", - "name": "balance", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "grgReservedForPoolRewards", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { "inputs": [], "name": "init", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "minimumPoolStake", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { "internalType": "enum IStructs.StakeStatus", "name": "status", "type": "uint8" }, - { "internalType": "bytes32", "name": "poolId", "type": "bytes32" } - ], - "internalType": "struct IStructs.StakeInfo", - "name": "from", - "type": "tuple" - }, - { - "components": [ - { "internalType": "enum IStructs.StakeStatus", "name": "status", "type": "uint8" }, - { "internalType": "bytes32", "name": "poolId", "type": "bytes32" } - ], - "internalType": "struct IStructs.StakeInfo", - "name": "to", - "type": "tuple" - }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "moveStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "poolIdByRbPoolAccount", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" }, - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "name": "poolStatsByEpoch", - "outputs": [ - { "internalType": "uint256", "name": "feesCollected", "type": "uint256" }, - { "internalType": "uint256", "name": "weightedStake", "type": "uint256" }, - { "internalType": "uint256", "name": "membersStake", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "target", "type": "address" }], - "name": "removeAuthorizedAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "target", "type": "address" }, - { "internalType": "uint256", "name": "index", "type": "uint256" } - ], - "name": "removeAuthorizedAddressAtIndex", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "addr", "type": "address" }], - "name": "removePopAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "rewardDelegatedStakeWeight", - "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "name": "rewardsByPoolId", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "_epochDurationInSeconds", "type": "uint256" }, - { "internalType": "uint32", "name": "_rewardDelegatedStakeWeight", "type": "uint32" }, - { "internalType": "uint256", "name": "_minimumPoolStake", "type": "uint256" }, - { "internalType": "uint32", "name": "_cobbDouglasAlphaNumerator", "type": "uint32" }, - { "internalType": "uint32", "name": "_cobbDouglasAlphaDenominator", "type": "uint32" } - ], - "name": "setParams", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "poolId", "type": "bytes32" }, - { "internalType": "address", "name": "newStakingPalAddress", "type": "address" } - ], - "name": "setStakingPalAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], - "name": "stake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "stakingContract", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], - "name": "unstake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "validPops", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "poolId", "type": "bytes32" }], - "name": "withdrawDelegatorRewards", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/rigoblock/contracts/abis/token-whitelist.json b/src/apps/rigoblock/contracts/abis/token-whitelist.json deleted file mode 100644 index 7470857da..000000000 --- a/src/apps/rigoblock/contracts/abis/token-whitelist.json +++ /dev/null @@ -1,54 +0,0 @@ -[ - { - "inputs": [{ "internalType": "address", "name": "newAuthority", "type": "address" }], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "token", "type": "address" }, - { "indexed": false, "internalType": "bool", "name": "isWhitelisted", "type": "bool" } - ], - "name": "Whitelisted", - "type": "event" - }, - { - "inputs": [ - { "internalType": "address[]", "name": "tokens", "type": "address[]" }, - { "internalType": "bool[]", "name": "whitelisted", "type": "bool[]" } - ], - "name": "batchUpdateTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getAuthority", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "token", "type": "address" }], - "name": "isWhitelistedToken", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "token", "type": "address" }], - "name": "removeToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "token", "type": "address" }], - "name": "whitelistToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/rigoblock/contracts/index.ts b/src/apps/rigoblock/contracts/index.ts deleted file mode 100644 index 5dcfebdf6..000000000 --- a/src/apps/rigoblock/contracts/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * from './viem.contract-factory'; diff --git a/src/apps/rigoblock/contracts/viem.contract-factory.ts b/src/apps/rigoblock/contracts/viem.contract-factory.ts deleted file mode 100644 index e1263d849..000000000 --- a/src/apps/rigoblock/contracts/viem.contract-factory.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Injectable, Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { Network } from '~types/network.interface'; - -import { - Governance__factory, - GrgVault__factory, - PoolRegistry__factory, - SmartPool__factory, - Staking__factory, - TokenWhitelist__factory, -} from './viem'; - -type ContractOpts = { address: string; network: Network }; - -@Injectable() -export class RigoblockViemContractFactory { - constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - - governance({ address, network }: ContractOpts) { - return Governance__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - grgVault({ address, network }: ContractOpts) { - return GrgVault__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - poolRegistry({ address, network }: ContractOpts) { - return PoolRegistry__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - smartPool({ address, network }: ContractOpts) { - return SmartPool__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - staking({ address, network }: ContractOpts) { - return Staking__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - tokenWhitelist({ address, network }: ContractOpts) { - return TokenWhitelist__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } -} diff --git a/src/apps/rigoblock/contracts/viem/Governance.ts b/src/apps/rigoblock/contracts/viem/Governance.ts deleted file mode 100644 index bcb50aac0..000000000 --- a/src/apps/rigoblock/contracts/viem/Governance.ts +++ /dev/null @@ -1,696 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const governanceAbi = [ - { - inputs: [], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'proposer', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'proposalId', - type: 'uint256', - }, - { - components: [ - { - internalType: 'address', - name: 'target', - type: 'address', - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - indexed: false, - internalType: 'struct IGovernanceVoting.ProposedAction[]', - name: 'actions', - type: 'tuple[]', - }, - { - indexed: false, - internalType: 'uint256', - name: 'startBlockOrTime', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'endBlockOrTime', - type: 'uint256', - }, - { - indexed: false, - internalType: 'string', - name: 'description', - type: 'string', - }, - ], - name: 'ProposalCreated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'proposalId', - type: 'uint256', - }, - ], - name: 'ProposalExecuted', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'newStrategy', - type: 'address', - }, - ], - name: 'StrategyUpgraded', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'proposalThreshold', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'quorumThreshold', - type: 'uint256', - }, - ], - name: 'ThresholdsUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'newImplementation', - type: 'address', - }, - ], - name: 'Upgraded', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'voter', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'proposalId', - type: 'uint256', - }, - { - indexed: false, - internalType: 'enum IGovernanceVoting.VoteType', - name: 'voteType', - type: 'uint8', - }, - { - indexed: false, - internalType: 'uint256', - name: 'votingPower', - type: 'uint256', - }, - ], - name: 'VoteCast', - type: 'event', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'proposalId', - type: 'uint256', - }, - { - internalType: 'enum IGovernanceVoting.VoteType', - name: 'voteType', - type: 'uint8', - }, - ], - name: 'castVote', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'proposalId', - type: 'uint256', - }, - { - internalType: 'enum IGovernanceVoting.VoteType', - name: 'voteType', - type: 'uint8', - }, - { - internalType: 'uint8', - name: 'v', - type: 'uint8', - }, - { - internalType: 'bytes32', - name: 'r', - type: 'bytes32', - }, - { - internalType: 'bytes32', - name: 's', - type: 'bytes32', - }, - ], - name: 'castVoteBySignature', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'proposalId', - type: 'uint256', - }, - ], - name: 'execute', - outputs: [], - stateMutability: 'payable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'proposalId', - type: 'uint256', - }, - ], - name: 'getActions', - outputs: [ - { - components: [ - { - internalType: 'address', - name: 'target', - type: 'address', - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - internalType: 'struct IGovernanceVoting.ProposedAction[]', - name: 'proposedActions', - type: 'tuple[]', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'proposalId', - type: 'uint256', - }, - ], - name: 'getProposalById', - outputs: [ - { - components: [ - { - components: [ - { - internalType: 'uint256', - name: 'actionsLength', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'startBlockOrTime', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'endBlockOrTime', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'votesFor', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'votesAgainst', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'votesAbstain', - type: 'uint256', - }, - { - internalType: 'bool', - name: 'executed', - type: 'bool', - }, - ], - internalType: 'struct IGovernanceState.Proposal', - name: 'proposal', - type: 'tuple', - }, - { - components: [ - { - internalType: 'address', - name: 'target', - type: 'address', - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - internalType: 'struct IGovernanceVoting.ProposedAction[]', - name: 'proposedAction', - type: 'tuple[]', - }, - ], - internalType: 'struct IGovernanceState.ProposalWrapper', - name: 'proposalWrapper', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'proposalId', - type: 'uint256', - }, - ], - name: 'getProposalState', - outputs: [ - { - internalType: 'enum IGovernanceState.ProposalState', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'proposalId', - type: 'uint256', - }, - { - internalType: 'address', - name: 'voter', - type: 'address', - }, - ], - name: 'getReceipt', - outputs: [ - { - components: [ - { - internalType: 'bool', - name: 'hasVoted', - type: 'bool', - }, - { - internalType: 'uint96', - name: 'votes', - type: 'uint96', - }, - { - internalType: 'enum IGovernanceVoting.VoteType', - name: 'voteType', - type: 'uint8', - }, - ], - internalType: 'struct IGovernanceState.Receipt', - name: '', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'getVotingPower', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'governanceParameters', - outputs: [ - { - components: [ - { - components: [ - { - internalType: 'address', - name: 'strategy', - type: 'address', - }, - { - internalType: 'uint256', - name: 'proposalThreshold', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'quorumThreshold', - type: 'uint256', - }, - { - internalType: 'enum IGovernanceState.TimeType', - name: 'timeType', - type: 'uint8', - }, - ], - internalType: 'struct IGovernanceState.GovernanceParameters', - name: 'params', - type: 'tuple', - }, - { - internalType: 'string', - name: 'name', - type: 'string', - }, - { - internalType: 'string', - name: 'version', - type: 'string', - }, - ], - internalType: 'struct IGovernanceState.EnhancedParams', - name: '', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'initializeGovernance', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'proposalCount', - outputs: [ - { - internalType: 'uint256', - name: 'count', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'proposals', - outputs: [ - { - components: [ - { - components: [ - { - internalType: 'uint256', - name: 'actionsLength', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'startBlockOrTime', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'endBlockOrTime', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'votesFor', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'votesAgainst', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'votesAbstain', - type: 'uint256', - }, - { - internalType: 'bool', - name: 'executed', - type: 'bool', - }, - ], - internalType: 'struct IGovernanceState.Proposal', - name: 'proposal', - type: 'tuple', - }, - { - components: [ - { - internalType: 'address', - name: 'target', - type: 'address', - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - internalType: 'struct IGovernanceVoting.ProposedAction[]', - name: 'proposedAction', - type: 'tuple[]', - }, - ], - internalType: 'struct IGovernanceState.ProposalWrapper[]', - name: 'proposalWrapper', - type: 'tuple[]', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - components: [ - { - internalType: 'address', - name: 'target', - type: 'address', - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - internalType: 'struct IGovernanceVoting.ProposedAction[]', - name: 'actions', - type: 'tuple[]', - }, - { - internalType: 'string', - name: 'description', - type: 'string', - }, - ], - name: 'propose', - outputs: [ - { - internalType: 'uint256', - name: 'proposalId', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'newProposalThreshold', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'newQuorumThreshold', - type: 'uint256', - }, - ], - name: 'updateThresholds', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newImplementation', - type: 'address', - }, - ], - name: 'upgradeImplementation', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newStrategy', - type: 'address', - }, - ], - name: 'upgradeStrategy', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'votingPeriod', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, -] as const; - -export type Governance = typeof governanceAbi; -export type GovernanceContract = GetContractReturnType; - -export class Governance__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: governanceAbi, publicClient: client }); - } -} diff --git a/src/apps/rigoblock/contracts/viem/GrgVault.ts b/src/apps/rigoblock/contracts/viem/GrgVault.ts deleted file mode 100644 index 48319876a..000000000 --- a/src/apps/rigoblock/contracts/viem/GrgVault.ts +++ /dev/null @@ -1,446 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const grgVaultAbi = [ - { - inputs: [ - { - internalType: 'address', - name: '_grgProxyAddress', - type: 'address', - }, - { - internalType: 'address', - name: '_grgTokenAddress', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'target', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'caller', - type: 'address', - }, - ], - name: 'AuthorizedAddressAdded', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'target', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'caller', - type: 'address', - }, - ], - name: 'AuthorizedAddressRemoved', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'staker', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Deposit', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'grgProxyAddress', - type: 'address', - }, - ], - name: 'GrgProxySet', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'sender', - type: 'address', - }, - ], - name: 'InCatastrophicFailureMode', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipTransferred', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'stakingProxyAddress', - type: 'address', - }, - ], - name: 'StakingProxySet', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'staker', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Withdraw', - type: 'event', - }, - { - inputs: [ - { - internalType: 'address', - name: 'target', - type: 'address', - }, - ], - name: 'addAuthorizedAddress', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'authorities', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'authorized', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'staker', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'balanceOfGrgVault', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'staker', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'depositFrom', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'enterCatastrophicFailure', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'getAuthorizedAddresses', - outputs: [ - { - internalType: 'address[]', - name: '', - type: 'address[]', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'grgAssetProxy', - outputs: [ - { - internalType: 'contract IAssetProxy', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'isInCatastrophicFailure', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'owner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'target', - type: 'address', - }, - ], - name: 'removeAuthorizedAddress', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'target', - type: 'address', - }, - { - internalType: 'uint256', - name: 'index', - type: 'uint256', - }, - ], - name: 'removeAuthorizedAddressAtIndex', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_grgProxyAddress', - type: 'address', - }, - ], - name: 'setGrgProxy', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_stakingProxyAddress', - type: 'address', - }, - ], - name: 'setStakingProxy', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'stakingProxyAddress', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'transferOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'staker', - type: 'address', - }, - ], - name: 'withdrawAllFrom', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'staker', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'withdrawFrom', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type GrgVault = typeof grgVaultAbi; -export type GrgVaultContract = GetContractReturnType; - -export class GrgVault__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: grgVaultAbi, publicClient: client }); - } -} diff --git a/src/apps/rigoblock/contracts/viem/PoolRegistry.ts b/src/apps/rigoblock/contracts/viem/PoolRegistry.ts deleted file mode 100644 index 6e2178377..000000000 --- a/src/apps/rigoblock/contracts/viem/PoolRegistry.ts +++ /dev/null @@ -1,266 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const poolRegistryAbi = [ - { - inputs: [ - { - internalType: 'address', - name: 'newAuthority', - type: 'address', - }, - { - internalType: 'address', - name: 'newRigoblockDao', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'authority', - type: 'address', - }, - ], - name: 'AuthorityChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - indexed: true, - internalType: 'bytes32', - name: 'key', - type: 'bytes32', - }, - { - indexed: false, - internalType: 'bytes32', - name: 'value', - type: 'bytes32', - }, - ], - name: 'MetaChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'group', - type: 'address', - }, - { - indexed: false, - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - indexed: true, - internalType: 'bytes32', - name: 'name', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'bytes32', - name: 'symbol', - type: 'bytes32', - }, - { - indexed: false, - internalType: 'bytes32', - name: 'id', - type: 'bytes32', - }, - ], - name: 'Registered', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'rigoblockDao', - type: 'address', - }, - ], - name: 'RigoblockDaoChanged', - type: 'event', - }, - { - inputs: [], - name: 'authority', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - internalType: 'bytes32', - name: 'key', - type: 'bytes32', - }, - ], - name: 'getMeta', - outputs: [ - { - internalType: 'bytes32', - name: 'poolMeta', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'pool', - type: 'address', - }, - ], - name: 'getPoolIdFromAddress', - outputs: [ - { - internalType: 'bytes32', - name: 'poolId', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - internalType: 'string', - name: 'name', - type: 'string', - }, - { - internalType: 'string', - name: 'symbol', - type: 'string', - }, - { - internalType: 'bytes32', - name: 'poolId', - type: 'bytes32', - }, - ], - name: 'register', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'rigoblockDao', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newAuthority', - type: 'address', - }, - ], - name: 'setAuthority', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - internalType: 'bytes32', - name: 'key', - type: 'bytes32', - }, - { - internalType: 'bytes32', - name: 'value', - type: 'bytes32', - }, - ], - name: 'setMeta', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newRigoblockDao', - type: 'address', - }, - ], - name: 'setRigoblockDao', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type PoolRegistry = typeof poolRegistryAbi; -export type PoolRegistryContract = GetContractReturnType; - -export class PoolRegistry__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: poolRegistryAbi, publicClient: client }); - } -} diff --git a/src/apps/rigoblock/contracts/viem/SmartPool.ts b/src/apps/rigoblock/contracts/viem/SmartPool.ts deleted file mode 100644 index 0421e4fdd..000000000 --- a/src/apps/rigoblock/contracts/viem/SmartPool.ts +++ /dev/null @@ -1,903 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const smartPoolAbi = [ - { - inputs: [ - { - internalType: 'address', - name: 'authority', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'kycProvider', - type: 'address', - }, - ], - name: 'KycProviderSet', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - indexed: false, - internalType: 'uint48', - name: 'minimumPeriod', - type: 'uint48', - }, - ], - name: 'MinimumPeriodChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'who', - type: 'address', - }, - { - indexed: false, - internalType: 'address', - name: 'feeCollector', - type: 'address', - }, - ], - name: 'NewCollector', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'who', - type: 'address', - }, - { - indexed: false, - internalType: 'uint16', - name: 'transactionFee', - type: 'uint16', - }, - ], - name: 'NewFee', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'poolOperator', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'unitaryValue', - type: 'uint256', - }, - ], - name: 'NewNav', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'old', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'current', - type: 'address', - }, - ], - name: 'NewOwner', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'group', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'baseToken', - type: 'address', - }, - { - indexed: false, - internalType: 'string', - name: 'name', - type: 'string', - }, - { - indexed: false, - internalType: 'bytes8', - name: 'symbol', - type: 'bytes8', - }, - ], - name: 'PoolInitialized', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - indexed: false, - internalType: 'uint16', - name: 'spread', - type: 'uint16', - }, - ], - name: 'SpreadChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - stateMutability: 'payable', - type: 'fallback', - }, - { - inputs: [], - name: 'VERSION', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: 'success', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'authority', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'who', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amountIn', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'amountOutMin', - type: 'uint256', - }, - ], - name: 'burn', - outputs: [ - { - internalType: 'uint256', - name: 'netRevenue', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'feeCollector', - type: 'address', - }, - ], - name: 'changeFeeCollector', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint48', - name: 'minPeriod', - type: 'uint48', - }, - ], - name: 'changeMinPeriod', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint16', - name: 'newSpread', - type: 'uint16', - }, - ], - name: 'changeSpread', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getPool', - outputs: [ - { - components: [ - { - internalType: 'string', - name: 'name', - type: 'string', - }, - { - internalType: 'string', - name: 'symbol', - type: 'string', - }, - { - internalType: 'uint8', - name: 'decimals', - type: 'uint8', - }, - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'baseToken', - type: 'address', - }, - ], - internalType: 'struct IRigoblockV3PoolState.ReturnedPool', - name: '', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getPoolParams', - outputs: [ - { - components: [ - { - internalType: 'uint48', - name: 'minPeriod', - type: 'uint48', - }, - { - internalType: 'uint16', - name: 'spread', - type: 'uint16', - }, - { - internalType: 'uint16', - name: 'transactionFee', - type: 'uint16', - }, - { - internalType: 'address', - name: 'feeCollector', - type: 'address', - }, - { - internalType: 'address', - name: 'kycProvider', - type: 'address', - }, - ], - internalType: 'struct IRigoblockV3PoolState.PoolParams', - name: '', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getPoolStorage', - outputs: [ - { - components: [ - { - internalType: 'string', - name: 'name', - type: 'string', - }, - { - internalType: 'string', - name: 'symbol', - type: 'string', - }, - { - internalType: 'uint8', - name: 'decimals', - type: 'uint8', - }, - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'baseToken', - type: 'address', - }, - ], - internalType: 'struct IRigoblockV3PoolState.ReturnedPool', - name: 'poolInitParams', - type: 'tuple', - }, - { - components: [ - { - internalType: 'uint48', - name: 'minPeriod', - type: 'uint48', - }, - { - internalType: 'uint16', - name: 'spread', - type: 'uint16', - }, - { - internalType: 'uint16', - name: 'transactionFee', - type: 'uint16', - }, - { - internalType: 'address', - name: 'feeCollector', - type: 'address', - }, - { - internalType: 'address', - name: 'kycProvider', - type: 'address', - }, - ], - internalType: 'struct IRigoblockV3PoolState.PoolParams', - name: 'poolVariables', - type: 'tuple', - }, - { - components: [ - { - internalType: 'uint256', - name: 'unitaryValue', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'totalSupply', - type: 'uint256', - }, - ], - internalType: 'struct IRigoblockV3PoolState.PoolTokens', - name: 'poolTokensInfo', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getPoolTokens', - outputs: [ - { - components: [ - { - internalType: 'uint256', - name: 'unitaryValue', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'totalSupply', - type: 'uint256', - }, - ], - internalType: 'struct IRigoblockV3PoolState.PoolTokens', - name: '', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'offset', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'length', - type: 'uint256', - }, - ], - name: 'getStorageAt', - outputs: [ - { - internalType: 'bytes', - name: '', - type: 'bytes', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256[]', - name: 'slots', - type: 'uint256[]', - }, - ], - name: 'getStorageSlotsAt', - outputs: [ - { - internalType: 'bytes', - name: '', - type: 'bytes', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'who', - type: 'address', - }, - ], - name: 'getUserAccount', - outputs: [ - { - components: [ - { - internalType: 'uint208', - name: 'userBalance', - type: 'uint208', - }, - { - internalType: 'uint48', - name: 'activation', - type: 'uint48', - }, - ], - internalType: 'struct IRigoblockV3PoolState.UserAccount', - name: '', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'initializePool', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amountIn', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'amountOutMin', - type: 'uint256', - }, - ], - name: 'mint', - outputs: [ - { - internalType: 'uint256', - name: 'recipientAmount', - type: 'uint256', - }, - ], - stateMutability: 'payable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'owner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'kycProvider', - type: 'address', - }, - ], - name: 'setKycProvider', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'setOwner', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint16', - name: 'transactionFee', - type: 'uint16', - }, - ], - name: 'setTransactionFee', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'unitaryValue', - type: 'uint256', - }, - ], - name: 'setUnitaryValue', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: 'success', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'from', - type: 'address', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: 'success', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - stateMutability: 'payable', - type: 'receive', - }, -] as const; - -export type SmartPool = typeof smartPoolAbi; -export type SmartPoolContract = GetContractReturnType; - -export class SmartPool__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: smartPoolAbi, publicClient: client }); - } -} diff --git a/src/apps/rigoblock/contracts/viem/Staking.ts b/src/apps/rigoblock/contracts/viem/Staking.ts deleted file mode 100644 index 7988f6528..000000000 --- a/src/apps/rigoblock/contracts/viem/Staking.ts +++ /dev/null @@ -1,1455 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const stakingAbi = [ - { - inputs: [ - { - internalType: 'address', - name: 'grgVault', - type: 'address', - }, - { - internalType: 'address', - name: 'poolRegistry', - type: 'address', - }, - { - internalType: 'address', - name: 'rigoToken', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'target', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'caller', - type: 'address', - }, - ], - name: 'AuthorizedAddressAdded', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'target', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'caller', - type: 'address', - }, - ], - name: 'AuthorizedAddressRemoved', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'string', - name: 'reason', - type: 'string', - }, - ], - name: 'CatchStringEvent', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'uint256', - name: 'epoch', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'numPoolsToFinalize', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'rewardsAvailable', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'totalFeesCollected', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'totalWeightedStake', - type: 'uint256', - }, - ], - name: 'EpochEnded', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'uint256', - name: 'epoch', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'rewardsPaid', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'rewardsRemaining', - type: 'uint256', - }, - ], - name: 'EpochFinalized', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'grgAmount', - type: 'uint256', - }, - ], - name: 'GrgMintEvent', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'staker', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint8', - name: 'fromStatus', - type: 'uint8', - }, - { - indexed: true, - internalType: 'bytes32', - name: 'fromPool', - type: 'bytes32', - }, - { - indexed: false, - internalType: 'uint8', - name: 'toStatus', - type: 'uint8', - }, - { - indexed: true, - internalType: 'bytes32', - name: 'toPool', - type: 'bytes32', - }, - ], - name: 'MoveStake', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: 'poolId', - type: 'bytes32', - }, - { - indexed: false, - internalType: 'uint32', - name: 'oldOperatorShare', - type: 'uint32', - }, - { - indexed: false, - internalType: 'uint32', - name: 'newOperatorShare', - type: 'uint32', - }, - ], - name: 'OperatorShareDecreased', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipTransferred', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'epochDurationInSeconds', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint32', - name: 'rewardDelegatedStakeWeight', - type: 'uint32', - }, - { - indexed: false, - internalType: 'uint256', - name: 'minimumPoolStake', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'cobbDouglasAlphaNumerator', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'cobbDouglasAlphaDenominator', - type: 'uint256', - }, - ], - name: 'ParamsSet', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'exchangeAddress', - type: 'address', - }, - ], - name: 'PopAdded', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'exchangeAddress', - type: 'address', - }, - ], - name: 'PopRemoved', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'rbPoolAddress', - type: 'address', - }, - { - indexed: true, - internalType: 'bytes32', - name: 'poolId', - type: 'bytes32', - }, - ], - name: 'RbPoolStakingPoolSet', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'bytes', - name: 'reason', - type: 'bytes', - }, - ], - name: 'ReturnDataEvent', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'uint256', - name: 'epoch', - type: 'uint256', - }, - { - indexed: true, - internalType: 'bytes32', - name: 'poolId', - type: 'bytes32', - }, - { - indexed: false, - internalType: 'uint256', - name: 'operatorReward', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'membersReward', - type: 'uint256', - }, - ], - name: 'RewardsPaid', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'staker', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Stake', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'bytes32', - name: 'poolId', - type: 'bytes32', - }, - { - indexed: false, - internalType: 'address', - name: 'operator', - type: 'address', - }, - { - indexed: false, - internalType: 'uint32', - name: 'operatorShare', - type: 'uint32', - }, - ], - name: 'StakingPoolCreated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'uint256', - name: 'epoch', - type: 'uint256', - }, - { - indexed: true, - internalType: 'bytes32', - name: 'poolId', - type: 'bytes32', - }, - ], - name: 'StakingPoolEarnedRewardsInEpoch', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'staker', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Unstake', - type: 'event', - }, - { - inputs: [ - { - internalType: 'address', - name: 'target', - type: 'address', - }, - ], - name: 'addAuthorizedAddress', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'addr', - type: 'address', - }, - ], - name: 'addPopAddress', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'aggregatedStatsByEpoch', - outputs: [ - { - internalType: 'uint256', - name: 'rewardsAvailable', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'numPoolsToFinalize', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'totalFeesCollected', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'totalWeightedStake', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'totalRewardsFinalized', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'authorities', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'authorized', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'cobbDouglasAlphaDenominator', - outputs: [ - { - internalType: 'uint32', - name: '', - type: 'uint32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'cobbDouglasAlphaNumerator', - outputs: [ - { - internalType: 'uint32', - name: '', - type: 'uint32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'poolId', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'member', - type: 'address', - }, - ], - name: 'computeRewardBalanceOfDelegator', - outputs: [ - { - internalType: 'uint256', - name: 'reward', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'poolId', - type: 'bytes32', - }, - ], - name: 'computeRewardBalanceOfOperator', - outputs: [ - { - internalType: 'uint256', - name: 'reward', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'rigoblockPoolAddress', - type: 'address', - }, - ], - name: 'createStakingPool', - outputs: [ - { - internalType: 'bytes32', - name: 'poolId', - type: 'bytes32', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'poolAccount', - type: 'address', - }, - { - internalType: 'uint256', - name: 'popReward', - type: 'uint256', - }, - ], - name: 'creditPopReward', - outputs: [], - stateMutability: 'payable', - type: 'function', - }, - { - inputs: [], - name: 'currentEpoch', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'currentEpochStartTimeInSeconds', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'poolId', - type: 'bytes32', - }, - { - internalType: 'uint32', - name: 'newOperatorShare', - type: 'uint32', - }, - ], - name: 'decreaseStakingPoolOperatorShare', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'endEpoch', - outputs: [ - { - internalType: 'uint256', - name: 'numPoolsToFinalize', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'epochDurationInSeconds', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'poolId', - type: 'bytes32', - }, - ], - name: 'finalizePool', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'getAuthorizedAddresses', - outputs: [ - { - internalType: 'address[]', - name: '', - type: 'address[]', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getCurrentEpochEarliestEndTimeInSeconds', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'enum IStructs.StakeStatus', - name: 'stakeStatus', - type: 'uint8', - }, - ], - name: 'getGlobalStakeByStatus', - outputs: [ - { - components: [ - { - internalType: 'uint64', - name: 'currentEpoch', - type: 'uint64', - }, - { - internalType: 'uint96', - name: 'currentEpochBalance', - type: 'uint96', - }, - { - internalType: 'uint96', - name: 'nextEpochBalance', - type: 'uint96', - }, - ], - internalType: 'struct IStructs.StoredBalance', - name: 'balance', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getGrgContract', - outputs: [ - { - internalType: 'contract IRigoToken', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getGrgVault', - outputs: [ - { - internalType: 'contract IGrgVault', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'staker', - type: 'address', - }, - { - internalType: 'enum IStructs.StakeStatus', - name: 'stakeStatus', - type: 'uint8', - }, - ], - name: 'getOwnerStakeByStatus', - outputs: [ - { - components: [ - { - internalType: 'uint64', - name: 'currentEpoch', - type: 'uint64', - }, - { - internalType: 'uint96', - name: 'currentEpochBalance', - type: 'uint96', - }, - { - internalType: 'uint96', - name: 'nextEpochBalance', - type: 'uint96', - }, - ], - internalType: 'struct IStructs.StoredBalance', - name: 'balance', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getParams', - outputs: [ - { - internalType: 'uint256', - name: '_epochDurationInSeconds', - type: 'uint256', - }, - { - internalType: 'uint32', - name: '_rewardDelegatedStakeWeight', - type: 'uint32', - }, - { - internalType: 'uint256', - name: '_minimumPoolStake', - type: 'uint256', - }, - { - internalType: 'uint32', - name: '_cobbDouglasAlphaNumerator', - type: 'uint32', - }, - { - internalType: 'uint32', - name: '_cobbDouglasAlphaDenominator', - type: 'uint32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getPoolRegistry', - outputs: [ - { - internalType: 'contract IPoolRegistry', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'staker', - type: 'address', - }, - { - internalType: 'bytes32', - name: 'poolId', - type: 'bytes32', - }, - ], - name: 'getStakeDelegatedToPoolByOwner', - outputs: [ - { - components: [ - { - internalType: 'uint64', - name: 'currentEpoch', - type: 'uint64', - }, - { - internalType: 'uint96', - name: 'currentEpochBalance', - type: 'uint96', - }, - { - internalType: 'uint96', - name: 'nextEpochBalance', - type: 'uint96', - }, - ], - internalType: 'struct IStructs.StoredBalance', - name: 'balance', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'poolId', - type: 'bytes32', - }, - ], - name: 'getStakingPool', - outputs: [ - { - components: [ - { - internalType: 'address', - name: 'operator', - type: 'address', - }, - { - internalType: 'address', - name: 'stakingPal', - type: 'address', - }, - { - internalType: 'uint32', - name: 'operatorShare', - type: 'uint32', - }, - { - internalType: 'uint32', - name: 'stakingPalShare', - type: 'uint32', - }, - ], - internalType: 'struct IStructs.Pool', - name: '', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'poolId', - type: 'bytes32', - }, - ], - name: 'getStakingPoolStatsThisEpoch', - outputs: [ - { - components: [ - { - internalType: 'uint256', - name: 'feesCollected', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'weightedStake', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'membersStake', - type: 'uint256', - }, - ], - internalType: 'struct IStructs.PoolStats', - name: '', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'staker', - type: 'address', - }, - ], - name: 'getTotalStake', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'poolId', - type: 'bytes32', - }, - ], - name: 'getTotalStakeDelegatedToPool', - outputs: [ - { - components: [ - { - internalType: 'uint64', - name: 'currentEpoch', - type: 'uint64', - }, - { - internalType: 'uint96', - name: 'currentEpochBalance', - type: 'uint96', - }, - { - internalType: 'uint96', - name: 'nextEpochBalance', - type: 'uint96', - }, - ], - internalType: 'struct IStructs.StoredBalance', - name: 'balance', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'grgReservedForPoolRewards', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'init', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'minimumPoolStake', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - components: [ - { - internalType: 'enum IStructs.StakeStatus', - name: 'status', - type: 'uint8', - }, - { - internalType: 'bytes32', - name: 'poolId', - type: 'bytes32', - }, - ], - internalType: 'struct IStructs.StakeInfo', - name: 'from', - type: 'tuple', - }, - { - components: [ - { - internalType: 'enum IStructs.StakeStatus', - name: 'status', - type: 'uint8', - }, - { - internalType: 'bytes32', - name: 'poolId', - type: 'bytes32', - }, - ], - internalType: 'struct IStructs.StakeInfo', - name: 'to', - type: 'tuple', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'moveStake', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'owner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'poolIdByRbPoolAccount', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'poolStatsByEpoch', - outputs: [ - { - internalType: 'uint256', - name: 'feesCollected', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'weightedStake', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'membersStake', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'target', - type: 'address', - }, - ], - name: 'removeAuthorizedAddress', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'target', - type: 'address', - }, - { - internalType: 'uint256', - name: 'index', - type: 'uint256', - }, - ], - name: 'removeAuthorizedAddressAtIndex', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'addr', - type: 'address', - }, - ], - name: 'removePopAddress', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'rewardDelegatedStakeWeight', - outputs: [ - { - internalType: 'uint32', - name: '', - type: 'uint32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - name: 'rewardsByPoolId', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_epochDurationInSeconds', - type: 'uint256', - }, - { - internalType: 'uint32', - name: '_rewardDelegatedStakeWeight', - type: 'uint32', - }, - { - internalType: 'uint256', - name: '_minimumPoolStake', - type: 'uint256', - }, - { - internalType: 'uint32', - name: '_cobbDouglasAlphaNumerator', - type: 'uint32', - }, - { - internalType: 'uint32', - name: '_cobbDouglasAlphaDenominator', - type: 'uint32', - }, - ], - name: 'setParams', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'poolId', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'newStakingPalAddress', - type: 'address', - }, - ], - name: 'setStakingPalAddress', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'stake', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'stakingContract', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'transferOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'unstake', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'validPops', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'poolId', - type: 'bytes32', - }, - ], - name: 'withdrawDelegatorRewards', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type Staking = typeof stakingAbi; -export type StakingContract = GetContractReturnType; - -export class Staking__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: stakingAbi, publicClient: client }); - } -} diff --git a/src/apps/rigoblock/contracts/viem/TokenWhitelist.ts b/src/apps/rigoblock/contracts/viem/TokenWhitelist.ts deleted file mode 100644 index f014cc47f..000000000 --- a/src/apps/rigoblock/contracts/viem/TokenWhitelist.ts +++ /dev/null @@ -1,122 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const tokenWhitelistAbi = [ - { - inputs: [ - { - internalType: 'address', - name: 'newAuthority', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'token', - type: 'address', - }, - { - indexed: false, - internalType: 'bool', - name: 'isWhitelisted', - type: 'bool', - }, - ], - name: 'Whitelisted', - type: 'event', - }, - { - inputs: [ - { - internalType: 'address[]', - name: 'tokens', - type: 'address[]', - }, - { - internalType: 'bool[]', - name: 'whitelisted', - type: 'bool[]', - }, - ], - name: 'batchUpdateTokens', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'getAuthority', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'token', - type: 'address', - }, - ], - name: 'isWhitelistedToken', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'token', - type: 'address', - }, - ], - name: 'removeToken', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'token', - type: 'address', - }, - ], - name: 'whitelistToken', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type TokenWhitelist = typeof tokenWhitelistAbi; -export type TokenWhitelistContract = GetContractReturnType; - -export class TokenWhitelist__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: tokenWhitelistAbi, publicClient: client }); - } -} diff --git a/src/apps/rigoblock/contracts/viem/index.ts b/src/apps/rigoblock/contracts/viem/index.ts deleted file mode 100644 index b720705e0..000000000 --- a/src/apps/rigoblock/contracts/viem/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -export type { Governance } from './Governance'; -export type { GrgVault } from './GrgVault'; -export type { PoolRegistry } from './PoolRegistry'; -export type { SmartPool } from './SmartPool'; -export type { Staking } from './Staking'; -export type { TokenWhitelist } from './TokenWhitelist'; - -export { Governance__factory } from './Governance'; -export { GrgVault__factory } from './GrgVault'; -export { PoolRegistry__factory } from './PoolRegistry'; -export { SmartPool__factory } from './SmartPool'; -export { Staking__factory } from './Staking'; -export { TokenWhitelist__factory } from './TokenWhitelist'; diff --git a/src/apps/rigoblock/ethereum/rigoblock.pool.contract-position-fetcher.ts b/src/apps/rigoblock/ethereum/rigoblock.pool.contract-position-fetcher.ts deleted file mode 100644 index 0f4776ba3..000000000 --- a/src/apps/rigoblock/ethereum/rigoblock.pool.contract-position-fetcher.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { RigoblockPoolContractPositionFetcher } from '../common/rigoblock.pool.contract-position-fetcher'; - -@PositionTemplate() -export class EthereumRigoblockPoolContractPositionFetcher extends RigoblockPoolContractPositionFetcher { - groupLabel = 'Smart Pools'; - - positionManagerAddress = '0xc36442b4a4522e871399cd717abdd847ab11fe88'; - factoryAddress = '0x1f98431c8ad98523631ae4a59f267346ea31f984'; -} diff --git a/src/apps/rigoblock/ethereum/rigoblock.pool.token-fetcher.ts b/src/apps/rigoblock/ethereum/rigoblock.pool.token-fetcher.ts deleted file mode 100644 index bcb52af11..000000000 --- a/src/apps/rigoblock/ethereum/rigoblock.pool.token-fetcher.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { RigoblockPoolTokenFetcher } from '../common/rigoblock.pool.token-fetcher'; - -@PositionTemplate() -export class EthereumRigoblockPoolTokenFetcher extends RigoblockPoolTokenFetcher { - groupLabel = 'Smart Pools'; -} diff --git a/src/apps/rigoblock/optimism/rigoblock.pool.contract-position-fetcher.ts b/src/apps/rigoblock/optimism/rigoblock.pool.contract-position-fetcher.ts deleted file mode 100644 index 22afefd5c..000000000 --- a/src/apps/rigoblock/optimism/rigoblock.pool.contract-position-fetcher.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { RigoblockPoolContractPositionFetcher } from '../common/rigoblock.pool.contract-position-fetcher'; - -@PositionTemplate() -export class OptimismRigoblockPoolContractPositionFetcher extends RigoblockPoolContractPositionFetcher { - groupLabel = 'Smart Pools'; - - positionManagerAddress = '0xc36442b4a4522e871399cd717abdd847ab11fe88'; - factoryAddress = '0x1f98431c8ad98523631ae4a59f267346ea31f984'; -} diff --git a/src/apps/rigoblock/optimism/rigoblock.pool.token-fetcher.ts b/src/apps/rigoblock/optimism/rigoblock.pool.token-fetcher.ts deleted file mode 100644 index c241adb6a..000000000 --- a/src/apps/rigoblock/optimism/rigoblock.pool.token-fetcher.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { RigoblockPoolTokenFetcher } from '../common/rigoblock.pool.token-fetcher'; - -@PositionTemplate() -export class OptimismRigoblockPoolTokenFetcher extends RigoblockPoolTokenFetcher { - groupLabel = 'Smart Pools'; -} diff --git a/src/apps/rigoblock/polygon/rigoblock.pool.contract-position-fetcher.ts b/src/apps/rigoblock/polygon/rigoblock.pool.contract-position-fetcher.ts deleted file mode 100644 index 51abfa283..000000000 --- a/src/apps/rigoblock/polygon/rigoblock.pool.contract-position-fetcher.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { RigoblockPoolContractPositionFetcher } from '../common/rigoblock.pool.contract-position-fetcher'; - -@PositionTemplate() -export class PolygonRigoblockPoolContractPositionFetcher extends RigoblockPoolContractPositionFetcher { - groupLabel = 'Smart Pools'; - - positionManagerAddress = '0xc36442b4a4522e871399cd717abdd847ab11fe88'; - factoryAddress = '0x1f98431c8ad98523631ae4a59f267346ea31f984'; -} diff --git a/src/apps/rigoblock/polygon/rigoblock.pool.token-fetcher.ts b/src/apps/rigoblock/polygon/rigoblock.pool.token-fetcher.ts deleted file mode 100644 index 13021912f..000000000 --- a/src/apps/rigoblock/polygon/rigoblock.pool.token-fetcher.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { RigoblockPoolTokenFetcher } from '../common/rigoblock.pool.token-fetcher'; - -@PositionTemplate() -export class PolygonRigoblockPoolTokenFetcher extends RigoblockPoolTokenFetcher { - groupLabel = 'Smart Pools'; -} diff --git a/src/apps/rigoblock/rigoblock.module.ts b/src/apps/rigoblock/rigoblock.module.ts deleted file mode 100644 index 04f32ee33..000000000 --- a/src/apps/rigoblock/rigoblock.module.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Module } from '@nestjs/common'; - -import { AbstractApp } from '~app/app.dynamic-module'; -import { UniswapV3LiquidityContractPositionBuilder } from '~apps/uniswap-v3/common/uniswap-v3.liquidity.contract-position-builder'; -import { UniswapV3ViemContractFactory } from '~apps/uniswap-v3/contracts'; - -import { ArbitrumRigoblockPoolContractPositionFetcher } from './arbitrum/rigoblock.pool.contract-position-fetcher'; -import { ArbitrumRigoblockPoolTokenFetcher } from './arbitrum/rigoblock.pool.token-fetcher'; -import { RigoblockLogProvider } from './common/rigoblock.log-provider'; -import { RigoblockViemContractFactory } from './contracts'; -import { EthereumRigoblockPoolContractPositionFetcher } from './ethereum/rigoblock.pool.contract-position-fetcher'; -import { EthereumRigoblockPoolTokenFetcher } from './ethereum/rigoblock.pool.token-fetcher'; -import { OptimismRigoblockPoolContractPositionFetcher } from './optimism/rigoblock.pool.contract-position-fetcher'; -import { OptimismRigoblockPoolTokenFetcher } from './optimism/rigoblock.pool.token-fetcher'; -import { PolygonRigoblockPoolContractPositionFetcher } from './polygon/rigoblock.pool.contract-position-fetcher'; -import { PolygonRigoblockPoolTokenFetcher } from './polygon/rigoblock.pool.token-fetcher'; - -@Module({ - providers: [ - UniswapV3ViemContractFactory, - UniswapV3LiquidityContractPositionBuilder, - ArbitrumRigoblockPoolContractPositionFetcher, - ArbitrumRigoblockPoolTokenFetcher, - EthereumRigoblockPoolContractPositionFetcher, - EthereumRigoblockPoolTokenFetcher, - OptimismRigoblockPoolContractPositionFetcher, - OptimismRigoblockPoolTokenFetcher, - PolygonRigoblockPoolContractPositionFetcher, - PolygonRigoblockPoolTokenFetcher, - RigoblockViemContractFactory, - RigoblockLogProvider, - ], -}) -export class RigoblockAppModule extends AbstractApp() {} diff --git a/src/apps/stargate/arbitrum/stargate.eth.token-fetcher.ts b/src/apps/stargate/arbitrum/stargate.eth.token-fetcher.ts deleted file mode 100644 index 94904a291..000000000 --- a/src/apps/stargate/arbitrum/stargate.eth.token-fetcher.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { StargateEthTokenFetcher } from '../common/stargate.eth.token-fetcher'; - -@PositionTemplate() -export class ArbitrumStargateEthTokenFetcher extends StargateEthTokenFetcher { - groupLabel = 'Wrapped'; - - stargateEthAddress = '0x915a55e36a01285a14f05de6e81ed9ce89772f8e'; -} diff --git a/src/apps/stargate/base/stargate.eth.token-fetcher.ts b/src/apps/stargate/base/stargate.eth.token-fetcher.ts deleted file mode 100644 index 23a95c59e..000000000 --- a/src/apps/stargate/base/stargate.eth.token-fetcher.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { StargateEthTokenFetcher } from '../common/stargate.eth.token-fetcher'; - -@PositionTemplate() -export class BaseStargateEthTokenFetcher extends StargateEthTokenFetcher { - groupLabel = 'Wrapped'; - - stargateEthAddress = '0x224d8fd7ab6ad4c6eb4611ce56ef35dec2277f03'; -} diff --git a/src/apps/stargate/common/stargate.eth.token-fetcher.ts b/src/apps/stargate/common/stargate.eth.token-fetcher.ts deleted file mode 100644 index c5ae760ce..000000000 --- a/src/apps/stargate/common/stargate.eth.token-fetcher.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { ZERO_ADDRESS } from '~app-toolkit/constants/address'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; - -import { StargateViemContractFactory } from '../contracts'; -import { StargateEth } from '../contracts/viem'; - -export abstract class StargateEthTokenFetcher extends AppTokenTemplatePositionFetcher { - abstract stargateEthAddress: string; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(StargateViemContractFactory) protected readonly contractFactory: StargateViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.stargateEth({ address, network: this.network }); - } - - getAddresses() { - return [this.stargateEthAddress]; - } - - async getUnderlyingTokenDefinitions() { - return [{ address: ZERO_ADDRESS, network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } -} diff --git a/src/apps/stargate/contracts/abis/stargate-eth.json b/src/apps/stargate/contracts/abis/stargate-eth.json deleted file mode 100644 index f9a93733c..000000000 --- a/src/apps/stargate/contracts/abis/stargate-eth.json +++ /dev/null @@ -1,395 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "guy", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "wad", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "wad", - "type": "uint256" - } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "wad", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "wad", - "type": "uint256" - } - ], - "name": "TransferNative", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "wad", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "guy", - "type": "address" - }, - { - "internalType": "uint256", - "name": "wad", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "deposit", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "noUnwrapTo", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_addr", - "type": "address" - } - ], - "name": "setNoUnwrapTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "wad", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "wad", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "wad", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } -] diff --git a/src/apps/stargate/contracts/viem.contract-factory.ts b/src/apps/stargate/contracts/viem.contract-factory.ts index 9f1992a60..bd92b4454 100644 --- a/src/apps/stargate/contracts/viem.contract-factory.ts +++ b/src/apps/stargate/contracts/viem.contract-factory.ts @@ -6,7 +6,6 @@ import { Network } from '~types/network.interface'; import { StargateChef__factory, StargateChefTime__factory, - StargateEth__factory, StargateFactory__factory, StargatePool__factory, StargateVe__factory, @@ -24,9 +23,6 @@ export class StargateViemContractFactory { stargateChefTime({ address, network }: ContractOpts) { return StargateChefTime__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } - stargateEth({ address, network }: ContractOpts) { - return StargateEth__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } stargateFactory({ address, network }: ContractOpts) { return StargateFactory__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } diff --git a/src/apps/stargate/contracts/viem/StargateEth.ts b/src/apps/stargate/contracts/viem/StargateEth.ts deleted file mode 100644 index 5b54b5c16..000000000 --- a/src/apps/stargate/contracts/viem/StargateEth.ts +++ /dev/null @@ -1,409 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const stargateEthAbi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'src', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'guy', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'wad', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'dst', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'wad', - type: 'uint256', - }, - ], - name: 'Deposit', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipTransferred', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'src', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'dst', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'wad', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'src', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'dst', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'wad', - type: 'uint256', - }, - ], - name: 'TransferNative', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'src', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'wad', - type: 'uint256', - }, - ], - name: 'Withdrawal', - type: 'event', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'guy', - type: 'address', - }, - { - internalType: 'uint256', - name: 'wad', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'deposit', - outputs: [], - stateMutability: 'payable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'noUnwrapTo', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'owner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'renounceOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_addr', - type: 'address', - }, - ], - name: 'setNoUnwrapTo', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'dst', - type: 'address', - }, - { - internalType: 'uint256', - name: 'wad', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'src', - type: 'address', - }, - { - internalType: 'address', - name: 'dst', - type: 'address', - }, - { - internalType: 'uint256', - name: 'wad', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'transferOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'wad', - type: 'uint256', - }, - ], - name: 'withdraw', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - stateMutability: 'payable', - type: 'receive', - }, -] as const; - -export type StargateEth = typeof stargateEthAbi; -export type StargateEthContract = GetContractReturnType; - -export class StargateEth__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: stargateEthAbi, publicClient: client }); - } -} diff --git a/src/apps/stargate/contracts/viem/index.ts b/src/apps/stargate/contracts/viem/index.ts index 5217a3819..db9c6750f 100644 --- a/src/apps/stargate/contracts/viem/index.ts +++ b/src/apps/stargate/contracts/viem/index.ts @@ -4,14 +4,12 @@ export type { StargateChefTime } from './StargateChefTime'; export type { StargateChef } from './StargateChef'; -export type { StargateEth } from './StargateEth'; export type { StargateFactory } from './StargateFactory'; export type { StargatePool } from './StargatePool'; export type { StargateVe } from './StargateVe'; export { StargateChefTime__factory } from './StargateChefTime'; export { StargateChef__factory } from './StargateChef'; -export { StargateEth__factory } from './StargateEth'; export { StargateFactory__factory } from './StargateFactory'; export { StargatePool__factory } from './StargatePool'; export { StargateVe__factory } from './StargateVe'; diff --git a/src/apps/stargate/ethereum/stargate.eth.token-fetcher.ts b/src/apps/stargate/ethereum/stargate.eth.token-fetcher.ts deleted file mode 100644 index ef534d2f4..000000000 --- a/src/apps/stargate/ethereum/stargate.eth.token-fetcher.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { StargateEthTokenFetcher } from '../common/stargate.eth.token-fetcher'; - -@PositionTemplate() -export class EthereumStargateEthTokenFetcher extends StargateEthTokenFetcher { - groupLabel = 'Wrapped'; - - stargateEthAddress = '0x72e2f4830b9e45d52f80ac08cb2bec0fef72ed9c'; -} diff --git a/src/apps/stargate/optimism/stargate.eth.token-fetcher.ts b/src/apps/stargate/optimism/stargate.eth.token-fetcher.ts deleted file mode 100644 index 6d8121452..000000000 --- a/src/apps/stargate/optimism/stargate.eth.token-fetcher.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { StargateEthTokenFetcher } from '../common/stargate.eth.token-fetcher'; - -@PositionTemplate() -export class OptimismStargateEthTokenFetcher extends StargateEthTokenFetcher { - groupLabel = 'Wrapped'; - - stargateEthAddress = '0xd22363e3762ca7339569f3d33eade20127d5f98c'; -} diff --git a/src/apps/stargate/stargate.module.ts b/src/apps/stargate/stargate.module.ts index adab735d8..a8be40509 100644 --- a/src/apps/stargate/stargate.module.ts +++ b/src/apps/stargate/stargate.module.ts @@ -2,7 +2,6 @@ import { Module } from '@nestjs/common'; import { AbstractApp } from '~app/app.dynamic-module'; -import { ArbitrumStargateEthTokenFetcher } from './arbitrum/stargate.eth.token-fetcher'; import { ArbitrumStargateFarmContractPositionFetcher } from './arbitrum/stargate.farm.contract-position-fetcher'; import { ArbitrumStargateLpStakingContractPositionFetcher } from './arbitrum/stargate.lp-staking.contract-position-fetcher'; import { ArbitrumStargatePoolTokenFetcher } from './arbitrum/stargate.pool.token-fetcher'; @@ -10,21 +9,18 @@ import { ArbitrumStargateVotingEscrowContractPositionFetcher } from './arbitrum/ import { AvalancheStargateFarmContractPositionFetcher } from './avalanche/stargate.farm.contract-position-fetcher'; import { AvalancheStargatePoolTokenFetcher } from './avalanche/stargate.pool.token-fetcher'; import { AvalancheStargateVotingEscrowContractPositionFetcher } from './avalanche/stargate.voting-escrow.contract-position-fetcher'; -import { BaseStargateEthTokenFetcher } from './base/stargate.eth.token-fetcher'; import { BaseStargateFarmContractPositionFetcher } from './base/stargate.farm.contract-position-fetcher'; import { BaseStargatePoolTokenFetcher } from './base/stargate.pool.token-fetcher'; import { BinanceSmartChainStargateFarmContractPositionFetcher } from './binance-smart-chain/stargate.farm.contract-position-fetcher'; import { BinanceSmartChainStargatePoolTokenFetcher } from './binance-smart-chain/stargate.pool.token-fetcher'; import { BinanceSmartChainStargateVotingEscrowContractPositionFetcher } from './binance-smart-chain/stargate.voting-escrow.contract-position-fetcher'; import { StargateViemContractFactory } from './contracts'; -import { EthereumStargateEthTokenFetcher } from './ethereum/stargate.eth.token-fetcher'; import { EthereumStargateFarmContractPositionFetcher } from './ethereum/stargate.farm.contract-position-fetcher'; import { EthereumStargatePoolTokenFetcher } from './ethereum/stargate.pool.token-fetcher'; import { EthereumStargateVotingEscrowContractPositionFetcher } from './ethereum/stargate.voting-escrow.contract-position-fetcher'; import { FantomStargateFarmContractPositionFetcher } from './fantom/stargate.farm.contract-position-fetcher'; import { FantomStargatePoolTokenFetcher } from './fantom/stargate.pool.token-fetcher'; import { FantomStargateVotingEscrowContractPositionFetcher } from './fantom/stargate.voting-escrow.contract-position-fetcher'; -import { OptimismStargateEthTokenFetcher } from './optimism/stargate.eth.token-fetcher'; import { OptimismStargateFarmContractPositionFetcher } from './optimism/stargate.farm.contract-position-fetcher'; import { OptimismStargateLpStakingContractPositionFetcher } from './optimism/stargate.lp-staking.contract-position-fetcher'; import { OptimismStargatePoolTokenFetcher } from './optimism/stargate.pool.token-fetcher'; @@ -37,7 +33,6 @@ import { PolygonStargateVotingEscrowContractPositionFetcher } from './polygon/st providers: [ StargateViemContractFactory, // Arbitrum - ArbitrumStargateEthTokenFetcher, ArbitrumStargateFarmContractPositionFetcher, ArbitrumStargatePoolTokenFetcher, ArbitrumStargateVotingEscrowContractPositionFetcher, @@ -47,7 +42,6 @@ import { PolygonStargateVotingEscrowContractPositionFetcher } from './polygon/st AvalancheStargatePoolTokenFetcher, AvalancheStargateVotingEscrowContractPositionFetcher, // Base - BaseStargateEthTokenFetcher, BaseStargateFarmContractPositionFetcher, BaseStargatePoolTokenFetcher, // Binance-smart-chain @@ -55,7 +49,6 @@ import { PolygonStargateVotingEscrowContractPositionFetcher } from './polygon/st BinanceSmartChainStargatePoolTokenFetcher, BinanceSmartChainStargateVotingEscrowContractPositionFetcher, // Ethereum - EthereumStargateEthTokenFetcher, EthereumStargateFarmContractPositionFetcher, EthereumStargatePoolTokenFetcher, EthereumStargateVotingEscrowContractPositionFetcher, @@ -64,7 +57,6 @@ import { PolygonStargateVotingEscrowContractPositionFetcher } from './polygon/st FantomStargatePoolTokenFetcher, FantomStargateVotingEscrowContractPositionFetcher, // Optimism - OptimismStargateEthTokenFetcher, OptimismStargateFarmContractPositionFetcher, OptimismStargatePoolTokenFetcher, OptimismStargateVotingEscrowContractPositionFetcher, diff --git a/src/apps/tarot/fantom/tarot.vault.token-fetcher.ts b/src/apps/tarot/fantom/tarot.vault.token-fetcher.ts deleted file mode 100644 index 188fd449a..000000000 --- a/src/apps/tarot/fantom/tarot.vault.token-fetcher.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { - GetDataPropsParams, - GetPricePerShareParams, - GetUnderlyingTokensParams, -} from '~position/template/app-token.template.types'; - -import { TarotViemContractFactory } from '../contracts'; -import { TarotSupplyVault } from '../contracts/viem'; - -@PositionTemplate() -export class FantomTarotVaultTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Vaults'; - - constructor( - @Inject(APP_TOOLKIT) readonly appToolkit: IAppToolkit, - @Inject(TarotViemContractFactory) private readonly contractFactory: TarotViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.tarotSupplyVault({ address, network: this.network }); - } - - async getAddresses() { - return [ - '0x74d1d2a851e339b8cb953716445be7e8abdf92f4', // xTAROT - '0x0defef0c977809db8c1a3f13fd8dacbd565d968e', // tFTM - '0x68d211bc1e66814575d89bbe4f352b4cdbdacdfb', // tUSDC - '0x87d05774362ff39af4944f949a34399baeb64a35', // tUSDC (Paused) - ]; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.underlying(), network: this.network }]; - } - - async getPricePerShare({ contract, appToken }: GetPricePerShareParams) { - const [underlyingToken] = appToken.tokens; - const reserveRaw = await contract.read.getTotalUnderlying(); - - const reserve = Number(reserveRaw) / 10 ** underlyingToken.decimals; - const pricePerShare = appToken.supply > 0 ? reserve / appToken.supply : 0; - return [pricePerShare]; - } - - async getLiquidity({ contract, appToken }: GetDataPropsParams) { - const reserveRaw = await contract.read.getTotalUnderlying(); - const reserve = Number(reserveRaw) / 10 ** appToken.tokens[0].decimals; - const liquidity = appToken.tokens[0].price * reserve; - return liquidity; - } - - async getReserves({ contract, appToken }: GetDataPropsParams) { - const reserveRaw = await contract.read.getTotalUnderlying(); - const reserve = Number(reserveRaw) / 10 ** appToken.tokens[0].decimals; - return [reserve]; - } -} diff --git a/src/apps/tarot/tarot.module.ts b/src/apps/tarot/tarot.module.ts index 0d0811100..bf1f21bf4 100644 --- a/src/apps/tarot/tarot.module.ts +++ b/src/apps/tarot/tarot.module.ts @@ -5,14 +5,8 @@ import { AbstractApp } from '~app/app.dynamic-module'; import { TarotViemContractFactory } from './contracts'; import { FantomTarotBorrowContractPositionFetcher } from './fantom/tarot.borrow.contract-position-fetcher'; import { FantomTarotSupplyTokenFetcher } from './fantom/tarot.supply.token-fetcher'; -import { FantomTarotVaultTokenFetcher } from './fantom/tarot.vault.token-fetcher'; @Module({ - providers: [ - TarotViemContractFactory, - FantomTarotBorrowContractPositionFetcher, - FantomTarotSupplyTokenFetcher, - FantomTarotVaultTokenFetcher, - ], + providers: [TarotViemContractFactory, FantomTarotBorrowContractPositionFetcher, FantomTarotSupplyTokenFetcher], }) export class TarotAppModule extends AbstractApp() {} diff --git a/src/apps/umami-finance/arbitrum/umami-finance.compound.token-fetcher.ts b/src/apps/umami-finance/arbitrum/umami-finance.compound.token-fetcher.ts deleted file mode 100644 index ea713d730..000000000 --- a/src/apps/umami-finance/arbitrum/umami-finance.compound.token-fetcher.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { getTokenImg } from '~app-toolkit/helpers/presentation/image.present'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { - GetDataPropsParams, - GetPricePerShareParams, - GetDisplayPropsParams, -} from '~position/template/app-token.template.types'; - -import { UmamiFinanceViemContractFactory } from '../contracts'; -import { UmamiFinanceCompound } from '../contracts/viem'; - -@PositionTemplate() -export class ArbitrumUmamiFinanceCompoundTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Compounding Marinating UMAMI'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(UmamiFinanceViemContractFactory) protected readonly contractFactory: UmamiFinanceViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.umamiFinanceCompound({ network: this.network, address }); - } - - async getAddresses(): Promise { - return ['0x1922c36f3bc762ca300b4a46bb2102f84b1684ab']; - } - - async getUnderlyingTokenDefinitions() { - return [{ address: '0x2adabd6e8ce3e82f52d9998a7f64a90d294a92a4', network: this.network }]; - } - - async getPricePerShare({ appToken }: GetPricePerShareParams) { - const underlyingTokenContract = this.contractFactory.umamiFinanceMarinate({ - address: appToken.tokens[0].address, - network: this.network, - }); - - const balanceRaw = await underlyingTokenContract.read.balanceOf([appToken.address]); - const reserve = Number(balanceRaw) / 10 ** appToken.decimals; - const pricePerShare = reserve / appToken.supply; - return [pricePerShare]; - } - - async getReserves({ appToken }: GetDataPropsParams) { - const underlyingTokenContract = this.contractFactory.umamiFinanceMarinate({ - address: appToken.tokens[0].address, - network: this.network, - }); - - const balanceRaw = await underlyingTokenContract.read.balanceOf([appToken.address]); - const reserve = Number(balanceRaw) / 10 ** appToken.decimals; - return [reserve]; - } - - async getImages({ appToken }: GetDisplayPropsParams): Promise { - return [getTokenImg(appToken.address, this.network)]; - } -} diff --git a/src/apps/umami-finance/arbitrum/umami-finance.glp-vaults.token-fetcher.ts b/src/apps/umami-finance/arbitrum/umami-finance.glp-vaults.token-fetcher.ts deleted file mode 100644 index f5e626612..000000000 --- a/src/apps/umami-finance/arbitrum/umami-finance.glp-vaults.token-fetcher.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { getTokenImg } from '~app-toolkit/helpers/presentation/image.present'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { - GetAddressesParams, - GetUnderlyingTokensParams, - UnderlyingTokenDefinition, - GetPricePerShareParams, - DefaultAppTokenDataProps, - GetDisplayPropsParams, -} from '~position/template/app-token.template.types'; - -import { UmamiFinanceGlpVaultAddress } from '../common/umami-finance.constants'; -import { UmamiFinanceViemContractFactory } from '../contracts'; -import { UmamiFinanceGlpVault } from '../contracts/viem/UmamiFinanceGlpVault'; - -export type UmamiFinanceGlpVaultAppTokenDefinition = { - address: string; - timelockedVaultAddress: string; - apiId: string; -}; - -@PositionTemplate() -export class ArbitrumUmamiFinanceGlpVaultsTokenFetcher extends AppTokenTemplatePositionFetcher< - UmamiFinanceGlpVault, - DefaultAppTokenDataProps, - UmamiFinanceGlpVaultAppTokenDefinition -> { - groupLabel = 'GLP Vaults'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(UmamiFinanceViemContractFactory) - private readonly umamiFinanceContractFactory: UmamiFinanceViemContractFactory, - ) { - super(appToolkit); - } - - getContract(_address: string) { - return this.umamiFinanceContractFactory.umamiFinanceGlpVault({ address: _address, network: this.network }); - } - - async getAddresses(_params: GetAddressesParams): Promise { - return [ - UmamiFinanceGlpVaultAddress.GLP_USDC, - UmamiFinanceGlpVaultAddress.GLP_WETH, - UmamiFinanceGlpVaultAddress.GLP_WBTC, - UmamiFinanceGlpVaultAddress.GLP_LINK, - UmamiFinanceGlpVaultAddress.GLP_UNI, - ]; - } - - async getUnderlyingTokenDefinitions({ - contract, - }: GetUnderlyingTokensParams): Promise< - UnderlyingTokenDefinition[] - > { - const underlyingToken = await contract.read.asset(); - return [{ address: underlyingToken, network: this.network }]; - } - - async getPricePerShare({ - contract, - appToken, - }: GetPricePerShareParams< - UmamiFinanceGlpVault, - DefaultAppTokenDataProps, - UmamiFinanceGlpVaultAppTokenDefinition - >): Promise { - const pricePerShareRaw = await contract.read.pps(); - const pricePerShare = Number(pricePerShareRaw) / 10 ** appToken.decimals; - - return [pricePerShare]; - } - - async getLabel({ appToken }: GetDisplayPropsParams): Promise { - return `GLP ${appToken.tokens[0].symbol}`; - } - - async getImages({ - appToken, - }: GetDisplayPropsParams< - UmamiFinanceGlpVault, - DefaultAppTokenDataProps, - UmamiFinanceGlpVaultAppTokenDefinition - >): Promise { - return [getTokenImg(appToken.address, this.network)]; - } -} diff --git a/src/apps/umami-finance/arbitrum/umami-finance.marinate-umami.token-fetcher.ts b/src/apps/umami-finance/arbitrum/umami-finance.marinate-umami.token-fetcher.ts deleted file mode 100644 index 7663d8cc9..000000000 --- a/src/apps/umami-finance/arbitrum/umami-finance.marinate-umami.token-fetcher.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { getTokenImg } from '~app-toolkit/helpers/presentation/image.present'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetDisplayPropsParams } from '~position/template/app-token.template.types'; - -import { UmamiFinanceViemContractFactory } from '../contracts'; -import { UmamiFinanceMarinate } from '../contracts/viem'; - -@PositionTemplate() -export class ArbitrumUmamiFinanceMarinateUmamiTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'mUMAMI'; - isExcludedFromBalances = true; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(UmamiFinanceViemContractFactory) protected readonly contractFactory: UmamiFinanceViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.umamiFinanceMarinate({ network: this.network, address }); - } - - async getAddresses(): Promise { - return ['0x2adabd6e8ce3e82f52d9998a7f64a90d294a92a4']; - } - - async getUnderlyingTokenDefinitions() { - return [{ address: '0x1622bf67e6e5747b81866fe0b85178a93c7f86e3', network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } - - async getImages({ appToken }: GetDisplayPropsParams): Promise { - return [getTokenImg(appToken.address, this.network)]; - } -} diff --git a/src/apps/umami-finance/arbitrum/umami-finance.timelocked-glp-vaults.token-fetcher.ts b/src/apps/umami-finance/arbitrum/umami-finance.timelocked-glp-vaults.token-fetcher.ts deleted file mode 100644 index 32756b85d..000000000 --- a/src/apps/umami-finance/arbitrum/umami-finance.timelocked-glp-vaults.token-fetcher.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { getTokenImg } from '~app-toolkit/helpers/presentation/image.present'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { - GetAddressesParams, - DefaultAppTokenDefinition, - GetUnderlyingTokensParams, - UnderlyingTokenDefinition, - GetPricePerShareParams, - GetDisplayPropsParams, -} from '~position/template/app-token.template.types'; - -import { UmamiFinanceTimelockedGlpVaultAddress } from '../common/umami-finance.constants'; -import { UmamiFinanceViemContractFactory } from '../contracts'; -import { UmamiFinanceTimelockedGlpVault } from '../contracts/viem/UmamiFinanceTimelockedGlpVault'; - -@PositionTemplate() -export class ArbitrumUmamiFinanceTimelockedGlpVaultsTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Timelocked GLP Vaults'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(UmamiFinanceViemContractFactory) - private readonly umamiFinanceContractFactory: UmamiFinanceViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.umamiFinanceContractFactory.umamiFinanceTimelockedGlpVault({ - address, - network: this.network, - }); - } - - async getAddresses(_params: GetAddressesParams): Promise { - return [ - UmamiFinanceTimelockedGlpVaultAddress.TL_GLP_USDC, - UmamiFinanceTimelockedGlpVaultAddress.TL_GLP_WETH, - UmamiFinanceTimelockedGlpVaultAddress.TL_GLP_WBTC, - UmamiFinanceTimelockedGlpVaultAddress.TL_GLP_LINK, - UmamiFinanceTimelockedGlpVaultAddress.TL_GLP_UNI, - ]; - } - - async getUnderlyingTokenDefinitions({ - contract, - }: GetUnderlyingTokensParams): Promise { - return [{ address: await contract.read.asset(), network: this.network }]; - } - - async getPricePerShare({ - contract, - appToken, - }: GetPricePerShareParams): Promise { - const pricePerShareRaw = await contract.read.pps(); - const pricePerShare = Number(pricePerShareRaw) / 10 ** appToken.decimals; - - return [pricePerShare]; - } - - async getLabel({ appToken }: GetDisplayPropsParams): Promise { - return `Timelocked GLP ${appToken.tokens[0].symbol}`; - } - - async getImages({ appToken }: GetDisplayPropsParams): Promise { - return [getTokenImg(appToken.address, this.network)]; - } -} diff --git a/src/apps/umami-finance/common/umami-finance.constants.ts b/src/apps/umami-finance/common/umami-finance.constants.ts deleted file mode 100644 index 7a20b4726..000000000 --- a/src/apps/umami-finance/common/umami-finance.constants.ts +++ /dev/null @@ -1,15 +0,0 @@ -export enum UmamiFinanceGlpVaultAddress { - GLP_USDC = '0x727ed4ef04bb2a96ec77e44c1a91dbb01b605e42', - GLP_WETH = '0xbb84d79159d6bbe1de148dc82640caa677e06126', - GLP_WBTC = '0x6a89faf99587a12e6bb0351f2fa9006c6cd12257', - GLP_LINK = '0xe0a21a475f8da0ee7fa5af8c1809d8ac5257607d', - GLP_UNI = '0x37c0705a65948ea5e0ae1add13552bcad7711a23', -} - -export enum UmamiFinanceTimelockedGlpVaultAddress { - TL_GLP_USDC = '0xdca4e88c00a8800ebcebad63abdbaaaa755557f9', - TL_GLP_WETH = '0xf2ad33e12a9780f1e42d878a29a3e0756008c838', - TL_GLP_WBTC = '0x83c19ec75d649aec7c99e2c6663ca055569da7c0', - TL_GLP_LINK = '0xb0d9e1832bd973abd8f3b4d710ead21fcbefcb7c', - TL_GLP_UNI = '0xee57e7e3776e4868976f315e07a883955c9225d5', -} diff --git a/src/apps/umami-finance/common/umami-finance.helpers.ts b/src/apps/umami-finance/common/umami-finance.helpers.ts deleted file mode 100644 index f53001c25..000000000 --- a/src/apps/umami-finance/common/umami-finance.helpers.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { UmamiFinanceGlpVaultAddress, UmamiFinanceTimelockedGlpVaultAddress } from './umami-finance.constants'; - -export const getUmamiApiIdFromVaultAddress = (vaultAddress: string): string | null => { - switch (vaultAddress) { - case UmamiFinanceGlpVaultAddress.GLP_USDC: - case UmamiFinanceTimelockedGlpVaultAddress.TL_GLP_USDC: - return 'glpusdc'; - case UmamiFinanceGlpVaultAddress.GLP_WETH: - case UmamiFinanceTimelockedGlpVaultAddress.TL_GLP_WETH: - return 'glpweth'; - case UmamiFinanceGlpVaultAddress.GLP_WBTC: - case UmamiFinanceTimelockedGlpVaultAddress.TL_GLP_WBTC: - return 'glpwbtc'; - case UmamiFinanceGlpVaultAddress.GLP_LINK: - case UmamiFinanceTimelockedGlpVaultAddress.TL_GLP_LINK: - return 'glplink'; - case UmamiFinanceGlpVaultAddress.GLP_UNI: - case UmamiFinanceTimelockedGlpVaultAddress.TL_GLP_UNI: - return 'glpuni'; - default: - return null; - } -}; diff --git a/src/apps/umami-finance/contracts/abis/umami-finance-compound.json b/src/apps/umami-finance/contracts/abis/umami-finance-compound.json deleted file mode 100644 index 7b4674928..000000000 --- a/src/apps/umami-finance/contracts/abis/umami-finance-compound.json +++ /dev/null @@ -1,517 +0,0 @@ -[ - { - "inputs": [ - { "internalType": "string", "name": "_name", "type": "string" }, - { "internalType": "string", "name": "_symbol", "type": "string" }, - { "internalType": "address", "name": "_depositToken", "type": "address" }, - { "internalType": "address", "name": "_marinateContract", "type": "address" }, - { "internalType": "address", "name": "_router", "type": "address" } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "Claim", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "token", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "Recovered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "uint256", "name": "newTotalDeposits", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "newTotalSupply", "type": "uint256" } - ], - "name": "Reinvest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "indexed": true, "internalType": "bytes32", "name": "previousAdminRole", "type": "bytes32" }, - { "indexed": true, "internalType": "bytes32", "name": "newAdminRole", "type": "bytes32" } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "uint256", "name": "oldValue", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "newValue", "type": "uint256" } - ], - "name": "UpdateAdminFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "uint256", "name": "oldValue", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "newValue", "type": "uint256" } - ], - "name": "UpdateMinTokensToReinvest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "uint256", "name": "oldValue", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "newValue", "type": "uint256" } - ], - "name": "UpdateMinTokensToReinvestBeforeDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "uint256", "name": "oldValue", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "newValue", "type": "uint256" } - ], - "name": "UpdateReinvestReward", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "bool", "name": "newValue", "type": "bool" }], - "name": "UpdateRequireReinvestBeforeDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "uint256", "name": "oldValue", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "newValue", "type": "uint256" } - ], - "name": "UpdateWithdrawFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "Withdraw", - "type": "event" - }, - { - "inputs": [], - "name": "ADMIN_FEE_BIPS", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ADMIN_ROLE", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MIN_TOKENS_TO_REINVEST", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "REINVEST_REWARD_BIPS", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "rewardToken", "type": "address" }, - { "internalType": "bytes", "name": "swapRoute", "type": "bytes" } - ], - "name": "addRewardToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "spender", "type": "address" } - ], - "name": "allowance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "approve", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "checkReward", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } - ], - "name": "decreaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "depositToken", - "outputs": [{ "internalType": "contract IERC20", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "feeDestination", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], - "name": "getDepositTokensForShares", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }], - "name": "getRoleAdmin", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], - "name": "getSharesForDepositTokens", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "hasRole", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "addedValue", "type": "uint256" } - ], - "name": "increaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "isRewardToken", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "marinateContract", - "outputs": [{ "internalType": "contract IMarinateV2", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "token", "type": "address" }, - { "internalType": "address", "name": "destination", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "migrateToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], - "name": "recoverETH", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { "inputs": [], "name": "reinvest", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [{ "internalType": "address", "name": "rewardToken", "type": "address" }], - "name": "removeRewardToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "token", "type": "address" }, - { "internalType": "address", "name": "spender", "type": "address" } - ], - "name": "revokeAllowance", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "name": "rewardTokens", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rewardTokensLength", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "router", - "outputs": [{ "internalType": "contract ISwapRouter", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "name": "routes", - "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], - "stateMutability": "view", - "type": "function" - }, - { "inputs": [], "name": "setAllowances", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [{ "internalType": "address", "name": "newDestination", "type": "address" }], - "name": "setFeeDestination", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" }], - "name": "supportsInterface", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalDeposits", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "from", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "newValue", "type": "uint256" }], - "name": "updateAdminFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "newValue", "type": "uint256" }], - "name": "updateMinTokensToReinvest", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "newValue", "type": "uint256" }], - "name": "updateReinvestReward", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/umami-finance/contracts/abis/umami-finance-glp-vault.json b/src/apps/umami-finance/contracts/abis/umami-finance-glp-vault.json deleted file mode 100644 index afcac1731..000000000 --- a/src/apps/umami-finance/contracts/abis/umami-finance-glp-vault.json +++ /dev/null @@ -1,931 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "contract ERC20", - "name": "_asset", - "type": "address" - }, - { - "internalType": "string", - "name": "_name", - "type": "string" - }, - { - "internalType": "string", - "name": "_symbol", - "type": "string" - }, - { - "internalType": "address", - "name": "_aggregateVault", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "assets", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "assets", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "name": "Withdraw", - "type": "event" - }, - { - "inputs": [], - "name": "AUTH", - "outputs": [ - { - "internalType": "contract Auth", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "aggregateVault", - "outputs": [ - { - "internalType": "contract AggregateVault", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "asset", - "outputs": [ - { - "internalType": "contract ERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "name": "convertToAssets", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "assets", - "type": "uint256" - } - ], - "name": "convertToShares", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "assets", - "type": "uint256" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "deposit", - "outputs": [ - { - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "maxDeposit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "maxMint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "maxRedeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "maxWithdraw", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "shares", - "type": "uint256" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "assets", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_mintAmount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_timelockContract", - "type": "address" - } - ], - "name": "mintTimelockBoost", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pauseDepositWithdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "permit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pps", - "outputs": [ - { - "internalType": "uint256", - "name": "pricePerShare", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "assets", - "type": "uint256" - } - ], - "name": "previewDeposit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "size", - "type": "uint256" - } - ], - "name": "previewDepositFee", - "outputs": [ - { - "internalType": "uint256", - "name": "totalDepositFee", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "name": "previewMint", - "outputs": [ - { - "internalType": "uint256", - "name": "_mintAmount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "name": "previewRedeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "previewVaultCap", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "assets", - "type": "uint256" - } - ], - "name": "previewWithdraw", - "outputs": [ - { - "internalType": "uint256", - "name": "_withdrawAmount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "size", - "type": "uint256" - } - ], - "name": "previewWithdrawalFee", - "outputs": [ - { - "internalType": "uint256", - "name": "totalWithdrawalFee", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "shares", - "type": "uint256" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "assets", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalAssets", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "tvl", - "outputs": [ - { - "internalType": "uint256", - "name": "totalValueLocked", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpauseDepositWithdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract AggregateVault", - "name": "_newAggregateVault", - "type": "address" - } - ], - "name": "updateAggregateVault", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "assets", - "type": "uint256" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "bytes32[]", - "name": "merkleProof", - "type": "bytes32[]" - } - ], - "name": "whitelistDeposit", - "outputs": [ - { - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "assets", - "type": "uint256" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "withdraw", - "outputs": [ - { - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/umami-finance/contracts/abis/umami-finance-timelocked-glp-vault.json b/src/apps/umami-finance/contracts/abis/umami-finance-timelocked-glp-vault.json deleted file mode 100644 index 9389985bf..000000000 --- a/src/apps/umami-finance/contracts/abis/umami-finance-timelocked-glp-vault.json +++ /dev/null @@ -1,644 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { "internalType": "contract ERC20", "name": "_asset", "type": "address" }, - { "internalType": "string", "name": "_name", "type": "string" }, - { "internalType": "string", "name": "_symbol", "type": "string" }, - { - "internalType": "uint256", - "name": "_withdrawDuration", - "type": "uint256" - }, - { "internalType": "contract Auth", "name": "_auth", "type": "address" } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_asset", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "assets", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "name": "Withdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_asset", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "WithdrawComplete", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_asset", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_duration", - "type": "uint256" - } - ], - "name": "WithdrawInitiated", - "type": "event" - }, - { - "inputs": [], - "name": "AUTH", - "outputs": [{ "internalType": "contract Auth", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ZAP", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "activeWithdrawals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "address", "name": "", "type": "address" } - ], - "name": "allowance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "approve", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "asset", - "outputs": [{ "internalType": "contract ERC20", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_receiver", "type": "address" }], - "name": "claimWithdrawals", - "outputs": [{ "internalType": "uint256", "name": "_totalWithdraw", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_account", "type": "address" }, - { "internalType": "address", "name": "_receiver", "type": "address" } - ], - "name": "claimWithdrawalsFor", - "outputs": [{ "internalType": "uint256", "name": "_totalWithdraw", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_shares", "type": "uint256" }], - "name": "convertToAssets", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_assets", "type": "uint256" }], - "name": "convertToShares", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "assets", "type": "uint256" }, - { "internalType": "address", "name": "receiver", "type": "address" } - ], - "name": "deposit", - "outputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getLockState", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "withdrawDuration", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "activeWithdrawBalance", - "type": "uint256" - } - ], - "internalType": "struct TimelockBoost.TokenLockState", - "name": "state", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_assets", "type": "uint256" }], - "name": "initiateWithdraw", - "outputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_zap", "type": "address" }], - "name": "initiateZap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "lockState", - "outputs": [ - { - "internalType": "uint256", - "name": "withdrawDuration", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "activeWithdrawBalance", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "maxDeposit", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "maxMint", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }], - "name": "maxRedeem", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }], - "name": "maxWithdraw", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "shares", "type": "uint256" }, - { "internalType": "address", "name": "receiver", "type": "address" } - ], - "name": "mint", - "outputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "nonces", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pauseDepositWithdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "value", "type": "uint256" }, - { "internalType": "uint256", "name": "deadline", "type": "uint256" }, - { "internalType": "uint8", "name": "v", "type": "uint8" }, - { "internalType": "bytes32", "name": "r", "type": "bytes32" }, - { "internalType": "bytes32", "name": "s", "type": "bytes32" } - ], - "name": "permit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pps", - "outputs": [{ "internalType": "uint256", "name": "pricePerShare", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_assets", "type": "uint256" }], - "name": "previewDeposit", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_shares", "type": "uint256" }], - "name": "previewMint", - "outputs": [{ "internalType": "uint256", "name": "_mintAmount", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], - "name": "previewRedeem", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_assets", "type": "uint256" }], - "name": "previewWithdraw", - "outputs": [ - { - "internalType": "uint256", - "name": "_withdrawAmount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "shares", "type": "uint256" }, - { "internalType": "address", "name": "receiver", "type": "address" }, - { "internalType": "address", "name": "owner", "type": "address" } - ], - "name": "redeem", - "outputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_withdrawalDuration", - "type": "uint256" - } - ], - "name": "setWithdrawalDuration", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalAssets", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "from", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_account", "type": "address" }], - "name": "underlyingBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "_underlyingBalance", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpauseDepositWithdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "assets", "type": "uint256" }, - { "internalType": "address", "name": "receiver", "type": "address" }, - { "internalType": "address", "name": "owner", "type": "address" } - ], - "name": "withdraw", - "outputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_account", "type": "address" }], - "name": "withdrawRequests", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "queuedTimestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "underlyingAmount", - "type": "uint256" - } - ], - "internalType": "struct TimelockBoost.QueuedWithdrawal[5]", - "name": "", - "type": "tuple[5]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "name": "withdrawalQueue", - "outputs": [ - { - "internalType": "uint256", - "name": "queuedTimestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "underlyingAmount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/src/apps/umami-finance/contracts/viem.contract-factory.ts b/src/apps/umami-finance/contracts/viem.contract-factory.ts index e3d41a500..c1153f0e3 100644 --- a/src/apps/umami-finance/contracts/viem.contract-factory.ts +++ b/src/apps/umami-finance/contracts/viem.contract-factory.ts @@ -3,12 +3,7 @@ import { Injectable, Inject } from '@nestjs/common'; import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; import { Network } from '~types/network.interface'; -import { - UmamiFinanceCompound__factory, - UmamiFinanceGlpVault__factory, - UmamiFinanceMarinate__factory, - UmamiFinanceTimelockedGlpVault__factory, -} from './viem'; +import { UmamiFinanceMarinate__factory } from './viem'; type ContractOpts = { address: string; network: Network }; @@ -16,16 +11,7 @@ type ContractOpts = { address: string; network: Network }; export class UmamiFinanceViemContractFactory { constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - umamiFinanceCompound({ address, network }: ContractOpts) { - return UmamiFinanceCompound__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - umamiFinanceGlpVault({ address, network }: ContractOpts) { - return UmamiFinanceGlpVault__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } umamiFinanceMarinate({ address, network }: ContractOpts) { return UmamiFinanceMarinate__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } - umamiFinanceTimelockedGlpVault({ address, network }: ContractOpts) { - return UmamiFinanceTimelockedGlpVault__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } } diff --git a/src/apps/umami-finance/contracts/viem/UmamiFinanceCompound.ts b/src/apps/umami-finance/contracts/viem/UmamiFinanceCompound.ts deleted file mode 100644 index beebccf81..000000000 --- a/src/apps/umami-finance/contracts/viem/UmamiFinanceCompound.ts +++ /dev/null @@ -1,1139 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const umamiFinanceCompoundAbi = [ - { - inputs: [ - { - internalType: 'string', - name: '_name', - type: 'string', - }, - { - internalType: 'string', - name: '_symbol', - type: 'string', - }, - { - internalType: 'address', - name: '_depositToken', - type: 'address', - }, - { - internalType: 'address', - name: '_marinateContract', - type: 'address', - }, - { - internalType: 'address', - name: '_router', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'account', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Claim', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'account', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Deposit', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'token', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Recovered', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'newTotalDeposits', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'newTotalSupply', - type: 'uint256', - }, - ], - name: 'Reinvest', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'bytes32', - name: 'previousAdminRole', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'bytes32', - name: 'newAdminRole', - type: 'bytes32', - }, - ], - name: 'RoleAdminChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'address', - name: 'account', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'sender', - type: 'address', - }, - ], - name: 'RoleGranted', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'address', - name: 'account', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'sender', - type: 'address', - }, - ], - name: 'RoleRevoked', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'oldValue', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'newValue', - type: 'uint256', - }, - ], - name: 'UpdateAdminFee', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'oldValue', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'newValue', - type: 'uint256', - }, - ], - name: 'UpdateMinTokensToReinvest', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'oldValue', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'newValue', - type: 'uint256', - }, - ], - name: 'UpdateMinTokensToReinvestBeforeDeposit', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'oldValue', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'newValue', - type: 'uint256', - }, - ], - name: 'UpdateReinvestReward', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'bool', - name: 'newValue', - type: 'bool', - }, - ], - name: 'UpdateRequireReinvestBeforeDeposit', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'oldValue', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'newValue', - type: 'uint256', - }, - ], - name: 'UpdateWithdrawFee', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'account', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Withdraw', - type: 'event', - }, - { - inputs: [], - name: 'ADMIN_FEE_BIPS', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'ADMIN_ROLE', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'DEFAULT_ADMIN_ROLE', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'MIN_TOKENS_TO_REINVEST', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'REINVEST_REWARD_BIPS', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'rewardToken', - type: 'address', - }, - { - internalType: 'bytes', - name: 'swapRoute', - type: 'bytes', - }, - ], - name: 'addRewardToken', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'checkReward', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'deposit', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'depositToken', - outputs: [ - { - internalType: 'contract IERC20', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'feeDestination', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'getDepositTokensForShares', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - ], - name: 'getRoleAdmin', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'getSharesForDepositTokens', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'grantRole', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'hasRole', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'isRewardToken', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'marinateContract', - outputs: [ - { - internalType: 'contract IMarinateV2', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'token', - type: 'address', - }, - { - internalType: 'address', - name: 'destination', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'migrateToken', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'recoverETH', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'reinvest', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'rewardToken', - type: 'address', - }, - ], - name: 'removeRewardToken', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'renounceRole', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'token', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - ], - name: 'revokeAllowance', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'revokeRole', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'rewardTokens', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'rewardTokensLength', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'router', - outputs: [ - { - internalType: 'contract ISwapRouter', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'routes', - outputs: [ - { - internalType: 'bytes', - name: '', - type: 'bytes', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'setAllowances', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newDestination', - type: 'address', - }, - ], - name: 'setFeeDestination', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes4', - name: 'interfaceId', - type: 'bytes4', - }, - ], - name: 'supportsInterface', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalDeposits', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'from', - type: 'address', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'newValue', - type: 'uint256', - }, - ], - name: 'updateAdminFee', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'newValue', - type: 'uint256', - }, - ], - name: 'updateMinTokensToReinvest', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'newValue', - type: 'uint256', - }, - ], - name: 'updateReinvestReward', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'withdraw', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type UmamiFinanceCompound = typeof umamiFinanceCompoundAbi; -export type UmamiFinanceCompoundContract = GetContractReturnType; - -export class UmamiFinanceCompound__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: umamiFinanceCompoundAbi, publicClient: client }); - } -} diff --git a/src/apps/umami-finance/contracts/viem/UmamiFinanceGlpVault.ts b/src/apps/umami-finance/contracts/viem/UmamiFinanceGlpVault.ts deleted file mode 100644 index 75ee3e5b7..000000000 --- a/src/apps/umami-finance/contracts/viem/UmamiFinanceGlpVault.ts +++ /dev/null @@ -1,945 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const umamiFinanceGlpVaultAbi = [ - { - inputs: [ - { - internalType: 'contract ERC20', - name: '_asset', - type: 'address', - }, - { - internalType: 'string', - name: '_name', - type: 'string', - }, - { - internalType: 'string', - name: '_symbol', - type: 'string', - }, - { - internalType: 'address', - name: '_aggregateVault', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'caller', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'Deposit', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'Paused', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'Unpaused', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'caller', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'receiver', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'Withdraw', - type: 'event', - }, - { - inputs: [], - name: 'AUTH', - outputs: [ - { - internalType: 'contract Auth', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'DOMAIN_SEPARATOR', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'aggregateVault', - outputs: [ - { - internalType: 'contract AggregateVault', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'asset', - outputs: [ - { - internalType: 'contract ERC20', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'convertToAssets', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - name: 'convertToShares', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - ], - name: 'deposit', - outputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'maxDeposit', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'maxMint', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - ], - name: 'maxRedeem', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - ], - name: 'maxWithdraw', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - ], - name: 'mint', - outputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_mintAmount', - type: 'uint256', - }, - { - internalType: 'address', - name: '_timelockContract', - type: 'address', - }, - ], - name: 'mintTimelockBoost', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'nonces', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'pauseDepositWithdraw', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'paused', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'deadline', - type: 'uint256', - }, - { - internalType: 'uint8', - name: 'v', - type: 'uint8', - }, - { - internalType: 'bytes32', - name: 'r', - type: 'bytes32', - }, - { - internalType: 'bytes32', - name: 's', - type: 'bytes32', - }, - ], - name: 'permit', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'pps', - outputs: [ - { - internalType: 'uint256', - name: 'pricePerShare', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - name: 'previewDeposit', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'size', - type: 'uint256', - }, - ], - name: 'previewDepositFee', - outputs: [ - { - internalType: 'uint256', - name: 'totalDepositFee', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'previewMint', - outputs: [ - { - internalType: 'uint256', - name: '_mintAmount', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'previewRedeem', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'previewVaultCap', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - name: 'previewWithdraw', - outputs: [ - { - internalType: 'uint256', - name: '_withdrawAmount', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'size', - type: 'uint256', - }, - ], - name: 'previewWithdrawalFee', - outputs: [ - { - internalType: 'uint256', - name: 'totalWithdrawalFee', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - ], - name: 'redeem', - outputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalAssets', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'from', - type: 'address', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'tvl', - outputs: [ - { - internalType: 'uint256', - name: 'totalValueLocked', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'unpauseDepositWithdraw', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'contract AggregateVault', - name: '_newAggregateVault', - type: 'address', - }, - ], - name: 'updateAggregateVault', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - { - internalType: 'bytes32[]', - name: 'merkleProof', - type: 'bytes32[]', - }, - ], - name: 'whitelistDeposit', - outputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - ], - name: 'withdraw', - outputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type UmamiFinanceGlpVault = typeof umamiFinanceGlpVaultAbi; -export type UmamiFinanceGlpVaultContract = GetContractReturnType; - -export class UmamiFinanceGlpVault__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: umamiFinanceGlpVaultAbi, publicClient: client }); - } -} diff --git a/src/apps/umami-finance/contracts/viem/UmamiFinanceTimelockedGlpVault.ts b/src/apps/umami-finance/contracts/viem/UmamiFinanceTimelockedGlpVault.ts deleted file mode 100644 index 861998ece..000000000 --- a/src/apps/umami-finance/contracts/viem/UmamiFinanceTimelockedGlpVault.ts +++ /dev/null @@ -1,1109 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const umamiFinanceTimelockedGlpVaultAbi = [ - { - anonymous: false, - inputs: [ - { - internalType: 'contract ERC20', - name: '_asset', - type: 'address', - }, - { - internalType: 'string', - name: '_name', - type: 'string', - }, - { - internalType: 'string', - name: '_symbol', - type: 'string', - }, - { - internalType: 'uint256', - name: '_withdrawDuration', - type: 'uint256', - }, - { - internalType: 'contract Auth', - name: '_auth', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: '_asset', - type: 'address', - }, - { - indexed: false, - internalType: 'address', - name: '_account', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'Deposit', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'Paused', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'Unpaused', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'caller', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'receiver', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'Withdraw', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: '_asset', - type: 'address', - }, - { - indexed: false, - internalType: 'address', - name: '_account', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'WithdrawComplete', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: '_asset', - type: 'address', - }, - { - indexed: false, - internalType: 'address', - name: '_account', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: '_duration', - type: 'uint256', - }, - ], - name: 'WithdrawInitiated', - type: 'event', - }, - { - inputs: [], - name: 'AUTH', - outputs: [ - { - internalType: 'contract Auth', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'DOMAIN_SEPARATOR', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'ZAP', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'activeWithdrawals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'asset', - outputs: [ - { - internalType: 'contract ERC20', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_receiver', - type: 'address', - }, - ], - name: 'claimWithdrawals', - outputs: [ - { - internalType: 'uint256', - name: '_totalWithdraw', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_account', - type: 'address', - }, - { - internalType: 'address', - name: '_receiver', - type: 'address', - }, - ], - name: 'claimWithdrawalsFor', - outputs: [ - { - internalType: 'uint256', - name: '_totalWithdraw', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_shares', - type: 'uint256', - }, - ], - name: 'convertToAssets', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_assets', - type: 'uint256', - }, - ], - name: 'convertToShares', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - ], - name: 'deposit', - outputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'getLockState', - outputs: [ - { - components: [ - { - internalType: 'uint256', - name: 'withdrawDuration', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'activeWithdrawBalance', - type: 'uint256', - }, - ], - internalType: 'struct TimelockBoost.TokenLockState', - name: 'state', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_assets', - type: 'uint256', - }, - ], - name: 'initiateWithdraw', - outputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_zap', - type: 'address', - }, - ], - name: 'initiateZap', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'lockState', - outputs: [ - { - internalType: 'uint256', - name: 'withdrawDuration', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'activeWithdrawBalance', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'maxDeposit', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'maxMint', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - ], - name: 'maxRedeem', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - ], - name: 'maxWithdraw', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - ], - name: 'mint', - outputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'nonces', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'pauseDepositWithdraw', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'paused', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'deadline', - type: 'uint256', - }, - { - internalType: 'uint8', - name: 'v', - type: 'uint8', - }, - { - internalType: 'bytes32', - name: 'r', - type: 'bytes32', - }, - { - internalType: 'bytes32', - name: 's', - type: 'bytes32', - }, - ], - name: 'permit', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'pps', - outputs: [ - { - internalType: 'uint256', - name: 'pricePerShare', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_assets', - type: 'uint256', - }, - ], - name: 'previewDeposit', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_shares', - type: 'uint256', - }, - ], - name: 'previewMint', - outputs: [ - { - internalType: 'uint256', - name: '_mintAmount', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'previewRedeem', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_assets', - type: 'uint256', - }, - ], - name: 'previewWithdraw', - outputs: [ - { - internalType: 'uint256', - name: '_withdrawAmount', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - ], - name: 'redeem', - outputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_withdrawalDuration', - type: 'uint256', - }, - ], - name: 'setWithdrawalDuration', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalAssets', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'from', - type: 'address', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_account', - type: 'address', - }, - ], - name: 'underlyingBalance', - outputs: [ - { - internalType: 'uint256', - name: '_underlyingBalance', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'unpauseDepositWithdraw', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - ], - name: 'withdraw', - outputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_account', - type: 'address', - }, - ], - name: 'withdrawRequests', - outputs: [ - { - components: [ - { - internalType: 'uint256', - name: 'queuedTimestamp', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'underlyingAmount', - type: 'uint256', - }, - ], - internalType: 'struct TimelockBoost.QueuedWithdrawal[5]', - name: '', - type: 'tuple[5]', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'withdrawalQueue', - outputs: [ - { - internalType: 'uint256', - name: 'queuedTimestamp', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'underlyingAmount', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, -] as const; - -export type UmamiFinanceTimelockedGlpVault = typeof umamiFinanceTimelockedGlpVaultAbi; -export type UmamiFinanceTimelockedGlpVaultContract = GetContractReturnType< - UmamiFinanceTimelockedGlpVault, - PublicClient ->; - -export class UmamiFinanceTimelockedGlpVault__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: umamiFinanceTimelockedGlpVaultAbi, publicClient: client }); - } -} diff --git a/src/apps/umami-finance/contracts/viem/index.ts b/src/apps/umami-finance/contracts/viem/index.ts index d20b19109..be28eaf76 100644 --- a/src/apps/umami-finance/contracts/viem/index.ts +++ b/src/apps/umami-finance/contracts/viem/index.ts @@ -2,12 +2,6 @@ /* tslint:disable */ /* eslint-disable */ -export type { UmamiFinanceCompound } from './UmamiFinanceCompound'; -export type { UmamiFinanceGlpVault } from './UmamiFinanceGlpVault'; export type { UmamiFinanceMarinate } from './UmamiFinanceMarinate'; -export type { UmamiFinanceTimelockedGlpVault } from './UmamiFinanceTimelockedGlpVault'; -export { UmamiFinanceCompound__factory } from './UmamiFinanceCompound'; -export { UmamiFinanceGlpVault__factory } from './UmamiFinanceGlpVault'; export { UmamiFinanceMarinate__factory } from './UmamiFinanceMarinate'; -export { UmamiFinanceTimelockedGlpVault__factory } from './UmamiFinanceTimelockedGlpVault'; diff --git a/src/apps/umami-finance/umami-finance.module.ts b/src/apps/umami-finance/umami-finance.module.ts index 4f854ab82..8cb323849 100644 --- a/src/apps/umami-finance/umami-finance.module.ts +++ b/src/apps/umami-finance/umami-finance.module.ts @@ -2,21 +2,10 @@ import { Module } from '@nestjs/common'; import { AbstractApp } from '~app/app.dynamic-module'; -import { ArbitrumUmamiFinanceCompoundTokenFetcher } from './arbitrum/umami-finance.compound.token-fetcher'; -import { ArbitrumUmamiFinanceGlpVaultsTokenFetcher } from './arbitrum/umami-finance.glp-vaults.token-fetcher'; -import { ArbitrumUmamiFinanceMarinateUmamiTokenFetcher } from './arbitrum/umami-finance.marinate-umami.token-fetcher'; import { ArbitrumUmamiFinanceMarinateContractPositionFetcher } from './arbitrum/umami-finance.marinate.contract-position-fetcher'; -import { ArbitrumUmamiFinanceTimelockedGlpVaultsTokenFetcher } from './arbitrum/umami-finance.timelocked-glp-vaults.token-fetcher'; import { UmamiFinanceViemContractFactory } from './contracts'; @Module({ - providers: [ - ArbitrumUmamiFinanceCompoundTokenFetcher, - ArbitrumUmamiFinanceGlpVaultsTokenFetcher, - ArbitrumUmamiFinanceMarinateContractPositionFetcher, - ArbitrumUmamiFinanceMarinateUmamiTokenFetcher, - ArbitrumUmamiFinanceTimelockedGlpVaultsTokenFetcher, - UmamiFinanceViemContractFactory, - ], + providers: [ArbitrumUmamiFinanceMarinateContractPositionFetcher, UmamiFinanceViemContractFactory], }) export class UmamiFinanceAppModule extends AbstractApp() {} diff --git a/src/apps/unlockd-finance/contracts/abis/unlockd-finance-debt-token.json b/src/apps/unlockd-finance/contracts/abis/unlockd-finance-debt-token.json deleted file mode 100644 index 4e1b3bdf2..000000000 --- a/src/apps/unlockd-finance/contracts/abis/unlockd-finance-debt-token.json +++ /dev/null @@ -1,623 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "fromUser", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "toUser", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "BorrowAllowanceDelegated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "Burn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "underlyingAsset", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "pool", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "incentivesController", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "debtTokenDecimals", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "string", - "name": "debtTokenName", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "debtTokenSymbol", - "type": "string" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [], - "name": "POOL", - "outputs": [ - { - "internalType": "contract ILendPool", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "UNDERLYING_ASSET_ADDRESS", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approveDelegation", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "fromUser", - "type": "address" - }, - { - "internalType": "address", - "name": "toUser", - "type": "address" - } - ], - "name": "borrowAllowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getIncentivesController", - "outputs": [ - { - "internalType": "contract IIncentivesController", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "getScaledUserBalanceAndSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract ILendPoolAddressesProvider", - "name": "addressProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "underlyingAsset", - "type": "address" - }, - { - "internalType": "uint8", - "name": "debtTokenDecimals", - "type": "uint8" - }, - { - "internalType": "string", - "name": "debtTokenName", - "type": "string" - }, - { - "internalType": "string", - "name": "debtTokenSymbol", - "type": "string" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "initiator", - "type": "address" - }, - { - "internalType": "address", - "name": "onBehalfOf", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "scaledBalanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "scaledTotalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/unlockd-finance/contracts/abis/unlockd-finance-lend-pool-addresses-provider.json b/src/apps/unlockd-finance/contracts/abis/unlockd-finance-lend-pool-addresses-provider.json deleted file mode 100644 index 508e0656e..000000000 --- a/src/apps/unlockd-finance/contracts/abis/unlockd-finance-lend-pool-addresses-provider.json +++ /dev/null @@ -1,903 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "string", - "name": "marketId", - "type": "string" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "newAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "hasProxy", - "type": "bool" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "encodedCallData", - "type": "bytes" - } - ], - "name": "AddressSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "name": "ConfigurationAdminUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "name": "EmergencyAdminUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "name": "IncentivesControllerUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "name": "LSSVMRouterUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "encodedCallData", - "type": "bytes" - } - ], - "name": "LendPoolConfiguratorUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "name": "LendPoolLiquidatorUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "encodedCallData", - "type": "bytes" - } - ], - "name": "LendPoolLoanUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "encodedCallData", - "type": "bytes" - } - ], - "name": "LendPoolUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "name": "LtvManagerUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "newMarketId", - "type": "string" - } - ], - "name": "MarketIdSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "name": "NFTXVaultFactoryUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "name": "NftOracleUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "name": "ProxyCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "name": "ReserveOracleUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "name": "SushiSwapRouterUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "name": "UIDataProviderUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "name": "UNFTRegistryUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "name": "UnlockdDataProviderUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "name": "WalletBalanceProviderUpdated", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "getAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getEmergencyAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "proxyAddress", - "type": "address" - } - ], - "name": "getImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getIncentivesController", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getLSSVMRouter", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getLendPool", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getLendPoolConfigurator", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getLendPoolLiquidator", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getLendPoolLoan", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getMarketId", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getNFTOracle", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getNFTXVaultFactory", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getPoolAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getReserveOracle", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getSushiSwapRouter", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getUIDataProvider", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getUNFTRegistry", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getUnlockdDataProvider", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getWalletBalanceProvider", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "name": "setAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "implementationAddress", - "type": "address" - }, - { - "internalType": "bytes", - "name": "encodedCallData", - "type": "bytes" - } - ], - "name": "setAddressAsProxy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "emergencyAdmin", - "type": "address" - } - ], - "name": "setEmergencyAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "controller", - "type": "address" - } - ], - "name": "setIncentivesController", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "router", - "type": "address" - } - ], - "name": "setLSSVMRouter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "configurator", - "type": "address" - }, - { - "internalType": "bytes", - "name": "encodedCallData", - "type": "bytes" - } - ], - "name": "setLendPoolConfiguratorImpl", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "pool", - "type": "address" - }, - { - "internalType": "bytes", - "name": "encodedCallData", - "type": "bytes" - } - ], - "name": "setLendPoolImpl", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - } - ], - "name": "setLendPoolLiquidator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "loanAddress", - "type": "address" - }, - { - "internalType": "bytes", - "name": "encodedCallData", - "type": "bytes" - } - ], - "name": "setLendPoolLoanImpl", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "marketId", - "type": "string" - } - ], - "name": "setMarketId", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "nftOracle", - "type": "address" - } - ], - "name": "setNFTOracle", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "factory", - "type": "address" - } - ], - "name": "setNFTXVaultFactory", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "admin", - "type": "address" - } - ], - "name": "setPoolAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "reserveOracle", - "type": "address" - } - ], - "name": "setReserveOracle", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "router", - "type": "address" - } - ], - "name": "setSushiSwapRouter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "provider", - "type": "address" - } - ], - "name": "setUIDataProvider", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "factory", - "type": "address" - } - ], - "name": "setUNFTRegistry", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "provider", - "type": "address" - } - ], - "name": "setUnlockdDataProvider", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "provider", - "type": "address" - } - ], - "name": "setWalletBalanceProvider", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/unlockd-finance/contracts/abis/unlockd-finance-lend-pool.json b/src/apps/unlockd-finance/contracts/abis/unlockd-finance-lend-pool.json deleted file mode 100644 index 2a4082acc..000000000 --- a/src/apps/unlockd-finance/contracts/abis/unlockd-finance-lend-pool.json +++ /dev/null @@ -1,2100 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "bidPrice", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "nftAsset", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "nftTokenId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "onBehalfOf", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "loanId", - "type": "uint256" - } - ], - "name": "Auction", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "nftAsset", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "nftTokenId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "onBehalfOf", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowRate", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "loanId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint16", - "name": "referral", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "nftConfigFee", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "onBehalfOf", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint16", - "name": "referral", - "type": "uint16" - } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "remainAmount", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "nftAsset", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "nftTokenId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "loanId", - "type": "uint256" - } - ], - "name": "Liquidate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "remainAmount", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "nftAsset", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "nftTokenId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "loanId", - "type": "uint256" - } - ], - "name": "LiquidateNFTX", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "nftTokenId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "configuration", - "type": "uint256" - } - ], - "name": "NftConfigurationByIdChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "configuration", - "type": "uint256" - } - ], - "name": "NftConfigurationChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "startTime", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "durationTime", - "type": "uint256" - } - ], - "name": "PausedTimeUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fineAmount", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "nftAsset", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "nftTokenId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "loanId", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "nftAsset", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "nftTokenId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "loanId", - "type": "uint256" - } - ], - "name": "Repay", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newRescuer", - "type": "address" - } - ], - "name": "RescuerChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "configuration", - "type": "uint256" - } - ], - "name": "ReserveConfigurationChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "liquidityRate", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "variableBorrowRate", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "liquidityIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "variableBorrowIndex", - "type": "uint256" - } - ], - "name": "ReserveDataUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "rateAddress", - "type": "address" - } - ], - "name": "ReserveInterestRateAddressChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "newSafeHealthFactor", - "type": "uint256" - } - ], - "name": "SafeHealthFactorUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "uToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "treasury", - "type": "address" - } - ], - "name": "TreasuryAddressUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Unpaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "nftAsset", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "nftTokenId", - "type": "uint256" - } - ], - "name": "ValuationApproved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "Withdraw", - "type": "event" - }, - { - "inputs": [], - "name": "ADDRESS_ID_PUNK_GATEWAY", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ADDRESS_ID_WETH_GATEWAY", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "name": "_isMarketSupported", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "nftAsset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nftTokenId", - "type": "uint256" - } - ], - "name": "approveValuation", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "nftAsset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nftTokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "bidPrice", - "type": "uint256" - }, - { - "internalType": "address", - "name": "onBehalfOf", - "type": "address" - } - ], - "name": "auction", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "nftAsset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nftTokenId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "onBehalfOf", - "type": "address" - }, - { - "internalType": "uint16", - "name": "referralCode", - "type": "uint16" - } - ], - "name": "borrow", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "onBehalfOf", - "type": "address" - }, - { - "internalType": "uint16", - "name": "referralCode", - "type": "uint16" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "finalizeTransfer", - "outputs": [], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getAddressesProvider", - "outputs": [ - { - "internalType": "contract ILendPoolAddressesProvider", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getAuctionDurationConfigFee", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getConfigFee", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "nftAsset", - "type": "address" - }, - { - "internalType": "uint8", - "name": "market", - "type": "uint8" - } - ], - "name": "getIsMarketSupported", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getLiquidateFeePercentage", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getMaxNumberOfNfts", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getMaxNumberOfReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getNftAssetConfig", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "data", - "type": "uint256" - } - ], - "internalType": "struct DataTypes.NftConfigurationMap", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "nftAsset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nftTokenId", - "type": "uint256" - } - ], - "name": "getNftAuctionData", - "outputs": [ - { - "internalType": "uint256", - "name": "loanId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "bidderAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "bidPrice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "bidBorrowAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "bidFine", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "nftAsset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nftTokenId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "reserveAsset", - "type": "address" - } - ], - "name": "getNftCollateralData", - "outputs": [ - { - "internalType": "uint256", - "name": "totalCollateralInETH", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalCollateralInReserve", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "availableBorrowsInETH", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "availableBorrowsInReserve", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "ltv", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "liquidationThreshold", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "liquidationBonus", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nftTokenId", - "type": "uint256" - } - ], - "name": "getNftConfigByTokenId", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "data", - "type": "uint256" - } - ], - "internalType": "struct DataTypes.NftConfigurationMap", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - } - ], - "name": "getNftConfiguration", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "data", - "type": "uint256" - } - ], - "internalType": "struct DataTypes.NftConfigurationMap", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - } - ], - "name": "getNftData", - "outputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "uint256", - "name": "data", - "type": "uint256" - } - ], - "internalType": "struct DataTypes.NftConfigurationMap", - "name": "configuration", - "type": "tuple" - }, - { - "internalType": "address", - "name": "uNftAddress", - "type": "address" - }, - { - "internalType": "uint8", - "name": "id", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "maxSupply", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxTokenId", - "type": "uint256" - } - ], - "internalType": "struct DataTypes.NftData", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "nftAsset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nftTokenId", - "type": "uint256" - } - ], - "name": "getNftDebtData", - "outputs": [ - { - "internalType": "uint256", - "name": "loanId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "reserveAsset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "totalCollateral", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalDebt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "availableBorrows", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "healthFactor", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "nftAsset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nftTokenId", - "type": "uint256" - } - ], - "name": "getNftLiquidatePrice", - "outputs": [ - { - "internalType": "uint256", - "name": "liquidatePrice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "paybackAmount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getNftsList", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getPausedTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - } - ], - "name": "getReserveConfiguration", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "data", - "type": "uint256" - } - ], - "internalType": "struct DataTypes.ReserveConfigurationMap", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - } - ], - "name": "getReserveData", - "outputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "uint256", - "name": "data", - "type": "uint256" - } - ], - "internalType": "struct DataTypes.ReserveConfigurationMap", - "name": "configuration", - "type": "tuple" - }, - { - "internalType": "uint128", - "name": "liquidityIndex", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "variableBorrowIndex", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "currentLiquidityRate", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "currentVariableBorrowRate", - "type": "uint128" - }, - { - "internalType": "uint40", - "name": "lastUpdateTimestamp", - "type": "uint40" - }, - { - "internalType": "address", - "name": "uTokenAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "debtTokenAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "interestRateAddress", - "type": "address" - }, - { - "internalType": "uint8", - "name": "id", - "type": "uint8" - } - ], - "internalType": "struct DataTypes.ReserveData", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - } - ], - "name": "getReserveNormalizedIncome", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - } - ], - "name": "getReserveNormalizedVariableDebt", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getReservesList", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getSafeHealthFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTimeframe", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "address", - "name": "uNftAddress", - "type": "address" - } - ], - "name": "initNft", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "address", - "name": "uTokenAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "debtTokenAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "interestRateAddress", - "type": "address" - } - ], - "name": "initReserve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract ILendPoolAddressesProvider", - "name": "provider", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "nftAsset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nftTokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "liquidate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "nftAsset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nftTokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - } - ], - "name": "liquidateNFTX", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "nftAsset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nftTokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "internalType": "address", - "name": "LSSVMPair", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amountOutMinSudoswap", - "type": "uint256" - } - ], - "name": "liquidateSudoSwap", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC721Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "nftAsset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nftTokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "bidFine", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "nftAsset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nftTokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "repay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "tokenContract", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "rescueETH", - "type": "bool" - } - ], - "name": "rescue", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC721Upgradeable", - "name": "nftAsset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "rescueNFT", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "rescuer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "auctionDurationConfigFee", - "type": "uint256" - } - ], - "name": "setAuctionDurationConfigFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "configFee", - "type": "uint256" - } - ], - "name": "setConfigFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "nftAsset", - "type": "address" - }, - { - "internalType": "uint8", - "name": "market", - "type": "uint8" - }, - { - "internalType": "bool", - "name": "val", - "type": "bool" - } - ], - "name": "setIsMarketSupported", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "percentage", - "type": "uint256" - } - ], - "name": "setLiquidateFeePercentage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "val", - "type": "uint256" - } - ], - "name": "setMaxNumberOfNfts", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "val", - "type": "uint256" - } - ], - "name": "setMaxNumberOfReserves", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nftTokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "configuration", - "type": "uint256" - } - ], - "name": "setNftConfigByTokenId", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "configuration", - "type": "uint256" - } - ], - "name": "setNftConfiguration", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "maxSupply", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxTokenId", - "type": "uint256" - } - ], - "name": "setNftMaxSupplyAndTokenId", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bool", - "name": "val", - "type": "bool" - } - ], - "name": "setPause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "startTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "durationTime", - "type": "uint256" - } - ], - "name": "setPausedTime", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "configuration", - "type": "uint256" - } - ], - "name": "setReserveConfiguration", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "address", - "name": "rateAddress", - "type": "address" - } - ], - "name": "setReserveInterestRateAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "timeframe", - "type": "uint256" - } - ], - "name": "setTimeframe", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "uToken", - "type": "address" - }, - { - "internalType": "address", - "name": "treasury", - "type": "address" - } - ], - "name": "setTreasuryAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newRescuer", - "type": "address" - } - ], - "name": "updateRescuer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newSafeHealthFactor", - "type": "uint256" - } - ], - "name": "updateSafeHealthFactor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "withdraw", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } -] diff --git a/src/apps/unlockd-finance/contracts/abis/unlockd-finance-protocol-data-provider.json b/src/apps/unlockd-finance/contracts/abis/unlockd-finance-protocol-data-provider.json deleted file mode 100644 index e6847fc8e..000000000 --- a/src/apps/unlockd-finance/contracts/abis/unlockd-finance-protocol-data-provider.json +++ /dev/null @@ -1,678 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "contract ILendPoolAddressesProvider", - "name": "addressesProvider", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "ADDRESSES_PROVIDER", - "outputs": [ - { - "internalType": "contract ILendPoolAddressesProvider", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getAllNftsTokenDatas", - "outputs": [ - { - "components": [ - { - "internalType": "string", - "name": "nftSymbol", - "type": "string" - }, - { - "internalType": "address", - "name": "nftAddress", - "type": "address" - }, - { - "internalType": "string", - "name": "uNftSymbol", - "type": "string" - }, - { - "internalType": "address", - "name": "uNftAddress", - "type": "address" - } - ], - "internalType": "struct UnlockdProtocolDataProvider.NftTokenData[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getAllReservesTokenDatas", - "outputs": [ - { - "components": [ - { - "internalType": "string", - "name": "tokenSymbol", - "type": "string" - }, - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - }, - { - "internalType": "string", - "name": "uTokenSymbol", - "type": "string" - }, - { - "internalType": "address", - "name": "uTokenAddress", - "type": "address" - }, - { - "internalType": "string", - "name": "debtTokenSymbol", - "type": "string" - }, - { - "internalType": "address", - "name": "debtTokenAddress", - "type": "address" - } - ], - "internalType": "struct UnlockdProtocolDataProvider.ReserveTokenData[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "nftAsset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nftTokenId", - "type": "uint256" - } - ], - "name": "getLoanDataByCollateral", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "loanId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "state", - "type": "uint8" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "address", - "name": "nftAsset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nftTokenId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "reserveAsset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "scaledAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "currentAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "bidStartTimestamp", - "type": "uint256" - }, - { - "internalType": "address", - "name": "bidderAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "bidPrice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "bidBorrowAmount", - "type": "uint256" - } - ], - "internalType": "struct UnlockdProtocolDataProvider.LoanData", - "name": "loanData", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "loanId", - "type": "uint256" - } - ], - "name": "getLoanDataByLoanId", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "loanId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "state", - "type": "uint8" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "address", - "name": "nftAsset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nftTokenId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "reserveAsset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "scaledAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "currentAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "bidStartTimestamp", - "type": "uint256" - }, - { - "internalType": "address", - "name": "bidderAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "bidPrice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "bidBorrowAmount", - "type": "uint256" - } - ], - "internalType": "struct UnlockdProtocolDataProvider.LoanData", - "name": "loanData", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "reserveAsset", - "type": "address" - } - ], - "name": "getNFTXPrice", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - } - ], - "name": "getNftConfigurationData", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "ltv", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "liquidationThreshold", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "liquidationBonus", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "redeemDuration", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "auctionDuration", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "redeemFine", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "redeemThreshold", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minBidFine", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "isActive", - "type": "bool" - }, - { - "internalType": "bool", - "name": "isFrozen", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "configTimestamp", - "type": "uint256" - } - ], - "internalType": "struct UnlockdProtocolDataProvider.NftConfigurationData", - "name": "configData", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getNftConfigurationDataByTokenId", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "ltv", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "liquidationThreshold", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "liquidationBonus", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "redeemDuration", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "auctionDuration", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "redeemFine", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "redeemThreshold", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minBidFine", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "isActive", - "type": "bool" - }, - { - "internalType": "bool", - "name": "isFrozen", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "configTimestamp", - "type": "uint256" - } - ], - "internalType": "struct UnlockdProtocolDataProvider.NftConfigurationData", - "name": "configData", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "nftAsset", - "type": "address" - } - ], - "name": "getNftTokenData", - "outputs": [ - { - "components": [ - { - "internalType": "string", - "name": "nftSymbol", - "type": "string" - }, - { - "internalType": "address", - "name": "nftAddress", - "type": "address" - }, - { - "internalType": "string", - "name": "uNftSymbol", - "type": "string" - }, - { - "internalType": "address", - "name": "uNftAddress", - "type": "address" - } - ], - "internalType": "struct UnlockdProtocolDataProvider.NftTokenData", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - } - ], - "name": "getReserveConfigurationData", - "outputs": [ - { - "internalType": "uint256", - "name": "decimals", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveFactor", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "borrowingEnabled", - "type": "bool" - }, - { - "internalType": "bool", - "name": "isActive", - "type": "bool" - }, - { - "internalType": "bool", - "name": "isFrozen", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - } - ], - "name": "getReserveData", - "outputs": [ - { - "internalType": "uint256", - "name": "availableLiquidity", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalVariableDebt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "liquidityRate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "variableBorrowRate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "liquidityIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "variableBorrowIndex", - "type": "uint256" - }, - { - "internalType": "uint40", - "name": "lastUpdateTimestamp", - "type": "uint40" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - } - ], - "name": "getReserveTokenData", - "outputs": [ - { - "components": [ - { - "internalType": "string", - "name": "tokenSymbol", - "type": "string" - }, - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - }, - { - "internalType": "string", - "name": "uTokenSymbol", - "type": "string" - }, - { - "internalType": "address", - "name": "uTokenAddress", - "type": "address" - }, - { - "internalType": "string", - "name": "debtTokenSymbol", - "type": "string" - }, - { - "internalType": "address", - "name": "debtTokenAddress", - "type": "address" - } - ], - "internalType": "struct UnlockdProtocolDataProvider.ReserveTokenData", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "getUserReserveData", - "outputs": [ - { - "internalType": "uint256", - "name": "currentUTokenBalance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "currentVariableDebt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "scaledVariableDebt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "liquidityRate", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/src/apps/unlockd-finance/contracts/abis/unlockd-finance-u-token.json b/src/apps/unlockd-finance/contracts/abis/unlockd-finance-u-token.json deleted file mode 100644 index 63a01a94e..000000000 --- a/src/apps/unlockd-finance/contracts/abis/unlockd-finance-u-token.json +++ /dev/null @@ -1,661 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "BalanceTransfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "Burn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "underlyingAsset", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "pool", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "treasury", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "incentivesController", - "type": "address" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_newTreasuryAddress", - "type": "address" - } - ], - "name": "TreasuryAddressUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "POOL", - "outputs": [ - { - "internalType": "contract ILendPool", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "RESERVE_TREASURY_ADDRESS", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "UNDERLYING_ASSET_ADDRESS", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "internalType": "address", - "name": "receiverOfUnderlying", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getIncentivesController", - "outputs": [ - { - "internalType": "contract IIncentivesController", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "getScaledUserBalanceAndSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract ILendPoolAddressesProvider", - "name": "addressProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "treasury", - "type": "address" - }, - { - "internalType": "address", - "name": "underlyingAsset", - "type": "address" - }, - { - "internalType": "uint8", - "name": "uTokenDecimals", - "type": "uint8" - }, - { - "internalType": "string", - "name": "uTokenName", - "type": "string" - }, - { - "internalType": "string", - "name": "uTokenSymbol", - "type": "string" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "mintToTreasury", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "scaledBalanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "scaledTotalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "treasury", - "type": "address" - } - ], - "name": "setTreasuryAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferUnderlyingTo", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/unlockd-finance/contracts/index.ts b/src/apps/unlockd-finance/contracts/index.ts deleted file mode 100644 index 5dcfebdf6..000000000 --- a/src/apps/unlockd-finance/contracts/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * from './viem.contract-factory'; diff --git a/src/apps/unlockd-finance/contracts/viem.contract-factory.ts b/src/apps/unlockd-finance/contracts/viem.contract-factory.ts deleted file mode 100644 index 48e564b2d..000000000 --- a/src/apps/unlockd-finance/contracts/viem.contract-factory.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Injectable, Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { Network } from '~types/network.interface'; - -import { - UnlockdFinanceDebtToken__factory, - UnlockdFinanceLendPool__factory, - UnlockdFinanceLendPoolAddressesProvider__factory, - UnlockdFinanceProtocolDataProvider__factory, - UnlockdFinanceUToken__factory, -} from './viem'; - -type ContractOpts = { address: string; network: Network }; - -@Injectable() -export class UnlockdFinanceViemContractFactory { - constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - - unlockdFinanceDebtToken({ address, network }: ContractOpts) { - return UnlockdFinanceDebtToken__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - unlockdFinanceLendPool({ address, network }: ContractOpts) { - return UnlockdFinanceLendPool__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - unlockdFinanceLendPoolAddressesProvider({ address, network }: ContractOpts) { - return UnlockdFinanceLendPoolAddressesProvider__factory.connect( - address, - this.appToolkit.getViemNetworkProvider(network), - ); - } - unlockdFinanceProtocolDataProvider({ address, network }: ContractOpts) { - return UnlockdFinanceProtocolDataProvider__factory.connect( - address, - this.appToolkit.getViemNetworkProvider(network), - ); - } - unlockdFinanceUToken({ address, network }: ContractOpts) { - return UnlockdFinanceUToken__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } -} diff --git a/src/apps/unlockd-finance/contracts/viem/UnlockdFinanceDebtToken.ts b/src/apps/unlockd-finance/contracts/viem/UnlockdFinanceDebtToken.ts deleted file mode 100644 index c0691c324..000000000 --- a/src/apps/unlockd-finance/contracts/viem/UnlockdFinanceDebtToken.ts +++ /dev/null @@ -1,637 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const unlockdFinanceDebtTokenAbi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'fromUser', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'toUser', - type: 'address', - }, - { - indexed: false, - internalType: 'address', - name: 'asset', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'BorrowAllowanceDelegated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'user', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'index', - type: 'uint256', - }, - ], - name: 'Burn', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'underlyingAsset', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - indexed: false, - internalType: 'address', - name: 'incentivesController', - type: 'address', - }, - { - indexed: false, - internalType: 'uint8', - name: 'debtTokenDecimals', - type: 'uint8', - }, - { - indexed: false, - internalType: 'string', - name: 'debtTokenName', - type: 'string', - }, - { - indexed: false, - internalType: 'string', - name: 'debtTokenSymbol', - type: 'string', - }, - ], - name: 'Initialized', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'index', - type: 'uint256', - }, - ], - name: 'Mint', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - inputs: [], - name: 'POOL', - outputs: [ - { - internalType: 'contract ILendPool', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'UNDERLYING_ASSET_ADDRESS', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'delegatee', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'approveDelegation', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'user', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'fromUser', - type: 'address', - }, - { - internalType: 'address', - name: 'toUser', - type: 'address', - }, - ], - name: 'borrowAllowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'user', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'index', - type: 'uint256', - }, - ], - name: 'burn', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'getIncentivesController', - outputs: [ - { - internalType: 'contract IIncentivesController', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'user', - type: 'address', - }, - ], - name: 'getScaledUserBalanceAndSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'contract ILendPoolAddressesProvider', - name: 'addressProvider', - type: 'address', - }, - { - internalType: 'address', - name: 'underlyingAsset', - type: 'address', - }, - { - internalType: 'uint8', - name: 'debtTokenDecimals', - type: 'uint8', - }, - { - internalType: 'string', - name: 'debtTokenName', - type: 'string', - }, - { - internalType: 'string', - name: 'debtTokenSymbol', - type: 'string', - }, - ], - name: 'initialize', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'initiator', - type: 'address', - }, - { - internalType: 'address', - name: 'onBehalfOf', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'index', - type: 'uint256', - }, - ], - name: 'mint', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'user', - type: 'address', - }, - ], - name: 'scaledBalanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'scaledTotalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type UnlockdFinanceDebtToken = typeof unlockdFinanceDebtTokenAbi; -export type UnlockdFinanceDebtTokenContract = GetContractReturnType; - -export class UnlockdFinanceDebtToken__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: unlockdFinanceDebtTokenAbi, publicClient: client }); - } -} diff --git a/src/apps/unlockd-finance/contracts/viem/UnlockdFinanceLendPool.ts b/src/apps/unlockd-finance/contracts/viem/UnlockdFinanceLendPool.ts deleted file mode 100644 index f48a04df1..000000000 --- a/src/apps/unlockd-finance/contracts/viem/UnlockdFinanceLendPool.ts +++ /dev/null @@ -1,2114 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const unlockdFinanceLendPoolAbi = [ - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'user', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'reserve', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'bidPrice', - type: 'uint256', - }, - { - indexed: true, - internalType: 'address', - name: 'nftAsset', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'nftTokenId', - type: 'uint256', - }, - { - indexed: false, - internalType: 'address', - name: 'onBehalfOf', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'borrower', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'loanId', - type: 'uint256', - }, - ], - name: 'Auction', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'user', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'reserve', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'address', - name: 'nftAsset', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'nftTokenId', - type: 'uint256', - }, - { - indexed: true, - internalType: 'address', - name: 'onBehalfOf', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'borrowRate', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'loanId', - type: 'uint256', - }, - { - indexed: true, - internalType: 'uint16', - name: 'referral', - type: 'uint16', - }, - { - indexed: false, - internalType: 'uint256', - name: 'nftConfigFee', - type: 'uint256', - }, - ], - name: 'Borrow', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'user', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'reserve', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - indexed: true, - internalType: 'address', - name: 'onBehalfOf', - type: 'address', - }, - { - indexed: true, - internalType: 'uint16', - name: 'referral', - type: 'uint16', - }, - ], - name: 'Deposit', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'user', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'reserve', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'repayAmount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'remainAmount', - type: 'uint256', - }, - { - indexed: true, - internalType: 'address', - name: 'nftAsset', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'nftTokenId', - type: 'uint256', - }, - { - indexed: true, - internalType: 'address', - name: 'borrower', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'loanId', - type: 'uint256', - }, - ], - name: 'Liquidate', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'reserve', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'repayAmount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'remainAmount', - type: 'uint256', - }, - { - indexed: true, - internalType: 'address', - name: 'nftAsset', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'nftTokenId', - type: 'uint256', - }, - { - indexed: true, - internalType: 'address', - name: 'borrower', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'loanId', - type: 'uint256', - }, - ], - name: 'LiquidateNFTX', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'asset', - type: 'address', - }, - { - indexed: true, - internalType: 'uint256', - name: 'nftTokenId', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'configuration', - type: 'uint256', - }, - ], - name: 'NftConfigurationByIdChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'asset', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'configuration', - type: 'uint256', - }, - ], - name: 'NftConfigurationChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [], - name: 'Paused', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'startTime', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'durationTime', - type: 'uint256', - }, - ], - name: 'PausedTimeUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'user', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'reserve', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'borrowAmount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'fineAmount', - type: 'uint256', - }, - { - indexed: true, - internalType: 'address', - name: 'nftAsset', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'nftTokenId', - type: 'uint256', - }, - { - indexed: true, - internalType: 'address', - name: 'borrower', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'loanId', - type: 'uint256', - }, - ], - name: 'Redeem', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'user', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'reserve', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - indexed: true, - internalType: 'address', - name: 'nftAsset', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'nftTokenId', - type: 'uint256', - }, - { - indexed: true, - internalType: 'address', - name: 'borrower', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'loanId', - type: 'uint256', - }, - ], - name: 'Repay', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'newRescuer', - type: 'address', - }, - ], - name: 'RescuerChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'asset', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'configuration', - type: 'uint256', - }, - ], - name: 'ReserveConfigurationChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'reserve', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'liquidityRate', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'variableBorrowRate', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'liquidityIndex', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'variableBorrowIndex', - type: 'uint256', - }, - ], - name: 'ReserveDataUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'asset', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'rateAddress', - type: 'address', - }, - ], - name: 'ReserveInterestRateAddressChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'uint256', - name: 'newSafeHealthFactor', - type: 'uint256', - }, - ], - name: 'SafeHealthFactorUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'uToken', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'treasury', - type: 'address', - }, - ], - name: 'TreasuryAddressUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [], - name: 'Unpaused', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'user', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'nftAsset', - type: 'address', - }, - { - indexed: true, - internalType: 'uint256', - name: 'nftTokenId', - type: 'uint256', - }, - ], - name: 'ValuationApproved', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'user', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'reserve', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - ], - name: 'Withdraw', - type: 'event', - }, - { - inputs: [], - name: 'ADDRESS_ID_PUNK_GATEWAY', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'ADDRESS_ID_WETH_GATEWAY', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - name: '_isMarketSupported', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'nftAsset', - type: 'address', - }, - { - internalType: 'uint256', - name: 'nftTokenId', - type: 'uint256', - }, - ], - name: 'approveValuation', - outputs: [], - stateMutability: 'payable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'nftAsset', - type: 'address', - }, - { - internalType: 'uint256', - name: 'nftTokenId', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'bidPrice', - type: 'uint256', - }, - { - internalType: 'address', - name: 'onBehalfOf', - type: 'address', - }, - ], - name: 'auction', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'asset', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'address', - name: 'nftAsset', - type: 'address', - }, - { - internalType: 'uint256', - name: 'nftTokenId', - type: 'uint256', - }, - { - internalType: 'address', - name: 'onBehalfOf', - type: 'address', - }, - { - internalType: 'uint16', - name: 'referralCode', - type: 'uint16', - }, - ], - name: 'borrow', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'asset', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'address', - name: 'onBehalfOf', - type: 'address', - }, - { - internalType: 'uint16', - name: 'referralCode', - type: 'uint16', - }, - ], - name: 'deposit', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'asset', - type: 'address', - }, - { - internalType: 'address', - name: 'from', - type: 'address', - }, - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'finalizeTransfer', - outputs: [], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getAddressesProvider', - outputs: [ - { - internalType: 'contract ILendPoolAddressesProvider', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getAuctionDurationConfigFee', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getConfigFee', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'nftAsset', - type: 'address', - }, - { - internalType: 'uint8', - name: 'market', - type: 'uint8', - }, - ], - name: 'getIsMarketSupported', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getLiquidateFeePercentage', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getMaxNumberOfNfts', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getMaxNumberOfReserves', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'asset', - type: 'address', - }, - { - internalType: 'uint256', - name: 'tokenId', - type: 'uint256', - }, - ], - name: 'getNftAssetConfig', - outputs: [ - { - components: [ - { - internalType: 'uint256', - name: 'data', - type: 'uint256', - }, - ], - internalType: 'struct DataTypes.NftConfigurationMap', - name: '', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'nftAsset', - type: 'address', - }, - { - internalType: 'uint256', - name: 'nftTokenId', - type: 'uint256', - }, - ], - name: 'getNftAuctionData', - outputs: [ - { - internalType: 'uint256', - name: 'loanId', - type: 'uint256', - }, - { - internalType: 'address', - name: 'bidderAddress', - type: 'address', - }, - { - internalType: 'uint256', - name: 'bidPrice', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'bidBorrowAmount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'bidFine', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'nftAsset', - type: 'address', - }, - { - internalType: 'uint256', - name: 'nftTokenId', - type: 'uint256', - }, - { - internalType: 'address', - name: 'reserveAsset', - type: 'address', - }, - ], - name: 'getNftCollateralData', - outputs: [ - { - internalType: 'uint256', - name: 'totalCollateralInETH', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'totalCollateralInReserve', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'availableBorrowsInETH', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'availableBorrowsInReserve', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'ltv', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'liquidationThreshold', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'liquidationBonus', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'asset', - type: 'address', - }, - { - internalType: 'uint256', - name: 'nftTokenId', - type: 'uint256', - }, - ], - name: 'getNftConfigByTokenId', - outputs: [ - { - components: [ - { - internalType: 'uint256', - name: 'data', - type: 'uint256', - }, - ], - internalType: 'struct DataTypes.NftConfigurationMap', - name: '', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'asset', - type: 'address', - }, - ], - name: 'getNftConfiguration', - outputs: [ - { - components: [ - { - internalType: 'uint256', - name: 'data', - type: 'uint256', - }, - ], - internalType: 'struct DataTypes.NftConfigurationMap', - name: '', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'asset', - type: 'address', - }, - ], - name: 'getNftData', - outputs: [ - { - components: [ - { - components: [ - { - internalType: 'uint256', - name: 'data', - type: 'uint256', - }, - ], - internalType: 'struct DataTypes.NftConfigurationMap', - name: 'configuration', - type: 'tuple', - }, - { - internalType: 'address', - name: 'uNftAddress', - type: 'address', - }, - { - internalType: 'uint8', - name: 'id', - type: 'uint8', - }, - { - internalType: 'uint256', - name: 'maxSupply', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'maxTokenId', - type: 'uint256', - }, - ], - internalType: 'struct DataTypes.NftData', - name: '', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'nftAsset', - type: 'address', - }, - { - internalType: 'uint256', - name: 'nftTokenId', - type: 'uint256', - }, - ], - name: 'getNftDebtData', - outputs: [ - { - internalType: 'uint256', - name: 'loanId', - type: 'uint256', - }, - { - internalType: 'address', - name: 'reserveAsset', - type: 'address', - }, - { - internalType: 'uint256', - name: 'totalCollateral', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'totalDebt', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'availableBorrows', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'healthFactor', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'nftAsset', - type: 'address', - }, - { - internalType: 'uint256', - name: 'nftTokenId', - type: 'uint256', - }, - ], - name: 'getNftLiquidatePrice', - outputs: [ - { - internalType: 'uint256', - name: 'liquidatePrice', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'paybackAmount', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getNftsList', - outputs: [ - { - internalType: 'address[]', - name: '', - type: 'address[]', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getPausedTime', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'asset', - type: 'address', - }, - ], - name: 'getReserveConfiguration', - outputs: [ - { - components: [ - { - internalType: 'uint256', - name: 'data', - type: 'uint256', - }, - ], - internalType: 'struct DataTypes.ReserveConfigurationMap', - name: '', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'asset', - type: 'address', - }, - ], - name: 'getReserveData', - outputs: [ - { - components: [ - { - components: [ - { - internalType: 'uint256', - name: 'data', - type: 'uint256', - }, - ], - internalType: 'struct DataTypes.ReserveConfigurationMap', - name: 'configuration', - type: 'tuple', - }, - { - internalType: 'uint128', - name: 'liquidityIndex', - type: 'uint128', - }, - { - internalType: 'uint128', - name: 'variableBorrowIndex', - type: 'uint128', - }, - { - internalType: 'uint128', - name: 'currentLiquidityRate', - type: 'uint128', - }, - { - internalType: 'uint128', - name: 'currentVariableBorrowRate', - type: 'uint128', - }, - { - internalType: 'uint40', - name: 'lastUpdateTimestamp', - type: 'uint40', - }, - { - internalType: 'address', - name: 'uTokenAddress', - type: 'address', - }, - { - internalType: 'address', - name: 'debtTokenAddress', - type: 'address', - }, - { - internalType: 'address', - name: 'interestRateAddress', - type: 'address', - }, - { - internalType: 'uint8', - name: 'id', - type: 'uint8', - }, - ], - internalType: 'struct DataTypes.ReserveData', - name: '', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'asset', - type: 'address', - }, - ], - name: 'getReserveNormalizedIncome', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'asset', - type: 'address', - }, - ], - name: 'getReserveNormalizedVariableDebt', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getReservesList', - outputs: [ - { - internalType: 'address[]', - name: '', - type: 'address[]', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getSafeHealthFactor', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getTimeframe', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'asset', - type: 'address', - }, - { - internalType: 'address', - name: 'uNftAddress', - type: 'address', - }, - ], - name: 'initNft', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'asset', - type: 'address', - }, - { - internalType: 'address', - name: 'uTokenAddress', - type: 'address', - }, - { - internalType: 'address', - name: 'debtTokenAddress', - type: 'address', - }, - { - internalType: 'address', - name: 'interestRateAddress', - type: 'address', - }, - ], - name: 'initReserve', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'contract ILendPoolAddressesProvider', - name: 'provider', - type: 'address', - }, - ], - name: 'initialize', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'nftAsset', - type: 'address', - }, - { - internalType: 'uint256', - name: 'nftTokenId', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'liquidate', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'nftAsset', - type: 'address', - }, - { - internalType: 'uint256', - name: 'nftTokenId', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'amountOutMin', - type: 'uint256', - }, - ], - name: 'liquidateNFTX', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'nftAsset', - type: 'address', - }, - { - internalType: 'uint256', - name: 'nftTokenId', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'amountOutMin', - type: 'uint256', - }, - { - internalType: 'address', - name: 'LSSVMPair', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amountOutMinSudoswap', - type: 'uint256', - }, - ], - name: 'liquidateSudoSwap', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - { - internalType: 'bytes', - name: '', - type: 'bytes', - }, - ], - name: 'onERC721Received', - outputs: [ - { - internalType: 'bytes4', - name: '', - type: 'bytes4', - }, - ], - stateMutability: 'pure', - type: 'function', - }, - { - inputs: [], - name: 'paused', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'nftAsset', - type: 'address', - }, - { - internalType: 'uint256', - name: 'nftTokenId', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'bidFine', - type: 'uint256', - }, - ], - name: 'redeem', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'nftAsset', - type: 'address', - }, - { - internalType: 'uint256', - name: 'nftTokenId', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'repay', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'contract IERC20', - name: 'tokenContract', - type: 'address', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'bool', - name: 'rescueETH', - type: 'bool', - }, - ], - name: 'rescue', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'contract IERC721Upgradeable', - name: 'nftAsset', - type: 'address', - }, - { - internalType: 'uint256', - name: 'tokenId', - type: 'uint256', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - ], - name: 'rescueNFT', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'rescuer', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'auctionDurationConfigFee', - type: 'uint256', - }, - ], - name: 'setAuctionDurationConfigFee', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'configFee', - type: 'uint256', - }, - ], - name: 'setConfigFee', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'nftAsset', - type: 'address', - }, - { - internalType: 'uint8', - name: 'market', - type: 'uint8', - }, - { - internalType: 'bool', - name: 'val', - type: 'bool', - }, - ], - name: 'setIsMarketSupported', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'percentage', - type: 'uint256', - }, - ], - name: 'setLiquidateFeePercentage', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'val', - type: 'uint256', - }, - ], - name: 'setMaxNumberOfNfts', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'val', - type: 'uint256', - }, - ], - name: 'setMaxNumberOfReserves', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'asset', - type: 'address', - }, - { - internalType: 'uint256', - name: 'nftTokenId', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'configuration', - type: 'uint256', - }, - ], - name: 'setNftConfigByTokenId', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'asset', - type: 'address', - }, - { - internalType: 'uint256', - name: 'configuration', - type: 'uint256', - }, - ], - name: 'setNftConfiguration', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'asset', - type: 'address', - }, - { - internalType: 'uint256', - name: 'maxSupply', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'maxTokenId', - type: 'uint256', - }, - ], - name: 'setNftMaxSupplyAndTokenId', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bool', - name: 'val', - type: 'bool', - }, - ], - name: 'setPause', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'startTime', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'durationTime', - type: 'uint256', - }, - ], - name: 'setPausedTime', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'asset', - type: 'address', - }, - { - internalType: 'uint256', - name: 'configuration', - type: 'uint256', - }, - ], - name: 'setReserveConfiguration', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'asset', - type: 'address', - }, - { - internalType: 'address', - name: 'rateAddress', - type: 'address', - }, - ], - name: 'setReserveInterestRateAddress', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'timeframe', - type: 'uint256', - }, - ], - name: 'setTimeframe', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'uToken', - type: 'address', - }, - { - internalType: 'address', - name: 'treasury', - type: 'address', - }, - ], - name: 'setTreasuryAddress', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newRescuer', - type: 'address', - }, - ], - name: 'updateRescuer', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'newSafeHealthFactor', - type: 'uint256', - }, - ], - name: 'updateSafeHealthFactor', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'asset', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - ], - name: 'withdraw', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - stateMutability: 'payable', - type: 'receive', - }, -] as const; - -export type UnlockdFinanceLendPool = typeof unlockdFinanceLendPoolAbi; -export type UnlockdFinanceLendPoolContract = GetContractReturnType; - -export class UnlockdFinanceLendPool__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: unlockdFinanceLendPoolAbi, publicClient: client }); - } -} diff --git a/src/apps/unlockd-finance/contracts/viem/UnlockdFinanceLendPoolAddressesProvider.ts b/src/apps/unlockd-finance/contracts/viem/UnlockdFinanceLendPoolAddressesProvider.ts deleted file mode 100644 index b3f907555..000000000 --- a/src/apps/unlockd-finance/contracts/viem/UnlockdFinanceLendPoolAddressesProvider.ts +++ /dev/null @@ -1,920 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const unlockdFinanceLendPoolAddressesProviderAbi = [ - { - inputs: [ - { - internalType: 'string', - name: 'marketId', - type: 'string', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'bytes32', - name: 'id', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'address', - name: 'newAddress', - type: 'address', - }, - { - indexed: false, - internalType: 'bool', - name: 'hasProxy', - type: 'bool', - }, - { - indexed: false, - internalType: 'bytes', - name: 'encodedCallData', - type: 'bytes', - }, - ], - name: 'AddressSet', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'newAddress', - type: 'address', - }, - ], - name: 'ConfigurationAdminUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'newAddress', - type: 'address', - }, - ], - name: 'EmergencyAdminUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'newAddress', - type: 'address', - }, - ], - name: 'IncentivesControllerUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'newAddress', - type: 'address', - }, - ], - name: 'LSSVMRouterUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'newAddress', - type: 'address', - }, - { - indexed: false, - internalType: 'bytes', - name: 'encodedCallData', - type: 'bytes', - }, - ], - name: 'LendPoolConfiguratorUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'newAddress', - type: 'address', - }, - ], - name: 'LendPoolLiquidatorUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'newAddress', - type: 'address', - }, - { - indexed: false, - internalType: 'bytes', - name: 'encodedCallData', - type: 'bytes', - }, - ], - name: 'LendPoolLoanUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'newAddress', - type: 'address', - }, - { - indexed: false, - internalType: 'bytes', - name: 'encodedCallData', - type: 'bytes', - }, - ], - name: 'LendPoolUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'newAddress', - type: 'address', - }, - ], - name: 'LtvManagerUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'string', - name: 'newMarketId', - type: 'string', - }, - ], - name: 'MarketIdSet', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'newAddress', - type: 'address', - }, - ], - name: 'NFTXVaultFactoryUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'newAddress', - type: 'address', - }, - ], - name: 'NftOracleUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipTransferred', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'bytes32', - name: 'id', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'address', - name: 'newAddress', - type: 'address', - }, - ], - name: 'ProxyCreated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'newAddress', - type: 'address', - }, - ], - name: 'ReserveOracleUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'newAddress', - type: 'address', - }, - ], - name: 'SushiSwapRouterUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'newAddress', - type: 'address', - }, - ], - name: 'UIDataProviderUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'newAddress', - type: 'address', - }, - ], - name: 'UNFTRegistryUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'newAddress', - type: 'address', - }, - ], - name: 'UnlockdDataProviderUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'newAddress', - type: 'address', - }, - ], - name: 'WalletBalanceProviderUpdated', - type: 'event', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'id', - type: 'bytes32', - }, - ], - name: 'getAddress', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getEmergencyAdmin', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'proxyAddress', - type: 'address', - }, - ], - name: 'getImplementation', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getIncentivesController', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getLSSVMRouter', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getLendPool', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getLendPoolConfigurator', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getLendPoolLiquidator', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getLendPoolLoan', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getMarketId', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getNFTOracle', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getNFTXVaultFactory', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getPoolAdmin', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getReserveOracle', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getSushiSwapRouter', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getUIDataProvider', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getUNFTRegistry', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getUnlockdDataProvider', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getWalletBalanceProvider', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'owner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'renounceOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'id', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'newAddress', - type: 'address', - }, - ], - name: 'setAddress', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'id', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'implementationAddress', - type: 'address', - }, - { - internalType: 'bytes', - name: 'encodedCallData', - type: 'bytes', - }, - ], - name: 'setAddressAsProxy', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'emergencyAdmin', - type: 'address', - }, - ], - name: 'setEmergencyAdmin', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'controller', - type: 'address', - }, - ], - name: 'setIncentivesController', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'router', - type: 'address', - }, - ], - name: 'setLSSVMRouter', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'configurator', - type: 'address', - }, - { - internalType: 'bytes', - name: 'encodedCallData', - type: 'bytes', - }, - ], - name: 'setLendPoolConfiguratorImpl', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - internalType: 'bytes', - name: 'encodedCallData', - type: 'bytes', - }, - ], - name: 'setLendPoolImpl', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'liquidator', - type: 'address', - }, - ], - name: 'setLendPoolLiquidator', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'loanAddress', - type: 'address', - }, - { - internalType: 'bytes', - name: 'encodedCallData', - type: 'bytes', - }, - ], - name: 'setLendPoolLoanImpl', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'string', - name: 'marketId', - type: 'string', - }, - ], - name: 'setMarketId', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'nftOracle', - type: 'address', - }, - ], - name: 'setNFTOracle', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'factory', - type: 'address', - }, - ], - name: 'setNFTXVaultFactory', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'admin', - type: 'address', - }, - ], - name: 'setPoolAdmin', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'reserveOracle', - type: 'address', - }, - ], - name: 'setReserveOracle', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'router', - type: 'address', - }, - ], - name: 'setSushiSwapRouter', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'provider', - type: 'address', - }, - ], - name: 'setUIDataProvider', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'factory', - type: 'address', - }, - ], - name: 'setUNFTRegistry', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'provider', - type: 'address', - }, - ], - name: 'setUnlockdDataProvider', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'provider', - type: 'address', - }, - ], - name: 'setWalletBalanceProvider', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'transferOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type UnlockdFinanceLendPoolAddressesProvider = typeof unlockdFinanceLendPoolAddressesProviderAbi; -export type UnlockdFinanceLendPoolAddressesProviderContract = GetContractReturnType< - UnlockdFinanceLendPoolAddressesProvider, - PublicClient ->; - -export class UnlockdFinanceLendPoolAddressesProvider__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: unlockdFinanceLendPoolAddressesProviderAbi, publicClient: client }); - } -} diff --git a/src/apps/unlockd-finance/contracts/viem/UnlockdFinanceProtocolDataProvider.ts b/src/apps/unlockd-finance/contracts/viem/UnlockdFinanceProtocolDataProvider.ts deleted file mode 100644 index ea6f35701..000000000 --- a/src/apps/unlockd-finance/contracts/viem/UnlockdFinanceProtocolDataProvider.ts +++ /dev/null @@ -1,695 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const unlockdFinanceProtocolDataProviderAbi = [ - { - inputs: [ - { - internalType: 'contract ILendPoolAddressesProvider', - name: 'addressesProvider', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - inputs: [], - name: 'ADDRESSES_PROVIDER', - outputs: [ - { - internalType: 'contract ILendPoolAddressesProvider', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getAllNftsTokenDatas', - outputs: [ - { - components: [ - { - internalType: 'string', - name: 'nftSymbol', - type: 'string', - }, - { - internalType: 'address', - name: 'nftAddress', - type: 'address', - }, - { - internalType: 'string', - name: 'uNftSymbol', - type: 'string', - }, - { - internalType: 'address', - name: 'uNftAddress', - type: 'address', - }, - ], - internalType: 'struct UnlockdProtocolDataProvider.NftTokenData[]', - name: '', - type: 'tuple[]', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getAllReservesTokenDatas', - outputs: [ - { - components: [ - { - internalType: 'string', - name: 'tokenSymbol', - type: 'string', - }, - { - internalType: 'address', - name: 'tokenAddress', - type: 'address', - }, - { - internalType: 'string', - name: 'uTokenSymbol', - type: 'string', - }, - { - internalType: 'address', - name: 'uTokenAddress', - type: 'address', - }, - { - internalType: 'string', - name: 'debtTokenSymbol', - type: 'string', - }, - { - internalType: 'address', - name: 'debtTokenAddress', - type: 'address', - }, - ], - internalType: 'struct UnlockdProtocolDataProvider.ReserveTokenData[]', - name: '', - type: 'tuple[]', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'nftAsset', - type: 'address', - }, - { - internalType: 'uint256', - name: 'nftTokenId', - type: 'uint256', - }, - ], - name: 'getLoanDataByCollateral', - outputs: [ - { - components: [ - { - internalType: 'uint256', - name: 'loanId', - type: 'uint256', - }, - { - internalType: 'uint8', - name: 'state', - type: 'uint8', - }, - { - internalType: 'address', - name: 'borrower', - type: 'address', - }, - { - internalType: 'address', - name: 'nftAsset', - type: 'address', - }, - { - internalType: 'uint256', - name: 'nftTokenId', - type: 'uint256', - }, - { - internalType: 'address', - name: 'reserveAsset', - type: 'address', - }, - { - internalType: 'uint256', - name: 'scaledAmount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'currentAmount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'bidStartTimestamp', - type: 'uint256', - }, - { - internalType: 'address', - name: 'bidderAddress', - type: 'address', - }, - { - internalType: 'uint256', - name: 'bidPrice', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'bidBorrowAmount', - type: 'uint256', - }, - ], - internalType: 'struct UnlockdProtocolDataProvider.LoanData', - name: 'loanData', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'loanId', - type: 'uint256', - }, - ], - name: 'getLoanDataByLoanId', - outputs: [ - { - components: [ - { - internalType: 'uint256', - name: 'loanId', - type: 'uint256', - }, - { - internalType: 'uint8', - name: 'state', - type: 'uint8', - }, - { - internalType: 'address', - name: 'borrower', - type: 'address', - }, - { - internalType: 'address', - name: 'nftAsset', - type: 'address', - }, - { - internalType: 'uint256', - name: 'nftTokenId', - type: 'uint256', - }, - { - internalType: 'address', - name: 'reserveAsset', - type: 'address', - }, - { - internalType: 'uint256', - name: 'scaledAmount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'currentAmount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'bidStartTimestamp', - type: 'uint256', - }, - { - internalType: 'address', - name: 'bidderAddress', - type: 'address', - }, - { - internalType: 'uint256', - name: 'bidPrice', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'bidBorrowAmount', - type: 'uint256', - }, - ], - internalType: 'struct UnlockdProtocolDataProvider.LoanData', - name: 'loanData', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'asset', - type: 'address', - }, - { - internalType: 'uint256', - name: 'tokenId', - type: 'uint256', - }, - { - internalType: 'address', - name: 'reserveAsset', - type: 'address', - }, - ], - name: 'getNFTXPrice', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'asset', - type: 'address', - }, - ], - name: 'getNftConfigurationData', - outputs: [ - { - components: [ - { - internalType: 'uint256', - name: 'ltv', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'liquidationThreshold', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'liquidationBonus', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'redeemDuration', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'auctionDuration', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'redeemFine', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'redeemThreshold', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'minBidFine', - type: 'uint256', - }, - { - internalType: 'bool', - name: 'isActive', - type: 'bool', - }, - { - internalType: 'bool', - name: 'isFrozen', - type: 'bool', - }, - { - internalType: 'uint256', - name: 'configTimestamp', - type: 'uint256', - }, - ], - internalType: 'struct UnlockdProtocolDataProvider.NftConfigurationData', - name: 'configData', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'asset', - type: 'address', - }, - { - internalType: 'uint256', - name: 'tokenId', - type: 'uint256', - }, - ], - name: 'getNftConfigurationDataByTokenId', - outputs: [ - { - components: [ - { - internalType: 'uint256', - name: 'ltv', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'liquidationThreshold', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'liquidationBonus', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'redeemDuration', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'auctionDuration', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'redeemFine', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'redeemThreshold', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'minBidFine', - type: 'uint256', - }, - { - internalType: 'bool', - name: 'isActive', - type: 'bool', - }, - { - internalType: 'bool', - name: 'isFrozen', - type: 'bool', - }, - { - internalType: 'uint256', - name: 'configTimestamp', - type: 'uint256', - }, - ], - internalType: 'struct UnlockdProtocolDataProvider.NftConfigurationData', - name: 'configData', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'nftAsset', - type: 'address', - }, - ], - name: 'getNftTokenData', - outputs: [ - { - components: [ - { - internalType: 'string', - name: 'nftSymbol', - type: 'string', - }, - { - internalType: 'address', - name: 'nftAddress', - type: 'address', - }, - { - internalType: 'string', - name: 'uNftSymbol', - type: 'string', - }, - { - internalType: 'address', - name: 'uNftAddress', - type: 'address', - }, - ], - internalType: 'struct UnlockdProtocolDataProvider.NftTokenData', - name: '', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'asset', - type: 'address', - }, - ], - name: 'getReserveConfigurationData', - outputs: [ - { - internalType: 'uint256', - name: 'decimals', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'reserveFactor', - type: 'uint256', - }, - { - internalType: 'bool', - name: 'borrowingEnabled', - type: 'bool', - }, - { - internalType: 'bool', - name: 'isActive', - type: 'bool', - }, - { - internalType: 'bool', - name: 'isFrozen', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'asset', - type: 'address', - }, - ], - name: 'getReserveData', - outputs: [ - { - internalType: 'uint256', - name: 'availableLiquidity', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'totalVariableDebt', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'liquidityRate', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'variableBorrowRate', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'liquidityIndex', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'variableBorrowIndex', - type: 'uint256', - }, - { - internalType: 'uint40', - name: 'lastUpdateTimestamp', - type: 'uint40', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'asset', - type: 'address', - }, - ], - name: 'getReserveTokenData', - outputs: [ - { - components: [ - { - internalType: 'string', - name: 'tokenSymbol', - type: 'string', - }, - { - internalType: 'address', - name: 'tokenAddress', - type: 'address', - }, - { - internalType: 'string', - name: 'uTokenSymbol', - type: 'string', - }, - { - internalType: 'address', - name: 'uTokenAddress', - type: 'address', - }, - { - internalType: 'string', - name: 'debtTokenSymbol', - type: 'string', - }, - { - internalType: 'address', - name: 'debtTokenAddress', - type: 'address', - }, - ], - internalType: 'struct UnlockdProtocolDataProvider.ReserveTokenData', - name: '', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'asset', - type: 'address', - }, - { - internalType: 'address', - name: 'user', - type: 'address', - }, - ], - name: 'getUserReserveData', - outputs: [ - { - internalType: 'uint256', - name: 'currentUTokenBalance', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'currentVariableDebt', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'scaledVariableDebt', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'liquidityRate', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, -] as const; - -export type UnlockdFinanceProtocolDataProvider = typeof unlockdFinanceProtocolDataProviderAbi; -export type UnlockdFinanceProtocolDataProviderContract = GetContractReturnType< - UnlockdFinanceProtocolDataProvider, - PublicClient ->; - -export class UnlockdFinanceProtocolDataProvider__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: unlockdFinanceProtocolDataProviderAbi, publicClient: client }); - } -} diff --git a/src/apps/unlockd-finance/contracts/viem/UnlockdFinanceUToken.ts b/src/apps/unlockd-finance/contracts/viem/UnlockdFinanceUToken.ts deleted file mode 100644 index 9e8243a40..000000000 --- a/src/apps/unlockd-finance/contracts/viem/UnlockdFinanceUToken.ts +++ /dev/null @@ -1,675 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const unlockdFinanceUTokenAbi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'index', - type: 'uint256', - }, - ], - name: 'BalanceTransfer', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'target', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'index', - type: 'uint256', - }, - ], - name: 'Burn', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'underlyingAsset', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - indexed: false, - internalType: 'address', - name: 'treasury', - type: 'address', - }, - { - indexed: false, - internalType: 'address', - name: 'incentivesController', - type: 'address', - }, - ], - name: 'Initialized', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'index', - type: 'uint256', - }, - ], - name: 'Mint', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: '_newTreasuryAddress', - type: 'address', - }, - ], - name: 'TreasuryAddressUpdated', - type: 'event', - }, - { - inputs: [], - name: 'POOL', - outputs: [ - { - internalType: 'contract ILendPool', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'RESERVE_TREASURY_ADDRESS', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'UNDERLYING_ASSET_ADDRESS', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'user', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'user', - type: 'address', - }, - { - internalType: 'address', - name: 'receiverOfUnderlying', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'index', - type: 'uint256', - }, - ], - name: 'burn', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'getIncentivesController', - outputs: [ - { - internalType: 'contract IIncentivesController', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'user', - type: 'address', - }, - ], - name: 'getScaledUserBalanceAndSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'contract ILendPoolAddressesProvider', - name: 'addressProvider', - type: 'address', - }, - { - internalType: 'address', - name: 'treasury', - type: 'address', - }, - { - internalType: 'address', - name: 'underlyingAsset', - type: 'address', - }, - { - internalType: 'uint8', - name: 'uTokenDecimals', - type: 'uint8', - }, - { - internalType: 'string', - name: 'uTokenName', - type: 'string', - }, - { - internalType: 'string', - name: 'uTokenSymbol', - type: 'string', - }, - ], - name: 'initialize', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'user', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'index', - type: 'uint256', - }, - ], - name: 'mint', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'index', - type: 'uint256', - }, - ], - name: 'mintToTreasury', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'user', - type: 'address', - }, - ], - name: 'scaledBalanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'scaledTotalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'treasury', - type: 'address', - }, - ], - name: 'setTreasuryAddress', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'target', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferUnderlyingTo', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type UnlockdFinanceUToken = typeof unlockdFinanceUTokenAbi; -export type UnlockdFinanceUTokenContract = GetContractReturnType; - -export class UnlockdFinanceUToken__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: unlockdFinanceUTokenAbi, publicClient: client }); - } -} diff --git a/src/apps/unlockd-finance/contracts/viem/index.ts b/src/apps/unlockd-finance/contracts/viem/index.ts deleted file mode 100644 index e08d4ad25..000000000 --- a/src/apps/unlockd-finance/contracts/viem/index.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -export type { UnlockdFinanceDebtToken } from './UnlockdFinanceDebtToken'; -export type { UnlockdFinanceLendPoolAddressesProvider } from './UnlockdFinanceLendPoolAddressesProvider'; -export type { UnlockdFinanceLendPool } from './UnlockdFinanceLendPool'; -export type { UnlockdFinanceProtocolDataProvider } from './UnlockdFinanceProtocolDataProvider'; -export type { UnlockdFinanceUToken } from './UnlockdFinanceUToken'; - -export { UnlockdFinanceDebtToken__factory } from './UnlockdFinanceDebtToken'; -export { UnlockdFinanceLendPoolAddressesProvider__factory } from './UnlockdFinanceLendPoolAddressesProvider'; -export { UnlockdFinanceLendPool__factory } from './UnlockdFinanceLendPool'; -export { UnlockdFinanceProtocolDataProvider__factory } from './UnlockdFinanceProtocolDataProvider'; -export { UnlockdFinanceUToken__factory } from './UnlockdFinanceUToken'; diff --git a/src/apps/unlockd-finance/ethereum/unlockd-finance.position-presenter.ts b/src/apps/unlockd-finance/ethereum/unlockd-finance.position-presenter.ts index aa387f311..0aca843af 100644 --- a/src/apps/unlockd-finance/ethereum/unlockd-finance.position-presenter.ts +++ b/src/apps/unlockd-finance/ethereum/unlockd-finance.position-presenter.ts @@ -18,7 +18,7 @@ export class EthereumUnlockdFinancePositionPresenter extends PositionPresenterTe { viewType: 'list', label: 'Borrow', - groupIds: ['variable-debt'], + groupIds: ['variable-debt-2'], }, ], }, diff --git a/src/apps/unlockd-finance/ethereum/unlockd-finance.supply.token-fetcher.ts b/src/apps/unlockd-finance/ethereum/unlockd-finance.supply.token-fetcher.ts deleted file mode 100644 index fad1d6b4a..000000000 --- a/src/apps/unlockd-finance/ethereum/unlockd-finance.supply.token-fetcher.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { getLabelFromToken } from '~app-toolkit/helpers/presentation/image.present'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { - GetAddressesParams, - DefaultAppTokenDefinition, - GetUnderlyingTokensParams, - GetDataPropsParams, - GetDisplayPropsParams, -} from '~position/template/app-token.template.types'; - -import { UnlockdFinanceViemContractFactory } from '../contracts'; -import { UnlockdFinanceUToken } from '../contracts/viem'; - -const SECONDS_PER_YEAR = 31536000; - -@PositionTemplate() -export class EthereumUnlockdFinanceSupplyTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Lending'; - uTokenAddress = '0x302ceac15678e3238d19a0c4714533701169c217'; // Mainnet UToken Address - wethAddress = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'; // Mainnet WETH Address - dataProviderAddress = '0x4abde724f8d7cb5ec7b22a9b86824591be9fdc86'; // Mainnet Data Provider Address - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(UnlockdFinanceViemContractFactory) private readonly contractFactory: UnlockdFinanceViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.unlockdFinanceUToken({ network: this.network, address }); - } - - async getAddresses(_params: GetAddressesParams): Promise { - return [this.uTokenAddress]; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.UNDERLYING_ASSET_ADDRESS(), network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } - - async getApy({ multicall }: GetDataPropsParams): Promise { - const pool = multicall.wrap( - this.contractFactory.unlockdFinanceProtocolDataProvider({ - network: this.network, - address: this.dataProviderAddress, - }), - ); - - const reservesData = await pool.read.getReserveData([this.wethAddress]); - - const aprNumber = Number(reservesData[2]) / 10 ** 27; - - const apyNumber = (aprNumber / SECONDS_PER_YEAR + 1) ** SECONDS_PER_YEAR - 1; - - return apyNumber * 100; - } - - async getLabel({ appToken }: GetDisplayPropsParams): Promise { - return getLabelFromToken(appToken.tokens[0]); - } - - async getLabelDetailed({ appToken }: GetDisplayPropsParams): Promise { - return appToken.symbol; - } - - async getTertiaryLabel({ appToken }: GetDisplayPropsParams) { - return `${appToken.dataProps.apy.toFixed(3)}% APY`; - } -} diff --git a/src/apps/unlockd-finance/ethereum/unlockd-finance.variable-debt.token-fetcher.ts b/src/apps/unlockd-finance/ethereum/unlockd-finance.variable-debt.token-fetcher.ts deleted file mode 100644 index 9c15c1d99..000000000 --- a/src/apps/unlockd-finance/ethereum/unlockd-finance.variable-debt.token-fetcher.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { getLabelFromToken } from '~app-toolkit/helpers/presentation/image.present'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { - GetAddressesParams, - DefaultAppTokenDefinition, - GetUnderlyingTokensParams, - UnderlyingTokenDefinition, - GetDataPropsParams, - GetDisplayPropsParams, -} from '~position/template/app-token.template.types'; - -import { UnlockdFinanceViemContractFactory } from '../contracts'; -import { UnlockdFinanceUToken } from '../contracts/viem'; - -const SECONDS_PER_YEAR = 31536000; - -@PositionTemplate() -export class EthereumUnlockdFinanceVariableDebtTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Lending'; - debtTokenAddress = '0xd11cf5512a775591b3258d976af51d3a70a6660e'; // Mainnet DebtToken Address - wethAddress = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'; // Mainnet WETH Address - dataProviderAddress = '0x4abde724f8d7cb5ec7b22a9b86824591be9fdc86'; // Mainnet Data Provider Address - isDebt = true; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(UnlockdFinanceViemContractFactory) private readonly contractFactory: UnlockdFinanceViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.unlockdFinanceUToken({ network: this.network, address }); - } - - async getAddresses(_params: GetAddressesParams): Promise { - return [this.debtTokenAddress]; - } - - async getUnderlyingTokenDefinitions({ - contract, - }: GetUnderlyingTokensParams): Promise { - return [{ address: await contract.read.UNDERLYING_ASSET_ADDRESS(), network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } - - async getApy({ multicall }: GetDataPropsParams): Promise { - const pool = multicall.wrap( - this.contractFactory.unlockdFinanceProtocolDataProvider({ - network: this.network, - address: this.dataProviderAddress, - }), - ); - - const reservesData = await pool.read.getReserveData([this.wethAddress]); - - const apr = Number(reservesData[3]) / 10 ** 27; - - const base = apr / SECONDS_PER_YEAR + 1; - - const apy = base ** SECONDS_PER_YEAR - 1; - - return apy * 100; - } - - async getLabel({ appToken }: GetDisplayPropsParams): Promise { - return getLabelFromToken(appToken.tokens[0]); - } - - async getLabelDetailed({ appToken }: GetDisplayPropsParams): Promise { - return appToken.symbol; - } - - async getTertiaryLabel({ appToken }: GetDisplayPropsParams) { - return `${appToken.dataProps.apy.toFixed(3)}% APY (variable)`; - } -} diff --git a/src/apps/unlockd-finance/unlockd-finance.module.ts b/src/apps/unlockd-finance/unlockd-finance.module.ts index 8cea49b96..4450b7cd7 100644 --- a/src/apps/unlockd-finance/unlockd-finance.module.ts +++ b/src/apps/unlockd-finance/unlockd-finance.module.ts @@ -2,17 +2,9 @@ import { Module } from '@nestjs/common'; import { AbstractApp } from '~app/app.dynamic-module'; -import { UnlockdFinanceViemContractFactory } from './contracts'; import { EthereumUnlockdFinancePositionPresenter } from './ethereum/unlockd-finance.position-presenter'; -import { EthereumUnlockdFinanceSupplyTokenFetcher } from './ethereum/unlockd-finance.supply.token-fetcher'; -import { EthereumUnlockdFinanceVariableDebtTokenFetcher } from './ethereum/unlockd-finance.variable-debt.token-fetcher'; @Module({ - providers: [ - UnlockdFinanceViemContractFactory, - EthereumUnlockdFinancePositionPresenter, - EthereumUnlockdFinanceSupplyTokenFetcher, - EthereumUnlockdFinanceVariableDebtTokenFetcher, - ], + providers: [EthereumUnlockdFinancePositionPresenter], }) export class UnlockdFinanceAppModule extends AbstractApp() {} diff --git a/src/apps/vela/arbitrum/vela.es-vela.token-fetcher.ts b/src/apps/vela/arbitrum/vela.es-vela.token-fetcher.ts deleted file mode 100644 index ec4b3e570..000000000 --- a/src/apps/vela/arbitrum/vela.es-vela.token-fetcher.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { VelaEsVelaTokenFetcher } from '../common/vela.es-vela.token-fetcher'; - -@PositionTemplate() -export class ArbitrumVelaEsVelaTokenFetcher extends VelaEsVelaTokenFetcher { - esVelaAddress = '0xefd5a713c5bd85e9ced46070b2532e4a47a18102'; - velaAddress = '0x088cd8f5ef3652623c22d48b1605dcfe860cd704'; -} diff --git a/src/apps/vela/common/vela.es-vela.token-fetcher.ts b/src/apps/vela/common/vela.es-vela.token-fetcher.ts deleted file mode 100644 index 6bf673b6e..000000000 --- a/src/apps/vela/common/vela.es-vela.token-fetcher.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { Erc20 } from '~contract/contracts/viem'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { UnderlyingTokenDefinition } from '~position/template/app-token.template.types'; - -import { VelaViemContractFactory } from '../contracts'; - -export abstract class VelaEsVelaTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'esVELA'; - - abstract esVelaAddress: string; - abstract velaAddress: string; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(VelaViemContractFactory) private readonly velaContractFactory: VelaViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.appToolkit.globalViemContracts.erc20({ - address, - network: this.network, - }); - } - - async getAddresses(): Promise { - return [this.esVelaAddress]; - } - - async getUnderlyingTokenDefinitions(): Promise { - return [{ address: this.velaAddress, network: this.network }]; - } - - async getPricePerShare(): Promise { - return [1]; - } -} diff --git a/src/apps/vela/vela.module.ts b/src/apps/vela/vela.module.ts index 7d2f4af66..d9a411d85 100644 --- a/src/apps/vela/vela.module.ts +++ b/src/apps/vela/vela.module.ts @@ -2,17 +2,11 @@ import { Module } from '@nestjs/common'; import { AbstractApp } from '~app/app.dynamic-module'; -import { ArbitrumVelaEsVelaTokenFetcher } from './arbitrum/vela.es-vela.token-fetcher'; import { ArbitrumVelaVlpFarmContractPositionFetcher } from './arbitrum/vela.token-farm.contract-position-fetcher'; import { ArbitrumVelaVlpTokenFetcher } from './arbitrum/vela.vlp.token-fetcher'; import { VelaViemContractFactory } from './contracts'; @Module({ - providers: [ - ArbitrumVelaEsVelaTokenFetcher, - ArbitrumVelaVlpFarmContractPositionFetcher, - ArbitrumVelaVlpTokenFetcher, - VelaViemContractFactory, - ], + providers: [ArbitrumVelaVlpFarmContractPositionFetcher, ArbitrumVelaVlpTokenFetcher, VelaViemContractFactory], }) export class VelaAppModule extends AbstractApp() {}