ethers.js/lib.esm/contract/wrappers.d.ts

130 lines
3.9 KiB
TypeScript
Raw Normal View History

2022-12-04 01:01:29 +03:00
import { Block, Log, TransactionReceipt, TransactionResponse } from "../providers/provider.js";
2022-09-05 23:57:11 +03:00
import { EventPayload } from "../utils/index.js";
import type { EventFragment, Interface, Result } from "../abi/index.js";
import type { Listener } from "../utils/index.js";
import type { Provider } from "../providers/index.js";
import type { BaseContract } from "./contract.js";
import type { ContractEventName } from "./types.js";
2023-06-02 00:52:58 +03:00
/**
* An **EventLog** contains additional properties parsed from the [[Log]].
*/
2022-09-05 23:57:11 +03:00
export declare class EventLog extends Log {
2023-06-02 00:52:58 +03:00
/**
* The Contract Interface.
*/
2022-09-05 23:57:11 +03:00
readonly interface: Interface;
2023-06-02 00:52:58 +03:00
/**
* The matching event.
*/
2022-09-05 23:57:11 +03:00
readonly fragment: EventFragment;
2023-06-02 00:52:58 +03:00
/**
* The parsed arguments passed to the event by ``emit``.
*/
2022-09-05 23:57:11 +03:00
readonly args: Result;
2023-06-02 00:52:58 +03:00
/**
* @_ignore:
*/
2022-09-05 23:57:11 +03:00
constructor(log: Log, iface: Interface, fragment: EventFragment);
2023-06-02 00:52:58 +03:00
/**
* The name of the event.
*/
2022-09-05 23:57:11 +03:00
get eventName(): string;
2023-06-02 00:52:58 +03:00
/**
* The signature of the event.
*/
2022-09-05 23:57:11 +03:00
get eventSignature(): string;
}
2023-06-02 00:52:58 +03:00
/**
* A **ContractTransactionReceipt** includes the parsed logs from a
* [[TransactionReceipt]].
*/
2022-09-05 23:57:11 +03:00
export declare class ContractTransactionReceipt extends TransactionReceipt {
#private;
2023-06-02 00:52:58 +03:00
/**
* @_ignore:
*/
2022-09-27 10:45:27 +03:00
constructor(iface: Interface, provider: Provider, tx: TransactionReceipt);
2023-06-02 00:52:58 +03:00
/**
* The parsed logs for any [[Log]] which has a matching event in the
* Contract ABI.
*/
2022-09-05 23:57:11 +03:00
get logs(): Array<EventLog | Log>;
}
2023-06-02 00:52:58 +03:00
/**
* A **ContractTransactionResponse** will return a
* [[ContractTransactionReceipt]] when waited on.
*/
2022-09-05 23:57:11 +03:00
export declare class ContractTransactionResponse extends TransactionResponse {
#private;
2023-06-02 00:52:58 +03:00
/**
* @_ignore:
*/
2022-09-27 10:45:27 +03:00
constructor(iface: Interface, provider: Provider, tx: TransactionResponse);
2023-06-02 00:52:58 +03:00
/**
* Resolves once this transaction has been mined and has
* %%confirms%% blocks including it (default: ``1``) with an
* optional %%timeout%%.
*
* This can resolve to ``null`` only if %%confirms%% is ``0``
* and the transaction has not been mined, otherwise this will
* wait until enough confirmations have completed.
*/
2022-09-05 23:57:11 +03:00
wait(confirms?: number): Promise<null | ContractTransactionReceipt>;
}
2023-06-02 00:52:58 +03:00
/**
* A **ContractUnknownEventPayload** is included as the last parameter to
* Contract Events when the event does not match any events in the ABI.
*/
2022-11-09 10:57:02 +03:00
export declare class ContractUnknownEventPayload extends EventPayload<ContractEventName> {
2023-06-02 00:52:58 +03:00
/**
* The log with no matching events.
*/
2022-11-09 10:57:02 +03:00
readonly log: Log;
2023-06-02 00:52:58 +03:00
/**
* @_event:
*/
2022-11-09 10:57:02 +03:00
constructor(contract: BaseContract, listener: null | Listener, filter: ContractEventName, log: Log);
2023-06-02 00:52:58 +03:00
/**
* Resolves to the block the event occured in.
*/
2022-11-30 23:44:23 +03:00
getBlock(): Promise<Block>;
2023-06-02 00:52:58 +03:00
/**
* Resolves to the transaction the event occured in.
*/
2022-11-09 10:57:02 +03:00
getTransaction(): Promise<TransactionResponse>;
2023-06-02 00:52:58 +03:00
/**
* Resolves to the transaction receipt the event occured in.
*/
2022-11-09 10:57:02 +03:00
getTransactionReceipt(): Promise<TransactionReceipt>;
}
2023-06-02 00:52:58 +03:00
/**
* A **ContractEventPayload** is included as the last parameter to
* Contract Events when the event is known.
*/
2022-11-09 10:57:02 +03:00
export declare class ContractEventPayload extends ContractUnknownEventPayload {
2023-06-02 00:52:58 +03:00
/**
* The matching event.
*/
2022-09-05 23:57:11 +03:00
readonly fragment: EventFragment;
2023-06-02 00:52:58 +03:00
/**
* The log, with parsed properties.
*/
2022-09-05 23:57:11 +03:00
readonly log: EventLog;
2023-06-02 00:52:58 +03:00
/**
* The parsed arguments passed to the event by ``emit``.
*/
2022-09-05 23:57:11 +03:00
readonly args: Result;
2023-06-02 00:52:58 +03:00
/**
* @_ignore:
*/
2022-09-05 23:57:11 +03:00
constructor(contract: BaseContract, listener: null | Listener, filter: ContractEventName, fragment: EventFragment, _log: Log);
2023-06-02 00:52:58 +03:00
/**
* The event name.
*/
2022-09-05 23:57:11 +03:00
get eventName(): string;
2023-06-02 00:52:58 +03:00
/**
* The event signature.
*/
2022-09-05 23:57:11 +03:00
get eventSignature(): string;
}
//# sourceMappingURL=wrappers.d.ts.map