Skip to content
This repository was archived by the owner on Jan 5, 2019. It is now read-only.

Commit 6e62404

Browse files
hugo-dclrettig
authored andcommitted
update gas costs
1 parent 75868dd commit 6e62404

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

Diff for: opcodes.js

+32-32
Original file line numberDiff line numberDiff line change
@@ -31,41 +31,41 @@ const codes = {
3131
0x20: ['SHA3', 30, 2, 1],
3232

3333
// 0x30 range - closure state
34-
0x30: ['ADDRESS', 0, 0, 1],
35-
0x31: ['BALANCE', 0, 1, 1],
36-
0x32: ['ORIGIN', 0, 0, 1],
37-
0x33: ['CALLER', 0, 0, 1],
38-
0x34: ['CALLVALUE', 0, 0, 1],
39-
0x35: ['CALLDATALOAD', 0, 1, 1],
40-
0x36: ['CALLDATASIZE', 0, 0, 1],
41-
0x37: ['CALLDATACOPY', 0, 3, 0],
42-
0x38: ['CODESIZE', 0, 0, 1],
43-
0x39: ['CODECOPY', 0, 3, 0],
44-
0x3a: ['GASPRICE', 0, 0, 1],
45-
0x3b: ['EXTCODESIZE', 0, 1, 1],
46-
0x3c: ['EXTCODECOPY', 0, 4, 0],
34+
0x30: ['ADDRESS', 2, 0, 1],
35+
0x31: ['BALANCE', 400, 1, 1],
36+
0x32: ['ORIGIN', 2, 0, 1],
37+
0x33: ['CALLER', 2, 0, 1],
38+
0x34: ['CALLVALUE', 2, 0, 1],
39+
0x35: ['CALLDATALOAD', 3, 1, 1],
40+
0x36: ['CALLDATASIZE', 2, 0, 1],
41+
0x37: ['CALLDATACOPY', 3, 3, 0],
42+
0x38: ['CODESIZE', 2, 0, 1],
43+
0x39: ['CODECOPY', 3, 3, 0],
44+
0x3a: ['GASPRICE', 2, 0, 1],
45+
0x3b: ['EXTCODESIZE', 700, 1, 1],
46+
0x3c: ['EXTCODECOPY', 700, 4, 0],
4747

4848
// '0x40' range - block operations
49-
0x40: ['BLOCKHASH', 0, 1, 1],
50-
0x41: ['COINBASE', 0, 0, 1],
51-
0x42: ['TIMESTAMP', 0, 0, 1],
52-
0x43: ['NUMBER', 0, 0, 1],
53-
0x44: ['DIFFICULTY', 0, 0, 1],
54-
0x45: ['GASLIMIT', 0, 0, 1],
49+
0x40: ['BLOCKHASH', 20, 1, 1],
50+
0x41: ['COINBASE', 2, 0, 1],
51+
0x42: ['TIMESTAMP', 2, 0, 1],
52+
0x43: ['NUMBER', 2, 0, 1],
53+
0x44: ['DIFFICULTY', 2, 0, 1],
54+
0x45: ['GASLIMIT', 2, 0, 1],
5555

5656
// 0x50 range - 'storage' and execution
5757
0x50: ['POP', 2, 1, 0],
5858
0x51: ['MLOAD', 3, 1, 1],
5959
0x52: ['MSTORE', 3, 2, 0],
6060
0x53: ['MSTORE8', 3, 2, 0],
61-
0x54: ['SLOAD', 0, 1, 1],
61+
0x54: ['SLOAD', 200, 1, 1],
6262
0x55: ['SSTORE', 0, 2, 0],
6363
0x56: ['JUMP', 8, 0, 0],
6464
0x57: ['JUMPI', 10, 0, 0],
6565
0x58: ['PC', 2, 0, 1],
6666
0x59: ['MSIZE', 2, 0, 1],
67-
0x5a: ['GAS', 0, 0, 1],
68-
0x5b: ['JUMPDEST', 0, 0, 0],
67+
0x5a: ['GAS', 2, 0, 1],
68+
0x5b: ['JUMPDEST', 1, 0, 0],
6969

7070
// 0x60, range
7171
0x60: ['PUSH', 3, 0, 1],
@@ -135,21 +135,21 @@ const codes = {
135135
0x9e: ['SWAP', 3, 0, 0],
136136
0x9f: ['SWAP', 3, 0, 0],
137137

138-
0xa0: ['LOG', 0, 2, 0],
139-
0xa1: ['LOG', 0, 3, 0],
140-
0xa2: ['LOG', 0, 4, 0],
141-
0xa3: ['LOG', 0, 5, 0],
142-
0xa4: ['LOG', 0, 6, 0],
138+
0xa0: ['LOG', 375, 2, 0],
139+
0xa1: ['LOG', 375, 3, 0],
140+
0xa2: ['LOG', 375, 4, 0],
141+
0xa3: ['LOG', 375, 5, 0],
142+
0xa4: ['LOG', 375, 6, 0],
143143

144144
// '0xf0' range - closures
145-
0xf0: ['CREATE', 0, 3, 1],
146-
0xf1: ['CALL', 0, 7, 1],
147-
0xf2: ['CALLCODE', 0, 7, 1],
145+
0xf0: ['CREATE', 32000, 3, 1],
146+
0xf1: ['CALL', 700, 7, 1],
147+
0xf2: ['CALLCODE', 700, 7, 1],
148148
0xf3: ['RETURN', 0, 2, 0],
149-
0xf4: ['DELEGATECALL', 0, 6, 1],
149+
0xf4: ['DELEGATECALL', 700, 6, 1],
150150

151151
// '0x70', range - other
152-
0xff: ['SELFDESTRUCT', 0, 1, 0]
152+
0xff: ['SELFDESTRUCT', 5000, 1, 0]
153153
}
154154

155155
module.exports = function (op) {

0 commit comments

Comments
 (0)