1 | import { Fragment, Indexed, Interface, JsonFragment, Result } from "@ethersproject/abi";
|
2 | import { Block, BlockTag, Listener, Log, Provider, TransactionReceipt, TransactionRequest, TransactionResponse } from "@ethersproject/abstract-provider";
|
3 | import { Signer } from "@ethersproject/abstract-signer";
|
4 | import { BigNumber, BigNumberish } from "@ethersproject/bignumber";
|
5 | import { BytesLike } from "@ethersproject/bytes";
|
6 | import { AccessList, AccessListish } from "@ethersproject/transactions";
|
7 | export interface Overrides {
|
8 | gasLimit?: BigNumberish | Promise<BigNumberish>;
|
9 | gasPrice?: BigNumberish | Promise<BigNumberish>;
|
10 | maxFeePerGas?: BigNumberish | Promise<BigNumberish>;
|
11 | maxPriorityFeePerGas?: BigNumberish | Promise<BigNumberish>;
|
12 | nonce?: BigNumberish | Promise<BigNumberish>;
|
13 | type?: number;
|
14 | accessList?: AccessListish;
|
15 | customData?: Record<string, any>;
|
16 | ccipReadEnabled?: boolean;
|
17 | }
|
18 | export interface PayableOverrides extends Overrides {
|
19 | value?: BigNumberish | Promise<BigNumberish>;
|
20 | }
|
21 | export interface CallOverrides extends PayableOverrides {
|
22 | blockTag?: BlockTag | Promise<BlockTag>;
|
23 | from?: string | Promise<string>;
|
24 | }
|
25 | export interface PopulatedTransaction {
|
26 | to?: string;
|
27 | from?: string;
|
28 | nonce?: number;
|
29 | gasLimit?: BigNumber;
|
30 | gasPrice?: BigNumber;
|
31 | data?: string;
|
32 | value?: BigNumber;
|
33 | chainId?: number;
|
34 | type?: number;
|
35 | accessList?: AccessList;
|
36 | maxFeePerGas?: BigNumber;
|
37 | maxPriorityFeePerGas?: BigNumber;
|
38 | customData?: Record<string, any>;
|
39 | ccipReadEnabled?: boolean;
|
40 | }
|
41 | export declare type EventFilter = {
|
42 | address?: string;
|
43 | topics?: Array<string | Array<string>>;
|
44 | };
|
45 | export declare type ContractFunction<T = any> = (...args: Array<any>) => Promise<T>;
|
46 | export interface Event extends Log {
|
47 | event?: string;
|
48 | eventSignature?: string;
|
49 | args?: Result;
|
50 | decodeError?: Error;
|
51 | decode?: (data: string, topics?: Array<string>) => any;
|
52 | removeListener: () => void;
|
53 | getBlock: () => Promise<Block>;
|
54 | getTransaction: () => Promise<TransactionResponse>;
|
55 | getTransactionReceipt: () => Promise<TransactionReceipt>;
|
56 | }
|
57 | export interface ContractReceipt extends TransactionReceipt {
|
58 | events?: Array<Event>;
|
59 | }
|
60 | export interface ContractTransaction extends TransactionResponse {
|
61 | wait(confirmations?: number): Promise<ContractReceipt>;
|
62 | }
|
63 | declare class RunningEvent {
|
64 | readonly tag: string;
|
65 | readonly filter: EventFilter;
|
66 | private _listeners;
|
67 | constructor(tag: string, filter: EventFilter);
|
68 | addListener(listener: Listener, once: boolean): void;
|
69 | removeListener(listener: Listener): void;
|
70 | removeAllListeners(): void;
|
71 | listeners(): Array<Listener>;
|
72 | listenerCount(): number;
|
73 | run(args: Array<any>): number;
|
74 | prepareEvent(event: Event): void;
|
75 | getEmit(event: Event): Array<any>;
|
76 | }
|
77 | export declare type ContractInterface = string | ReadonlyArray<Fragment | JsonFragment | string> | Interface;
|
78 | export declare class BaseContract {
|
79 | readonly address: string;
|
80 | readonly interface: Interface;
|
81 | readonly signer: Signer;
|
82 | readonly provider: Provider;
|
83 | readonly functions: {
|
84 | [name: string]: ContractFunction;
|
85 | };
|
86 | readonly callStatic: {
|
87 | [name: string]: ContractFunction;
|
88 | };
|
89 | readonly estimateGas: {
|
90 | [name: string]: ContractFunction<BigNumber>;
|
91 | };
|
92 | readonly populateTransaction: {
|
93 | [name: string]: ContractFunction<PopulatedTransaction>;
|
94 | };
|
95 | readonly filters: {
|
96 | [name: string]: (...args: Array<any>) => EventFilter;
|
97 | };
|
98 | readonly resolvedAddress: Promise<string>;
|
99 | readonly deployTransaction: TransactionResponse;
|
100 | _deployedPromise: Promise<Contract>;
|
101 | _runningEvents: {
|
102 | [eventTag: string]: RunningEvent;
|
103 | };
|
104 | _wrappedEmits: {
|
105 | [eventTag: string]: (...args: Array<any>) => void;
|
106 | };
|
107 | constructor(addressOrName: string, contractInterface: ContractInterface, signerOrProvider?: Signer | Provider);
|
108 | static getContractAddress(transaction: {
|
109 | from: string;
|
110 | nonce: BigNumberish;
|
111 | }): string;
|
112 | static getInterface(contractInterface: ContractInterface): Interface;
|
113 | deployed(): Promise<Contract>;
|
114 | _deployed(blockTag?: BlockTag): Promise<Contract>;
|
115 | fallback(overrides?: TransactionRequest): Promise<TransactionResponse>;
|
116 | connect(signerOrProvider: Signer | Provider | string): Contract;
|
117 | attach(addressOrName: string): Contract;
|
118 | static isIndexed(value: any): value is Indexed;
|
119 | private _normalizeRunningEvent;
|
120 | private _getRunningEvent;
|
121 | _checkRunningEvents(runningEvent: RunningEvent): void;
|
122 | _wrapEvent(runningEvent: RunningEvent, log: Log, listener: Listener): Event;
|
123 | private _addEventListener;
|
124 | queryFilter(event: EventFilter, fromBlockOrBlockhash?: BlockTag | string, toBlock?: BlockTag): Promise<Array<Event>>;
|
125 | on(event: EventFilter | string, listener: Listener): this;
|
126 | once(event: EventFilter | string, listener: Listener): this;
|
127 | emit(eventName: EventFilter | string, ...args: Array<any>): boolean;
|
128 | listenerCount(eventName?: EventFilter | string): number;
|
129 | listeners(eventName?: EventFilter | string): Array<Listener>;
|
130 | removeAllListeners(eventName?: EventFilter | string): this;
|
131 | off(eventName: EventFilter | string, listener: Listener): this;
|
132 | removeListener(eventName: EventFilter | string, listener: Listener): this;
|
133 | }
|
134 | export declare class Contract extends BaseContract {
|
135 | readonly [key: string]: ContractFunction | any;
|
136 | }
|
137 | export declare class ContractFactory {
|
138 | readonly interface: Interface;
|
139 | readonly bytecode: string;
|
140 | readonly signer: Signer;
|
141 | constructor(contractInterface: ContractInterface, bytecode: BytesLike | {
|
142 | object: string;
|
143 | }, signer?: Signer);
|
144 | getDeployTransaction(...args: Array<any>): TransactionRequest;
|
145 | deploy(...args: Array<any>): Promise<Contract>;
|
146 | attach(address: string): Contract;
|
147 | connect(signer: Signer): ContractFactory;
|
148 | static fromSolidity(compilerOutput: any, signer?: Signer): ContractFactory;
|
149 | static getInterface(contractInterface: ContractInterface): Interface;
|
150 | static getContractAddress(tx: {
|
151 | from: string;
|
152 | nonce: BytesLike | BigNumber | number;
|
153 | }): string;
|
154 | static getContract(address: string, contractInterface: ContractInterface, signer?: Signer): Contract;
|
155 | }
|
156 | export {};
|
157 |
|
\ | No newline at end of file |