From cff438bee0c31ce2957c884b8954d9648fe14db5 Mon Sep 17 00:00:00 2001 From: William Poulin Date: Tue, 2 Jan 2024 14:21:02 -0500 Subject: [PATCH] more --- .../cask-protocol.wallet.token-fetcher.ts | 9 - src/apps/cask-protocol/assets/logo.png | Bin 8767 -> 0 bytes .../cask-protocol.wallet.token-fetcher.ts | 9 - .../cask-protocol.wallet.token-fetcher.ts | 9 - .../cask-protocol/cask-protocol.module.ts | 28 - .../cask-protocol.wallet.token-fetcher.ts | 9 - .../cask-protocol.wallet.token-fetcher.ts | 46 - .../contracts/abis/cask-vault-token.json | 1568 ---------------- src/apps/cask-protocol/contracts/index.ts | 4 - .../contracts/viem.contract-factory.ts | 17 - .../contracts/viem/CaskVaultToken.ts | 1582 ----------------- .../cask-protocol/contracts/viem/index.ts | 7 - .../cask-protocol.wallet.token-fetcher.ts | 9 - .../cask-protocol.wallet.token-fetcher.ts | 9 - .../cask-protocol.wallet.token-fetcher.ts | 9 - .../cask-protocol.wallet.token-fetcher.ts | 9 - .../gmx/arbitrum/gmx.es-gmx.token-fetcher.ts | 12 - .../gmx/avalanche/gmx.es-gmx.token-fetcher.ts | 12 - .../gmx/common/gmx.es-gmx.token-fetcher.ts | 35 - src/apps/gmx/gmx.module.ts | 4 - 20 files changed, 3387 deletions(-) delete mode 100644 src/apps/cask-protocol/arbitrum/cask-protocol.wallet.token-fetcher.ts delete mode 100644 src/apps/cask-protocol/assets/logo.png delete mode 100644 src/apps/cask-protocol/avalanche/cask-protocol.wallet.token-fetcher.ts delete mode 100644 src/apps/cask-protocol/binance-smart-chain/cask-protocol.wallet.token-fetcher.ts delete mode 100644 src/apps/cask-protocol/cask-protocol.module.ts delete mode 100644 src/apps/cask-protocol/celo/cask-protocol.wallet.token-fetcher.ts delete mode 100644 src/apps/cask-protocol/common/cask-protocol.wallet.token-fetcher.ts delete mode 100644 src/apps/cask-protocol/contracts/abis/cask-vault-token.json delete mode 100644 src/apps/cask-protocol/contracts/index.ts delete mode 100644 src/apps/cask-protocol/contracts/viem.contract-factory.ts delete mode 100644 src/apps/cask-protocol/contracts/viem/CaskVaultToken.ts delete mode 100644 src/apps/cask-protocol/contracts/viem/index.ts delete mode 100644 src/apps/cask-protocol/fantom/cask-protocol.wallet.token-fetcher.ts delete mode 100644 src/apps/cask-protocol/gnosis/cask-protocol.wallet.token-fetcher.ts delete mode 100644 src/apps/cask-protocol/optimism/cask-protocol.wallet.token-fetcher.ts delete mode 100644 src/apps/cask-protocol/polygon/cask-protocol.wallet.token-fetcher.ts delete mode 100644 src/apps/gmx/arbitrum/gmx.es-gmx.token-fetcher.ts delete mode 100644 src/apps/gmx/avalanche/gmx.es-gmx.token-fetcher.ts delete mode 100644 src/apps/gmx/common/gmx.es-gmx.token-fetcher.ts diff --git a/src/apps/cask-protocol/arbitrum/cask-protocol.wallet.token-fetcher.ts b/src/apps/cask-protocol/arbitrum/cask-protocol.wallet.token-fetcher.ts deleted file mode 100644 index 1c8922f06..000000000 --- a/src/apps/cask-protocol/arbitrum/cask-protocol.wallet.token-fetcher.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { CaskProtocolWalletTokenFetcher } from '../common/cask-protocol.wallet.token-fetcher'; - -@PositionTemplate() -export class ArbitrumCaskProtocolWalletTokenFetcher extends CaskProtocolWalletTokenFetcher { - groupLabel = 'Vaults'; - caskVaultContractAddress = '0x20151ff7fdd720b85063d02081aa5b7876adff7b'; -} diff --git a/src/apps/cask-protocol/assets/logo.png b/src/apps/cask-protocol/assets/logo.png deleted file mode 100644 index 286e4c62e4980f95710c7a6fd71bbd4db58aaddc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8767 zcmcI~2UJtfzAiAed`CnWTQ5_$)vC`AP6B}fS!3%!US9fd$B z7K(^S01<>J9d7)$civg|-gVYn>t$u{J$v>y->=S0_Dm9u3^bX~a-OB2pkUV4QZpf6 z!+#(2wB&PYl;?Hwg~40P%8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3cpYnRK)e3wX9X6#31RJb+eIa~kdDJD_3yU7y}SKd?cLKC z+?b>LOY{l_#9Vo*7>@M@#`sQ5i>dz93x-L@?OK49%iXAJU z!EP>&4RDY&Thu&!${&K`;|(_-aJ;%PI^(O#EADAeusJi6P2TW% zgbnm=&0%HnW@k}CT*3TiH+;LFj^-#iOZk*W;^=noLyCX@#Y0=&K&|eUL(G2x Dy@21$ diff --git a/src/apps/cask-protocol/avalanche/cask-protocol.wallet.token-fetcher.ts b/src/apps/cask-protocol/avalanche/cask-protocol.wallet.token-fetcher.ts deleted file mode 100644 index e08f9aadd..000000000 --- a/src/apps/cask-protocol/avalanche/cask-protocol.wallet.token-fetcher.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { CaskProtocolWalletTokenFetcher } from '../common/cask-protocol.wallet.token-fetcher'; - -@PositionTemplate() -export class AvalancheCaskProtocolWalletTokenFetcher extends CaskProtocolWalletTokenFetcher { - groupLabel = 'Vaults'; - caskVaultContractAddress = '0x3b2b4b547daeebf3a703288cb43650f0f287b9ff'; -} diff --git a/src/apps/cask-protocol/binance-smart-chain/cask-protocol.wallet.token-fetcher.ts b/src/apps/cask-protocol/binance-smart-chain/cask-protocol.wallet.token-fetcher.ts deleted file mode 100644 index f312ab147..000000000 --- a/src/apps/cask-protocol/binance-smart-chain/cask-protocol.wallet.token-fetcher.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { CaskProtocolWalletTokenFetcher } from '../common/cask-protocol.wallet.token-fetcher'; - -@PositionTemplate() -export class BinanceSmartChainCaskProtocolWalletTokenFetcher extends CaskProtocolWalletTokenFetcher { - groupLabel = 'Vaults'; - caskVaultContractAddress = '0x3b2b4b547daeebf3a703288cb43650f0f287b9ff'; -} diff --git a/src/apps/cask-protocol/cask-protocol.module.ts b/src/apps/cask-protocol/cask-protocol.module.ts deleted file mode 100644 index 26f5f831e..000000000 --- a/src/apps/cask-protocol/cask-protocol.module.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Module } from '@nestjs/common'; - -import { AbstractApp } from '~app/app.dynamic-module'; - -import { ArbitrumCaskProtocolWalletTokenFetcher } from './arbitrum/cask-protocol.wallet.token-fetcher'; -import { AvalancheCaskProtocolWalletTokenFetcher } from './avalanche/cask-protocol.wallet.token-fetcher'; -import { BinanceSmartChainCaskProtocolWalletTokenFetcher } from './binance-smart-chain/cask-protocol.wallet.token-fetcher'; -import { CeloCaskProtocolWalletTokenFetcher } from './celo/cask-protocol.wallet.token-fetcher'; -import { CaskProtocolViemContractFactory } from './contracts'; -import { FantomCaskProtocolWalletTokenFetcher } from './fantom/cask-protocol.wallet.token-fetcher'; -import { GnosisCaskProtocolWalletTokenFetcher } from './gnosis/cask-protocol.wallet.token-fetcher'; -import { OptimismCaskProtocolWalletTokenFetcher } from './optimism/cask-protocol.wallet.token-fetcher'; -import { PolygonCaskProtocolWalletTokenFetcher } from './polygon/cask-protocol.wallet.token-fetcher'; - -@Module({ - providers: [ - CaskProtocolViemContractFactory, - ArbitrumCaskProtocolWalletTokenFetcher, - AvalancheCaskProtocolWalletTokenFetcher, - BinanceSmartChainCaskProtocolWalletTokenFetcher, - CeloCaskProtocolWalletTokenFetcher, - FantomCaskProtocolWalletTokenFetcher, - GnosisCaskProtocolWalletTokenFetcher, - OptimismCaskProtocolWalletTokenFetcher, - PolygonCaskProtocolWalletTokenFetcher, - ], -}) -export class CaskProtocolAppModule extends AbstractApp() {} diff --git a/src/apps/cask-protocol/celo/cask-protocol.wallet.token-fetcher.ts b/src/apps/cask-protocol/celo/cask-protocol.wallet.token-fetcher.ts deleted file mode 100644 index 7abc37b18..000000000 --- a/src/apps/cask-protocol/celo/cask-protocol.wallet.token-fetcher.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { CaskProtocolWalletTokenFetcher } from '../common/cask-protocol.wallet.token-fetcher'; - -@PositionTemplate() -export class CeloCaskProtocolWalletTokenFetcher extends CaskProtocolWalletTokenFetcher { - groupLabel = 'Vaults'; - caskVaultContractAddress = '0xbccdbb0806acc914f6746de592f924b374190710'; -} diff --git a/src/apps/cask-protocol/common/cask-protocol.wallet.token-fetcher.ts b/src/apps/cask-protocol/common/cask-protocol.wallet.token-fetcher.ts deleted file mode 100644 index 4ce06770c..000000000 --- a/src/apps/cask-protocol/common/cask-protocol.wallet.token-fetcher.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } 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 { CaskProtocolViemContractFactory } from '../contracts'; -import { CaskVaultToken } from '../contracts/viem'; - -export abstract class CaskProtocolWalletTokenFetcher extends AppTokenTemplatePositionFetcher { - abstract caskVaultContractAddress: string; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(CaskProtocolViemContractFactory) protected readonly contractFactory: CaskProtocolViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.caskVaultToken({ address, network: this.network }); - } - - async getAddresses() { - return [this.caskVaultContractAddress]; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.getBaseAsset(), network: this.network }]; - } - - async getPricePerShare({ appToken, contract }: GetPricePerShareParams) { - const pricePerShareRaw = await contract.read.pricePerShare(); - const pricePerShare = Number(pricePerShareRaw) / 10 ** appToken.tokens[0].decimals; - return [pricePerShare]; - } - - async getLabel({ appToken }: GetDisplayPropsParams) { - return getLabelFromToken(appToken.tokens[0]); - } -} diff --git a/src/apps/cask-protocol/contracts/abis/cask-vault-token.json b/src/apps/cask-protocol/contracts/abis/cask-vault-token.json deleted file mode 100644 index a8b2266e8..000000000 --- a/src/apps/cask-protocol/contracts/abis/cask-vault-token.json +++ /dev/null @@ -1,1568 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "protocol", - "type": "address" - } - ], - "name": "AddProtocol", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "asset", - "type": "address" - } - ], - "name": "AllowedAsset", - "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": "address", - "name": "participant", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "assetAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "baseAssetAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "name": "AssetDeposited", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "participant", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "assetAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "baseAssetAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "name": "AssetWithdrawn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "asset", - "type": "address" - } - ], - "name": "DisallowedAsset", - "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": "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": "baseAssetAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shares", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "protocolFee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "protocolFeeShares", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "network", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "networkFee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "networkFeeShares", - "type": "uint256" - } - ], - "name": "Payment", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "protocol", - "type": "address" - } - ], - "name": "RemoveProtocol", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "feeDistributor", - "type": "address" - } - ], - "name": "SetFeeDistributor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "participant", - "type": "address" - }, - { - "indexed": false, - "internalType": "enum ICaskVault.FundingSource", - "name": "fundingSource", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "address", - "name": "fundingAsset", - "type": "address" - } - ], - "name": "SetFundingSource", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "maxPriceFeedAge", - "type": "uint256" - } - ], - "name": "SetMaxPriceFeedAge", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "minDeposit", - "type": "uint256" - } - ], - "name": "SetMinDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "feeDistributor", - "type": "address" - } - ], - "name": "SetTrustedForwarder", - "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": "baseAssetAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "name": "TransferValue", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_protocol", - "type": "address" - } - ], - "name": "addProtocol", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_asset", - "type": "address" - }, - { - "internalType": "address", - "name": "_priceFeed", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_depositLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_slippageBps", - "type": "uint256" - } - ], - "name": "allowAsset", - "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": "baseAsset", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_fromAsset", - "type": "address" - }, - { - "internalType": "address", - "name": "_toAsset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_fromAmount", - "type": "uint256" - } - ], - "name": "convertPrice", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "currentValueOf", - "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": "_asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_assetAmount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "address", - "name": "_asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_assetAmount", - "type": "uint256" - } - ], - "name": "depositTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_asset", - "type": "address" - } - ], - "name": "disallowAsset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "feeDistributor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "fundingSource", - "outputs": [ - { - "components": [ - { - "internalType": "enum ICaskVault.FundingSource", - "name": "fundingSource", - "type": "uint8" - }, - { - "internalType": "address", - "name": "fundingAsset", - "type": "address" - } - ], - "internalType": "struct ICaskVault.FundingProfile", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getAllAssets", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_asset", - "type": "address" - } - ], - "name": "getAsset", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "priceFeed", - "type": "address" - }, - { - "internalType": "uint256", - "name": "slippageBps", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "depositLimit", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "assetDecimals", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "priceFeedDecimals", - "type": "uint8" - }, - { - "internalType": "bool", - "name": "allowed", - "type": "bool" - } - ], - "internalType": "struct ICaskVault.Asset", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getBaseAsset", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "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": "_baseAsset", - "type": "address" - }, - { - "internalType": "address", - "name": "_baseAssetPriceFeed", - "type": "address" - }, - { - "internalType": "address", - "name": "_feeDistributor", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "forwarder", - "type": "address" - } - ], - "name": "isTrustedForwarder", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maxPriceFeedAge", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "minDeposit", - "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": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pricePerShare", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "protocolCount", - "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": "_value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_protocolFee", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_network", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_networkFee", - "type": "uint256" - } - ], - "name": "protocolPayment", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_from", - "type": "address" - }, - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_value", - "type": "uint256" - } - ], - "name": "protocolPayment", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_from", - "type": "address" - }, - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_protocolFee", - "type": "uint256" - } - ], - "name": "protocolPayment", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "protocols", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_protocol", - "type": "address" - } - ], - "name": "removeProtocol", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "reserved1", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_feeDistributor", - "type": "address" - } - ], - "name": "setFeeDistributor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "enum ICaskVault.FundingSource", - "name": "_fundingSource", - "type": "uint8" - }, - { - "internalType": "address", - "name": "_fundingAsset", - "type": "address" - } - ], - "name": "setFundingSource", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_maxPriceFeedAge", - "type": "uint256" - } - ], - "name": "setMaxPriceFeedAge", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_minDeposit", - "type": "uint256" - } - ], - "name": "setMinDeposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_forwarder", - "type": "address" - } - ], - "name": "setTrustedForwarder", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_value", - "type": "uint256" - } - ], - "name": "sharesForValue", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_asset", - "type": "address" - } - ], - "name": "supportsAsset", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_asset", - "type": "address" - } - ], - "name": "totalAssetBalance", - "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": "totalValue", - "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": "address", - "name": "_recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_value", - "type": "uint256" - } - ], - "name": "transferValue", - "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": "_value", - "type": "uint256" - } - ], - "name": "transferValueFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "trustedForwarder", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "versionRecipient", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_shares", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_recipient", - "type": "address" - }, - { - "internalType": "address", - "name": "_asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_shares", - "type": "uint256" - } - ], - "name": "withdrawTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "initialLogic", - "type": "address" - }, - { - "internalType": "address", - "name": "initialAdmin", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - } -] diff --git a/src/apps/cask-protocol/contracts/index.ts b/src/apps/cask-protocol/contracts/index.ts deleted file mode 100644 index 5dcfebdf6..000000000 --- a/src/apps/cask-protocol/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/cask-protocol/contracts/viem.contract-factory.ts b/src/apps/cask-protocol/contracts/viem.contract-factory.ts deleted file mode 100644 index 48fe10543..000000000 --- a/src/apps/cask-protocol/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 { CaskVaultToken__factory } from './viem'; - -type ContractOpts = { address: string; network: Network }; - -@Injectable() -export class CaskProtocolViemContractFactory { - constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - - caskVaultToken({ address, network }: ContractOpts) { - return CaskVaultToken__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } -} diff --git a/src/apps/cask-protocol/contracts/viem/CaskVaultToken.ts b/src/apps/cask-protocol/contracts/viem/CaskVaultToken.ts deleted file mode 100644 index 28e39bbe1..000000000 --- a/src/apps/cask-protocol/contracts/viem/CaskVaultToken.ts +++ /dev/null @@ -1,1582 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const caskVaultTokenAbi = [ - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'previousAdmin', - type: 'address', - }, - { - indexed: false, - internalType: 'address', - name: 'newAdmin', - type: 'address', - }, - ], - name: 'AdminChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'implementation', - type: 'address', - }, - ], - name: 'Upgraded', - type: 'event', - }, - { - stateMutability: 'payable', - type: 'fallback', - }, - { - inputs: [], - name: 'admin', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newAdmin', - type: 'address', - }, - ], - name: 'changeAdmin', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'implementation', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newImplementation', - type: 'address', - }, - ], - name: 'upgradeTo', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newImplementation', - type: 'address', - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - ], - name: 'upgradeToAndCall', - outputs: [], - stateMutability: 'payable', - type: 'function', - }, - { - stateMutability: 'payable', - type: 'receive', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'protocol', - type: 'address', - }, - ], - name: 'AddProtocol', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'asset', - type: 'address', - }, - ], - name: 'AllowedAsset', - 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: 'address', - name: 'participant', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'asset', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'assetAmount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'baseAssetAmount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'AssetDeposited', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'participant', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'asset', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'assetAmount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'baseAssetAmount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'AssetWithdrawn', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'asset', - type: 'address', - }, - ], - name: 'DisallowedAsset', - 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: '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: 'baseAssetAmount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'protocolFee', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'protocolFeeShares', - type: 'uint256', - }, - { - indexed: true, - internalType: 'address', - name: 'network', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'networkFee', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'networkFeeShares', - type: 'uint256', - }, - ], - name: 'Payment', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'protocol', - type: 'address', - }, - ], - name: 'RemoveProtocol', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'feeDistributor', - type: 'address', - }, - ], - name: 'SetFeeDistributor', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'participant', - type: 'address', - }, - { - indexed: false, - internalType: 'enum ICaskVault.FundingSource', - name: 'fundingSource', - type: 'uint8', - }, - { - indexed: false, - internalType: 'address', - name: 'fundingAsset', - type: 'address', - }, - ], - name: 'SetFundingSource', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'maxPriceFeedAge', - type: 'uint256', - }, - ], - name: 'SetMaxPriceFeedAge', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'minDeposit', - type: 'uint256', - }, - ], - name: 'SetMinDeposit', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'feeDistributor', - type: 'address', - }, - ], - name: 'SetTrustedForwarder', - 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: 'baseAssetAmount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'TransferValue', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'Unpaused', - type: 'event', - }, - { - inputs: [ - { - internalType: 'address', - name: '_protocol', - type: 'address', - }, - ], - name: 'addProtocol', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_asset', - type: 'address', - }, - { - internalType: 'address', - name: '_priceFeed', - type: 'address', - }, - { - internalType: 'uint256', - name: '_depositLimit', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_slippageBps', - type: 'uint256', - }, - ], - name: 'allowAsset', - 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: 'baseAsset', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_fromAsset', - type: 'address', - }, - { - internalType: 'address', - name: '_toAsset', - type: 'address', - }, - { - internalType: 'uint256', - name: '_fromAmount', - type: 'uint256', - }, - ], - name: 'convertPrice', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_address', - type: 'address', - }, - ], - name: 'currentValueOf', - 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: '_asset', - type: 'address', - }, - { - internalType: 'uint256', - name: '_assetAmount', - type: 'uint256', - }, - ], - name: 'deposit', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_to', - type: 'address', - }, - { - internalType: 'address', - name: '_asset', - type: 'address', - }, - { - internalType: 'uint256', - name: '_assetAmount', - type: 'uint256', - }, - ], - name: 'depositTo', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_asset', - type: 'address', - }, - ], - name: 'disallowAsset', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'feeDistributor', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_address', - type: 'address', - }, - ], - name: 'fundingSource', - outputs: [ - { - components: [ - { - internalType: 'enum ICaskVault.FundingSource', - name: 'fundingSource', - type: 'uint8', - }, - { - internalType: 'address', - name: 'fundingAsset', - type: 'address', - }, - ], - internalType: 'struct ICaskVault.FundingProfile', - name: '', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getAllAssets', - outputs: [ - { - internalType: 'address[]', - name: '', - type: 'address[]', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_asset', - type: 'address', - }, - ], - name: 'getAsset', - outputs: [ - { - components: [ - { - internalType: 'address', - name: 'priceFeed', - type: 'address', - }, - { - internalType: 'uint256', - name: 'slippageBps', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'depositLimit', - type: 'uint256', - }, - { - internalType: 'uint8', - name: 'assetDecimals', - type: 'uint8', - }, - { - internalType: 'uint8', - name: 'priceFeedDecimals', - type: 'uint8', - }, - { - internalType: 'bool', - name: 'allowed', - type: 'bool', - }, - ], - internalType: 'struct ICaskVault.Asset', - name: '', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getBaseAsset', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - 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: '_baseAsset', - type: 'address', - }, - { - internalType: 'address', - name: '_baseAssetPriceFeed', - type: 'address', - }, - { - internalType: 'address', - name: '_feeDistributor', - type: 'address', - }, - ], - name: 'initialize', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'forwarder', - type: 'address', - }, - ], - name: 'isTrustedForwarder', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'maxPriceFeedAge', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'minDeposit', - 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: 'owner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'pause', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'paused', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'pricePerShare', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'protocolCount', - 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: '_value', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_protocolFee', - type: 'uint256', - }, - { - internalType: 'address', - name: '_network', - type: 'address', - }, - { - internalType: 'uint256', - name: '_networkFee', - type: 'uint256', - }, - ], - name: 'protocolPayment', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_from', - type: 'address', - }, - { - internalType: 'address', - name: '_to', - type: 'address', - }, - { - internalType: 'uint256', - name: '_value', - type: 'uint256', - }, - ], - name: 'protocolPayment', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_from', - type: 'address', - }, - { - internalType: 'address', - name: '_to', - type: 'address', - }, - { - internalType: 'uint256', - name: '_value', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_protocolFee', - type: 'uint256', - }, - ], - name: 'protocolPayment', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'protocols', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_protocol', - type: 'address', - }, - ], - name: 'removeProtocol', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'renounceOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'reserved1', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_feeDistributor', - type: 'address', - }, - ], - name: 'setFeeDistributor', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'enum ICaskVault.FundingSource', - name: '_fundingSource', - type: 'uint8', - }, - { - internalType: 'address', - name: '_fundingAsset', - type: 'address', - }, - ], - name: 'setFundingSource', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_maxPriceFeedAge', - type: 'uint256', - }, - ], - name: 'setMaxPriceFeedAge', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_minDeposit', - type: 'uint256', - }, - ], - name: 'setMinDeposit', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_forwarder', - type: 'address', - }, - ], - name: 'setTrustedForwarder', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_value', - type: 'uint256', - }, - ], - name: 'sharesForValue', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_asset', - type: 'address', - }, - ], - name: 'supportsAsset', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_asset', - type: 'address', - }, - ], - name: 'totalAssetBalance', - 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: 'totalValue', - 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: 'address', - name: '_recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: '_value', - type: 'uint256', - }, - ], - name: 'transferValue', - 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: '_value', - type: 'uint256', - }, - ], - name: 'transferValueFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'trustedForwarder', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'unpause', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'versionRecipient', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'pure', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_asset', - type: 'address', - }, - { - internalType: 'uint256', - name: '_shares', - type: 'uint256', - }, - ], - name: 'withdraw', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_recipient', - type: 'address', - }, - { - internalType: 'address', - name: '_asset', - type: 'address', - }, - { - internalType: 'uint256', - name: '_shares', - type: 'uint256', - }, - ], - name: 'withdrawTo', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'initialLogic', - type: 'address', - }, - { - internalType: 'address', - name: 'initialAdmin', - type: 'address', - }, - { - internalType: 'bytes', - name: '_data', - type: 'bytes', - }, - ], - stateMutability: 'payable', - type: 'constructor', - }, -] as const; - -export type CaskVaultToken = typeof caskVaultTokenAbi; -export type CaskVaultTokenContract = GetContractReturnType; - -export class CaskVaultToken__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: caskVaultTokenAbi, publicClient: client }); - } -} diff --git a/src/apps/cask-protocol/contracts/viem/index.ts b/src/apps/cask-protocol/contracts/viem/index.ts deleted file mode 100644 index aca4c4351..000000000 --- a/src/apps/cask-protocol/contracts/viem/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -export type { CaskVaultToken } from './CaskVaultToken'; - -export { CaskVaultToken__factory } from './CaskVaultToken'; diff --git a/src/apps/cask-protocol/fantom/cask-protocol.wallet.token-fetcher.ts b/src/apps/cask-protocol/fantom/cask-protocol.wallet.token-fetcher.ts deleted file mode 100644 index 55d8a7b57..000000000 --- a/src/apps/cask-protocol/fantom/cask-protocol.wallet.token-fetcher.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { CaskProtocolWalletTokenFetcher } from '../common/cask-protocol.wallet.token-fetcher'; - -@PositionTemplate() -export class FantomCaskProtocolWalletTokenFetcher extends CaskProtocolWalletTokenFetcher { - groupLabel = 'Vaults'; - caskVaultContractAddress = '0xbccdbb0806acc914f6746de592f924b374190710'; -} diff --git a/src/apps/cask-protocol/gnosis/cask-protocol.wallet.token-fetcher.ts b/src/apps/cask-protocol/gnosis/cask-protocol.wallet.token-fetcher.ts deleted file mode 100644 index 0d8b78b1d..000000000 --- a/src/apps/cask-protocol/gnosis/cask-protocol.wallet.token-fetcher.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { CaskProtocolWalletTokenFetcher } from '../common/cask-protocol.wallet.token-fetcher'; - -@PositionTemplate() -export class GnosisCaskProtocolWalletTokenFetcher extends CaskProtocolWalletTokenFetcher { - caskVaultContractAddress = '0x3b2b4b547daeebf3a703288cb43650f0f287b9ff'; - groupLabel = 'Vaults'; -} diff --git a/src/apps/cask-protocol/optimism/cask-protocol.wallet.token-fetcher.ts b/src/apps/cask-protocol/optimism/cask-protocol.wallet.token-fetcher.ts deleted file mode 100644 index 25e84fcb3..000000000 --- a/src/apps/cask-protocol/optimism/cask-protocol.wallet.token-fetcher.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { CaskProtocolWalletTokenFetcher } from '../common/cask-protocol.wallet.token-fetcher'; - -@PositionTemplate() -export class OptimismCaskProtocolWalletTokenFetcher extends CaskProtocolWalletTokenFetcher { - groupLabel = 'Vaults'; - caskVaultContractAddress = '0x3b2b4b547daeebf3a703288cb43650f0f287b9ff'; -} diff --git a/src/apps/cask-protocol/polygon/cask-protocol.wallet.token-fetcher.ts b/src/apps/cask-protocol/polygon/cask-protocol.wallet.token-fetcher.ts deleted file mode 100644 index f6a9c1bae..000000000 --- a/src/apps/cask-protocol/polygon/cask-protocol.wallet.token-fetcher.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { CaskProtocolWalletTokenFetcher } from '../common/cask-protocol.wallet.token-fetcher'; - -@PositionTemplate() -export class PolygonCaskProtocolWalletTokenFetcher extends CaskProtocolWalletTokenFetcher { - groupLabel = 'Vaults'; - caskVaultContractAddress = '0x3b2b4b547daeebf3a703288cb43650f0f287b9ff'; -} diff --git a/src/apps/gmx/arbitrum/gmx.es-gmx.token-fetcher.ts b/src/apps/gmx/arbitrum/gmx.es-gmx.token-fetcher.ts deleted file mode 100644 index f49c6cecb..000000000 --- a/src/apps/gmx/arbitrum/gmx.es-gmx.token-fetcher.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { GmxEsGmxTokenFetcher } from '../common/gmx.es-gmx.token-fetcher'; - -@PositionTemplate() -export class ArbitrumGmxEsGmxTokenFetcher extends GmxEsGmxTokenFetcher { - groupLabel = 'esGMX'; - isExcludedFromTvl = true; - - esGmxAddress = '0xf42ae1d54fd613c9bb14810b0588faaa09a426ca'; - gmxAddress = '0xfc5a1a6eb076a2c7ad06ed22c90d7e710e35ad0a'; -} diff --git a/src/apps/gmx/avalanche/gmx.es-gmx.token-fetcher.ts b/src/apps/gmx/avalanche/gmx.es-gmx.token-fetcher.ts deleted file mode 100644 index b725767ba..000000000 --- a/src/apps/gmx/avalanche/gmx.es-gmx.token-fetcher.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { GmxEsGmxTokenFetcher } from '../common/gmx.es-gmx.token-fetcher'; - -@PositionTemplate() -export class AvalancheGmxEsGmxTokenFetcher extends GmxEsGmxTokenFetcher { - groupLabel = 'esGMX'; - isExcludedFromTvl = true; - - esGmxAddress = '0xff1489227bbaac61a9209a08929e4c2a526ddd17'; - gmxAddress = '0x62edc0692bd897d2295872a9ffcac5425011c661'; -} diff --git a/src/apps/gmx/common/gmx.es-gmx.token-fetcher.ts b/src/apps/gmx/common/gmx.es-gmx.token-fetcher.ts deleted file mode 100644 index 125427831..000000000 --- a/src/apps/gmx/common/gmx.es-gmx.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 { Erc20 } from '~contract/contracts/viem'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; - -import { GmxViemContractFactory } from '../contracts'; - -export abstract class GmxEsGmxTokenFetcher extends AppTokenTemplatePositionFetcher { - abstract esGmxAddress: string; - abstract gmxAddress: string; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(GmxViemContractFactory) protected readonly contractFactory: GmxViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.appToolkit.globalViemContracts.erc20({ address, network: this.network }); - } - - async getAddresses() { - return [this.esGmxAddress]; - } - - async getUnderlyingTokenDefinitions() { - return [{ address: this.gmxAddress, network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } -} diff --git a/src/apps/gmx/gmx.module.ts b/src/apps/gmx/gmx.module.ts index 771b46352..1646cbf51 100644 --- a/src/apps/gmx/gmx.module.ts +++ b/src/apps/gmx/gmx.module.ts @@ -2,11 +2,9 @@ import { Module } from '@nestjs/common'; import { AbstractApp } from '~app/app.dynamic-module'; -import { ArbitrumGmxEsGmxTokenFetcher } from './arbitrum/gmx.es-gmx.token-fetcher'; import { ArbitrumGmxFarmContractPositionFetcher } from './arbitrum/gmx.farm.contract-position-fetcher'; import { ArbitrumGmxGlpTokenFetcher } from './arbitrum/gmx.glp.token-fetcher'; import { ArbitrumGmxPerpContractPositionFetcher } from './arbitrum/gmx.perp.contract-position-fetcher'; -import { AvalancheGmxEsGmxTokenFetcher } from './avalanche/gmx.es-gmx.token-fetcher'; import { AvalancheGmxFarmContractPositionFetcher } from './avalanche/gmx.farm.contract-position-fetcher'; import { AvalancheGmxGlpTokenFetcher } from './avalanche/gmx.glp.token-fetcher'; import { AvalancheGmxPerpContractPositionFetcher } from './avalanche/gmx.perp.contract-position-fetcher'; @@ -16,12 +14,10 @@ import { GmxViemContractFactory } from './contracts'; providers: [ GmxViemContractFactory, // Arbitrum - ArbitrumGmxEsGmxTokenFetcher, ArbitrumGmxFarmContractPositionFetcher, ArbitrumGmxGlpTokenFetcher, ArbitrumGmxPerpContractPositionFetcher, // Avalanche - AvalancheGmxEsGmxTokenFetcher, AvalancheGmxFarmContractPositionFetcher, AvalancheGmxGlpTokenFetcher, AvalancheGmxPerpContractPositionFetcher,