219 assertThrow(1 <= _number && _number <= 32, InvalidOpcode,
"Invalid PUSH instruction requested.");
226 assertThrow(1 <= _number && _number <= 16, InvalidOpcode,
"Invalid DUP instruction requested.");
233 assertThrow(1 <= _number && _number <= 16, InvalidOpcode,
"Invalid SWAP instruction requested.");
240 assertThrow(_number <= 4, InvalidOpcode,
"Invalid LOG instruction requested.");
signed greater-than comparision
set a potential jumpsub destination
place 17 byte item on stack
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
unsigned modular addition
void eachInstruction(bytes const &_mem, std::function< void(Instruction, u256 const &)> const &_onInstruction)
Iterate through EVM code and call a function on each instruction.
place 10 byte item on stack
copies the 14th highest item in the stack to the top of the stack
get external code size (from another contract)
#define function(a, b, c, d, k, s)
place 28 byte item on stack
return to subroutine jumped from
int args
Number of items required on the stack for this instruction (and, for the purposes of ret...
place 19 byte item on stack
unsigned modular multiplication
get the block's timestamp
place 1 byte item on stack
place 27 byte item on stack
place 31 byte item on stack
conditionally alter the program counter
SHA3 message digest base class.
place 13 byte item on stack
unsigned getSwapNumber(Instruction _inst)
alter the program counter to a beginsub
copy input data in current environment to memory
conditionally alter the program counter
place 2 byte item on stack
retrieve single byte from word
place 6 byte item on stack
place 20 byte item on stack
swaps the highest and 6th highest value on the stack
swaps the highest and 9th highest value on the stack
get execution origination address
Makes a log entry; 4 topics.
get the block's number
swaps the highest and 15th highest value on the stack
unsigned getDupNumber(Instruction _inst)
swaps the highest and 11th highest value on the stack
swaps the highest and 13th highest value on the stack
integer division operation
copies the 9th highest item in the stack to the top of the stack
swaps the highest and 17th highest value on the stack
get the block's coinbase address
set a potential jump destination
swaps the highest and 7th highest value on the stack
get input data of current environment
place 30 byte item on stack
place 12 byte item on stack
copies the 5th highest item in the stack to the top of the stack
halt execution and register account for later deletion
place 8 byte item on stack
swaps the highest and third highest value on the stack
signed integer division operation
swaps the highest and 4th highest value on the stack
copies the 16th highest item in the stack to the top of the stack
place 29 byte item on stack
signed less-than comparision
InstructionInfo instructionInfo(Instruction _inst)
Information on all the instructions.
halt execution returning output data
conditionally alter the program counter - pre-verified
copies the 10th highest item in the stack to the top of the stack
get address of currently executing account
place 25 byte item on stack
place 26 byte item on stack
get hash of most recent complete block
alter the program counter - pre-verified
#define assertThrow(_condition, _ExceptionType, _description)
Assertion that throws an exception containing the given description if it is not met.
bool isValidInstruction(Instruction _inst)
check whether instructions exists
Instruction logInstruction(unsigned _number)
copies the 6th highest item in the stack to the top of the stack
copies the third highest item in the stack to the top of the stack
swaps the highest and 14th highest value on the stack
std::string name
The name of the instruction.
get size of code running in current environment
unsigned getPushNumber(Instruction _inst)
place 16 byte item on stack
bool sideEffects
false if the only effect on the execution environment (apart from gas usage) is a change to a topmost...
int ret
Number of items placed (back) on the stack by this instruction, assuming args items were removed...
copies the highest item in the stack to the top of the stack
Makes a log entry; no topics.
get the size of active memory
copies the 8th highest item in the stack to the top of the stack
copies the second highest item in the stack to the top of the stack
get the block's gas limit
place 3 byte item on stack
place 11 byte item on stack
get balance of the given account
message-call with another account's code only
std::vector< byte > bytes
get size of input data in current environment
extend length of signed integer
place 18 byte item on stack
const std::map< std::string, Instruction > c_instructions
Convert from string mnemonic to Instruction type.
copy code running in current environment to memory
place 15 byte item on stack
copies the 11th highest item in the stack to the top of the stack
boost::multiprecision::number< boost::multiprecision::cpp_int_backend< 256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void >> u256
signed modulo remainder operation
swaps the highest and 10th highest value on the stack
swaps the highest and 5th highest value on the stack
like CALLCODE but keeps caller's value and sender
swaps the highest and 16th highest value on the stack
place 23 byte item on stack
Instruction pushInstruction(unsigned _number)
Instruction
Virtual machine bytecode instruction.
get the amount of available gas
swaps the highest and 12th highest value on the stack
copies the 4th highest item in the stack to the top of the stack
copy external code (from another contract)
alter the program counter to a beginsub
Information structure for a particular instruction.
get deposited value by the instruction/transaction responsible for this execution ...
swaps the highest and 8th highest value on the stack
place 32 byte item on stack
place 22 byte item on stack
place 9 byte item on stack
int additional
Additional items required in memory for this instructions (only for PUSH).
get price of gas in current environment
alter the program counter to a jumpdest
swaps the highest and second highest value on the stack
Makes a log entry; 1 topic.
copies the 15th highest item in the stack to the top of the stack
place 14 byte item on stack
message-call into an account
get the block's difficulty
Instruction dupInstruction(unsigned _number)
alter the program counter to a jumpdest
placed to force invalid instruction exception
place 24 byte item on stack
place 7 byte item on stack
Instruction swapInstruction(unsigned _number)
Tier gasPriceTier
Tier for gas pricing.
Makes a log entry; 3 topics.
alter the program counter to a jumpdest
push value from constant pool
place 5 byte item on stack
copies the 12th highest item in the stack to the top of the stack
copies the 7th highest item in the stack to the top of the stack
std::string disassemble(bytes const &_mem)
Convert from EVM code to simple EVM assembly language.
place 4 byte item on stack
modulo remainder operation
copies the 13th highest item in the stack to the top of the stack
place 21 byte item on stack
create a new account with associated code
Makes a log entry; 2 topics.