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 286e4c62e..000000000 Binary files a/src/apps/cask-protocol/assets/logo.png and /dev/null differ 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,