Skip to content

Commit

Permalink
add ABI for COW claiming contracts for holders of locked GNO (#2643)
Browse files Browse the repository at this point in the history
  • Loading branch information
jfschwarz authored Apr 4, 2022
1 parent b9fb54d commit 57c10c0
Show file tree
Hide file tree
Showing 7 changed files with 428 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/custom/abis/MerkleDrop.json
Original file line number Diff line number Diff line change
@@ -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"
}
]

33 changes: 33 additions & 0 deletions src/custom/abis/TokenDistro.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
124 changes: 124 additions & 0 deletions src/custom/abis/types/MerkleDrop.d.ts
Original file line number Diff line number Diff line change
@@ -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<this>;

listeners<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter?: TypedEventFilter<EventArgsArray, EventArgsObject>
): Array<TypedListener<EventArgsArray, EventArgsObject>>;
off<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
on<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
once<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
removeListener<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
removeAllListeners<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>
): this;

listeners(eventName?: string): Array<Listener>;
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<EventArgsArray extends Array<any>, EventArgsObject>(
event: TypedEventFilter<EventArgsArray, EventArgsObject>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEvent<EventArgsArray & EventArgsObject>>>;

interface: MerkleDropInterface;

functions: {
claim(
index: BigNumberish,
amount: BigNumberish,
merkleProof: BytesLike[],
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
};

claim(
index: BigNumberish,
amount: BigNumberish,
merkleProof: BytesLike[],
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;

callStatic: {
claim(
index: BigNumberish,
amount: BigNumberish,
merkleProof: BytesLike[],
overrides?: CallOverrides
): Promise<void>;
};

filters: {};

estimateGas: {
claim(
index: BigNumberish,
amount: BigNumberish,
merkleProof: BytesLike[],
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
};

populateTransaction: {
claim(
index: BigNumberish,
amount: BigNumberish,
merkleProof: BytesLike[],
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
};
}
141 changes: 141 additions & 0 deletions src/custom/abis/types/TokenDistro.d.ts
Original file line number Diff line number Diff line change
@@ -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<this>;

listeners<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter?: TypedEventFilter<EventArgsArray, EventArgsObject>
): Array<TypedListener<EventArgsArray, EventArgsObject>>;
off<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
on<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
once<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
removeListener<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
removeAllListeners<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>
): this;

listeners(eventName?: string): Array<Listener>;
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<EventArgsArray extends Array<any>, EventArgsObject>(
event: TypedEventFilter<EventArgsArray, EventArgsObject>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEvent<EventArgsArray & EventArgsObject>>>;

interface: TokenDistroInterface;

functions: {
balances(
arg0: string,
overrides?: CallOverrides
): Promise<
[BigNumber, BigNumber] & {
allocatedTokens: BigNumber;
claimed: BigNumber;
}
>;

claim(
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
};

balances(
arg0: string,
overrides?: CallOverrides
): Promise<
[BigNumber, BigNumber] & { allocatedTokens: BigNumber; claimed: BigNumber }
>;

claim(
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;

callStatic: {
balances(
arg0: string,
overrides?: CallOverrides
): Promise<
[BigNumber, BigNumber] & {
allocatedTokens: BigNumber;
claimed: BigNumber;
}
>;

claim(overrides?: CallOverrides): Promise<void>;
};

filters: {};

estimateGas: {
balances(arg0: string, overrides?: CallOverrides): Promise<BigNumber>;

claim(
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
};

populateTransaction: {
balances(
arg0: string,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;

claim(
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
};
}
46 changes: 46 additions & 0 deletions src/custom/abis/types/factories/MerkleDrop__factory.ts
Original file line number Diff line number Diff line change
@@ -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;
}
}
Loading

0 comments on commit 57c10c0

Please sign in to comment.