ERC20 abis

This commit is contained in:
smart_ex 2022-05-26 17:48:13 +10:00
parent 3279eeaf08
commit bee7d46f6e
2 changed files with 710 additions and 0 deletions

433
contracts/ERC20Abi.ts Normal file
View File

@ -0,0 +1,433 @@
/* 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,
} from "./common";
export interface ERC20AbiInterface extends utils.Interface {
contractName: "ERC20Abi";
functions: {
"totalSupply()": FunctionFragment;
"_totalSupply()": FunctionFragment;
"balanceOf(address)": FunctionFragment;
"transfer(address,uint256)": FunctionFragment;
"allowance(address,address)": FunctionFragment;
"transferFrom(address,address,uint256)": FunctionFragment;
"approve(address,uint256)": FunctionFragment;
"nonces(address)": FunctionFragment;
"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment;
};
getFunction(
nameOrSignatureOrTopic:
| "totalSupply"
| "_totalSupply"
| "balanceOf"
| "transfer"
| "allowance"
| "transferFrom"
| "approve"
| "nonces"
| "permit"
): FunctionFragment;
encodeFunctionData(
functionFragment: "totalSupply",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "_totalSupply",
values?: undefined
): string;
encodeFunctionData(functionFragment: "balanceOf", values: [string]): string;
encodeFunctionData(
functionFragment: "transfer",
values: [string, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "allowance",
values: [string, string]
): string;
encodeFunctionData(
functionFragment: "transferFrom",
values: [string, string, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "approve",
values: [string, BigNumberish]
): string;
encodeFunctionData(functionFragment: "nonces", values: [string]): string;
encodeFunctionData(
functionFragment: "permit",
values: [
string,
string,
BigNumberish,
BigNumberish,
BigNumberish,
BytesLike,
BytesLike
]
): string;
decodeFunctionResult(
functionFragment: "totalSupply",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "_totalSupply",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "transferFrom",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result;
events: {
"Approval(address,address,uint256)": EventFragment;
"Transfer(address,address,uint256)": EventFragment;
};
getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment;
getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment;
}
export interface ApprovalEventObject {
owner: string;
spender: string;
value: BigNumber;
}
export type ApprovalEvent = TypedEvent<
[string, string, BigNumber],
ApprovalEventObject
>;
export type ApprovalEventFilter = TypedEventFilter<ApprovalEvent>;
export interface TransferEventObject {
from: string;
to: string;
value: BigNumber;
}
export type TransferEvent = TypedEvent<
[string, string, BigNumber],
TransferEventObject
>;
export type TransferEventFilter = TypedEventFilter<TransferEvent>;
export interface ERC20Abi extends BaseContract {
contractName: "ERC20Abi";
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
interface: ERC20AbiInterface;
queryFilter<TEvent extends TypedEvent>(
event: TypedEventFilter<TEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TEvent>>;
listeners<TEvent extends TypedEvent>(
eventFilter?: TypedEventFilter<TEvent>
): Array<TypedListener<TEvent>>;
listeners(eventName?: string): Array<Listener>;
removeAllListeners<TEvent extends TypedEvent>(
eventFilter: TypedEventFilter<TEvent>
): this;
removeAllListeners(eventName?: string): this;
off: OnEvent<this>;
on: OnEvent<this>;
once: OnEvent<this>;
removeListener: OnEvent<this>;
functions: {
totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>;
_totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>;
balanceOf(who: string, overrides?: CallOverrides): Promise<[BigNumber]>;
transfer(
to: string,
value: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
allowance(
owner: string,
spender: string,
overrides?: CallOverrides
): Promise<[BigNumber]>;
transferFrom(
from: string,
to: string,
value: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
approve(
spender: string,
value: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
nonces(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>;
permit(
owner: string,
spender: string,
amount: BigNumberish,
deadline: BigNumberish,
v: BigNumberish,
r: BytesLike,
s: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
};
totalSupply(overrides?: CallOverrides): Promise<BigNumber>;
_totalSupply(overrides?: CallOverrides): Promise<BigNumber>;
balanceOf(who: string, overrides?: CallOverrides): Promise<BigNumber>;
transfer(
to: string,
value: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
allowance(
owner: string,
spender: string,
overrides?: CallOverrides
): Promise<BigNumber>;
transferFrom(
from: string,
to: string,
value: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
approve(
spender: string,
value: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
nonces(owner: string, overrides?: CallOverrides): Promise<BigNumber>;
permit(
owner: string,
spender: string,
amount: BigNumberish,
deadline: BigNumberish,
v: BigNumberish,
r: BytesLike,
s: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
callStatic: {
totalSupply(overrides?: CallOverrides): Promise<BigNumber>;
_totalSupply(overrides?: CallOverrides): Promise<BigNumber>;
balanceOf(who: string, overrides?: CallOverrides): Promise<BigNumber>;
transfer(
to: string,
value: BigNumberish,
overrides?: CallOverrides
): Promise<void>;
allowance(
owner: string,
spender: string,
overrides?: CallOverrides
): Promise<BigNumber>;
transferFrom(
from: string,
to: string,
value: BigNumberish,
overrides?: CallOverrides
): Promise<void>;
approve(
spender: string,
value: BigNumberish,
overrides?: CallOverrides
): Promise<void>;
nonces(owner: string, overrides?: CallOverrides): Promise<BigNumber>;
permit(
owner: string,
spender: string,
amount: BigNumberish,
deadline: BigNumberish,
v: BigNumberish,
r: BytesLike,
s: BytesLike,
overrides?: CallOverrides
): Promise<void>;
};
filters: {
"Approval(address,address,uint256)"(
owner?: string | null,
spender?: string | null,
value?: null
): ApprovalEventFilter;
Approval(
owner?: string | null,
spender?: string | null,
value?: null
): ApprovalEventFilter;
"Transfer(address,address,uint256)"(
from?: string | null,
to?: string | null,
value?: null
): TransferEventFilter;
Transfer(
from?: string | null,
to?: string | null,
value?: null
): TransferEventFilter;
};
estimateGas: {
totalSupply(overrides?: CallOverrides): Promise<BigNumber>;
_totalSupply(overrides?: CallOverrides): Promise<BigNumber>;
balanceOf(who: string, overrides?: CallOverrides): Promise<BigNumber>;
transfer(
to: string,
value: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
allowance(
owner: string,
spender: string,
overrides?: CallOverrides
): Promise<BigNumber>;
transferFrom(
from: string,
to: string,
value: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
approve(
spender: string,
value: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
nonces(owner: string, overrides?: CallOverrides): Promise<BigNumber>;
permit(
owner: string,
spender: string,
amount: BigNumberish,
deadline: BigNumberish,
v: BigNumberish,
r: BytesLike,
s: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
};
populateTransaction: {
totalSupply(overrides?: CallOverrides): Promise<PopulatedTransaction>;
_totalSupply(overrides?: CallOverrides): Promise<PopulatedTransaction>;
balanceOf(
who: string,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
transfer(
to: string,
value: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
allowance(
owner: string,
spender: string,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
transferFrom(
from: string,
to: string,
value: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
approve(
spender: string,
value: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
nonces(
owner: string,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
permit(
owner: string,
spender: string,
amount: BigNumberish,
deadline: BigNumberish,
v: BigNumberish,
r: BytesLike,
s: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
};
}

View File

@ -0,0 +1,277 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Contract, Signer, utils } from "ethers";
import type { Provider } from "@ethersproject/providers";
import type { ERC20Abi, ERC20AbiInterface } from "../ERC20Abi";
const _abi = [
{
constant: true,
inputs: [],
name: "totalSupply",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
payable: false,
stateMutability: "view",
type: "function",
},
{
constant: true,
inputs: [],
name: "_totalSupply",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
payable: false,
stateMutability: "view",
type: "function",
},
{
constant: true,
inputs: [
{
internalType: "address",
name: "who",
type: "address",
},
],
name: "balanceOf",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
payable: false,
stateMutability: "view",
type: "function",
},
{
constant: false,
inputs: [
{
internalType: "address",
name: "to",
type: "address",
},
{
internalType: "uint256",
name: "value",
type: "uint256",
},
],
name: "transfer",
outputs: [],
payable: false,
stateMutability: "nonpayable",
type: "function",
},
{
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: 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",
},
{
constant: true,
inputs: [
{
internalType: "address",
name: "owner",
type: "address",
},
{
internalType: "address",
name: "spender",
type: "address",
},
],
name: "allowance",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
payable: false,
stateMutability: "view",
type: "function",
},
{
constant: false,
inputs: [
{
internalType: "address",
name: "from",
type: "address",
},
{
internalType: "address",
name: "to",
type: "address",
},
{
internalType: "uint256",
name: "value",
type: "uint256",
},
],
name: "transferFrom",
outputs: [],
payable: false,
stateMutability: "nonpayable",
type: "function",
},
{
constant: false,
inputs: [
{
internalType: "address",
name: "spender",
type: "address",
},
{
internalType: "uint256",
name: "value",
type: "uint256",
},
],
name: "approve",
outputs: [],
payable: false,
stateMutability: "nonpayable",
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: "amount",
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",
},
];
export class ERC20Abi__factory {
static readonly abi = _abi;
static createInterface(): ERC20AbiInterface {
return new utils.Interface(_abi) as ERC20AbiInterface;
}
static connect(
address: string,
signerOrProvider: Signer | Provider
): ERC20Abi {
return new Contract(address, _abi, signerOrProvider) as ERC20Abi;
}
}