Rename RichRevertReason to RevertError.

Rename `StandardError` to `StringRevertError`.
Rename `RichRevertAbi` to `RevertErrorAbi`.
Make `RevertError` extend `Error` so it can be thrown.
Add `RevertError` tests.
This commit is contained in:
Lawrence Forman
2019-04-04 01:00:25 -04:00
committed by Amir Bandeali
parent 5b25eb4fbd
commit 6231724f49
8 changed files with 171 additions and 89 deletions

View File

@@ -77,7 +77,7 @@ export interface EIP1193Provider {
export type ContractAbi = AbiDefinition[];
export type AbiDefinition = FunctionAbi | EventAbi | RichRevertAbi;
export type AbiDefinition = FunctionAbi | EventAbi | RevertErrorAbi;
export type FunctionAbi = MethodAbi | ConstructorAbi | FallbackAbi;
@@ -116,7 +116,7 @@ export interface EventParameter extends DataItem {
indexed: boolean;
}
export interface RichRevertAbi {
export interface RevertErrorAbi {
type: 'error';
name: string;
arguments?: DataItem[];