2019-05-15 01:48:48 +03:00
|
|
|
import { BigNumber, BigNumberish } from "@ethersproject/bignumber";
|
|
|
|
import { BytesLike } from "@ethersproject/bytes";
|
|
|
|
import { Description } from "@ethersproject/properties";
|
|
|
|
import { AbiCoder } from "./abi-coder";
|
2020-04-25 10:54:54 +03:00
|
|
|
import { checkResultErrors, Result } from "./coders/abstract-coder";
|
2021-05-17 23:19:36 +03:00
|
|
|
import { ConstructorFragment, ErrorFragment, EventFragment, Fragment, FunctionFragment, JsonFragment, ParamType } from "./fragments";
|
2020-04-25 10:54:54 +03:00
|
|
|
export { checkResultErrors, Result };
|
2020-01-08 03:58:04 +03:00
|
|
|
export declare class LogDescription extends Description<LogDescription> {
|
2019-05-15 01:48:48 +03:00
|
|
|
readonly eventFragment: EventFragment;
|
|
|
|
readonly name: string;
|
|
|
|
readonly signature: string;
|
|
|
|
readonly topic: string;
|
2020-01-08 03:58:04 +03:00
|
|
|
readonly args: Result;
|
2019-05-15 01:48:48 +03:00
|
|
|
}
|
2020-01-08 03:58:04 +03:00
|
|
|
export declare class TransactionDescription extends Description<TransactionDescription> {
|
2019-05-15 01:48:48 +03:00
|
|
|
readonly functionFragment: FunctionFragment;
|
|
|
|
readonly name: string;
|
2020-01-08 03:58:04 +03:00
|
|
|
readonly args: Result;
|
2019-05-15 01:48:48 +03:00
|
|
|
readonly signature: string;
|
|
|
|
readonly sighash: string;
|
|
|
|
readonly value: BigNumber;
|
|
|
|
}
|
2021-06-24 09:13:06 +03:00
|
|
|
export declare class ErrorDescription extends Description<ErrorDescription> {
|
|
|
|
readonly errorFragment: ErrorFragment;
|
|
|
|
readonly name: string;
|
|
|
|
readonly args: Result;
|
|
|
|
readonly signature: string;
|
|
|
|
readonly sighash: string;
|
|
|
|
}
|
2020-01-08 03:58:04 +03:00
|
|
|
export declare class Indexed extends Description<Indexed> {
|
2019-05-15 01:48:48 +03:00
|
|
|
readonly hash: string;
|
2020-01-08 03:58:04 +03:00
|
|
|
readonly _isIndexed: boolean;
|
2019-06-12 00:57:04 +03:00
|
|
|
static isIndexed(value: any): value is Indexed;
|
2019-05-15 01:48:48 +03:00
|
|
|
}
|
|
|
|
export declare class Interface {
|
2021-03-30 22:22:45 +03:00
|
|
|
readonly fragments: ReadonlyArray<Fragment>;
|
2019-05-15 01:48:48 +03:00
|
|
|
readonly errors: {
|
2021-05-17 23:19:36 +03:00
|
|
|
[name: string]: ErrorFragment;
|
2019-05-15 01:48:48 +03:00
|
|
|
};
|
|
|
|
readonly events: {
|
|
|
|
[name: string]: EventFragment;
|
|
|
|
};
|
|
|
|
readonly functions: {
|
|
|
|
[name: string]: FunctionFragment;
|
|
|
|
};
|
|
|
|
readonly structs: {
|
|
|
|
[name: string]: any;
|
|
|
|
};
|
|
|
|
readonly deploy: ConstructorFragment;
|
|
|
|
readonly _abiCoder: AbiCoder;
|
2020-02-07 02:21:34 +03:00
|
|
|
readonly _isInterface: boolean;
|
2021-03-30 22:22:45 +03:00
|
|
|
constructor(fragments: string | ReadonlyArray<Fragment | JsonFragment | string>);
|
2020-01-08 03:58:04 +03:00
|
|
|
format(format?: string): string | Array<string>;
|
2019-05-15 01:48:48 +03:00
|
|
|
static getAbiCoder(): AbiCoder;
|
|
|
|
static getAddress(address: string): string;
|
2021-05-17 23:19:36 +03:00
|
|
|
static getSighash(fragment: ErrorFragment | FunctionFragment): string;
|
2020-02-26 13:06:48 +03:00
|
|
|
static getEventTopic(eventFragment: EventFragment): string;
|
2019-05-15 01:48:48 +03:00
|
|
|
getFunction(nameOrSignatureOrSighash: string): FunctionFragment;
|
|
|
|
getEvent(nameOrSignatureOrTopic: string): EventFragment;
|
2021-05-17 23:19:36 +03:00
|
|
|
getError(nameOrSignatureOrSighash: string): ErrorFragment;
|
2021-06-24 09:13:06 +03:00
|
|
|
getSighash(fragment: ErrorFragment | FunctionFragment | string): string;
|
2019-05-15 01:48:48 +03:00
|
|
|
getEventTopic(eventFragment: EventFragment | string): string;
|
2021-03-30 22:22:45 +03:00
|
|
|
_decodeParams(params: ReadonlyArray<ParamType>, data: BytesLike): Result;
|
|
|
|
_encodeParams(params: ReadonlyArray<ParamType>, values: ReadonlyArray<any>): string;
|
|
|
|
encodeDeploy(values?: ReadonlyArray<any>): string;
|
2021-06-26 08:55:19 +03:00
|
|
|
decodeErrorResult(fragment: ErrorFragment | string, data: BytesLike): Result;
|
|
|
|
encodeErrorResult(fragment: ErrorFragment | string, values?: ReadonlyArray<any>): string;
|
2020-01-08 03:58:04 +03:00
|
|
|
decodeFunctionData(functionFragment: FunctionFragment | string, data: BytesLike): Result;
|
2021-03-30 22:22:45 +03:00
|
|
|
encodeFunctionData(functionFragment: FunctionFragment | string, values?: ReadonlyArray<any>): string;
|
2020-01-08 03:58:04 +03:00
|
|
|
decodeFunctionResult(functionFragment: FunctionFragment | string, data: BytesLike): Result;
|
2021-03-30 22:22:45 +03:00
|
|
|
encodeFunctionResult(functionFragment: FunctionFragment | string, values?: ReadonlyArray<any>): string;
|
2022-08-18 21:48:39 +03:00
|
|
|
encodeFilterTopics(eventFragment: EventFragment | string, values: ReadonlyArray<any>): Array<string | Array<string>>;
|
|
|
|
encodeEventLog(eventFragment: EventFragment | string, values: ReadonlyArray<any>): {
|
2020-04-25 10:54:54 +03:00
|
|
|
data: string;
|
|
|
|
topics: Array<string>;
|
|
|
|
};
|
2021-03-30 22:22:45 +03:00
|
|
|
decodeEventLog(eventFragment: EventFragment | string, data: BytesLike, topics?: ReadonlyArray<string>): Result;
|
2019-05-15 01:48:48 +03:00
|
|
|
parseTransaction(tx: {
|
|
|
|
data: string;
|
|
|
|
value?: BigNumberish;
|
|
|
|
}): TransactionDescription;
|
|
|
|
parseLog(log: {
|
|
|
|
topics: Array<string>;
|
|
|
|
data: string;
|
|
|
|
}): LogDescription;
|
2021-06-24 09:13:06 +03:00
|
|
|
parseError(data: BytesLike): ErrorDescription;
|
2019-06-12 00:57:04 +03:00
|
|
|
static isInterface(value: any): value is Interface;
|
2019-05-15 01:48:48 +03:00
|
|
|
}
|
2021-01-19 13:22:54 +03:00
|
|
|
//# sourceMappingURL=interface.d.ts.map
|