diff --git a/src/apps/arbitrum-airdrop/arbitrum-airdrop.module.ts b/src/apps/arbitrum-airdrop/arbitrum-airdrop.module.ts deleted file mode 100644 index 8e4150171..000000000 --- a/src/apps/arbitrum-airdrop/arbitrum-airdrop.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Module } from '@nestjs/common'; - -import { AbstractApp } from '~app/app.dynamic-module'; - -import { ArbitrumArbitrumAirdropAirdropContractPositionFetcher } from './arbitrum/arbitrum-airdrop.airdrop.contract-position-fetcher'; -import { ArbitrumAirdropContractFactory } from './contracts'; - -@Module({ - providers: [ArbitrumAirdropContractFactory, ArbitrumArbitrumAirdropAirdropContractPositionFetcher], -}) -export class ArbitrumAirdropAppModule extends AbstractApp() {} diff --git a/src/apps/arbitrum-airdrop/arbitrum/arbitrum-airdrop.airdrop.contract-position-fetcher.ts b/src/apps/arbitrum-airdrop/arbitrum/arbitrum-airdrop.airdrop.contract-position-fetcher.ts deleted file mode 100644 index 28e12b655..000000000 --- a/src/apps/arbitrum-airdrop/arbitrum/arbitrum-airdrop.airdrop.contract-position-fetcher.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Inject } from '@nestjs/common'; -import { BigNumberish, Contract } from 'ethers'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { DefaultDataProps } from '~position/display.interface'; -import { MetaType } from '~position/position.interface'; -import { ContractPositionTemplatePositionFetcher } from '~position/template/contract-position.template.position-fetcher'; -import { - GetDefinitionsParams, - DefaultContractPositionDefinition, - GetTokenDefinitionsParams, - UnderlyingTokenDefinition, - GetTokenBalancesParams, - GetDisplayPropsParams, -} from '~position/template/contract-position.template.types'; - -import { ArbitrumAirdropContractFactory, TokenDistributor } from '../contracts'; - -const TOKEN_DISTRIBUTOR = '0x67a24ce4321ab3af51c2d0a4801c3e111d88c9d9'; -const ARB_TOKEN = '0x912ce59144191c1204e64559fe8253a0e49e6548'; - -@PositionTemplate() -export class ArbitrumArbitrumAirdropAirdropContractPositionFetcher extends ContractPositionTemplatePositionFetcher { - groupLabel = 'airdrop'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(ArbitrumAirdropContractFactory) - protected readonly arbitrumAirdropContractFactory: ArbitrumAirdropContractFactory, - ) { - super(appToolkit); - } - - getContract(_address: string): Contract { - return this.arbitrumAirdropContractFactory.tokenDistributor({ - address: _address, - network: this.network, - }); - } - - async getLabel( - _params: GetDisplayPropsParams, - ): Promise { - return 'Arbitrum Airdrop'; - } - - async getDefinitions(_params: GetDefinitionsParams): Promise { - return [{ address: TOKEN_DISTRIBUTOR }]; - } - - async getTokenDefinitions( - _params: GetTokenDefinitionsParams, - ): Promise { - return [{ metaType: MetaType.CLAIMABLE, address: ARB_TOKEN, network: this.network }]; - } - - async getTokenBalancesPerPosition( - params: GetTokenBalancesParams, - ): Promise { - return [await params.contract.claimableTokens(params.address)]; - } -} diff --git a/src/apps/arbitrum-airdrop/assets/logo.png b/src/apps/arbitrum-airdrop/assets/logo.png deleted file mode 100644 index 1a7e7493a..000000000 Binary files a/src/apps/arbitrum-airdrop/assets/logo.png and /dev/null differ diff --git a/src/apps/arbitrum-airdrop/contracts/abis/token-distributor.json b/src/apps/arbitrum-airdrop/contracts/abis/token-distributor.json deleted file mode 100644 index 320d34f87..000000000 --- a/src/apps/arbitrum-airdrop/contracts/abis/token-distributor.json +++ /dev/null @@ -1,348 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "contract IERC20VotesUpgradeable", - "name": "_token", - "type": "address" - }, - { - "internalType": "address payable", - "name": "_sweepReceiver", - "type": "address" - }, - { - "internalType": "address", - "name": "_owner", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_claimPeriodStart", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_claimPeriodEnd", - "type": "uint256" - }, - { - "internalType": "address", - "name": "delegateTo", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "CanClaim", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "HasClaimed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newSweepReceiver", - "type": "address" - } - ], - "name": "SweepReceiverSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Swept", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - }, - { - "inputs": [], - "name": "claim", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "claimAndDelegate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "claimPeriodEnd", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "claimPeriodStart", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "claimableTokens", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_recipients", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "_claimableAmount", - "type": "uint256[]" - } - ], - "name": "setRecipients", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_sweepReceiver", - "type": "address" - } - ], - "name": "setSweepReciever", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "sweep", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "sweepReceiver", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "token", - "outputs": [ - { - "internalType": "contract IERC20VotesUpgradeable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalClaimable", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/arbitrum-airdrop/contracts/ethers/TokenDistributor.ts b/src/apps/arbitrum-airdrop/contracts/ethers/TokenDistributor.ts deleted file mode 100644 index 8f4354c3e..000000000 --- a/src/apps/arbitrum-airdrop/contracts/ethers/TokenDistributor.ts +++ /dev/null @@ -1,461 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from 'ethers'; -import type { FunctionFragment, Result, EventFragment } from '@ethersproject/abi'; -import type { Listener, Provider } from '@ethersproject/providers'; -import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from './common'; - -export interface TokenDistributorInterface extends utils.Interface { - functions: { - 'claim()': FunctionFragment; - 'claimAndDelegate(address,uint256,uint8,bytes32,bytes32)': FunctionFragment; - 'claimPeriodEnd()': FunctionFragment; - 'claimPeriodStart()': FunctionFragment; - 'claimableTokens(address)': FunctionFragment; - 'owner()': FunctionFragment; - 'renounceOwnership()': FunctionFragment; - 'setRecipients(address[],uint256[])': FunctionFragment; - 'setSweepReciever(address)': FunctionFragment; - 'sweep()': FunctionFragment; - 'sweepReceiver()': FunctionFragment; - 'token()': FunctionFragment; - 'totalClaimable()': FunctionFragment; - 'transferOwnership(address)': FunctionFragment; - 'withdraw(uint256)': FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | 'claim' - | 'claimAndDelegate' - | 'claimPeriodEnd' - | 'claimPeriodStart' - | 'claimableTokens' - | 'owner' - | 'renounceOwnership' - | 'setRecipients' - | 'setSweepReciever' - | 'sweep' - | 'sweepReceiver' - | 'token' - | 'totalClaimable' - | 'transferOwnership' - | 'withdraw', - ): FunctionFragment; - - encodeFunctionData(functionFragment: 'claim', values?: undefined): string; - encodeFunctionData( - functionFragment: 'claimAndDelegate', - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - ], - ): string; - encodeFunctionData(functionFragment: 'claimPeriodEnd', values?: undefined): string; - encodeFunctionData(functionFragment: 'claimPeriodStart', values?: undefined): string; - encodeFunctionData(functionFragment: 'claimableTokens', values: [PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'owner', values?: undefined): string; - encodeFunctionData(functionFragment: 'renounceOwnership', values?: undefined): string; - encodeFunctionData( - functionFragment: 'setRecipients', - values: [PromiseOrValue[], PromiseOrValue[]], - ): string; - encodeFunctionData(functionFragment: 'setSweepReciever', values: [PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'sweep', values?: undefined): string; - encodeFunctionData(functionFragment: 'sweepReceiver', values?: undefined): string; - encodeFunctionData(functionFragment: 'token', values?: undefined): string; - encodeFunctionData(functionFragment: 'totalClaimable', values?: undefined): string; - encodeFunctionData(functionFragment: 'transferOwnership', values: [PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'withdraw', values: [PromiseOrValue]): string; - - decodeFunctionResult(functionFragment: 'claim', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'claimAndDelegate', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'claimPeriodEnd', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'claimPeriodStart', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'claimableTokens', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'owner', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'renounceOwnership', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'setRecipients', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'setSweepReciever', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'sweep', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'sweepReceiver', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'token', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'totalClaimable', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'transferOwnership', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'withdraw', data: BytesLike): Result; - - events: { - 'CanClaim(address,uint256)': EventFragment; - 'HasClaimed(address,uint256)': EventFragment; - 'OwnershipTransferred(address,address)': EventFragment; - 'SweepReceiverSet(address)': EventFragment; - 'Swept(uint256)': EventFragment; - 'Withdrawal(address,uint256)': EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: 'CanClaim'): EventFragment; - getEvent(nameOrSignatureOrTopic: 'HasClaimed'): EventFragment; - getEvent(nameOrSignatureOrTopic: 'OwnershipTransferred'): EventFragment; - getEvent(nameOrSignatureOrTopic: 'SweepReceiverSet'): EventFragment; - getEvent(nameOrSignatureOrTopic: 'Swept'): EventFragment; - getEvent(nameOrSignatureOrTopic: 'Withdrawal'): EventFragment; -} - -export interface CanClaimEventObject { - recipient: string; - amount: BigNumber; -} -export type CanClaimEvent = TypedEvent<[string, BigNumber], CanClaimEventObject>; - -export type CanClaimEventFilter = TypedEventFilter; - -export interface HasClaimedEventObject { - recipient: string; - amount: BigNumber; -} -export type HasClaimedEvent = TypedEvent<[string, BigNumber], HasClaimedEventObject>; - -export type HasClaimedEventFilter = TypedEventFilter; - -export interface OwnershipTransferredEventObject { - previousOwner: string; - newOwner: string; -} -export type OwnershipTransferredEvent = TypedEvent<[string, string], OwnershipTransferredEventObject>; - -export type OwnershipTransferredEventFilter = TypedEventFilter; - -export interface SweepReceiverSetEventObject { - newSweepReceiver: string; -} -export type SweepReceiverSetEvent = TypedEvent<[string], SweepReceiverSetEventObject>; - -export type SweepReceiverSetEventFilter = TypedEventFilter; - -export interface SweptEventObject { - amount: BigNumber; -} -export type SweptEvent = TypedEvent<[BigNumber], SweptEventObject>; - -export type SweptEventFilter = TypedEventFilter; - -export interface WithdrawalEventObject { - recipient: string; - amount: BigNumber; -} -export type WithdrawalEvent = TypedEvent<[string, BigNumber], WithdrawalEventObject>; - -export type WithdrawalEventFilter = TypedEventFilter; - -export interface TokenDistributor extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: TokenDistributorInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined, - ): Promise>; - - listeners(eventFilter?: TypedEventFilter): Array>; - listeners(eventName?: string): Array; - removeAllListeners(eventFilter: TypedEventFilter): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - claim(overrides?: Overrides & { from?: PromiseOrValue }): Promise; - - claimAndDelegate( - delegatee: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, - ): Promise; - - claimPeriodEnd(overrides?: CallOverrides): Promise<[BigNumber]>; - - claimPeriodStart(overrides?: CallOverrides): Promise<[BigNumber]>; - - claimableTokens(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; - - setRecipients( - _recipients: PromiseOrValue[], - _claimableAmount: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue }, - ): Promise; - - setSweepReciever( - _sweepReceiver: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, - ): Promise; - - sweep(overrides?: Overrides & { from?: PromiseOrValue }): Promise; - - sweepReceiver(overrides?: CallOverrides): Promise<[string]>; - - token(overrides?: CallOverrides): Promise<[string]>; - - totalClaimable(overrides?: CallOverrides): Promise<[BigNumber]>; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, - ): Promise; - - withdraw( - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, - ): Promise; - }; - - claim(overrides?: Overrides & { from?: PromiseOrValue }): Promise; - - claimAndDelegate( - delegatee: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, - ): Promise; - - claimPeriodEnd(overrides?: CallOverrides): Promise; - - claimPeriodStart(overrides?: CallOverrides): Promise; - - claimableTokens(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; - - setRecipients( - _recipients: PromiseOrValue[], - _claimableAmount: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue }, - ): Promise; - - setSweepReciever( - _sweepReceiver: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, - ): Promise; - - sweep(overrides?: Overrides & { from?: PromiseOrValue }): Promise; - - sweepReceiver(overrides?: CallOverrides): Promise; - - token(overrides?: CallOverrides): Promise; - - totalClaimable(overrides?: CallOverrides): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, - ): Promise; - - withdraw( - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, - ): Promise; - - callStatic: { - claim(overrides?: CallOverrides): Promise; - - claimAndDelegate( - delegatee: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides, - ): Promise; - - claimPeriodEnd(overrides?: CallOverrides): Promise; - - claimPeriodStart(overrides?: CallOverrides): Promise; - - claimableTokens(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - renounceOwnership(overrides?: CallOverrides): Promise; - - setRecipients( - _recipients: PromiseOrValue[], - _claimableAmount: PromiseOrValue[], - overrides?: CallOverrides, - ): Promise; - - setSweepReciever(_sweepReceiver: PromiseOrValue, overrides?: CallOverrides): Promise; - - sweep(overrides?: CallOverrides): Promise; - - sweepReceiver(overrides?: CallOverrides): Promise; - - token(overrides?: CallOverrides): Promise; - - totalClaimable(overrides?: CallOverrides): Promise; - - transferOwnership(newOwner: PromiseOrValue, overrides?: CallOverrides): Promise; - - withdraw(amount: PromiseOrValue, overrides?: CallOverrides): Promise; - }; - - filters: { - 'CanClaim(address,uint256)'(recipient?: PromiseOrValue | null, amount?: null): CanClaimEventFilter; - CanClaim(recipient?: PromiseOrValue | null, amount?: null): CanClaimEventFilter; - - 'HasClaimed(address,uint256)'(recipient?: PromiseOrValue | null, amount?: null): HasClaimedEventFilter; - HasClaimed(recipient?: PromiseOrValue | null, amount?: null): HasClaimedEventFilter; - - 'OwnershipTransferred(address,address)'( - previousOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null, - ): OwnershipTransferredEventFilter; - OwnershipTransferred( - previousOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null, - ): OwnershipTransferredEventFilter; - - 'SweepReceiverSet(address)'(newSweepReceiver?: PromiseOrValue | null): SweepReceiverSetEventFilter; - SweepReceiverSet(newSweepReceiver?: PromiseOrValue | null): SweepReceiverSetEventFilter; - - 'Swept(uint256)'(amount?: null): SweptEventFilter; - Swept(amount?: null): SweptEventFilter; - - 'Withdrawal(address,uint256)'(recipient?: PromiseOrValue | null, amount?: null): WithdrawalEventFilter; - Withdrawal(recipient?: PromiseOrValue | null, amount?: null): WithdrawalEventFilter; - }; - - estimateGas: { - claim(overrides?: Overrides & { from?: PromiseOrValue }): Promise; - - claimAndDelegate( - delegatee: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, - ): Promise; - - claimPeriodEnd(overrides?: CallOverrides): Promise; - - claimPeriodStart(overrides?: CallOverrides): Promise; - - claimableTokens(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; - - setRecipients( - _recipients: PromiseOrValue[], - _claimableAmount: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue }, - ): Promise; - - setSweepReciever( - _sweepReceiver: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, - ): Promise; - - sweep(overrides?: Overrides & { from?: PromiseOrValue }): Promise; - - sweepReceiver(overrides?: CallOverrides): Promise; - - token(overrides?: CallOverrides): Promise; - - totalClaimable(overrides?: CallOverrides): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, - ): Promise; - - withdraw( - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, - ): Promise; - }; - - populateTransaction: { - claim(overrides?: Overrides & { from?: PromiseOrValue }): Promise; - - claimAndDelegate( - delegatee: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, - ): Promise; - - claimPeriodEnd(overrides?: CallOverrides): Promise; - - claimPeriodStart(overrides?: CallOverrides): Promise; - - claimableTokens(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; - - setRecipients( - _recipients: PromiseOrValue[], - _claimableAmount: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue }, - ): Promise; - - setSweepReciever( - _sweepReceiver: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, - ): Promise; - - sweep(overrides?: Overrides & { from?: PromiseOrValue }): Promise; - - sweepReceiver(overrides?: CallOverrides): Promise; - - token(overrides?: CallOverrides): Promise; - - totalClaimable(overrides?: CallOverrides): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, - ): Promise; - - withdraw( - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, - ): Promise; - }; -} diff --git a/src/apps/arbitrum-airdrop/contracts/ethers/common.ts b/src/apps/arbitrum-airdrop/contracts/ethers/common.ts deleted file mode 100644 index 35f31be99..000000000 --- a/src/apps/arbitrum-airdrop/contracts/ethers/common.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { Listener } from '@ethersproject/providers'; -import type { Event, EventFilter } from 'ethers'; - -export interface TypedEvent = any, TArgsObject = any> extends Event { - args: TArgsArray & TArgsObject; -} - -export interface TypedEventFilter<_TEvent extends TypedEvent> extends EventFilter {} - -export interface TypedListener { - (...listenerArg: [...__TypechainArgsArray, TEvent]): void; -} - -type __TypechainArgsArray = T extends TypedEvent ? U : never; - -export interface OnEvent { - (eventFilter: TypedEventFilter, listener: TypedListener): TRes; - (eventName: string, listener: Listener): TRes; -} - -export type MinEthersFactory = { - deploy(...a: ARGS[]): Promise; -}; - -export type GetContractTypeFromFactory = F extends MinEthersFactory ? C : never; - -export type GetARGsTypeFromFactory = F extends MinEthersFactory ? Parameters : never; - -export type PromiseOrValue = T | Promise; diff --git a/src/apps/arbitrum-airdrop/contracts/ethers/factories/TokenDistributor__factory.ts b/src/apps/arbitrum-airdrop/contracts/ethers/factories/TokenDistributor__factory.ts deleted file mode 100644 index 4569be310..000000000 --- a/src/apps/arbitrum-airdrop/contracts/ethers/factories/TokenDistributor__factory.ts +++ /dev/null @@ -1,366 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from 'ethers'; -import type { Provider } from '@ethersproject/providers'; -import type { TokenDistributor, TokenDistributorInterface } from '../TokenDistributor'; - -const _abi = [ - { - inputs: [ - { - internalType: 'contract IERC20VotesUpgradeable', - name: '_token', - type: 'address', - }, - { - internalType: 'address payable', - name: '_sweepReceiver', - type: 'address', - }, - { - internalType: 'address', - name: '_owner', - type: 'address', - }, - { - internalType: 'uint256', - name: '_claimPeriodStart', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_claimPeriodEnd', - type: 'uint256', - }, - { - internalType: 'address', - name: 'delegateTo', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'CanClaim', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'HasClaimed', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipTransferred', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'newSweepReceiver', - type: 'address', - }, - ], - name: 'SweepReceiverSet', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Swept', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Withdrawal', - type: 'event', - }, - { - inputs: [], - name: 'claim', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'delegatee', - type: 'address', - }, - { - internalType: 'uint256', - name: 'expiry', - type: 'uint256', - }, - { - internalType: 'uint8', - name: 'v', - type: 'uint8', - }, - { - internalType: 'bytes32', - name: 'r', - type: 'bytes32', - }, - { - internalType: 'bytes32', - name: 's', - type: 'bytes32', - }, - ], - name: 'claimAndDelegate', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'claimPeriodEnd', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'claimPeriodStart', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'claimableTokens', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'owner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'renounceOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address[]', - name: '_recipients', - type: 'address[]', - }, - { - internalType: 'uint256[]', - name: '_claimableAmount', - type: 'uint256[]', - }, - ], - name: 'setRecipients', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address payable', - name: '_sweepReceiver', - type: 'address', - }, - ], - name: 'setSweepReciever', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'sweep', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'sweepReceiver', - outputs: [ - { - internalType: 'address payable', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'token', - outputs: [ - { - internalType: 'contract IERC20VotesUpgradeable', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalClaimable', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'transferOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'withdraw', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, -]; - -export class TokenDistributor__factory { - static readonly abi = _abi; - static createInterface(): TokenDistributorInterface { - return new utils.Interface(_abi) as TokenDistributorInterface; - } - static connect(address: string, signerOrProvider: Signer | Provider): TokenDistributor { - return new Contract(address, _abi, signerOrProvider) as TokenDistributor; - } -} diff --git a/src/apps/arbitrum-airdrop/contracts/ethers/factories/index.ts b/src/apps/arbitrum-airdrop/contracts/ethers/factories/index.ts deleted file mode 100644 index e3e32e345..000000000 --- a/src/apps/arbitrum-airdrop/contracts/ethers/factories/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { TokenDistributor__factory } from './TokenDistributor__factory'; diff --git a/src/apps/arbitrum-airdrop/contracts/ethers/index.ts b/src/apps/arbitrum-airdrop/contracts/ethers/index.ts deleted file mode 100644 index 8b984a700..000000000 --- a/src/apps/arbitrum-airdrop/contracts/ethers/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { TokenDistributor } from './TokenDistributor'; -export * as factories from './factories'; -export { TokenDistributor__factory } from './factories/TokenDistributor__factory'; diff --git a/src/apps/arbitrum-airdrop/contracts/index.ts b/src/apps/arbitrum-airdrop/contracts/index.ts deleted file mode 100644 index 06d5e5698..000000000 --- a/src/apps/arbitrum-airdrop/contracts/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Injectable, Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { ContractFactory } from '~contract/contracts'; -import { Network } from '~types/network.interface'; - -import { TokenDistributor__factory } from './ethers'; - -// eslint-disable-next-line -type ContractOpts = { address: string; network: Network }; - -@Injectable() -export class ArbitrumAirdropContractFactory extends ContractFactory { - constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) { - super((network: Network) => appToolkit.getNetworkProvider(network)); - } - - tokenDistributor({ address, network }: ContractOpts) { - return TokenDistributor__factory.connect(address, this.appToolkit.getNetworkProvider(network)); - } -} - -export type { TokenDistributor } from './ethers';