Add RichRevertAbi to etherem-types

This commit is contained in:
Lawrence Forman
2019-04-02 17:51:09 -04:00
committed by Amir Bandeali
parent 9319f362bb
commit 9a162e5d5c
2 changed files with 16 additions and 1 deletions

View File

@@ -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": [

View File

@@ -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'`