From 57c10c029da5c511585e729dac513451343c8557 Mon Sep 17 00:00:00 2001 From: Jan-Felix Date: Mon, 4 Apr 2022 14:35:00 +0200 Subject: [PATCH] add ABI for COW claiming contracts for holders of locked GNO (#2643) --- src/custom/abis/MerkleDrop.json | 26 ++++ src/custom/abis/TokenDistro.json | 33 ++++ src/custom/abis/types/MerkleDrop.d.ts | 124 +++++++++++++++ src/custom/abis/types/TokenDistro.d.ts | 141 ++++++++++++++++++ .../types/factories/MerkleDrop__factory.ts | 46 ++++++ .../types/factories/TokenDistro__factory.ts | 54 +++++++ src/custom/abis/types/index.ts | 4 + 7 files changed, 428 insertions(+) create mode 100644 src/custom/abis/MerkleDrop.json create mode 100644 src/custom/abis/TokenDistro.json create mode 100644 src/custom/abis/types/MerkleDrop.d.ts create mode 100644 src/custom/abis/types/TokenDistro.d.ts create mode 100644 src/custom/abis/types/factories/MerkleDrop__factory.ts create mode 100644 src/custom/abis/types/factories/TokenDistro__factory.ts diff --git a/src/custom/abis/MerkleDrop.json b/src/custom/abis/MerkleDrop.json new file mode 100644 index 0000000000..f4efc3aa7b --- /dev/null +++ b/src/custom/abis/MerkleDrop.json @@ -0,0 +1,26 @@ +[ + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + } + ], + "name": "claim", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] + diff --git a/src/custom/abis/TokenDistro.json b/src/custom/abis/TokenDistro.json new file mode 100644 index 0000000000..cfdff2c797 --- /dev/null +++ b/src/custom/abis/TokenDistro.json @@ -0,0 +1,33 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "balances", + "outputs": [ + { + "internalType": "uint256", + "name": "allocatedTokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimed", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "claim", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/src/custom/abis/types/MerkleDrop.d.ts b/src/custom/abis/types/MerkleDrop.d.ts new file mode 100644 index 0000000000..ad939bb677 --- /dev/null +++ b/src/custom/abis/types/MerkleDrop.d.ts @@ -0,0 +1,124 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + BaseContract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import type { TypedEventFilter, TypedEvent, TypedListener } from "./common"; + +interface MerkleDropInterface extends ethers.utils.Interface { + functions: { + "claim(uint256,uint256,bytes32[])": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "claim", + values: [BigNumberish, BigNumberish, BytesLike[]] + ): string; + + decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result; + + events: {}; +} + +export class MerkleDrop extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: MerkleDropInterface; + + functions: { + claim( + index: BigNumberish, + amount: BigNumberish, + merkleProof: BytesLike[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + claim( + index: BigNumberish, + amount: BigNumberish, + merkleProof: BytesLike[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + claim( + index: BigNumberish, + amount: BigNumberish, + merkleProof: BytesLike[], + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + claim( + index: BigNumberish, + amount: BigNumberish, + merkleProof: BytesLike[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + claim( + index: BigNumberish, + amount: BigNumberish, + merkleProof: BytesLike[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/src/custom/abis/types/TokenDistro.d.ts b/src/custom/abis/types/TokenDistro.d.ts new file mode 100644 index 0000000000..f5e190b9e5 --- /dev/null +++ b/src/custom/abis/types/TokenDistro.d.ts @@ -0,0 +1,141 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + BaseContract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import type { TypedEventFilter, TypedEvent, TypedListener } from "./common"; + +interface TokenDistroInterface extends ethers.utils.Interface { + functions: { + "balances(address)": FunctionFragment; + "claim()": FunctionFragment; + }; + + encodeFunctionData(functionFragment: "balances", values: [string]): string; + encodeFunctionData(functionFragment: "claim", values?: undefined): string; + + decodeFunctionResult(functionFragment: "balances", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result; + + events: {}; +} + +export class TokenDistro extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: TokenDistroInterface; + + functions: { + balances( + arg0: string, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { + allocatedTokens: BigNumber; + claimed: BigNumber; + } + >; + + claim( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + balances( + arg0: string, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { allocatedTokens: BigNumber; claimed: BigNumber } + >; + + claim( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + balances( + arg0: string, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { + allocatedTokens: BigNumber; + claimed: BigNumber; + } + >; + + claim(overrides?: CallOverrides): Promise; + }; + + filters: {}; + + estimateGas: { + balances(arg0: string, overrides?: CallOverrides): Promise; + + claim( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + balances( + arg0: string, + overrides?: CallOverrides + ): Promise; + + claim( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/src/custom/abis/types/factories/MerkleDrop__factory.ts b/src/custom/abis/types/factories/MerkleDrop__factory.ts new file mode 100644 index 0000000000..7c49900b96 --- /dev/null +++ b/src/custom/abis/types/factories/MerkleDrop__factory.ts @@ -0,0 +1,46 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import { Provider } from "@ethersproject/providers"; +import type { MerkleDrop, MerkleDropInterface } from "../MerkleDrop"; + +const _abi = [ + { + inputs: [ + { + internalType: "uint256", + name: "index", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes32[]", + name: "merkleProof", + type: "bytes32[]", + }, + ], + name: "claim", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +export class MerkleDrop__factory { + static readonly abi = _abi; + static createInterface(): MerkleDropInterface { + return new utils.Interface(_abi) as MerkleDropInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): MerkleDrop { + return new Contract(address, _abi, signerOrProvider) as MerkleDrop; + } +} diff --git a/src/custom/abis/types/factories/TokenDistro__factory.ts b/src/custom/abis/types/factories/TokenDistro__factory.ts new file mode 100644 index 0000000000..fe7e2ce269 --- /dev/null +++ b/src/custom/abis/types/factories/TokenDistro__factory.ts @@ -0,0 +1,54 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import { Provider } from "@ethersproject/providers"; +import type { TokenDistro, TokenDistroInterface } from "../TokenDistro"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "balances", + outputs: [ + { + internalType: "uint256", + name: "allocatedTokens", + type: "uint256", + }, + { + internalType: "uint256", + name: "claimed", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "claim", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +export class TokenDistro__factory { + static readonly abi = _abi; + static createInterface(): TokenDistroInterface { + return new utils.Interface(_abi) as TokenDistroInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): TokenDistro { + return new Contract(address, _abi, signerOrProvider) as TokenDistro; + } +} diff --git a/src/custom/abis/types/index.ts b/src/custom/abis/types/index.ts index 4e0d72bd0e..330d8031be 100644 --- a/src/custom/abis/types/index.ts +++ b/src/custom/abis/types/index.ts @@ -2,8 +2,12 @@ /* tslint:disable */ /* eslint-disable */ export type { GPv2Settlement } from "./GPv2Settlement"; +export type { MerkleDrop } from "./MerkleDrop"; +export type { TokenDistro } from "./TokenDistro"; export type { VCow } from "./VCow"; export { GPv2Settlement__factory } from "./factories/GPv2Settlement__factory"; +export { MerkleDrop__factory } from "./factories/MerkleDrop__factory"; +export { TokenDistro__factory } from "./factories/TokenDistro__factory"; export { VCow__factory } from "./factories/VCow__factory"; export * from "@src/abis/types";