Add ExitReason types (evm) (#3001)

* Add ExitReason types (evm)

* Log, Account, Vicinity
This commit is contained in:
Jaco Greeff
2020-12-29 21:28:04 +01:00
committed by GitHub
parent 3aaa6db190
commit e685923102
2 changed files with 48 additions and 3 deletions
+5
View File
@@ -21,6 +21,11 @@ const typesModules: Record<string, OverrideModuleType> = {
Transaction: 'EthTransaction',
TransactionStatus: 'EthTransactionStatus'
},
evm: {
Account: 'EvmAccount',
Log: 'EvmLog',
Vicinity: 'EvmVicinity'
},
grandpa: {
Equivocation: 'GrandpaEquivocation',
EquivocationProof: 'GrandpaEquivocationProof'
@@ -9,18 +9,58 @@ import type { Definitions } from '../../types';
export default {
rpc: {},
types: {
Account: {
EvmAccount: {
nonce: 'u256',
balance: 'u256'
},
Log: {
EvmLog: {
address: 'H160',
topics: 'Vec<H256>',
data: 'Bytes'
},
Vicinity: {
EvmVicinity: {
gasPrice: 'u256',
origin: 'H160'
},
ExitError: {
_enum: {
StackUnderflow: 'Null',
StackOverflow: 'Null',
InvalidJump: 'Null',
InvalidRange: 'Null',
DesignatedInvalid: 'Null',
CallTooDeep: 'Null',
CreateCollision: 'Null',
CreateContractLimit: 'Null',
OutOfOffset: 'Null',
OutOfGas: 'Null',
OutOfFund: 'Null',
PCUnderflow: 'Null',
CreateEmpty: 'Null',
Other: 'Text'
}
},
ExitFatal: {
_enum: {
NotSupported: 'Null',
UnhandledInterrupt: 'Null',
CallErrorAsFatal: 'ExitError',
Other: 'Text'
}
},
ExitReason: {
_enum: {
Succeed: 'ExitSucceed',
Error: 'ExitError',
Revert: 'ExitRevert',
Fatal: 'ExitFatal'
}
},
ExitRevert: {
_enum: ['Reverted']
},
ExitSucceed: {
_enum: ['Stopped', 'Returned', 'Suicided']
}
}
} as Definitions;