TRON Energy Cost - Odyssey-v3.1.1
 Share
The version of the browser you are using is no longer supported. Please upgrade to a supported browser.Dismiss

View only
 
ABCDEFGHIJKLMNOPQRSTUVWXY
1
CodeMnemonicEnergy Used - (sun)Cost TierRemoved from stackAdded to stackOpreation NotesEnergy Calculation Notes
2
0x00STOP0ZeroTier00Halts execution.
3
0x01ADD3VeryLowTier21Addition operation
4
0x02MUL5LowTier21Multiplication operation.
5
0x03SUB3VeryLowTier21Subtraction operation.
6
0x04DIV5LowTier21Integer division operation.
7
0x05SDIV5LowTier21Signed integer division operation (truncated).
8
0x06MOD5LowTier21Modulo remainder operation
9
0x07SMOD5LowTier21Signed modulo remainder operation.
10
0x08ADDMOD8MidTier31Modulo addition operation.
11
0x09MULMOD8MidTier31Modulo multiplication operation.
12
0x0aEXP
(exp == 0) ? 10 : (10 + 10 * (1 + log256(exp)))
SpecialTier21Exponential operation.
If exponent is 0, gas used is 10. If exponent is greater than 0, gas used is 10 plus 10 times a factor related to how large the log of the exponent is.
13
0x0bSIGNEXTEND5LowTier21Extend length of two’s complement signed integer.
14
0x10LT3VeryLowTier21Less-than comparison.
15
0x11GT3VeryLowTier21Greater-than comparison.
16
0x12SLT3VeryLowTier21Signed less-than comparison.
17
0x13SGT3VeryLowTier21Signed greater-than comparison.
18
0x14EQ3VeryLowTier21Equality comparison.
19
0x15ISZERO3VeryLowTier11Simple not operator.
20
0x16ANDVeryLowTier21Bitwise AND operation.
21
0x17OR3VeryLowTier21Bitwise OR operation
22
0x18XOR3VeryLowTier21Bitwise XOR operation.
23
0x19NOT3VeryLowTier11Bitwise NOT operation.
24
0x1aBYTE3VeryLowTier21Retrieve single byte from word
25
0x20SHA330 + 6 * (size of input in words)SpecialTier21Compute Keccak-256 hash.
30 is the paid for the operation plus 6 paid for each word (rounded up) for the input data.
26
0x30ADDRESS2BaseTier01Get address of currently executing account.
27
0x31BALANCE20ExtTier11Get balance of the given account.
28
0x32ORIGIN2BaseTier01Get execution origination address.
29
0x33CALLER2BaseTier01Get caller address.
30
0x34CALLVALUE2BaseTier01Get deposited value by the instruction/transaction responsible for this execution.
31
0x35CALLDATALOAD3VeryLowTier11Get input data of current environment.
32
0x36CALLDATASIZE2BaseTier01Get size of input data in current environment.
33
0x37CALLDATACOPY
2 + 3 * (number of words copied, rounded up)
VeryLowTier30Copy input data in current environment to memory.
2 is paid for the operation plus 3 for each word copied (rounded up).
34
0x38CODESIZE2BaseTier01Get size of code running in current environment.
35
0x39CODECOPY
2 + 3 * (number of words copied, rounded up)
VeryLowTier30Copy code running in current environment to memory.
2 is paid for the operation plus 3 for each word copied (rounded up).
36
0x3aGASPRICE2BaseTier01Get price of gas in current environment.
37
0x3bEXTCODESIZE20ExtTier11Get size of an account’s code.
38
0x3cEXTCODECOPY
20 + 3 * (number of words copied, rounded up)
ExtTier40Copy an account’s code to memory.
20 is paid for the operation plus 3 for each word copied (rounded up).
39
0x3dRETURNDATASIZE2BaseTier30
40
0x3eRETURNDATACOPY3VeryLowTier30
41
0x40BLOCKHASH20ExtTier11Get the hash of one of the 256 most recent complete blocks.
42
0x41COINBASE2BaseTier01Get the block’s beneficiary address.
43
0x42TIMESTAMP2BaseTier01Get the block’s timestamp.
44
0x43NUMBER2BaseTier01Get the block’s number.
45
0x44DIFFICULTY2BaseTier01Get the block’s difficulty.
46
0x45GASLIMIT2BaseTier01Get the block’s gas limit.
47
0x50POP2BaseTier10Remove item from stack.
48
0x51MLOAD3VeryLowTier11Load word from memory.
49
0x52MSTORE3VeryLowTier20Save word to memory
50
0x53MSTORE83VeryLowTier20Save byte to memory.
51
0x54SLOAD50SpecialTier11Load word from storage
52
0x55SSTORE
((value != 0) && (storage_location == 0)) ? 20000 : 5000
SpecialTier20Save word to storage.
20000 is paid when storage value is set to non-zero from zero. 5000 is paid when the storage value's zeroness remains unchanged or is set to zero.
53
0x56JUMP8MidTier10Alter the program counter
54
0x57JUMPI10HighTier20Conditionally alter the program counter.
55
0x58PC2BaseTier01Get the value of the program counter prior to the increment corresponding to this instruction.
56
0x59MSIZE2BaseTier01Get the size of active memory in bytes.
57
0x5aGAS2BaseTier01Get the amount of available gas, including the corresponding reduction for the cost of this instruction.
58
0x5bJUMPDEST1SpecialTier00Mark a valid destination for jumps
59
0x60 -- 0x7fPUSH1*3VeryLowTier01Place * byte item on stack. 0 < * <= 32
60
0x80 -- 0x8fDUP1*3VeryLowTier** + 1Duplicate *th stack item. 0 < * <= 16
61
0x90 -- 0x9fSWAP*3VeryLowTier* + 1* + 1Exchange 1st and (* + 1)th stack items. 0 < * <= 16
62
0xa0LOG0375 + 8 * (number of bytes in log data)SpecialTier20Append log record with no topics.
375 is paid for operation plus 8 for each byte in data to be logged.
63
0xa1LOG1375 + 8 * (number of bytes in log data)SpecialTier30Append log record with one topic.
375 is paid for operation plus 8 for each byte in data to be logged plus 375 for the 1 topic to be logged.
64
0xa2LOG2375 + 8 * (number of bytes in log data)SpecialTier40Append log record with two topics.
375 is paid for operation plus 8 for each byte in data to be logged plus 2 * 375 for the 2 topics to be logged.
65
0xa3LOG3375 + 8 * (number of bytes in log data)SpecialTier50Append log record with three topics.
375 is paid for operation plus 8 for each byte in data to be logged plus 3 * 375 for the 3 topics to be logged.
66
0xa4LOG4375 + 8 * (number of bytes in log data)SpecialTier60Append log record with four topics.
375 is paid for operation plus 8 for each byte in data to be logged plus 4 * 375 for the 4 topics to be logged.
67
0xf0CREATE32000SpecialTier31Create a new account with associated code.
68
0xf1CALL40SpecialTier71Message-call into an account.
69
0xf2CALLCODE40SpecialTier71Message-call into this account with an alternative account’s code.
70
0xf3RETURN0ZeroTier20Halt execution returning output data.
71
0xf4DELEGATECALL40SpecialTier61Message-call into this account with an alternative account’s code, but persisting the current values for sender and value.
72
0xfaSTATICCALL40SpecialTier61
Opcode that can be used to call another contract (or itself) while disallowing any modifications to the state during the call (and its subcalls, if present). Any opcode that attempts to perform such a modification (see below for details) will result in an exception instead of performing the modification.
73
0xfdREVERT0ZeroTier20The `REVERT` instruction will stop execution, roll back all state changes done so far and provide a pointer to a memory section, which can be interpreted as an error code or message. While doing so, it will not consume all the remaining gas.
74
0xffSUICIDE0ZeroTier10Halt execution and register account for later deletion
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Loading...