Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
326cb226
Commit
326cb226
authored
Dec 05, 2019
by
aniket-engg
Committed by
Aniket
Dec 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opcodes and errorCodes updated
parent
3e2b4a3d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
opcodes.js
remix-lib/src/code/opcodes.js
+7
-2
txExecution.js
remix-lib/src/execution/txExecution.js
+5
-1
No files found.
remix-lib/src/code/opcodes.js
View file @
326cb226
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
var
codes
=
{
var
codes
=
{
// 0x0 range - arithmetic ops
// 0x0 range - arithmetic ops
// name, baseCost, off stack, on stack, dynamic, async
// name, baseCost, off stack, on stack, dynamic, async
// @todo can be improved while refactoring
0x00
:
[
'STOP'
,
0
,
0
,
0
,
false
],
0x00
:
[
'STOP'
,
0
,
0
,
0
,
false
],
0x01
:
[
'ADD'
,
3
,
2
,
1
,
false
],
0x01
:
[
'ADD'
,
3
,
2
,
1
,
false
],
0x02
:
[
'MUL'
,
5
,
2
,
1
,
false
],
0x02
:
[
'MUL'
,
5
,
2
,
1
,
false
],
...
@@ -36,7 +38,7 @@ var codes = {
...
@@ -36,7 +38,7 @@ var codes = {
// 0x30 range - closure state
// 0x30 range - closure state
0x30
:
[
'ADDRESS'
,
2
,
0
,
1
,
true
],
0x30
:
[
'ADDRESS'
,
2
,
0
,
1
,
true
],
0x31
:
[
'BALANCE'
,
4
00
,
1
,
1
,
true
,
true
],
0x31
:
[
'BALANCE'
,
7
00
,
1
,
1
,
true
,
true
],
0x32
:
[
'ORIGIN'
,
2
,
0
,
1
,
true
],
0x32
:
[
'ORIGIN'
,
2
,
0
,
1
,
true
],
0x33
:
[
'CALLER'
,
2
,
0
,
1
,
true
],
0x33
:
[
'CALLER'
,
2
,
0
,
1
,
true
],
0x34
:
[
'CALLVALUE'
,
2
,
0
,
1
,
true
],
0x34
:
[
'CALLVALUE'
,
2
,
0
,
1
,
true
],
...
@@ -50,6 +52,7 @@ var codes = {
...
@@ -50,6 +52,7 @@ var codes = {
0x3c
:
[
'EXTCODECOPY'
,
700
,
4
,
0
,
true
,
true
],
0x3c
:
[
'EXTCODECOPY'
,
700
,
4
,
0
,
true
,
true
],
0x3d
:
[
'RETURNDATASIZE'
,
2
,
0
,
1
,
true
],
0x3d
:
[
'RETURNDATASIZE'
,
2
,
0
,
1
,
true
],
0x3e
:
[
'RETURNDATACOPY'
,
3
,
3
,
0
,
true
],
0x3e
:
[
'RETURNDATACOPY'
,
3
,
3
,
0
,
true
],
0x3f
:
[
'EXTCODEHASH'
,
400
,
3
,
0
,
true
],
// '0x40' range - block operations
// '0x40' range - block operations
0x40
:
[
'BLOCKHASH'
,
20
,
1
,
1
,
true
,
true
],
0x40
:
[
'BLOCKHASH'
,
20
,
1
,
1
,
true
,
true
],
...
@@ -58,13 +61,15 @@ var codes = {
...
@@ -58,13 +61,15 @@ var codes = {
0x43
:
[
'NUMBER'
,
2
,
0
,
1
,
true
],
0x43
:
[
'NUMBER'
,
2
,
0
,
1
,
true
],
0x44
:
[
'DIFFICULTY'
,
2
,
0
,
1
,
true
],
0x44
:
[
'DIFFICULTY'
,
2
,
0
,
1
,
true
],
0x45
:
[
'GASLIMIT'
,
2
,
0
,
1
,
true
],
0x45
:
[
'GASLIMIT'
,
2
,
0
,
1
,
true
],
0x46
:
[
'CHAINID'
,
2
,
0
,
1
,
false
],
0x47
:
[
'SELFBALANCE'
,
5
,
0
,
1
,
false
],
// 0x50 range - 'storage' and execution
// 0x50 range - 'storage' and execution
0x50
:
[
'POP'
,
2
,
1
,
0
,
false
],
0x50
:
[
'POP'
,
2
,
1
,
0
,
false
],
0x51
:
[
'MLOAD'
,
3
,
1
,
1
,
false
],
0x51
:
[
'MLOAD'
,
3
,
1
,
1
,
false
],
0x52
:
[
'MSTORE'
,
3
,
2
,
0
,
false
],
0x52
:
[
'MSTORE'
,
3
,
2
,
0
,
false
],
0x53
:
[
'MSTORE8'
,
3
,
2
,
0
,
false
],
0x53
:
[
'MSTORE8'
,
3
,
2
,
0
,
false
],
0x54
:
[
'SLOAD'
,
2
00
,
1
,
1
,
true
,
true
],
0x54
:
[
'SLOAD'
,
8
00
,
1
,
1
,
true
,
true
],
0x55
:
[
'SSTORE'
,
0
,
2
,
0
,
true
,
true
],
0x55
:
[
'SSTORE'
,
0
,
2
,
0
,
true
,
true
],
0x56
:
[
'JUMP'
,
8
,
1
,
0
,
false
],
0x56
:
[
'JUMP'
,
8
,
1
,
0
,
false
],
0x57
:
[
'JUMPI'
,
10
,
2
,
0
,
false
],
0x57
:
[
'JUMPI'
,
10
,
2
,
0
,
false
],
...
...
remix-lib/src/execution/txExecution.js
View file @
326cb226
...
@@ -64,7 +64,11 @@ module.exports = {
...
@@ -64,7 +64,11 @@ module.exports = {
INVALID_JUMP
:
'invalid JUMP'
,
INVALID_JUMP
:
'invalid JUMP'
,
INVALID_OPCODE
:
'invalid opcode'
,
INVALID_OPCODE
:
'invalid opcode'
,
REVERT
:
'revert'
,
REVERT
:
'revert'
,
STATIC_STATE_CHANGE
:
'static state change'
STATIC_STATE_CHANGE
:
'static state change'
,
INTERNAL_ERROR
:
'internal error'
,
CREATE_COLLISION
:
'create collision'
,
STOP
:
'stop'
,
REFUND_EXHAUSTED
:
'refund exhausted'
,
}
}
var
ret
=
{
var
ret
=
{
error
:
false
,
error
:
false
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment