From 4ff10b55915e37fa5e4ee337db45f10d3707c80c Mon Sep 17 00:00:00 2001 From: Karan Shahani Date: Tue, 12 Dec 2023 23:32:31 -0500 Subject: [PATCH] feat(opnx): Remove and pull into private repo --- src/apps/opnx/assets/logo.png | Bin 8828 -> 0 bytes src/apps/opnx/contracts/abis/veox.json | 612 ----------------- src/apps/opnx/contracts/index.ts | 4 - .../opnx/contracts/viem.contract-factory.ts | 17 - src/apps/opnx/contracts/viem/Veox.ts | 626 ------------------ src/apps/opnx/contracts/viem/index.ts | 7 - .../opnx.veox.contract-position-fetcher.ts | 44 -- src/apps/opnx/opnx.module.ts | 11 - 8 files changed, 1321 deletions(-) delete mode 100644 src/apps/opnx/assets/logo.png delete mode 100644 src/apps/opnx/contracts/abis/veox.json delete mode 100644 src/apps/opnx/contracts/index.ts delete mode 100644 src/apps/opnx/contracts/viem.contract-factory.ts delete mode 100644 src/apps/opnx/contracts/viem/Veox.ts delete mode 100644 src/apps/opnx/contracts/viem/index.ts delete mode 100644 src/apps/opnx/ethereum/opnx.veox.contract-position-fetcher.ts delete mode 100644 src/apps/opnx/opnx.module.ts diff --git a/src/apps/opnx/assets/logo.png b/src/apps/opnx/assets/logo.png deleted file mode 100644 index 113419e15ba1df0beb0cdfca6ebadd1344f12ab1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8828 zcmXw93pkVQ|97^W7aMaJX3lax8##?u$k{@&O_Gp9F(ovo8Mayq9UV$?$o4C&w|Skn zmsI>jLbVyv!P}G}Kge4{Zj57QPRALPos+(mbk>HaB~|}8vHAczE`d{( zwsGZfy3x^qmIJTh?#tCHXl=~BfY&70*Em38y5!Ub{N9v#}HRJ?d^ZLjI zqV6ID=WTzNl$5s0lc{H z6;t8)a@2hB82uh>Pz6N|Ch9)Sl#thGip!oRt!%B@`Kh-y$#!$EWIEjSDK9pF)sV@> z>MZ?l%ckqzrXkBW5lWaRaZ&cC@|DUTbB_tFm#S~oQ%xd`-&h)GIV*RMofNC(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 100644 index 44b745acd..000000000 --- a/src/apps/opnx/contracts/abis/veox.json +++ /dev/null @@ -1,612 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "token_addr", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "provider", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "locktime", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "enum VotingEscrow.DepositType", - "name": "deposit_type", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "ts", - "type": "uint256" - } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "prevSupply", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "supply", - "type": "uint256" - } - ], - "name": "Supply", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "provider", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "ts", - "type": "uint256" - } - ], - "name": "Withdraw", - "type": "event" - }, - { - "inputs": [], - "name": "MAXTIME", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MINTIME", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_block", - "type": "uint256" - } - ], - "name": "balanceOfAt", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_t", - "type": "uint256" - } - ], - "name": "balanceOfAtT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "checkpoint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_unlock_time", - "type": "uint256" - } - ], - "name": "create_lock", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_addr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_unlock_time", - "type": "uint256" - } - ], - "name": "create_lock_as_minter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_addr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_value", - "type": "uint256" - } - ], - "name": "deposit_for", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "epoch", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - } - ], - "name": "get_last_user_slope", - "outputs": [ - { - "internalType": "int128", - "name": "", - "type": "int128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_value", - "type": "uint256" - } - ], - "name": "increase_amount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_unlock_time", - "type": "uint256" - } - ], - "name": "increase_unlock_time", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "locked", - "outputs": [ - { - "internalType": "int128", - "name": "amount", - "type": "int128" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_addr", - "type": "address" - } - ], - "name": "locked__end", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "point_history", - "outputs": [ - { - "internalType": "int128", - "name": "bias", - "type": "int128" - }, - { - "internalType": "int128", - "name": "slope", - "type": "int128" - }, - { - "internalType": "uint256", - "name": "ts", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "blk", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "slope_changes", - "outputs": [ - { - "internalType": "int128", - "name": "", - "type": "int128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "supply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "token", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_block", - "type": "uint256" - } - ], - "name": "totalSupplyAt", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "t", - "type": "uint256" - } - ], - "name": "totalSupplyAtT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "user_point_epoch", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "user_point_history", - "outputs": [ - { - "internalType": "int128", - "name": "bias", - "type": "int128" - }, - { - "internalType": "int128", - "name": "slope", - "type": "int128" - }, - { - "internalType": "uint256", - "name": "ts", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "blk", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_addr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_idx", - "type": "uint256" - } - ], - "name": "user_point_history__ts", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/opnx/contracts/index.ts b/src/apps/opnx/contracts/index.ts deleted file mode 100644 index 5dcfebdf6..000000000 --- a/src/apps/opnx/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/opnx/contracts/viem.contract-factory.ts b/src/apps/opnx/contracts/viem.contract-factory.ts deleted file mode 100644 index a225c101d..000000000 --- a/src/apps/opnx/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 { Veox__factory } from './viem'; - -type ContractOpts = { address: string; network: Network }; - -@Injectable() -export class OpnxViemContractFactory { - constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - - veox({ address, network }: ContractOpts) { - return Veox__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } -} diff --git a/src/apps/opnx/contracts/viem/Veox.ts b/src/apps/opnx/contracts/viem/Veox.ts deleted file mode 100644 index ae3c17f99..000000000 --- a/src/apps/opnx/contracts/viem/Veox.ts +++ /dev/null @@ -1,626 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const veoxAbi = [ - { - inputs: [ - { - internalType: 'address', - name: 'token_addr', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'provider', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - indexed: true, - internalType: 'uint256', - name: 'locktime', - type: 'uint256', - }, - { - indexed: false, - internalType: 'enum VotingEscrow.DepositType', - name: 'deposit_type', - type: 'uint8', - }, - { - indexed: false, - internalType: 'uint256', - name: 'ts', - type: 'uint256', - }, - ], - name: 'Deposit', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'prevSupply', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'supply', - type: 'uint256', - }, - ], - name: 'Supply', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'provider', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'ts', - type: 'uint256', - }, - ], - name: 'Withdraw', - type: 'event', - }, - { - inputs: [], - name: 'MAXTIME', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'MINTIME', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'addr', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'addr', - type: 'address', - }, - { - internalType: 'uint256', - name: '_block', - type: 'uint256', - }, - ], - name: 'balanceOfAt', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'addr', - type: 'address', - }, - { - internalType: 'uint256', - name: '_t', - type: 'uint256', - }, - ], - name: 'balanceOfAtT', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'checkpoint', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_value', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_unlock_time', - type: 'uint256', - }, - ], - name: 'create_lock', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_addr', - type: 'address', - }, - { - internalType: 'uint256', - name: '_value', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_unlock_time', - type: 'uint256', - }, - ], - name: 'create_lock_as_minter', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_addr', - type: 'address', - }, - { - internalType: 'uint256', - name: '_value', - type: 'uint256', - }, - ], - name: 'deposit_for', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'epoch', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'addr', - type: 'address', - }, - ], - name: 'get_last_user_slope', - outputs: [ - { - internalType: 'int128', - name: '', - type: 'int128', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_value', - type: 'uint256', - }, - ], - name: 'increase_amount', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_unlock_time', - type: 'uint256', - }, - ], - name: 'increase_unlock_time', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'locked', - outputs: [ - { - internalType: 'int128', - name: 'amount', - type: 'int128', - }, - { - internalType: 'uint256', - name: 'end', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_addr', - type: 'address', - }, - ], - name: 'locked__end', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'point_history', - outputs: [ - { - internalType: 'int128', - name: 'bias', - type: 'int128', - }, - { - internalType: 'int128', - name: 'slope', - type: 'int128', - }, - { - internalType: 'uint256', - name: 'ts', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'blk', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'slope_changes', - outputs: [ - { - internalType: 'int128', - name: '', - type: 'int128', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'supply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'token', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_block', - type: 'uint256', - }, - ], - name: 'totalSupplyAt', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 't', - type: 'uint256', - }, - ], - name: 'totalSupplyAtT', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'user_point_epoch', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'user_point_history', - outputs: [ - { - internalType: 'int128', - name: 'bias', - type: 'int128', - }, - { - internalType: 'int128', - name: 'slope', - type: 'int128', - }, - { - internalType: 'uint256', - name: 'ts', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'blk', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_addr', - type: 'address', - }, - { - internalType: 'uint256', - name: '_idx', - type: 'uint256', - }, - ], - name: 'user_point_history__ts', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'withdraw', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type Veox = typeof veoxAbi; -export type VeoxContract = GetContractReturnType; - -export class Veox__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: veoxAbi, publicClient: client }); - } -} diff --git a/src/apps/opnx/contracts/viem/index.ts b/src/apps/opnx/contracts/viem/index.ts deleted file mode 100644 index 2041fb72f..000000000 --- a/src/apps/opnx/contracts/viem/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -export type { Veox } from './Veox'; - -export { Veox__factory } from './Veox'; diff --git a/src/apps/opnx/ethereum/opnx.veox.contract-position-fetcher.ts b/src/apps/opnx/ethereum/opnx.veox.contract-position-fetcher.ts deleted file mode 100644 index 13b29cf89..000000000 --- a/src/apps/opnx/ethereum/opnx.veox.contract-position-fetcher.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { getLabelFromToken } from '~app-toolkit/helpers/presentation/image.present'; -import { - GetDisplayPropsParams, - GetTokenBalancesParams, - GetTokenDefinitionsParams, -} from '~position/template/contract-position.template.types'; -import { VotingEscrowTemplateContractPositionFetcher } from '~position/template/voting-escrow.template.contract-position-fetcher'; - -import { OpnxViemContractFactory } from '../contracts'; -import { Veox } from '../contracts/viem'; -import { VeoxContract } from '../contracts/viem/Veox'; - -@PositionTemplate() -export class EthereumOpnxContractPositionFetcher extends VotingEscrowTemplateContractPositionFetcher { - veTokenAddress = '0x28901cf869d94c9d892fbd86c8e57b801e8fdd87'; - groupLabel = 'Staking'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(OpnxViemContractFactory) private readonly opnxContractFactory: OpnxViemContractFactory, - ) { - super(appToolkit); - } - - getEscrowContract(address: string): VeoxContract { - return this.opnxContractFactory.veox({ address, network: this.network }); - } - - getEscrowedTokenAddress({ contract }: GetTokenDefinitionsParams) { - return contract.read.token(); - } - - async getEscrowedTokenBalance({ contract, address }: GetTokenBalancesParams) { - return contract.read.locked([address]).then(v => v[0]); - } - - async getLabel({ contractPosition }: GetDisplayPropsParams) { - return getLabelFromToken(contractPosition.tokens[0]); - } -} diff --git a/src/apps/opnx/opnx.module.ts b/src/apps/opnx/opnx.module.ts deleted file mode 100644 index 45c2a4740..000000000 --- a/src/apps/opnx/opnx.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Module } from '@nestjs/common'; - -import { AbstractApp } from '~app/app.dynamic-module'; - -import { OpnxViemContractFactory } from './contracts'; -import { EthereumOpnxContractPositionFetcher } from './ethereum/opnx.veox.contract-position-fetcher'; - -@Module({ - providers: [EthereumOpnxContractPositionFetcher, OpnxViemContractFactory], -}) -export class OpnxAppModule extends AbstractApp() {}