anchor-sdk 0.1.36
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 +21 -0
- package/README.md +735 -0
- package/dist/AnchorApiClient.d.ts +203 -0
- package/dist/AnchorApiClient.js +279 -0
- package/dist/AnchorApiClientV2.d.ts +270 -0
- package/dist/AnchorApiClientV2.js +424 -0
- package/dist/AnchorERC1155Client.d.ts +85 -0
- package/dist/AnchorERC1155Client.js +280 -0
- package/dist/AnchorPayClient.d.ts +79 -0
- package/dist/AnchorPayClient.js +217 -0
- package/dist/abi/AnchorERC1155.d.ts +1359 -0
- package/dist/abi/AnchorERC1155.js +1122 -0
- package/dist/abi/AnchorPay.json +452 -0
- package/dist/api/AnchorApiHttpClient.d.ts +210 -0
- package/dist/api/AnchorApiHttpClient.js +411 -0
- package/dist/api/types.d.ts +764 -0
- package/dist/api/types.js +2 -0
- package/dist/constants.d.ts +49 -0
- package/dist/constants.js +221 -0
- package/dist/generated/Api.d.ts +1083 -0
- package/dist/generated/Api.js +571 -0
- package/dist/index.d.ts +341 -0
- package/dist/index.js +1377 -0
- package/dist/react/AnchorReactSDK.d.ts +59 -0
- package/dist/react/AnchorReactSDK.js +181 -0
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.js +8 -0
- package/dist/typechain/AnchorERC1155.d.ts +999 -0
- package/dist/typechain/AnchorERC1155.js +2 -0
- package/dist/typechain/AnchorPay.d.ts +242 -0
- package/dist/typechain/AnchorPay.js +2 -0
- package/dist/typechain/common.d.ts +50 -0
- package/dist/typechain/common.js +2 -0
- package/dist/typechain/factories/AnchorERC1155__factory.d.ts +1365 -0
- package/dist/typechain/factories/AnchorERC1155__factory.js +1766 -0
- package/dist/typechain/factories/AnchorPay__factory.d.ts +358 -0
- package/dist/typechain/factories/AnchorPay__factory.js +469 -0
- package/dist/typechain/factories/index.d.ts +2 -0
- package/dist/typechain/factories/index.js +10 -0
- package/dist/typechain/index.d.ts +5 -0
- package/dist/typechain/index.js +41 -0
- package/dist/types.d.ts +109 -0
- package/dist/types.js +2 -0
- package/package.json +87 -0
|
@@ -0,0 +1,242 @@
|
|
|
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 AnchorPayInterface extends Interface {
|
|
4
|
+
getFunction(nameOrSignature: "UPGRADE_INTERFACE_VERSION" | "acceptOwnership" | "getInterfaceImplementer" | "initialize" | "owner" | "pause" | "pendingOwner" | "proxiableUUID" | "renounceOwnership" | "send" | "setInterfaceImplementer" | "transferOwnership" | "unpause" | "upgradeToAndCall"): FunctionFragment;
|
|
5
|
+
getEvent(nameOrSignatureOrTopic: "Initialized" | "InterfaceImplementerSet" | "OwnershipTransferStarted" | "OwnershipTransferred" | "Paid" | "Upgraded"): EventFragment;
|
|
6
|
+
encodeFunctionData(functionFragment: "UPGRADE_INTERFACE_VERSION", values?: undefined): string;
|
|
7
|
+
encodeFunctionData(functionFragment: "acceptOwnership", values?: undefined): string;
|
|
8
|
+
encodeFunctionData(functionFragment: "getInterfaceImplementer", values: [AddressLike, BytesLike]): string;
|
|
9
|
+
encodeFunctionData(functionFragment: "initialize", values: [AddressLike]): string;
|
|
10
|
+
encodeFunctionData(functionFragment: "owner", values?: undefined): string;
|
|
11
|
+
encodeFunctionData(functionFragment: "pause", values?: undefined): string;
|
|
12
|
+
encodeFunctionData(functionFragment: "pendingOwner", values?: undefined): string;
|
|
13
|
+
encodeFunctionData(functionFragment: "proxiableUUID", values?: undefined): string;
|
|
14
|
+
encodeFunctionData(functionFragment: "renounceOwnership", values?: undefined): string;
|
|
15
|
+
encodeFunctionData(functionFragment: "send", values: [AddressLike, AddressLike, BigNumberish, BytesLike]): string;
|
|
16
|
+
encodeFunctionData(functionFragment: "setInterfaceImplementer", values: [AddressLike, BytesLike, AddressLike]): string;
|
|
17
|
+
encodeFunctionData(functionFragment: "transferOwnership", values: [AddressLike]): string;
|
|
18
|
+
encodeFunctionData(functionFragment: "unpause", values?: undefined): string;
|
|
19
|
+
encodeFunctionData(functionFragment: "upgradeToAndCall", values: [AddressLike, BytesLike]): string;
|
|
20
|
+
decodeFunctionResult(functionFragment: "UPGRADE_INTERFACE_VERSION", data: BytesLike): Result;
|
|
21
|
+
decodeFunctionResult(functionFragment: "acceptOwnership", data: BytesLike): Result;
|
|
22
|
+
decodeFunctionResult(functionFragment: "getInterfaceImplementer", data: BytesLike): Result;
|
|
23
|
+
decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result;
|
|
24
|
+
decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result;
|
|
25
|
+
decodeFunctionResult(functionFragment: "pause", data: BytesLike): Result;
|
|
26
|
+
decodeFunctionResult(functionFragment: "pendingOwner", data: BytesLike): Result;
|
|
27
|
+
decodeFunctionResult(functionFragment: "proxiableUUID", data: BytesLike): Result;
|
|
28
|
+
decodeFunctionResult(functionFragment: "renounceOwnership", data: BytesLike): Result;
|
|
29
|
+
decodeFunctionResult(functionFragment: "send", data: BytesLike): Result;
|
|
30
|
+
decodeFunctionResult(functionFragment: "setInterfaceImplementer", data: BytesLike): Result;
|
|
31
|
+
decodeFunctionResult(functionFragment: "transferOwnership", data: BytesLike): Result;
|
|
32
|
+
decodeFunctionResult(functionFragment: "unpause", data: BytesLike): Result;
|
|
33
|
+
decodeFunctionResult(functionFragment: "upgradeToAndCall", data: BytesLike): Result;
|
|
34
|
+
}
|
|
35
|
+
export declare namespace InitializedEvent {
|
|
36
|
+
type InputTuple = [version: BigNumberish];
|
|
37
|
+
type OutputTuple = [version: bigint];
|
|
38
|
+
interface OutputObject {
|
|
39
|
+
version: 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 InterfaceImplementerSetEvent {
|
|
47
|
+
type InputTuple = [
|
|
48
|
+
account: AddressLike,
|
|
49
|
+
interfaceHash: BytesLike,
|
|
50
|
+
implementer: AddressLike
|
|
51
|
+
];
|
|
52
|
+
type OutputTuple = [
|
|
53
|
+
account: string,
|
|
54
|
+
interfaceHash: string,
|
|
55
|
+
implementer: string
|
|
56
|
+
];
|
|
57
|
+
interface OutputObject {
|
|
58
|
+
account: string;
|
|
59
|
+
interfaceHash: string;
|
|
60
|
+
implementer: string;
|
|
61
|
+
}
|
|
62
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
63
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
64
|
+
type Log = TypedEventLog<Event>;
|
|
65
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
66
|
+
}
|
|
67
|
+
export declare namespace OwnershipTransferStartedEvent {
|
|
68
|
+
type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike];
|
|
69
|
+
type OutputTuple = [previousOwner: string, newOwner: string];
|
|
70
|
+
interface OutputObject {
|
|
71
|
+
previousOwner: string;
|
|
72
|
+
newOwner: string;
|
|
73
|
+
}
|
|
74
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
75
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
76
|
+
type Log = TypedEventLog<Event>;
|
|
77
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
78
|
+
}
|
|
79
|
+
export declare namespace OwnershipTransferredEvent {
|
|
80
|
+
type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike];
|
|
81
|
+
type OutputTuple = [previousOwner: string, newOwner: string];
|
|
82
|
+
interface OutputObject {
|
|
83
|
+
previousOwner: string;
|
|
84
|
+
newOwner: string;
|
|
85
|
+
}
|
|
86
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
87
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
88
|
+
type Log = TypedEventLog<Event>;
|
|
89
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
90
|
+
}
|
|
91
|
+
export declare namespace PaidEvent {
|
|
92
|
+
type InputTuple = [
|
|
93
|
+
from: AddressLike,
|
|
94
|
+
to: AddressLike,
|
|
95
|
+
amount: BigNumberish,
|
|
96
|
+
data: BytesLike
|
|
97
|
+
];
|
|
98
|
+
type OutputTuple = [
|
|
99
|
+
from: string,
|
|
100
|
+
to: string,
|
|
101
|
+
amount: bigint,
|
|
102
|
+
data: string
|
|
103
|
+
];
|
|
104
|
+
interface OutputObject {
|
|
105
|
+
from: string;
|
|
106
|
+
to: string;
|
|
107
|
+
amount: bigint;
|
|
108
|
+
data: string;
|
|
109
|
+
}
|
|
110
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
111
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
112
|
+
type Log = TypedEventLog<Event>;
|
|
113
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
114
|
+
}
|
|
115
|
+
export declare namespace UpgradedEvent {
|
|
116
|
+
type InputTuple = [implementation: AddressLike];
|
|
117
|
+
type OutputTuple = [implementation: string];
|
|
118
|
+
interface OutputObject {
|
|
119
|
+
implementation: string;
|
|
120
|
+
}
|
|
121
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
122
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
123
|
+
type Log = TypedEventLog<Event>;
|
|
124
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
125
|
+
}
|
|
126
|
+
export interface AnchorPay extends BaseContract {
|
|
127
|
+
connect(runner?: ContractRunner | null): AnchorPay;
|
|
128
|
+
waitForDeployment(): Promise<this>;
|
|
129
|
+
interface: AnchorPayInterface;
|
|
130
|
+
queryFilter<TCEvent extends TypedContractEvent>(event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
131
|
+
queryFilter<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
132
|
+
on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
133
|
+
on<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
|
|
134
|
+
once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
135
|
+
once<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
|
|
136
|
+
listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>;
|
|
137
|
+
listeners(eventName?: string): Promise<Array<Listener>>;
|
|
138
|
+
removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>;
|
|
139
|
+
UPGRADE_INTERFACE_VERSION: TypedContractMethod<[], [string], "view">;
|
|
140
|
+
acceptOwnership: TypedContractMethod<[], [void], "nonpayable">;
|
|
141
|
+
getInterfaceImplementer: TypedContractMethod<[
|
|
142
|
+
account: AddressLike,
|
|
143
|
+
_interfaceHash: BytesLike
|
|
144
|
+
], [
|
|
145
|
+
string
|
|
146
|
+
], "view">;
|
|
147
|
+
initialize: TypedContractMethod<[
|
|
148
|
+
_defaultAdmin: AddressLike
|
|
149
|
+
], [
|
|
150
|
+
void
|
|
151
|
+
], "nonpayable">;
|
|
152
|
+
owner: TypedContractMethod<[], [string], "view">;
|
|
153
|
+
pause: TypedContractMethod<[], [void], "nonpayable">;
|
|
154
|
+
pendingOwner: TypedContractMethod<[], [string], "view">;
|
|
155
|
+
proxiableUUID: TypedContractMethod<[], [string], "view">;
|
|
156
|
+
renounceOwnership: TypedContractMethod<[], [void], "nonpayable">;
|
|
157
|
+
send: TypedContractMethod<[
|
|
158
|
+
recipient: AddressLike,
|
|
159
|
+
token: AddressLike,
|
|
160
|
+
amount: BigNumberish,
|
|
161
|
+
data: BytesLike
|
|
162
|
+
], [
|
|
163
|
+
void
|
|
164
|
+
], "payable">;
|
|
165
|
+
setInterfaceImplementer: TypedContractMethod<[
|
|
166
|
+
account: AddressLike,
|
|
167
|
+
_interfaceHash: BytesLike,
|
|
168
|
+
implementer: AddressLike
|
|
169
|
+
], [
|
|
170
|
+
void
|
|
171
|
+
], "nonpayable">;
|
|
172
|
+
transferOwnership: TypedContractMethod<[
|
|
173
|
+
newOwner: AddressLike
|
|
174
|
+
], [
|
|
175
|
+
void
|
|
176
|
+
], "nonpayable">;
|
|
177
|
+
unpause: TypedContractMethod<[], [void], "nonpayable">;
|
|
178
|
+
upgradeToAndCall: TypedContractMethod<[
|
|
179
|
+
newImplementation: AddressLike,
|
|
180
|
+
data: BytesLike
|
|
181
|
+
], [
|
|
182
|
+
void
|
|
183
|
+
], "payable">;
|
|
184
|
+
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
|
|
185
|
+
getFunction(nameOrSignature: "UPGRADE_INTERFACE_VERSION"): TypedContractMethod<[], [string], "view">;
|
|
186
|
+
getFunction(nameOrSignature: "acceptOwnership"): TypedContractMethod<[], [void], "nonpayable">;
|
|
187
|
+
getFunction(nameOrSignature: "getInterfaceImplementer"): TypedContractMethod<[
|
|
188
|
+
account: AddressLike,
|
|
189
|
+
_interfaceHash: BytesLike
|
|
190
|
+
], [
|
|
191
|
+
string
|
|
192
|
+
], "view">;
|
|
193
|
+
getFunction(nameOrSignature: "initialize"): TypedContractMethod<[_defaultAdmin: AddressLike], [void], "nonpayable">;
|
|
194
|
+
getFunction(nameOrSignature: "owner"): TypedContractMethod<[], [string], "view">;
|
|
195
|
+
getFunction(nameOrSignature: "pause"): TypedContractMethod<[], [void], "nonpayable">;
|
|
196
|
+
getFunction(nameOrSignature: "pendingOwner"): TypedContractMethod<[], [string], "view">;
|
|
197
|
+
getFunction(nameOrSignature: "proxiableUUID"): TypedContractMethod<[], [string], "view">;
|
|
198
|
+
getFunction(nameOrSignature: "renounceOwnership"): TypedContractMethod<[], [void], "nonpayable">;
|
|
199
|
+
getFunction(nameOrSignature: "send"): TypedContractMethod<[
|
|
200
|
+
recipient: AddressLike,
|
|
201
|
+
token: AddressLike,
|
|
202
|
+
amount: BigNumberish,
|
|
203
|
+
data: BytesLike
|
|
204
|
+
], [
|
|
205
|
+
void
|
|
206
|
+
], "payable">;
|
|
207
|
+
getFunction(nameOrSignature: "setInterfaceImplementer"): TypedContractMethod<[
|
|
208
|
+
account: AddressLike,
|
|
209
|
+
_interfaceHash: BytesLike,
|
|
210
|
+
implementer: AddressLike
|
|
211
|
+
], [
|
|
212
|
+
void
|
|
213
|
+
], "nonpayable">;
|
|
214
|
+
getFunction(nameOrSignature: "transferOwnership"): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">;
|
|
215
|
+
getFunction(nameOrSignature: "unpause"): TypedContractMethod<[], [void], "nonpayable">;
|
|
216
|
+
getFunction(nameOrSignature: "upgradeToAndCall"): TypedContractMethod<[
|
|
217
|
+
newImplementation: AddressLike,
|
|
218
|
+
data: BytesLike
|
|
219
|
+
], [
|
|
220
|
+
void
|
|
221
|
+
], "payable">;
|
|
222
|
+
getEvent(key: "Initialized"): TypedContractEvent<InitializedEvent.InputTuple, InitializedEvent.OutputTuple, InitializedEvent.OutputObject>;
|
|
223
|
+
getEvent(key: "InterfaceImplementerSet"): TypedContractEvent<InterfaceImplementerSetEvent.InputTuple, InterfaceImplementerSetEvent.OutputTuple, InterfaceImplementerSetEvent.OutputObject>;
|
|
224
|
+
getEvent(key: "OwnershipTransferStarted"): TypedContractEvent<OwnershipTransferStartedEvent.InputTuple, OwnershipTransferStartedEvent.OutputTuple, OwnershipTransferStartedEvent.OutputObject>;
|
|
225
|
+
getEvent(key: "OwnershipTransferred"): TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>;
|
|
226
|
+
getEvent(key: "Paid"): TypedContractEvent<PaidEvent.InputTuple, PaidEvent.OutputTuple, PaidEvent.OutputObject>;
|
|
227
|
+
getEvent(key: "Upgraded"): TypedContractEvent<UpgradedEvent.InputTuple, UpgradedEvent.OutputTuple, UpgradedEvent.OutputObject>;
|
|
228
|
+
filters: {
|
|
229
|
+
"Initialized(uint64)": TypedContractEvent<InitializedEvent.InputTuple, InitializedEvent.OutputTuple, InitializedEvent.OutputObject>;
|
|
230
|
+
Initialized: TypedContractEvent<InitializedEvent.InputTuple, InitializedEvent.OutputTuple, InitializedEvent.OutputObject>;
|
|
231
|
+
"InterfaceImplementerSet(address,bytes32,address)": TypedContractEvent<InterfaceImplementerSetEvent.InputTuple, InterfaceImplementerSetEvent.OutputTuple, InterfaceImplementerSetEvent.OutputObject>;
|
|
232
|
+
InterfaceImplementerSet: TypedContractEvent<InterfaceImplementerSetEvent.InputTuple, InterfaceImplementerSetEvent.OutputTuple, InterfaceImplementerSetEvent.OutputObject>;
|
|
233
|
+
"OwnershipTransferStarted(address,address)": TypedContractEvent<OwnershipTransferStartedEvent.InputTuple, OwnershipTransferStartedEvent.OutputTuple, OwnershipTransferStartedEvent.OutputObject>;
|
|
234
|
+
OwnershipTransferStarted: TypedContractEvent<OwnershipTransferStartedEvent.InputTuple, OwnershipTransferStartedEvent.OutputTuple, OwnershipTransferStartedEvent.OutputObject>;
|
|
235
|
+
"OwnershipTransferred(address,address)": TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>;
|
|
236
|
+
OwnershipTransferred: TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>;
|
|
237
|
+
"Paid(address,address,uint256,bytes)": TypedContractEvent<PaidEvent.InputTuple, PaidEvent.OutputTuple, PaidEvent.OutputObject>;
|
|
238
|
+
Paid: TypedContractEvent<PaidEvent.InputTuple, PaidEvent.OutputTuple, PaidEvent.OutputObject>;
|
|
239
|
+
"Upgraded(address)": TypedContractEvent<UpgradedEvent.InputTuple, UpgradedEvent.OutputTuple, UpgradedEvent.OutputObject>;
|
|
240
|
+
Upgraded: TypedContractEvent<UpgradedEvent.InputTuple, UpgradedEvent.OutputTuple, UpgradedEvent.OutputObject>;
|
|
241
|
+
};
|
|
242
|
+
}
|
|
@@ -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 {};
|