Add RichRevertAbi to etherem-types
This commit is contained in:
committed by
Amir Bandeali
parent
9319f362bb
commit
9a162e5d5c
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"version": "2.2.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Add `RichRevertAbi` interface as part of `AbiDefinition` types",
|
||||
"pr": 1761
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "2.1.4",
|
||||
"changes": [
|
||||
|
||||
@@ -77,7 +77,7 @@ export interface EIP1193Provider {
|
||||
|
||||
export type ContractAbi = AbiDefinition[];
|
||||
|
||||
export type AbiDefinition = FunctionAbi | EventAbi;
|
||||
export type AbiDefinition = FunctionAbi | EventAbi | RichRevertAbi;
|
||||
|
||||
export type FunctionAbi = MethodAbi | ConstructorAbi | FallbackAbi;
|
||||
|
||||
@@ -116,6 +116,12 @@ export interface EventParameter extends DataItem {
|
||||
indexed: boolean;
|
||||
}
|
||||
|
||||
export interface RichRevertAbi {
|
||||
type: 'error';
|
||||
name: string;
|
||||
arguments?: DataItem[];
|
||||
}
|
||||
|
||||
export interface EventAbi {
|
||||
// Ideally this would be set to: `'event'` but then TS complains when artifacts are loaded
|
||||
// from JSON files, and this value has type `string` not type `'event'`
|
||||
|
||||
Reference in New Issue
Block a user