UNPKG

4.1 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.default = {
4 rpc: {
5 call: {
6 description: 'eth call',
7 params: [
8 {
9 name: 'data',
10 type: 'CallRequest'
11 },
12 {
13 name: 'at',
14 type: 'BlockHash',
15 isHistoric: true,
16 isOptional: true
17 }
18 ],
19 type: 'Raw'
20 },
21 estimateResources: {
22 description: 'eth estimateResources',
23 params: [
24 {
25 name: 'from',
26 type: 'H160'
27 },
28 {
29 name: 'unsignedExtrinsic',
30 type: 'Bytes'
31 },
32 {
33 name: 'at',
34 type: 'BlockHash',
35 isHistoric: true,
36 isOptional: true
37 }
38 ],
39 type: 'EstimateResourcesResponse'
40 }
41 },
42 typesAlias: {
43 evm: {
44 AccountInfo: 'EvmAccountInfo',
45 ContractInfo: 'EvmContractInfo'
46 }
47 },
48 types: {
49 BlockLimits: {
50 maxGasLimit: 'u64',
51 maxStorageLimit: 'u32'
52 },
53 Erc20Info: {
54 address: 'EvmAddress',
55 name: 'Vec<u8>',
56 symbol: 'Vec<u8>',
57 decimals: 'u8'
58 },
59 EstimateResourcesResponse: {
60 // Used gas
61 gas: 'u256',
62 // Used storage
63 storage: 'i32',
64 // Adjusted weight fee
65 weightFee: 'u256'
66 },
67 EvmAccountInfo: {
68 nonce: 'Index',
69 contractInfo: 'Option<EvmContractInfo>'
70 },
71 CodeInfo: {
72 codeSize: 'u32',
73 refCount: 'u32'
74 },
75 EvmContractInfo: {
76 codeHash: 'H256',
77 maintainer: 'H160',
78 deployed: 'bool'
79 },
80 EvmAddress: 'H160',
81 CallRequest: {
82 from: 'Option<H160>',
83 to: 'Option<H160>',
84 gasLimit: 'Option<u32>',
85 storageLimit: 'Option<u32>',
86 value: 'Option<U128>',
87 data: 'Option<Bytes>'
88 },
89 CallInfo: {
90 exit_reason: 'ExitReason',
91 value: 'Vec<u8>',
92 used_gas: 'U256',
93 used_storage: 'i32',
94 logs: 'Vec<EthereumLog>'
95 },
96 CreateInfo: {
97 exit_reason: 'ExitReason',
98 value: 'H160',
99 used_gas: 'U256',
100 used_storage: 'i32',
101 logs: 'Vec<EthereumLog>'
102 },
103 EthereumLog: {
104 address: 'H160',
105 topics: 'Vec<H256>',
106 data: 'Bytes'
107 },
108 ExitReason: {
109 _enum: {
110 Succeed: 'ExitSucceed',
111 Error: 'ExitError',
112 Revert: 'ExitRevert',
113 Fatal: 'ExitFatal'
114 }
115 },
116 ExitSucceed: {
117 _enum: ['Stopped', 'Returned', 'Suicided']
118 },
119 ExitError: {
120 _enum: {
121 StackUnderflow: 'Null',
122 StackOverflow: 'Null',
123 InvalidJump: 'Null',
124 InvalidRange: 'Null',
125 DesignatedInvalid: 'Null',
126 CallTooDeep: 'Null',
127 CreateCollision: 'Null',
128 CreateContractLimit: 'Null',
129 OutOfOffset: 'Null',
130 OutOfGas: 'Null',
131 OutOfFund: 'Null',
132 PCUnderflow: 'Null',
133 CreateEmpty: 'Null',
134 Other: 'Text',
135 InvalidCode: 'u8'
136 }
137 },
138 ExitRevert: {
139 _enum: ['Reverted']
140 },
141 ExitFatal: {
142 _enum: {
143 NotSupported: 'Null',
144 UnhandledInterrupt: 'Null',
145 CallErrorAsFatal: 'ExitError',
146 Other: 'Text'
147 }
148 }
149 }
150};