diff --git a/src/apps/unipilot/assets/logo.png b/src/apps/unipilot/assets/logo.png deleted file mode 100644 index fbbc85ebc..000000000 Binary files a/src/apps/unipilot/assets/logo.png and /dev/null differ diff --git a/src/apps/unipilot/common/unipilot.vault-definition-resolver.ts b/src/apps/unipilot/common/unipilot.vault-definition-resolver.ts deleted file mode 100644 index 934ccd1e3..000000000 --- a/src/apps/unipilot/common/unipilot.vault-definition-resolver.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { Inject, Injectable } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { gqlFetch } from '~app-toolkit/helpers/the-graph.helper'; -import { Cache } from '~cache/cache.decorator'; -import { Network } from '~types/network.interface'; - -import { UNIPILOT_VAULTS, UNIPILOT_VAULTS_POLYGON } from '../graphql/queries'; -import { SUBGRAPH_ENDPOINTS } from '../utils/constants'; -import { UnipilotVaultDefinition, UnipilotVaultFetcherResponse } from '../utils/generalTypes'; - -@Injectable() -export class UnipilotVaultDefinitionsResolver { - constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - - @Cache({ - key: network => `studio:unipilot:${network}:pool-data-definitions`, - ttl: 5 * 60, // 5 minutes - }) - private async getVaultDefinitionsData(network: Network) { - const Query = network === Network.ETHEREUM_MAINNET ? UNIPILOT_VAULTS : UNIPILOT_VAULTS_POLYGON; - - const data = await gqlFetch({ - endpoint: SUBGRAPH_ENDPOINTS[network].stats, - query: Query, - variables: { - first: 1000, - }, - }); - - return data.vaults; - } - - async getVaultDefinitions(network: Network): Promise { - const vaultsDefinitionsData = await this.getVaultDefinitionsData(network); - - const vaultsDefinitions = vaultsDefinitionsData.map(vault => { - return { - address: vault.id, - token0Address: vault.token0.id, - token1Address: vault.token1.id, - feeTier: vault.feeTier, - token0Symbol: vault.token0.symbol, - token1Symbol: vault.token1.symbol, - strategyId: vault.strategyId, - totalLockedToken0: vault.totalLockedToken0, - totalLockedToken1: vault.totalLockedToken1, - }; - }); - - return vaultsDefinitions; - } -} diff --git a/src/apps/unipilot/common/unipilot.vault.token-fetcher.ts b/src/apps/unipilot/common/unipilot.vault.token-fetcher.ts deleted file mode 100644 index b289c4364..000000000 --- a/src/apps/unipilot/common/unipilot.vault.token-fetcher.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { MetaType } from '~position/position.interface'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { - DefaultAppTokenDataProps, - GetAddressesParams, - GetDisplayPropsParams, - GetPricePerShareParams, - GetUnderlyingTokensParams, -} from '~position/template/app-token.template.types'; -import { GetTokenDefinitionsParams } from '~position/template/contract-position.template.types'; - -import { UnipilotViemContractFactory } from '../contracts'; -import { UnipilotVault } from '../contracts/viem'; -import { UnipilotVaultDefinition } from '../utils/generalTypes'; - -import { UnipilotVaultDefinitionsResolver } from './unipilot.vault-definition-resolver'; - -export type UnipilotVaultTokenDataProps = DefaultAppTokenDataProps & { - fee: number; -}; - -export abstract class UnipilotVaultTokenFetcher extends AppTokenTemplatePositionFetcher< - UnipilotVault, - UnipilotVaultTokenDataProps, - UnipilotVaultDefinition -> { - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(UnipilotVaultDefinitionsResolver) - private readonly vaultDefinitionsResolver: UnipilotVaultDefinitionsResolver, - @Inject(UnipilotViemContractFactory) - private readonly contractFactory: UnipilotViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.unipilotVault({ address, network: this.network }); - } - - async getDefinitions(): Promise { - return this.vaultDefinitionsResolver.getVaultDefinitions(this.network); - } - - async getAddresses({ definitions }: GetAddressesParams): Promise { - return definitions.map(v => v.address); - } - - async getUnderlyingTokenDefinitions({ - definition, - }: GetUnderlyingTokensParams) { - return [ - { address: definition.token0Address, network: this.network }, - { address: definition.token1Address, network: this.network }, - ]; - } - - async getTokenDefinitions({ definition }: GetTokenDefinitionsParams) { - return [ - { - metaType: MetaType.SUPPLIED, - address: definition.token0Address, - network: this.network, - }, - { - metaType: MetaType.SUPPLIED, - address: definition.token1Address, - network: this.network, - }, - ]; - } - - async getPricePerShare({ - appToken, - definition, - }: GetPricePerShareParams) { - const { totalLockedToken0, totalLockedToken1 } = definition; - const reservesRaw = [totalLockedToken0, totalLockedToken1]; - const reserves = reservesRaw.map((r, i) => Number(r) / 10 ** appToken.tokens[i].decimals); - const pricePerShare = reserves.map(r => { - return r == 0 ? 0 : r / appToken.supply; - }); - return pricePerShare; - } - - async getLabel({ - appToken, - definition, - }: GetDisplayPropsParams): Promise { - const strategyLabels = { - '0': '', - '1': 'Wide', - '2': 'Balanced', - '3': 'Narrow', - }; - const { feeTier, strategyId } = definition; - const { tokens } = appToken; - - const feeTierLabel = parseFloat(feeTier) / 10000 + '%'; - - const strategyLabel: string = strategyId ? strategyLabels[strategyId] : ''; - const label = `${tokens[0].symbol}/${tokens[1].symbol} ${feeTierLabel} ${strategyLabel}`; - - return label; - } - - async getSecondaryLabel({ - appToken, - }: GetDisplayPropsParams) { - const { liquidity, reserves } = appToken.dataProps; - const reservePercentages = appToken.tokens.map((t, i) => reserves[i] * (t.price / liquidity)); - return reservePercentages.map(p => `${Math.round(p * 100)}%`).join(' / '); - } -} diff --git a/src/apps/unipilot/contracts/abis/unipilot-ethereum-factory.json b/src/apps/unipilot/contracts/abis/unipilot-ethereum-factory.json deleted file mode 100644 index 263801da3..000000000 --- a/src/apps/unipilot/contracts/abis/unipilot-ethereum-factory.json +++ /dev/null @@ -1,104 +0,0 @@ -[ - { - "inputs": [ - { "internalType": "address", "name": "_uniswapFactory", "type": "address" }, - { "internalType": "address", "name": "_governance", "type": "address" }, - { "internalType": "address", "name": "_uniStrategy", "type": "address" }, - { "internalType": "address", "name": "_indexFund", "type": "address" }, - { "internalType": "address", "name": "_WETH", "type": "address" }, - { "internalType": "uint8", "name": "percentage", "type": "uint8" } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "_oldGovernance", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "_newGovernance", "type": "address" } - ], - "name": "GovernanceChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "_tokenA", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "_tokenB", "type": "address" }, - { "indexed": false, "internalType": "uint24", "name": "_fee", "type": "uint24" }, - { "indexed": true, "internalType": "address", "name": "_vault", "type": "address" } - ], - "name": "VaultCreated", - "type": "event" - }, - { - "inputs": [ - { "internalType": "address", "name": "_tokenA", "type": "address" }, - { "internalType": "address", "name": "_tokenB", "type": "address" }, - { "internalType": "uint24", "name": "_fee", "type": "uint24" }, - { "internalType": "uint160", "name": "_sqrtPriceX96", "type": "uint160" }, - { "internalType": "string", "name": "_name", "type": "string" }, - { "internalType": "string", "name": "_symbol", "type": "string" } - ], - "name": "createVault", - "outputs": [{ "internalType": "address", "name": "_vault", "type": "address" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getUnipilotDetails", - "outputs": [ - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "uint8", "name": "", "type": "uint8" }, - { "internalType": "uint8", "name": "", "type": "uint8" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "isWhitelist", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_newGovernance", "type": "address" }], - "name": "setGovernance", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_strategy", "type": "address" }, - { "internalType": "address", "name": "_indexFund", "type": "address" }, - { "internalType": "uint8", "name": "_indexFundPercentage", "type": "uint8" } - ], - "name": "setUnipilotDetails", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_address", "type": "address" }], - "name": "toggleWhitelistAccount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "uint24", "name": "", "type": "uint24" } - ], - "name": "vaults", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - } -] diff --git a/src/apps/unipilot/contracts/abis/unipilot-polygon-factory.json b/src/apps/unipilot/contracts/abis/unipilot-polygon-factory.json deleted file mode 100644 index f3879f39b..000000000 --- a/src/apps/unipilot/contracts/abis/unipilot-polygon-factory.json +++ /dev/null @@ -1,107 +0,0 @@ -[ - { - "inputs": [ - { "internalType": "address", "name": "_uniswapFactory", "type": "address" }, - { "internalType": "address", "name": "_governance", "type": "address" }, - { "internalType": "address", "name": "_uniStrategy", "type": "address" }, - { "internalType": "address", "name": "_indexFund", "type": "address" }, - { "internalType": "address", "name": "_WETH", "type": "address" }, - { "internalType": "uint8", "name": "percentage", "type": "uint8" } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "_oldGovernance", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "_newGovernance", "type": "address" } - ], - "name": "GovernanceChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "_tokenA", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "_tokenB", "type": "address" }, - { "indexed": false, "internalType": "uint16", "name": "_strategyType", "type": "uint16" }, - { "indexed": false, "internalType": "uint24", "name": "_fee", "type": "uint24" }, - { "indexed": true, "internalType": "address", "name": "_vault", "type": "address" } - ], - "name": "VaultCreated", - "type": "event" - }, - { - "inputs": [ - { "internalType": "address", "name": "_tokenA", "type": "address" }, - { "internalType": "address", "name": "_tokenB", "type": "address" }, - { "internalType": "uint24", "name": "_fee", "type": "uint24" }, - { "internalType": "uint16", "name": "_vaultStrategy", "type": "uint16" }, - { "internalType": "uint160", "name": "_sqrtPriceX96", "type": "uint160" }, - { "internalType": "string", "name": "_name", "type": "string" }, - { "internalType": "string", "name": "_symbol", "type": "string" } - ], - "name": "createVault", - "outputs": [{ "internalType": "address", "name": "_vault", "type": "address" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getUnipilotDetails", - "outputs": [ - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "uint8", "name": "", "type": "uint8" }, - { "internalType": "uint8", "name": "", "type": "uint8" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "isWhitelist", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_newGovernance", "type": "address" }], - "name": "setGovernance", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_strategy", "type": "address" }, - { "internalType": "address", "name": "_indexFund", "type": "address" }, - { "internalType": "uint8", "name": "_indexFundPercentage", "type": "uint8" } - ], - "name": "setUnipilotDetails", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_address", "type": "address" }], - "name": "toggleWhitelistAccount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "uint24", "name": "", "type": "uint24" }, - { "internalType": "uint16", "name": "", "type": "uint16" } - ], - "name": "vaults", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - } -] diff --git a/src/apps/unipilot/contracts/abis/unipilot-vault.json b/src/apps/unipilot/contracts/abis/unipilot-vault.json deleted file mode 100644 index 5b2f71066..000000000 --- a/src/apps/unipilot/contracts/abis/unipilot-vault.json +++ /dev/null @@ -1,303 +0,0 @@ -[ - { - "inputs": [ - { "internalType": "address", "name": "_pool", "type": "address" }, - { "internalType": "address", "name": "_unipilotFactory", "type": "address" }, - { "internalType": "address", "name": "_WETH", "type": "address" }, - { "internalType": "string", "name": "_name", "type": "string" }, - { "internalType": "string", "name": "_symbol", "type": "string" } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "uint256", "name": "amount0", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "amount1", "type": "uint256" } - ], - "name": "CompoundFees", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "depositor", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "recipient", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount0", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "amount1", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "lpShares", "type": "uint256" } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "bool", "name": "isReadjustLiquidity", "type": "bool" }, - { "indexed": false, "internalType": "uint256", "name": "fees0", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "fees1", "type": "uint256" } - ], - "name": "FeesSnapshot", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "uint256", "name": "reserves0", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "reserves1", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "fees0", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "fees1", "type": "uint256" } - ], - "name": "PullLiquidity", - "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": "recipient", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "shares", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "amount0", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "amount1", "type": "uint256" } - ], - "name": "Withdraw", - "type": "event" - }, - { "stateMutability": "payable", "type": "fallback" }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "spender", "type": "address" } - ], - "name": "allowance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "approve", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } - ], - "name": "decreaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "amount0Desired", "type": "uint256" }, - { "internalType": "uint256", "name": "amount1Desired", "type": "uint256" }, - { "internalType": "address", "name": "recipient", "type": "address" } - ], - "name": "deposit", - "outputs": [ - { "internalType": "uint256", "name": "lpShares", "type": "uint256" }, - { "internalType": "uint256", "name": "amount0", "type": "uint256" }, - { "internalType": "uint256", "name": "amount1", "type": "uint256" } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "getPositionDetails", - "outputs": [ - { "internalType": "uint256", "name": "amount0", "type": "uint256" }, - { "internalType": "uint256", "name": "amount1", "type": "uint256" }, - { "internalType": "uint256", "name": "fees0", "type": "uint256" }, - { "internalType": "uint256", "name": "fees1", "type": "uint256" }, - { "internalType": "uint128", "name": "baseLiquidity", "type": "uint128" }, - { "internalType": "uint128", "name": "rangeLiquidity", "type": "uint128" } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getVaultInfo", - "outputs": [ - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "uint24", "name": "", "type": "uint24" }, - { "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": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }], - "name": "nonces", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "value", "type": "uint256" }, - { "internalType": "uint256", "name": "deadline", "type": "uint256" }, - { "internalType": "uint8", "name": "v", "type": "uint8" }, - { "internalType": "bytes32", "name": "r", "type": "bytes32" }, - { "internalType": "bytes32", "name": "s", "type": "bytes32" } - ], - "name": "permit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { "inputs": [], "name": "readjustLiquidity", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "symbol", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ticksData", - "outputs": [ - { "internalType": "int24", "name": "baseTickLower", "type": "int24" }, - { "internalType": "int24", "name": "baseTickUpper", "type": "int24" }, - { "internalType": "int24", "name": "rangeTickLower", "type": "int24" }, - { "internalType": "int24", "name": "rangeTickUpper", "type": "int24" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "sender", "type": "address" }, - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "amount0Owed", "type": "uint256" }, - { "internalType": "uint256", "name": "amount1Owed", "type": "uint256" }, - { "internalType": "bytes", "name": "data", "type": "bytes" } - ], - "name": "uniswapV3MintCallback", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "int256", "name": "amount0", "type": "int256" }, - { "internalType": "int256", "name": "amount1", "type": "int256" }, - { "internalType": "bytes", "name": "data", "type": "bytes" } - ], - "name": "uniswapV3SwapCallback", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "liquidity", "type": "uint256" }, - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "bool", "name": "refundAsETH", "type": "bool" } - ], - "name": "withdraw", - "outputs": [ - { "internalType": "uint256", "name": "amount0", "type": "uint256" }, - { "internalType": "uint256", "name": "amount1", "type": "uint256" } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { "stateMutability": "payable", "type": "receive" } -] diff --git a/src/apps/unipilot/contracts/index.ts b/src/apps/unipilot/contracts/index.ts deleted file mode 100644 index 5dcfebdf6..000000000 --- a/src/apps/unipilot/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/unipilot/contracts/viem.contract-factory.ts b/src/apps/unipilot/contracts/viem.contract-factory.ts deleted file mode 100644 index dce452ec3..000000000 --- a/src/apps/unipilot/contracts/viem.contract-factory.ts +++ /dev/null @@ -1,23 +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 { UnipilotEthereumFactory__factory, UnipilotPolygonFactory__factory, UnipilotVault__factory } from './viem'; - -type ContractOpts = { address: string; network: Network }; - -@Injectable() -export class UnipilotViemContractFactory { - constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - - unipilotEthereumFactory({ address, network }: ContractOpts) { - return UnipilotEthereumFactory__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - unipilotPolygonFactory({ address, network }: ContractOpts) { - return UnipilotPolygonFactory__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - unipilotVault({ address, network }: ContractOpts) { - return UnipilotVault__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } -} diff --git a/src/apps/unipilot/contracts/viem/UnipilotEthereumFactory.ts b/src/apps/unipilot/contracts/viem/UnipilotEthereumFactory.ts deleted file mode 100644 index 5e081f3c8..000000000 --- a/src/apps/unipilot/contracts/viem/UnipilotEthereumFactory.ts +++ /dev/null @@ -1,276 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const unipilotEthereumFactoryAbi = [ - { - inputs: [ - { - internalType: 'address', - name: '_uniswapFactory', - type: 'address', - }, - { - internalType: 'address', - name: '_governance', - type: 'address', - }, - { - internalType: 'address', - name: '_uniStrategy', - type: 'address', - }, - { - internalType: 'address', - name: '_indexFund', - type: 'address', - }, - { - internalType: 'address', - name: '_WETH', - type: 'address', - }, - { - internalType: 'uint8', - name: 'percentage', - type: 'uint8', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: '_oldGovernance', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: '_newGovernance', - type: 'address', - }, - ], - name: 'GovernanceChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: '_tokenA', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: '_tokenB', - type: 'address', - }, - { - indexed: false, - internalType: 'uint24', - name: '_fee', - type: 'uint24', - }, - { - indexed: true, - internalType: 'address', - name: '_vault', - type: 'address', - }, - ], - name: 'VaultCreated', - type: 'event', - }, - { - inputs: [ - { - internalType: 'address', - name: '_tokenA', - type: 'address', - }, - { - internalType: 'address', - name: '_tokenB', - type: 'address', - }, - { - internalType: 'uint24', - name: '_fee', - type: 'uint24', - }, - { - internalType: 'uint160', - name: '_sqrtPriceX96', - type: 'uint160', - }, - { - internalType: 'string', - name: '_name', - type: 'string', - }, - { - internalType: 'string', - name: '_symbol', - type: 'string', - }, - ], - name: 'createVault', - outputs: [ - { - internalType: 'address', - name: '_vault', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'getUnipilotDetails', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'isWhitelist', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_newGovernance', - type: 'address', - }, - ], - name: 'setGovernance', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_strategy', - type: 'address', - }, - { - internalType: 'address', - name: '_indexFund', - type: 'address', - }, - { - internalType: 'uint8', - name: '_indexFundPercentage', - type: 'uint8', - }, - ], - name: 'setUnipilotDetails', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_address', - type: 'address', - }, - ], - name: 'toggleWhitelistAccount', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'uint24', - name: '', - type: 'uint24', - }, - ], - name: 'vaults', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, -] as const; - -export type UnipilotEthereumFactory = typeof unipilotEthereumFactoryAbi; -export type UnipilotEthereumFactoryContract = GetContractReturnType; - -export class UnipilotEthereumFactory__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: unipilotEthereumFactoryAbi, publicClient: client }); - } -} diff --git a/src/apps/unipilot/contracts/viem/UnipilotPolygonFactory.ts b/src/apps/unipilot/contracts/viem/UnipilotPolygonFactory.ts deleted file mode 100644 index ed72c5eaa..000000000 --- a/src/apps/unipilot/contracts/viem/UnipilotPolygonFactory.ts +++ /dev/null @@ -1,292 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const unipilotPolygonFactoryAbi = [ - { - inputs: [ - { - internalType: 'address', - name: '_uniswapFactory', - type: 'address', - }, - { - internalType: 'address', - name: '_governance', - type: 'address', - }, - { - internalType: 'address', - name: '_uniStrategy', - type: 'address', - }, - { - internalType: 'address', - name: '_indexFund', - type: 'address', - }, - { - internalType: 'address', - name: '_WETH', - type: 'address', - }, - { - internalType: 'uint8', - name: 'percentage', - type: 'uint8', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: '_oldGovernance', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: '_newGovernance', - type: 'address', - }, - ], - name: 'GovernanceChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: '_tokenA', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: '_tokenB', - type: 'address', - }, - { - indexed: false, - internalType: 'uint16', - name: '_strategyType', - type: 'uint16', - }, - { - indexed: false, - internalType: 'uint24', - name: '_fee', - type: 'uint24', - }, - { - indexed: true, - internalType: 'address', - name: '_vault', - type: 'address', - }, - ], - name: 'VaultCreated', - type: 'event', - }, - { - inputs: [ - { - internalType: 'address', - name: '_tokenA', - type: 'address', - }, - { - internalType: 'address', - name: '_tokenB', - type: 'address', - }, - { - internalType: 'uint24', - name: '_fee', - type: 'uint24', - }, - { - internalType: 'uint16', - name: '_vaultStrategy', - type: 'uint16', - }, - { - internalType: 'uint160', - name: '_sqrtPriceX96', - type: 'uint160', - }, - { - internalType: 'string', - name: '_name', - type: 'string', - }, - { - internalType: 'string', - name: '_symbol', - type: 'string', - }, - ], - name: 'createVault', - outputs: [ - { - internalType: 'address', - name: '_vault', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'getUnipilotDetails', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'isWhitelist', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_newGovernance', - type: 'address', - }, - ], - name: 'setGovernance', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_strategy', - type: 'address', - }, - { - internalType: 'address', - name: '_indexFund', - type: 'address', - }, - { - internalType: 'uint8', - name: '_indexFundPercentage', - type: 'uint8', - }, - ], - name: 'setUnipilotDetails', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_address', - type: 'address', - }, - ], - name: 'toggleWhitelistAccount', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'uint24', - name: '', - type: 'uint24', - }, - { - internalType: 'uint16', - name: '', - type: 'uint16', - }, - ], - name: 'vaults', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, -] as const; - -export type UnipilotPolygonFactory = typeof unipilotPolygonFactoryAbi; -export type UnipilotPolygonFactoryContract = GetContractReturnType; - -export class UnipilotPolygonFactory__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: unipilotPolygonFactoryAbi, publicClient: client }); - } -} diff --git a/src/apps/unipilot/contracts/viem/UnipilotVault.ts b/src/apps/unipilot/contracts/viem/UnipilotVault.ts deleted file mode 100644 index acff81ffb..000000000 --- a/src/apps/unipilot/contracts/viem/UnipilotVault.ts +++ /dev/null @@ -1,763 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const unipilotVaultAbi = [ - { - inputs: [ - { - internalType: 'address', - name: '_pool', - type: 'address', - }, - { - internalType: 'address', - name: '_unipilotFactory', - type: 'address', - }, - { - internalType: 'address', - name: '_WETH', - type: 'address', - }, - { - internalType: 'string', - name: '_name', - type: 'string', - }, - { - internalType: 'string', - name: '_symbol', - type: 'string', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'amount0', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount1', - type: 'uint256', - }, - ], - name: 'CompoundFees', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'depositor', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount0', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount1', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'lpShares', - type: 'uint256', - }, - ], - name: 'Deposit', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'bool', - name: 'isReadjustLiquidity', - type: 'bool', - }, - { - indexed: false, - internalType: 'uint256', - name: 'fees0', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'fees1', - type: 'uint256', - }, - ], - name: 'FeesSnapshot', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'reserves0', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'reserves1', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'fees0', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'fees1', - type: 'uint256', - }, - ], - name: 'PullLiquidity', - 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: 'recipient', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount0', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount1', - type: 'uint256', - }, - ], - name: 'Withdraw', - type: 'event', - }, - { - stateMutability: 'payable', - type: 'fallback', - }, - { - inputs: [], - name: 'DOMAIN_SEPARATOR', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount0Desired', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'amount1Desired', - type: 'uint256', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - ], - name: 'deposit', - outputs: [ - { - internalType: 'uint256', - name: 'lpShares', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'amount0', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'amount1', - type: 'uint256', - }, - ], - stateMutability: 'payable', - type: 'function', - }, - { - inputs: [], - name: 'getPositionDetails', - outputs: [ - { - internalType: 'uint256', - name: 'amount0', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'amount1', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'fees0', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'fees1', - type: 'uint256', - }, - { - internalType: 'uint128', - name: 'baseLiquidity', - type: 'uint128', - }, - { - internalType: 'uint128', - name: 'rangeLiquidity', - type: 'uint128', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'getVaultInfo', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'uint24', - name: '', - type: 'uint24', - }, - { - 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: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - ], - name: 'nonces', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'deadline', - type: 'uint256', - }, - { - internalType: 'uint8', - name: 'v', - type: 'uint8', - }, - { - internalType: 'bytes32', - name: 'r', - type: 'bytes32', - }, - { - internalType: 'bytes32', - name: 's', - type: 'bytes32', - }, - ], - name: 'permit', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'readjustLiquidity', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'ticksData', - outputs: [ - { - internalType: 'int24', - name: 'baseTickLower', - type: 'int24', - }, - { - internalType: 'int24', - name: 'baseTickUpper', - type: 'int24', - }, - { - internalType: 'int24', - name: 'rangeTickLower', - type: 'int24', - }, - { - internalType: 'int24', - name: 'rangeTickUpper', - type: 'int24', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount0Owed', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'amount1Owed', - type: 'uint256', - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - ], - name: 'uniswapV3MintCallback', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'int256', - name: 'amount0', - type: 'int256', - }, - { - internalType: 'int256', - name: 'amount1', - type: 'int256', - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - ], - name: 'uniswapV3SwapCallback', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'liquidity', - type: 'uint256', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'bool', - name: 'refundAsETH', - type: 'bool', - }, - ], - name: 'withdraw', - outputs: [ - { - internalType: 'uint256', - name: 'amount0', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'amount1', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - stateMutability: 'payable', - type: 'receive', - }, -] as const; - -export type UnipilotVault = typeof unipilotVaultAbi; -export type UnipilotVaultContract = GetContractReturnType; - -export class UnipilotVault__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: unipilotVaultAbi, publicClient: client }); - } -} diff --git a/src/apps/unipilot/contracts/viem/index.ts b/src/apps/unipilot/contracts/viem/index.ts deleted file mode 100644 index 729a04602..000000000 --- a/src/apps/unipilot/contracts/viem/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -export type { UnipilotEthereumFactory } from './UnipilotEthereumFactory'; -export type { UnipilotPolygonFactory } from './UnipilotPolygonFactory'; -export type { UnipilotVault } from './UnipilotVault'; - -export { UnipilotEthereumFactory__factory } from './UnipilotEthereumFactory'; -export { UnipilotPolygonFactory__factory } from './UnipilotPolygonFactory'; -export { UnipilotVault__factory } from './UnipilotVault'; diff --git a/src/apps/unipilot/ethereum/unipilot.pool.token-fetcher.ts b/src/apps/unipilot/ethereum/unipilot.pool.token-fetcher.ts deleted file mode 100644 index 572ddc80b..000000000 --- a/src/apps/unipilot/ethereum/unipilot.pool.token-fetcher.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { UnipilotVaultTokenFetcher } from '../common/unipilot.vault.token-fetcher'; - -@PositionTemplate() -export class EthereumUnipilotPoolTokenFetcher extends UnipilotVaultTokenFetcher { - groupLabel = 'Vaults'; -} diff --git a/src/apps/unipilot/graphql/queries.ts b/src/apps/unipilot/graphql/queries.ts deleted file mode 100644 index ef799bbbb..000000000 --- a/src/apps/unipilot/graphql/queries.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { gql } from 'graphql-request'; - -//unipilot vaults -export const UNIPILOT_VAULTS = gql` - query getVaults($first: Int!) { - vaults { - id - feeTier - token0 { - id - symbol - } - token1 { - id - symbol - } - totalLockedToken0 - totalLockedToken1 - fee0Uninvested - fee1Uninvested - fee0invested - fee1invested - } - } -`; - -//unipilot vaults for polygon -export const UNIPILOT_VAULTS_POLYGON = gql` - query getVaults($first: Int!) { - vaults { - id - feeTier - strategyId - token0 { - id - symbol - } - token1 { - id - symbol - } - totalLockedToken0 - totalLockedToken1 - fee0Uninvested - fee1Uninvested - fee0invested - fee1invested - } - } -`; - -//unipilot vault addresses for apy -export const VAULT_ADDRESSES = gql` - query getAddresses { - vaults(first: 1000) { - id - } - } -`; diff --git a/src/apps/unipilot/polygon/unipilot.pool.token-fetcher.ts b/src/apps/unipilot/polygon/unipilot.pool.token-fetcher.ts deleted file mode 100644 index d2de517aa..000000000 --- a/src/apps/unipilot/polygon/unipilot.pool.token-fetcher.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { UnipilotVaultTokenFetcher } from '../common/unipilot.vault.token-fetcher'; - -@PositionTemplate() -export class PolygonUnipilotPoolTokenFetcher extends UnipilotVaultTokenFetcher { - groupLabel = 'Vaults'; -} diff --git a/src/apps/unipilot/unipilot.module.ts b/src/apps/unipilot/unipilot.module.ts deleted file mode 100644 index fdc0c0311..000000000 --- a/src/apps/unipilot/unipilot.module.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Module } from '@nestjs/common'; - -import { AbstractApp } from '~app/app.dynamic-module'; - -import { UnipilotVaultDefinitionsResolver } from './common/unipilot.vault-definition-resolver'; -import { UnipilotViemContractFactory } from './contracts'; -import { EthereumUnipilotPoolTokenFetcher } from './ethereum/unipilot.pool.token-fetcher'; -import { PolygonUnipilotPoolTokenFetcher } from './polygon/unipilot.pool.token-fetcher'; - -@Module({ - providers: [ - UnipilotViemContractFactory, - UnipilotVaultDefinitionsResolver, - // Ethereum - EthereumUnipilotPoolTokenFetcher, - // Polygon - PolygonUnipilotPoolTokenFetcher, - ], -}) -export class UnipilotAppModule extends AbstractApp() {} diff --git a/src/apps/unipilot/utils/constants.ts b/src/apps/unipilot/utils/constants.ts deleted file mode 100644 index d84107265..000000000 --- a/src/apps/unipilot/utils/constants.ts +++ /dev/null @@ -1,10 +0,0 @@ -export const SUBGRAPH_ENDPOINTS = { - ethereum: { - stats: 'https://api.thegraph.com/subgraphs/name/unipilotvoirstudio/unipilot-v2-stats?source=zapper', - }, - polygon: { - stats: 'https://api.thegraph.com/subgraphs/name/unipilotvoirstudio/stats-v2-polygon?source=zapper', - }, -}; - -export const SERVER_ENDPOINTS = 'https://apis.unipilot.io/api/unipilot'; diff --git a/src/apps/unipilot/utils/generalTypes.ts b/src/apps/unipilot/utils/generalTypes.ts deleted file mode 100644 index 19c676145..000000000 --- a/src/apps/unipilot/utils/generalTypes.ts +++ /dev/null @@ -1,39 +0,0 @@ -export type UnipilotVaultFetcherResponse = { - vaults: { - id: string; - feeTier: string; - token0: { - id: string; - symbol: string; - }; - token1: { - id: string; - symbol: string; - }; - strategyId?: string; - totalLockedToken0: string; - totalLockedToken1: string; - fee0Uninvested: string; - fee1Uninvested: string; - fee0invested: string; - fee1invested: string; - }[]; -}; - -export type VaultAddressesResponse = { - vaults: { - id: string; - }[]; -}; - -export type UnipilotVaultDefinition = { - address: string; - token0Address: string; - token1Address: string; - feeTier: string; - token0Symbol: string; - token1Symbol: string; - strategyId?: string; - totalLockedToken0: string; - totalLockedToken1: string; -};