@imtbl/dex-sdk 2.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +176 -0
- package/README.md +3 -0
- package/dist/browser/index.js +2 -0
- package/dist/node/index.cjs +2 -0
- package/dist/node/index.js +2 -0
- package/dist/types/config/config.test.d.ts +1 -0
- package/dist/types/config/index.d.ts +18 -0
- package/dist/types/constants/chains/immutable-mainnet.d.ts +2 -0
- package/dist/types/constants/chains/immutable-testnet.d.ts +2 -0
- package/dist/types/constants/chains/index.d.ts +2 -0
- package/dist/types/constants/index.d.ts +3 -0
- package/dist/types/constants/router.d.ts +8 -0
- package/dist/types/constants/tokens/immutable-mainnet.d.ts +5 -0
- package/dist/types/constants/tokens/immutable-testnet.d.ts +4 -0
- package/dist/types/constants/tokens/index.d.ts +2 -0
- package/dist/types/constants/wrapping.d.ts +2 -0
- package/dist/types/contracts/types/ERC20.d.ts +141 -0
- package/dist/types/contracts/types/ImmutableSwapProxy.d.ts +469 -0
- package/dist/types/contracts/types/Multicall.d.ts +83 -0
- package/dist/types/contracts/types/QuoterV2.d.ts +219 -0
- package/dist/types/contracts/types/UniswapV3Pool.d.ts +732 -0
- package/dist/types/contracts/types/WIMX.d.ts +179 -0
- package/dist/types/contracts/types/common.d.ts +50 -0
- package/dist/types/contracts/types/factories/ERC20__factory.d.ts +174 -0
- package/dist/types/contracts/types/factories/ImmutableSwapProxy__factory.d.ts +612 -0
- package/dist/types/contracts/types/factories/Multicall__factory.d.ts +90 -0
- package/dist/types/contracts/types/factories/QuoterV2__factory.d.ts +226 -0
- package/dist/types/contracts/types/factories/UniswapV3Pool__factory.d.ts +795 -0
- package/dist/types/contracts/types/factories/WIMX__factory.d.ts +219 -0
- package/dist/types/contracts/types/factories/index.d.ts +6 -0
- package/dist/types/contracts/types/index.d.ts +13 -0
- package/dist/types/errors/exchangeError.d.ts +61 -0
- package/dist/types/errors/index.d.ts +1 -0
- package/dist/types/exchange.d.ts +50 -0
- package/dist/types/exchange.getUnsignedSwapTxFromAmountIn.test.d.ts +1 -0
- package/dist/types/exchange.getUnsignedSwapTxFromAmountOut.test.d.ts +1 -0
- package/dist/types/exchange.test.d.ts +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/lib/fees.d.ts +16 -0
- package/dist/types/lib/fees.test.d.ts +1 -0
- package/dist/types/lib/getQuotesForRoutes.d.ts +14 -0
- package/dist/types/lib/getQuotesForRoutes.test.d.ts +1 -0
- package/dist/types/lib/index.d.ts +3 -0
- package/dist/types/lib/multicall.d.ts +12 -0
- package/dist/types/lib/multicall.test.d.ts +1 -0
- package/dist/types/lib/nativeTokenService.d.ts +13 -0
- package/dist/types/lib/nativeTokenService.test.d.ts +1 -0
- package/dist/types/lib/poolUtils/computePoolAddress.d.ts +9 -0
- package/dist/types/lib/poolUtils/ensureCorrectERC20AddressOrder.test.d.ts +1 -0
- package/dist/types/lib/poolUtils/fetchValidPools.d.ts +14 -0
- package/dist/types/lib/poolUtils/fetchValidPools.test.d.ts +1 -0
- package/dist/types/lib/poolUtils/generateAllAcyclicPaths.test.d.ts +1 -0
- package/dist/types/lib/poolUtils/generateERC20Pairs.d.ts +7 -0
- package/dist/types/lib/poolUtils/generateERC20Pairs.test.d.ts +1 -0
- package/dist/types/lib/poolUtils/generatePossiblePoolsFromERC20Pairs.d.ts +11 -0
- package/dist/types/lib/poolUtils/generatePossiblePoolsFromERC20Pairs.test.d.ts +1 -0
- package/dist/types/lib/router.d.ts +24 -0
- package/dist/types/lib/router.test.d.ts +1 -0
- package/dist/types/lib/transactionUtils/approval.d.ts +25 -0
- package/dist/types/lib/transactionUtils/approval.test.d.ts +1 -0
- package/dist/types/lib/transactionUtils/gas.d.ts +18 -0
- package/dist/types/lib/transactionUtils/gas.test.d.ts +1 -0
- package/dist/types/lib/transactionUtils/getQuote.d.ts +13 -0
- package/dist/types/lib/transactionUtils/getQuote.test.d.ts +1 -0
- package/dist/types/lib/transactionUtils/slippage.d.ts +2 -0
- package/dist/types/lib/transactionUtils/slippage.test.d.ts +1 -0
- package/dist/types/lib/transactionUtils/swap.d.ts +16 -0
- package/dist/types/lib/transactionUtils/swap.test.d.ts +1 -0
- package/dist/types/lib/utils.d.ts +60 -0
- package/dist/types/lib/utils.test.d.ts +1 -0
- package/dist/types/test/utils.d.ts +134 -0
- package/dist/types/test/utils.test.d.ts +1 -0
- package/dist/types/types/index.d.ts +174 -0
- package/package.json +74 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers";
|
|
2
|
+
import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "./common";
|
|
3
|
+
export interface WIMXInterface extends Interface {
|
|
4
|
+
getFunction(nameOrSignature: "name" | "approve" | "totalSupply" | "transferFrom" | "withdraw" | "decimals" | "balanceOf" | "symbol" | "transfer" | "deposit" | "allowance"): FunctionFragment;
|
|
5
|
+
getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer" | "Deposit" | "Withdrawal"): EventFragment;
|
|
6
|
+
encodeFunctionData(functionFragment: "name", values?: undefined): string;
|
|
7
|
+
encodeFunctionData(functionFragment: "approve", values: [AddressLike, BigNumberish]): string;
|
|
8
|
+
encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string;
|
|
9
|
+
encodeFunctionData(functionFragment: "transferFrom", values: [AddressLike, AddressLike, BigNumberish]): string;
|
|
10
|
+
encodeFunctionData(functionFragment: "withdraw", values: [BigNumberish]): string;
|
|
11
|
+
encodeFunctionData(functionFragment: "decimals", values?: undefined): string;
|
|
12
|
+
encodeFunctionData(functionFragment: "balanceOf", values: [AddressLike]): string;
|
|
13
|
+
encodeFunctionData(functionFragment: "symbol", values?: undefined): string;
|
|
14
|
+
encodeFunctionData(functionFragment: "transfer", values: [AddressLike, BigNumberish]): string;
|
|
15
|
+
encodeFunctionData(functionFragment: "deposit", values?: undefined): string;
|
|
16
|
+
encodeFunctionData(functionFragment: "allowance", values: [AddressLike, AddressLike]): string;
|
|
17
|
+
decodeFunctionResult(functionFragment: "name", data: BytesLike): Result;
|
|
18
|
+
decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result;
|
|
19
|
+
decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result;
|
|
20
|
+
decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result;
|
|
21
|
+
decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result;
|
|
22
|
+
decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result;
|
|
23
|
+
decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result;
|
|
24
|
+
decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result;
|
|
25
|
+
decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result;
|
|
26
|
+
decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result;
|
|
27
|
+
decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result;
|
|
28
|
+
}
|
|
29
|
+
export declare namespace ApprovalEvent {
|
|
30
|
+
type InputTuple = [
|
|
31
|
+
src: AddressLike,
|
|
32
|
+
guy: AddressLike,
|
|
33
|
+
wad: BigNumberish
|
|
34
|
+
];
|
|
35
|
+
type OutputTuple = [src: string, guy: string, wad: bigint];
|
|
36
|
+
interface OutputObject {
|
|
37
|
+
src: string;
|
|
38
|
+
guy: string;
|
|
39
|
+
wad: bigint;
|
|
40
|
+
}
|
|
41
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
42
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
43
|
+
type Log = TypedEventLog<Event>;
|
|
44
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
45
|
+
}
|
|
46
|
+
export declare namespace TransferEvent {
|
|
47
|
+
type InputTuple = [
|
|
48
|
+
src: AddressLike,
|
|
49
|
+
dst: AddressLike,
|
|
50
|
+
wad: BigNumberish
|
|
51
|
+
];
|
|
52
|
+
type OutputTuple = [src: string, dst: string, wad: bigint];
|
|
53
|
+
interface OutputObject {
|
|
54
|
+
src: string;
|
|
55
|
+
dst: string;
|
|
56
|
+
wad: bigint;
|
|
57
|
+
}
|
|
58
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
59
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
60
|
+
type Log = TypedEventLog<Event>;
|
|
61
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
62
|
+
}
|
|
63
|
+
export declare namespace DepositEvent {
|
|
64
|
+
type InputTuple = [dst: AddressLike, wad: BigNumberish];
|
|
65
|
+
type OutputTuple = [dst: string, wad: bigint];
|
|
66
|
+
interface OutputObject {
|
|
67
|
+
dst: string;
|
|
68
|
+
wad: bigint;
|
|
69
|
+
}
|
|
70
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
71
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
72
|
+
type Log = TypedEventLog<Event>;
|
|
73
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
74
|
+
}
|
|
75
|
+
export declare namespace WithdrawalEvent {
|
|
76
|
+
type InputTuple = [src: AddressLike, wad: BigNumberish];
|
|
77
|
+
type OutputTuple = [src: string, wad: bigint];
|
|
78
|
+
interface OutputObject {
|
|
79
|
+
src: string;
|
|
80
|
+
wad: bigint;
|
|
81
|
+
}
|
|
82
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
83
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
84
|
+
type Log = TypedEventLog<Event>;
|
|
85
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
86
|
+
}
|
|
87
|
+
export interface WIMX extends BaseContract {
|
|
88
|
+
connect(runner?: ContractRunner | null): WIMX;
|
|
89
|
+
waitForDeployment(): Promise<this>;
|
|
90
|
+
interface: WIMXInterface;
|
|
91
|
+
queryFilter<TCEvent extends TypedContractEvent>(event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
92
|
+
queryFilter<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
93
|
+
on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
94
|
+
on<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
|
|
95
|
+
once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
96
|
+
once<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
|
|
97
|
+
listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>;
|
|
98
|
+
listeners(eventName?: string): Promise<Array<Listener>>;
|
|
99
|
+
removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>;
|
|
100
|
+
name: TypedContractMethod<[], [string], "view">;
|
|
101
|
+
approve: TypedContractMethod<[
|
|
102
|
+
guy: AddressLike,
|
|
103
|
+
wad: BigNumberish
|
|
104
|
+
], [
|
|
105
|
+
boolean
|
|
106
|
+
], "nonpayable">;
|
|
107
|
+
totalSupply: TypedContractMethod<[], [bigint], "view">;
|
|
108
|
+
transferFrom: TypedContractMethod<[
|
|
109
|
+
src: AddressLike,
|
|
110
|
+
dst: AddressLike,
|
|
111
|
+
wad: BigNumberish
|
|
112
|
+
], [
|
|
113
|
+
boolean
|
|
114
|
+
], "nonpayable">;
|
|
115
|
+
withdraw: TypedContractMethod<[wad: BigNumberish], [void], "nonpayable">;
|
|
116
|
+
decimals: TypedContractMethod<[], [bigint], "view">;
|
|
117
|
+
balanceOf: TypedContractMethod<[arg0: AddressLike], [bigint], "view">;
|
|
118
|
+
symbol: TypedContractMethod<[], [string], "view">;
|
|
119
|
+
transfer: TypedContractMethod<[
|
|
120
|
+
dst: AddressLike,
|
|
121
|
+
wad: BigNumberish
|
|
122
|
+
], [
|
|
123
|
+
boolean
|
|
124
|
+
], "nonpayable">;
|
|
125
|
+
deposit: TypedContractMethod<[], [void], "payable">;
|
|
126
|
+
allowance: TypedContractMethod<[
|
|
127
|
+
arg0: AddressLike,
|
|
128
|
+
arg1: AddressLike
|
|
129
|
+
], [
|
|
130
|
+
bigint
|
|
131
|
+
], "view">;
|
|
132
|
+
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
|
|
133
|
+
getFunction(nameOrSignature: "name"): TypedContractMethod<[], [string], "view">;
|
|
134
|
+
getFunction(nameOrSignature: "approve"): TypedContractMethod<[
|
|
135
|
+
guy: AddressLike,
|
|
136
|
+
wad: BigNumberish
|
|
137
|
+
], [
|
|
138
|
+
boolean
|
|
139
|
+
], "nonpayable">;
|
|
140
|
+
getFunction(nameOrSignature: "totalSupply"): TypedContractMethod<[], [bigint], "view">;
|
|
141
|
+
getFunction(nameOrSignature: "transferFrom"): TypedContractMethod<[
|
|
142
|
+
src: AddressLike,
|
|
143
|
+
dst: AddressLike,
|
|
144
|
+
wad: BigNumberish
|
|
145
|
+
], [
|
|
146
|
+
boolean
|
|
147
|
+
], "nonpayable">;
|
|
148
|
+
getFunction(nameOrSignature: "withdraw"): TypedContractMethod<[wad: BigNumberish], [void], "nonpayable">;
|
|
149
|
+
getFunction(nameOrSignature: "decimals"): TypedContractMethod<[], [bigint], "view">;
|
|
150
|
+
getFunction(nameOrSignature: "balanceOf"): TypedContractMethod<[arg0: AddressLike], [bigint], "view">;
|
|
151
|
+
getFunction(nameOrSignature: "symbol"): TypedContractMethod<[], [string], "view">;
|
|
152
|
+
getFunction(nameOrSignature: "transfer"): TypedContractMethod<[
|
|
153
|
+
dst: AddressLike,
|
|
154
|
+
wad: BigNumberish
|
|
155
|
+
], [
|
|
156
|
+
boolean
|
|
157
|
+
], "nonpayable">;
|
|
158
|
+
getFunction(nameOrSignature: "deposit"): TypedContractMethod<[], [void], "payable">;
|
|
159
|
+
getFunction(nameOrSignature: "allowance"): TypedContractMethod<[
|
|
160
|
+
arg0: AddressLike,
|
|
161
|
+
arg1: AddressLike
|
|
162
|
+
], [
|
|
163
|
+
bigint
|
|
164
|
+
], "view">;
|
|
165
|
+
getEvent(key: "Approval"): TypedContractEvent<ApprovalEvent.InputTuple, ApprovalEvent.OutputTuple, ApprovalEvent.OutputObject>;
|
|
166
|
+
getEvent(key: "Transfer"): TypedContractEvent<TransferEvent.InputTuple, TransferEvent.OutputTuple, TransferEvent.OutputObject>;
|
|
167
|
+
getEvent(key: "Deposit"): TypedContractEvent<DepositEvent.InputTuple, DepositEvent.OutputTuple, DepositEvent.OutputObject>;
|
|
168
|
+
getEvent(key: "Withdrawal"): TypedContractEvent<WithdrawalEvent.InputTuple, WithdrawalEvent.OutputTuple, WithdrawalEvent.OutputObject>;
|
|
169
|
+
filters: {
|
|
170
|
+
"Approval(address,address,uint256)": TypedContractEvent<ApprovalEvent.InputTuple, ApprovalEvent.OutputTuple, ApprovalEvent.OutputObject>;
|
|
171
|
+
Approval: TypedContractEvent<ApprovalEvent.InputTuple, ApprovalEvent.OutputTuple, ApprovalEvent.OutputObject>;
|
|
172
|
+
"Transfer(address,address,uint256)": TypedContractEvent<TransferEvent.InputTuple, TransferEvent.OutputTuple, TransferEvent.OutputObject>;
|
|
173
|
+
Transfer: TypedContractEvent<TransferEvent.InputTuple, TransferEvent.OutputTuple, TransferEvent.OutputObject>;
|
|
174
|
+
"Deposit(address,uint256)": TypedContractEvent<DepositEvent.InputTuple, DepositEvent.OutputTuple, DepositEvent.OutputObject>;
|
|
175
|
+
Deposit: TypedContractEvent<DepositEvent.InputTuple, DepositEvent.OutputTuple, DepositEvent.OutputObject>;
|
|
176
|
+
"Withdrawal(address,uint256)": TypedContractEvent<WithdrawalEvent.InputTuple, WithdrawalEvent.OutputTuple, WithdrawalEvent.OutputObject>;
|
|
177
|
+
Withdrawal: TypedContractEvent<WithdrawalEvent.InputTuple, WithdrawalEvent.OutputTuple, WithdrawalEvent.OutputObject>;
|
|
178
|
+
};
|
|
179
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { FunctionFragment, Typed, EventFragment, ContractTransaction, ContractTransactionResponse, DeferredTopicFilter, EventLog, TransactionRequest, LogDescription } from "ethers";
|
|
2
|
+
export interface TypedDeferredTopicFilter<_TCEvent extends TypedContractEvent> extends DeferredTopicFilter {
|
|
3
|
+
}
|
|
4
|
+
export interface TypedContractEvent<InputTuple extends Array<any> = any, OutputTuple extends Array<any> = any, OutputObject = any> {
|
|
5
|
+
(...args: Partial<InputTuple>): TypedDeferredTopicFilter<TypedContractEvent<InputTuple, OutputTuple, OutputObject>>;
|
|
6
|
+
name: string;
|
|
7
|
+
fragment: EventFragment;
|
|
8
|
+
getFragment(...args: Partial<InputTuple>): EventFragment;
|
|
9
|
+
}
|
|
10
|
+
type __TypechainAOutputTuple<T> = T extends TypedContractEvent<infer _U, infer W> ? W : never;
|
|
11
|
+
type __TypechainOutputObject<T> = T extends TypedContractEvent<infer _U, infer _W, infer V> ? V : never;
|
|
12
|
+
export interface TypedEventLog<TCEvent extends TypedContractEvent> extends Omit<EventLog, "args"> {
|
|
13
|
+
args: __TypechainAOutputTuple<TCEvent> & __TypechainOutputObject<TCEvent>;
|
|
14
|
+
}
|
|
15
|
+
export interface TypedLogDescription<TCEvent extends TypedContractEvent> extends Omit<LogDescription, "args"> {
|
|
16
|
+
args: __TypechainAOutputTuple<TCEvent> & __TypechainOutputObject<TCEvent>;
|
|
17
|
+
}
|
|
18
|
+
export type TypedListener<TCEvent extends TypedContractEvent> = (...listenerArg: [
|
|
19
|
+
...__TypechainAOutputTuple<TCEvent>,
|
|
20
|
+
TypedEventLog<TCEvent>,
|
|
21
|
+
...undefined[]
|
|
22
|
+
]) => void;
|
|
23
|
+
export type MinEthersFactory<C, ARGS> = {
|
|
24
|
+
deploy(...a: ARGS[]): Promise<C>;
|
|
25
|
+
};
|
|
26
|
+
export type GetContractTypeFromFactory<F> = F extends MinEthersFactory<infer C, any> ? C : never;
|
|
27
|
+
export type GetARGsTypeFromFactory<F> = F extends MinEthersFactory<any, any> ? Parameters<F["deploy"]> : never;
|
|
28
|
+
export type StateMutability = "nonpayable" | "payable" | "view";
|
|
29
|
+
export type BaseOverrides = Omit<TransactionRequest, "to" | "data">;
|
|
30
|
+
export type NonPayableOverrides = Omit<BaseOverrides, "value" | "blockTag" | "enableCcipRead">;
|
|
31
|
+
export type PayableOverrides = Omit<BaseOverrides, "blockTag" | "enableCcipRead">;
|
|
32
|
+
export type ViewOverrides = Omit<TransactionRequest, "to" | "data">;
|
|
33
|
+
export type Overrides<S extends StateMutability> = S extends "nonpayable" ? NonPayableOverrides : S extends "payable" ? PayableOverrides : ViewOverrides;
|
|
34
|
+
export type PostfixOverrides<A extends Array<any>, S extends StateMutability> = A | [...A, Overrides<S>];
|
|
35
|
+
export type ContractMethodArgs<A extends Array<any>, S extends StateMutability> = PostfixOverrides<{
|
|
36
|
+
[I in keyof A]-?: A[I] | Typed;
|
|
37
|
+
}, S>;
|
|
38
|
+
export type DefaultReturnType<R> = R extends Array<any> ? R[0] : R;
|
|
39
|
+
export interface TypedContractMethod<A extends Array<any> = Array<any>, R = any, S extends StateMutability = "payable"> {
|
|
40
|
+
(...args: ContractMethodArgs<A, S>): S extends "view" ? Promise<DefaultReturnType<R>> : Promise<ContractTransactionResponse>;
|
|
41
|
+
name: string;
|
|
42
|
+
fragment: FunctionFragment;
|
|
43
|
+
getFragment(...args: ContractMethodArgs<A, S>): FunctionFragment;
|
|
44
|
+
populateTransaction(...args: ContractMethodArgs<A, S>): Promise<ContractTransaction>;
|
|
45
|
+
staticCall(...args: ContractMethodArgs<A, "view">): Promise<DefaultReturnType<R>>;
|
|
46
|
+
send(...args: ContractMethodArgs<A, S>): Promise<ContractTransactionResponse>;
|
|
47
|
+
estimateGas(...args: ContractMethodArgs<A, S>): Promise<bigint>;
|
|
48
|
+
staticCallResult(...args: ContractMethodArgs<A, "view">): Promise<R>;
|
|
49
|
+
}
|
|
50
|
+
export {};
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { type ContractRunner } from "ethers";
|
|
2
|
+
import type { ERC20, ERC20Interface } from "../ERC20";
|
|
3
|
+
export declare class ERC20__factory {
|
|
4
|
+
static readonly abi: readonly [{
|
|
5
|
+
readonly constant: true;
|
|
6
|
+
readonly inputs: readonly [];
|
|
7
|
+
readonly name: "name";
|
|
8
|
+
readonly outputs: readonly [{
|
|
9
|
+
readonly name: "";
|
|
10
|
+
readonly type: "string";
|
|
11
|
+
}];
|
|
12
|
+
readonly payable: false;
|
|
13
|
+
readonly stateMutability: "view";
|
|
14
|
+
readonly type: "function";
|
|
15
|
+
}, {
|
|
16
|
+
readonly constant: false;
|
|
17
|
+
readonly inputs: readonly [{
|
|
18
|
+
readonly name: "_spender";
|
|
19
|
+
readonly type: "address";
|
|
20
|
+
}, {
|
|
21
|
+
readonly name: "_value";
|
|
22
|
+
readonly type: "uint256";
|
|
23
|
+
}];
|
|
24
|
+
readonly name: "approve";
|
|
25
|
+
readonly outputs: readonly [{
|
|
26
|
+
readonly name: "";
|
|
27
|
+
readonly type: "bool";
|
|
28
|
+
}];
|
|
29
|
+
readonly payable: false;
|
|
30
|
+
readonly stateMutability: "nonpayable";
|
|
31
|
+
readonly type: "function";
|
|
32
|
+
}, {
|
|
33
|
+
readonly constant: true;
|
|
34
|
+
readonly inputs: readonly [];
|
|
35
|
+
readonly name: "totalSupply";
|
|
36
|
+
readonly outputs: readonly [{
|
|
37
|
+
readonly name: "";
|
|
38
|
+
readonly type: "uint256";
|
|
39
|
+
}];
|
|
40
|
+
readonly payable: false;
|
|
41
|
+
readonly stateMutability: "view";
|
|
42
|
+
readonly type: "function";
|
|
43
|
+
}, {
|
|
44
|
+
readonly constant: false;
|
|
45
|
+
readonly inputs: readonly [{
|
|
46
|
+
readonly name: "_from";
|
|
47
|
+
readonly type: "address";
|
|
48
|
+
}, {
|
|
49
|
+
readonly name: "_to";
|
|
50
|
+
readonly type: "address";
|
|
51
|
+
}, {
|
|
52
|
+
readonly name: "_value";
|
|
53
|
+
readonly type: "uint256";
|
|
54
|
+
}];
|
|
55
|
+
readonly name: "transferFrom";
|
|
56
|
+
readonly outputs: readonly [{
|
|
57
|
+
readonly name: "";
|
|
58
|
+
readonly type: "bool";
|
|
59
|
+
}];
|
|
60
|
+
readonly payable: false;
|
|
61
|
+
readonly stateMutability: "nonpayable";
|
|
62
|
+
readonly type: "function";
|
|
63
|
+
}, {
|
|
64
|
+
readonly constant: true;
|
|
65
|
+
readonly inputs: readonly [];
|
|
66
|
+
readonly name: "decimals";
|
|
67
|
+
readonly outputs: readonly [{
|
|
68
|
+
readonly name: "";
|
|
69
|
+
readonly type: "uint8";
|
|
70
|
+
}];
|
|
71
|
+
readonly payable: false;
|
|
72
|
+
readonly stateMutability: "view";
|
|
73
|
+
readonly type: "function";
|
|
74
|
+
}, {
|
|
75
|
+
readonly constant: true;
|
|
76
|
+
readonly inputs: readonly [{
|
|
77
|
+
readonly name: "_owner";
|
|
78
|
+
readonly type: "address";
|
|
79
|
+
}];
|
|
80
|
+
readonly name: "balanceOf";
|
|
81
|
+
readonly outputs: readonly [{
|
|
82
|
+
readonly name: "balance";
|
|
83
|
+
readonly type: "uint256";
|
|
84
|
+
}];
|
|
85
|
+
readonly payable: false;
|
|
86
|
+
readonly stateMutability: "view";
|
|
87
|
+
readonly type: "function";
|
|
88
|
+
}, {
|
|
89
|
+
readonly constant: true;
|
|
90
|
+
readonly inputs: readonly [];
|
|
91
|
+
readonly name: "symbol";
|
|
92
|
+
readonly outputs: readonly [{
|
|
93
|
+
readonly name: "";
|
|
94
|
+
readonly type: "string";
|
|
95
|
+
}];
|
|
96
|
+
readonly payable: false;
|
|
97
|
+
readonly stateMutability: "view";
|
|
98
|
+
readonly type: "function";
|
|
99
|
+
}, {
|
|
100
|
+
readonly constant: false;
|
|
101
|
+
readonly inputs: readonly [{
|
|
102
|
+
readonly name: "_to";
|
|
103
|
+
readonly type: "address";
|
|
104
|
+
}, {
|
|
105
|
+
readonly name: "_value";
|
|
106
|
+
readonly type: "uint256";
|
|
107
|
+
}];
|
|
108
|
+
readonly name: "transfer";
|
|
109
|
+
readonly outputs: readonly [{
|
|
110
|
+
readonly name: "";
|
|
111
|
+
readonly type: "bool";
|
|
112
|
+
}];
|
|
113
|
+
readonly payable: false;
|
|
114
|
+
readonly stateMutability: "nonpayable";
|
|
115
|
+
readonly type: "function";
|
|
116
|
+
}, {
|
|
117
|
+
readonly constant: true;
|
|
118
|
+
readonly inputs: readonly [{
|
|
119
|
+
readonly name: "_owner";
|
|
120
|
+
readonly type: "address";
|
|
121
|
+
}, {
|
|
122
|
+
readonly name: "_spender";
|
|
123
|
+
readonly type: "address";
|
|
124
|
+
}];
|
|
125
|
+
readonly name: "allowance";
|
|
126
|
+
readonly outputs: readonly [{
|
|
127
|
+
readonly name: "";
|
|
128
|
+
readonly type: "uint256";
|
|
129
|
+
}];
|
|
130
|
+
readonly payable: false;
|
|
131
|
+
readonly stateMutability: "view";
|
|
132
|
+
readonly type: "function";
|
|
133
|
+
}, {
|
|
134
|
+
readonly payable: true;
|
|
135
|
+
readonly stateMutability: "payable";
|
|
136
|
+
readonly type: "fallback";
|
|
137
|
+
}, {
|
|
138
|
+
readonly anonymous: false;
|
|
139
|
+
readonly inputs: readonly [{
|
|
140
|
+
readonly indexed: true;
|
|
141
|
+
readonly name: "owner";
|
|
142
|
+
readonly type: "address";
|
|
143
|
+
}, {
|
|
144
|
+
readonly indexed: true;
|
|
145
|
+
readonly name: "spender";
|
|
146
|
+
readonly type: "address";
|
|
147
|
+
}, {
|
|
148
|
+
readonly indexed: false;
|
|
149
|
+
readonly name: "value";
|
|
150
|
+
readonly type: "uint256";
|
|
151
|
+
}];
|
|
152
|
+
readonly name: "Approval";
|
|
153
|
+
readonly type: "event";
|
|
154
|
+
}, {
|
|
155
|
+
readonly anonymous: false;
|
|
156
|
+
readonly inputs: readonly [{
|
|
157
|
+
readonly indexed: true;
|
|
158
|
+
readonly name: "from";
|
|
159
|
+
readonly type: "address";
|
|
160
|
+
}, {
|
|
161
|
+
readonly indexed: true;
|
|
162
|
+
readonly name: "to";
|
|
163
|
+
readonly type: "address";
|
|
164
|
+
}, {
|
|
165
|
+
readonly indexed: false;
|
|
166
|
+
readonly name: "value";
|
|
167
|
+
readonly type: "uint256";
|
|
168
|
+
}];
|
|
169
|
+
readonly name: "Transfer";
|
|
170
|
+
readonly type: "event";
|
|
171
|
+
}];
|
|
172
|
+
static createInterface(): ERC20Interface;
|
|
173
|
+
static connect(address: string, runner?: ContractRunner | null): ERC20;
|
|
174
|
+
}
|