2016-04-14 09:18:24 -07:00
|
|
|
// Copyright 2015 The go-ethereum Authors
|
|
|
|
// This file is part of the go-ethereum library.
|
|
|
|
//
|
|
|
|
// The go-ethereum library is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU Lesser General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// The go-ethereum library is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
|
|
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2015-08-30 01:19:10 -07:00
|
|
|
package vm
|
|
|
|
|
2016-10-20 04:36:29 -07:00
|
|
|
import (
|
|
|
|
"math/big"
|
|
|
|
|
|
|
|
"github.com/ethereum/go-ethereum/params"
|
|
|
|
)
|
2015-08-30 01:19:10 -07:00
|
|
|
|
2017-01-05 02:52:10 -08:00
|
|
|
type (
|
|
|
|
executionFunc func(pc *uint64, env *EVM, contract *Contract, memory *Memory, stack *Stack) ([]byte, error)
|
2017-02-08 04:39:26 -08:00
|
|
|
gasFunc func(params.GasTable, *EVM, *Contract, *Stack, *Memory, *big.Int) *big.Int
|
2017-01-05 02:52:10 -08:00
|
|
|
stackValidationFunc func(*Stack) error
|
|
|
|
memorySizeFunc func(*Stack) *big.Int
|
|
|
|
)
|
|
|
|
|
|
|
|
type operation struct {
|
|
|
|
// op is the operation function
|
|
|
|
execute executionFunc
|
|
|
|
// gasCost is the gas function and returns the gas required for execution
|
|
|
|
gasCost gasFunc
|
|
|
|
// validateStack validates the stack (size) for the operation
|
|
|
|
validateStack stackValidationFunc
|
|
|
|
// memorySize returns the memory size required for the operation
|
|
|
|
memorySize memorySizeFunc
|
|
|
|
// halts indicates whether the operation shoult halt further execution
|
|
|
|
// and return
|
|
|
|
halts bool
|
|
|
|
// jumps indicates whether operation made a jump. This prevents the program
|
|
|
|
// counter from further incrementing.
|
|
|
|
jumps bool
|
|
|
|
// valid is used to check whether the retrieved operation is valid and known
|
2015-08-30 01:19:10 -07:00
|
|
|
valid bool
|
|
|
|
}
|
|
|
|
|
2017-01-05 02:52:10 -08:00
|
|
|
var defaultJumpTable = NewJumpTable()
|
2016-01-19 14:50:00 -08:00
|
|
|
|
2017-01-05 02:52:10 -08:00
|
|
|
func NewJumpTable() [256]operation {
|
|
|
|
return [256]operation{
|
2017-02-08 04:39:26 -08:00
|
|
|
STOP: {
|
|
|
|
execute: opStop,
|
|
|
|
gasCost: constGasFunc(new(big.Int)),
|
|
|
|
validateStack: makeStackFunc(0, 0),
|
|
|
|
halts: true,
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-02-08 04:39:26 -08:00
|
|
|
ADD: {
|
|
|
|
execute: opAdd,
|
2017-01-05 02:52:10 -08:00
|
|
|
gasCost: constGasFunc(GasFastestStep),
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeStackFunc(2, -1),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
MUL: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opMul,
|
|
|
|
gasCost: constGasFunc(GasFastStep),
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeStackFunc(2, -1),
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
SUB: {
|
|
|
|
execute: opSub,
|
|
|
|
gasCost: constGasFunc(GasFastestStep),
|
|
|
|
validateStack: makeStackFunc(2, -1),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
DIV: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opDiv,
|
|
|
|
gasCost: constGasFunc(GasFastStep),
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeStackFunc(2, -1),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
SDIV: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opSdiv,
|
|
|
|
gasCost: constGasFunc(GasFastStep),
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeStackFunc(2, -1),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
MOD: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opMod,
|
|
|
|
gasCost: constGasFunc(GasFastStep),
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeStackFunc(2, -1),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
SMOD: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opSmod,
|
|
|
|
gasCost: constGasFunc(GasFastStep),
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeStackFunc(2, -1),
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
ADDMOD: {
|
|
|
|
execute: opAddmod,
|
|
|
|
gasCost: constGasFunc(GasMidStep),
|
|
|
|
validateStack: makeStackFunc(3, -2),
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
MULMOD: {
|
|
|
|
execute: opMulmod,
|
|
|
|
gasCost: constGasFunc(GasMidStep),
|
|
|
|
validateStack: makeStackFunc(3, -2),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
EXP: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opExp,
|
|
|
|
gasCost: gasExp,
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeStackFunc(2, -1),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
SIGNEXTEND: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opSignExtend,
|
|
|
|
gasCost: constGasFunc(GasFastStep),
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeStackFunc(2, -1),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
LT: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opLt,
|
|
|
|
gasCost: constGasFunc(GasFastestStep),
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeStackFunc(2, -1),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
GT: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opGt,
|
|
|
|
gasCost: constGasFunc(GasFastestStep),
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeStackFunc(2, -1),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
SLT: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opSlt,
|
|
|
|
gasCost: constGasFunc(GasFastestStep),
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeStackFunc(2, -1),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
SGT: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opSgt,
|
|
|
|
gasCost: constGasFunc(GasFastestStep),
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeStackFunc(2, -1),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
EQ: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opEq,
|
|
|
|
gasCost: constGasFunc(GasFastestStep),
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeStackFunc(2, -1),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
ISZERO: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opIszero,
|
|
|
|
gasCost: constGasFunc(GasFastestStep),
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeStackFunc(1, 0),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
AND: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opAnd,
|
|
|
|
gasCost: constGasFunc(GasFastestStep),
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeStackFunc(2, -1),
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
XOR: {
|
|
|
|
execute: opXor,
|
|
|
|
gasCost: constGasFunc(GasFastestStep),
|
|
|
|
validateStack: makeStackFunc(2, -1),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
OR: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opOr,
|
|
|
|
gasCost: constGasFunc(GasFastestStep),
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeStackFunc(2, -1),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-02-08 04:39:26 -08:00
|
|
|
NOT: {
|
|
|
|
execute: opNot,
|
2017-01-05 02:52:10 -08:00
|
|
|
gasCost: constGasFunc(GasFastestStep),
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeStackFunc(1, 0),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
BYTE: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opByte,
|
|
|
|
gasCost: constGasFunc(GasFastestStep),
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeStackFunc(2, -1),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
SHA3: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opSha3,
|
|
|
|
gasCost: gasSha3,
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeStackFunc(2, -1),
|
2017-01-05 02:52:10 -08:00
|
|
|
memorySize: memorySha3,
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
ADDRESS: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opAddress,
|
|
|
|
gasCost: constGasFunc(GasQuickStep),
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
BALANCE: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opBalance,
|
|
|
|
gasCost: gasBalance,
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeStackFunc(1, 0),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
ORIGIN: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opOrigin,
|
|
|
|
gasCost: constGasFunc(GasQuickStep),
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
CALLER: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opCaller,
|
|
|
|
gasCost: constGasFunc(GasQuickStep),
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
CALLVALUE: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opCallValue,
|
|
|
|
gasCost: constGasFunc(GasQuickStep),
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
CALLDATALOAD: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opCalldataLoad,
|
|
|
|
gasCost: constGasFunc(GasFastestStep),
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeStackFunc(1, 0),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
CALLDATASIZE: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opCalldataSize,
|
|
|
|
gasCost: constGasFunc(GasQuickStep),
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
CALLDATACOPY: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opCalldataCopy,
|
|
|
|
gasCost: gasCalldataCopy,
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeStackFunc(3, -3),
|
2017-01-05 02:52:10 -08:00
|
|
|
memorySize: memoryCalldataCopy,
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
CODESIZE: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opCodeSize,
|
|
|
|
gasCost: constGasFunc(GasQuickStep),
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
CODECOPY: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opCodeCopy,
|
|
|
|
gasCost: gasCodeCopy,
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeStackFunc(3, -3),
|
2017-01-05 02:52:10 -08:00
|
|
|
memorySize: memoryCodeCopy,
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
GASPRICE: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opGasprice,
|
|
|
|
gasCost: constGasFunc(GasQuickStep),
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-02-08 04:39:26 -08:00
|
|
|
EXTCODESIZE: {
|
|
|
|
execute: opExtCodeSize,
|
|
|
|
gasCost: gasExtCodeSize,
|
|
|
|
validateStack: makeStackFunc(1, 0),
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
EXTCODECOPY: {
|
|
|
|
execute: opExtCodeCopy,
|
|
|
|
gasCost: gasExtCodeCopy,
|
|
|
|
validateStack: makeStackFunc(4, -4),
|
|
|
|
memorySize: memoryExtCodeCopy,
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
BLOCKHASH: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opBlockhash,
|
|
|
|
gasCost: constGasFunc(GasExtStep),
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeStackFunc(1, 0),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
COINBASE: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opCoinbase,
|
|
|
|
gasCost: constGasFunc(GasQuickStep),
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
TIMESTAMP: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opTimestamp,
|
|
|
|
gasCost: constGasFunc(GasQuickStep),
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
NUMBER: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opNumber,
|
|
|
|
gasCost: constGasFunc(GasQuickStep),
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
DIFFICULTY: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opDifficulty,
|
|
|
|
gasCost: constGasFunc(GasQuickStep),
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
GASLIMIT: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opGasLimit,
|
|
|
|
gasCost: constGasFunc(GasQuickStep),
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
POP: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opPop,
|
|
|
|
gasCost: constGasFunc(GasQuickStep),
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeStackFunc(1, -1),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
MLOAD: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opMload,
|
|
|
|
gasCost: gasMLoad,
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeStackFunc(1, 0),
|
2017-01-05 02:52:10 -08:00
|
|
|
memorySize: memoryMLoad,
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
MSTORE: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opMstore,
|
|
|
|
gasCost: gasMStore,
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeStackFunc(2, -2),
|
2017-01-05 02:52:10 -08:00
|
|
|
memorySize: memoryMStore,
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
MSTORE8: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opMstore8,
|
|
|
|
gasCost: gasMStore8,
|
|
|
|
memorySize: memoryMStore8,
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeStackFunc(2, -2),
|
2016-01-21 06:29:58 -08:00
|
|
|
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
SLOAD: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opSload,
|
|
|
|
gasCost: gasSLoad,
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeStackFunc(1, 0),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
SSTORE: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opSstore,
|
|
|
|
gasCost: gasSStore,
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeStackFunc(2, -2),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-02-08 04:39:26 -08:00
|
|
|
JUMP: {
|
|
|
|
execute: opJump,
|
|
|
|
gasCost: constGasFunc(GasMidStep),
|
|
|
|
validateStack: makeStackFunc(1, -1),
|
|
|
|
jumps: true,
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
JUMPI: {
|
|
|
|
execute: opJumpi,
|
|
|
|
gasCost: constGasFunc(GasSlowStep),
|
|
|
|
validateStack: makeStackFunc(2, -2),
|
|
|
|
jumps: true,
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PC: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opPc,
|
|
|
|
gasCost: constGasFunc(GasQuickStep),
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
MSIZE: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opMsize,
|
|
|
|
gasCost: constGasFunc(GasQuickStep),
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
GAS: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: opGas,
|
|
|
|
gasCost: constGasFunc(GasQuickStep),
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-02-08 04:39:26 -08:00
|
|
|
JUMPDEST: {
|
|
|
|
execute: opJumpdest,
|
|
|
|
gasCost: constGasFunc(params.JumpdestGas),
|
2017-01-05 02:52:10 -08:00
|
|
|
validateStack: makeStackFunc(0, 0),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH1: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(1, big.NewInt(1)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH2: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(2, big.NewInt(2)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH3: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(3, big.NewInt(3)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH4: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(4, big.NewInt(4)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH5: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(5, big.NewInt(5)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH6: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(6, big.NewInt(6)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH7: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(7, big.NewInt(7)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH8: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(8, big.NewInt(8)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH9: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(9, big.NewInt(9)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH10: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(10, big.NewInt(10)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH11: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(11, big.NewInt(11)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH12: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(12, big.NewInt(12)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH13: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(13, big.NewInt(13)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH14: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(14, big.NewInt(14)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH15: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(15, big.NewInt(15)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH16: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(16, big.NewInt(16)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH17: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(17, big.NewInt(17)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH18: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(18, big.NewInt(18)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH19: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(19, big.NewInt(19)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH20: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(20, big.NewInt(20)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH21: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(21, big.NewInt(21)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH22: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(22, big.NewInt(22)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH23: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(23, big.NewInt(23)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH24: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(24, big.NewInt(24)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH25: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(25, big.NewInt(25)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH26: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(26, big.NewInt(26)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH27: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(27, big.NewInt(27)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH28: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(28, big.NewInt(28)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH29: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(29, big.NewInt(29)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH30: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(30, big.NewInt(30)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH31: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(31, big.NewInt(31)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
PUSH32: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makePush(32, big.NewInt(32)),
|
|
|
|
gasCost: gasPush,
|
|
|
|
validateStack: makeStackFunc(0, 1),
|
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
DUP1: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makeDup(1),
|
|
|
|
gasCost: gasDup,
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeDupStackFunc(1),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
DUP2: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makeDup(2),
|
|
|
|
gasCost: gasDup,
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeDupStackFunc(2),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
DUP3: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makeDup(3),
|
|
|
|
gasCost: gasDup,
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeDupStackFunc(3),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
DUP4: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makeDup(4),
|
|
|
|
gasCost: gasDup,
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeDupStackFunc(4),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
DUP5: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makeDup(5),
|
|
|
|
gasCost: gasDup,
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeDupStackFunc(5),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
DUP6: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makeDup(6),
|
|
|
|
gasCost: gasDup,
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeDupStackFunc(6),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
DUP7: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makeDup(7),
|
|
|
|
gasCost: gasDup,
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeDupStackFunc(7),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
DUP8: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makeDup(8),
|
|
|
|
gasCost: gasDup,
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeDupStackFunc(8),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
DUP9: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makeDup(9),
|
|
|
|
gasCost: gasDup,
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeDupStackFunc(9),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
DUP10: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makeDup(10),
|
|
|
|
gasCost: gasDup,
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeDupStackFunc(10),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
DUP11: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makeDup(11),
|
|
|
|
gasCost: gasDup,
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeDupStackFunc(11),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
DUP12: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makeDup(12),
|
|
|
|
gasCost: gasDup,
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeDupStackFunc(12),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
DUP13: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makeDup(13),
|
|
|
|
gasCost: gasDup,
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeDupStackFunc(13),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
DUP14: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makeDup(14),
|
|
|
|
gasCost: gasDup,
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeDupStackFunc(14),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
DUP15: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makeDup(15),
|
|
|
|
gasCost: gasDup,
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeDupStackFunc(15),
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 06:52:03 -08:00
|
|
|
DUP16: {
|
2017-01-05 02:52:10 -08:00
|
|
|
execute: makeDup(16),
|
|
|
|
gasCost: gasDup,
|
2017-02-08 04:39:26 -08:00
|
|
|
validateStack: makeDupStackFunc(16),
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
SWAP1: {
|
|
|
|
execute: makeSwap(1),
|
|
|
|
gasCost: gasSwap,
|
|
|
|
validateStack: makeSwapStackFunc(2),
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
SWAP2: {
|
|
|
|
execute: makeSwap(2),
|
|
|
|
gasCost: gasSwap,
|
|
|
|
validateStack: makeSwapStackFunc(3),
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
SWAP3: {
|
|
|
|
execute: makeSwap(3),
|
|
|
|
gasCost: gasSwap,
|
|
|
|
validateStack: makeSwapStackFunc(4),
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
SWAP4: {
|
|
|
|
execute: makeSwap(4),
|
|
|
|
gasCost: gasSwap,
|
|
|
|
validateStack: makeSwapStackFunc(5),
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
SWAP5: {
|
|
|
|
execute: makeSwap(5),
|
|
|
|
gasCost: gasSwap,
|
|
|
|
validateStack: makeSwapStackFunc(6),
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
SWAP6: {
|
|
|
|
execute: makeSwap(6),
|
|
|
|
gasCost: gasSwap,
|
|
|
|
validateStack: makeSwapStackFunc(7),
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
SWAP7: {
|
|
|
|
execute: makeSwap(7),
|
|
|
|
gasCost: gasSwap,
|
|
|
|
validateStack: makeSwapStackFunc(8),
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
SWAP8: {
|
|
|
|
execute: makeSwap(8),
|
|
|
|
gasCost: gasSwap,
|
|
|
|
validateStack: makeSwapStackFunc(9),
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
SWAP9: {
|
|
|
|
execute: makeSwap(9),
|
|
|
|
gasCost: gasSwap,
|
|
|
|
validateStack: makeSwapStackFunc(10),
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
SWAP10: {
|
|
|
|
execute: makeSwap(10),
|
|
|
|
gasCost: gasSwap,
|
|
|
|
validateStack: makeSwapStackFunc(11),
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
SWAP11: {
|
|
|
|
execute: makeSwap(11),
|
|
|
|
gasCost: gasSwap,
|
|
|
|
validateStack: makeSwapStackFunc(12),
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
SWAP12: {
|
|
|
|
execute: makeSwap(12),
|
|
|
|
gasCost: gasSwap,
|
|
|
|
validateStack: makeSwapStackFunc(13),
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
SWAP13: {
|
|
|
|
execute: makeSwap(13),
|
|
|
|
gasCost: gasSwap,
|
|
|
|
validateStack: makeSwapStackFunc(14),
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
SWAP14: {
|
|
|
|
execute: makeSwap(14),
|
|
|
|
gasCost: gasSwap,
|
|
|
|
validateStack: makeSwapStackFunc(15),
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
SWAP15: {
|
|
|
|
execute: makeSwap(15),
|
|
|
|
gasCost: gasSwap,
|
|
|
|
validateStack: makeSwapStackFunc(16),
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
SWAP16: {
|
|
|
|
execute: makeSwap(16),
|
|
|
|
gasCost: gasSwap,
|
|
|
|
validateStack: makeSwapStackFunc(17),
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
LOG0: {
|
|
|
|
execute: makeLog(0),
|
|
|
|
gasCost: makeGasLog(0),
|
|
|
|
validateStack: makeStackFunc(2, -2),
|
|
|
|
memorySize: memoryLog,
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
LOG1: {
|
|
|
|
execute: makeLog(1),
|
|
|
|
gasCost: makeGasLog(1),
|
|
|
|
validateStack: makeStackFunc(3, -3),
|
|
|
|
memorySize: memoryLog,
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
LOG2: {
|
|
|
|
execute: makeLog(2),
|
|
|
|
gasCost: makeGasLog(2),
|
|
|
|
validateStack: makeStackFunc(4, -4),
|
|
|
|
memorySize: memoryLog,
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
LOG3: {
|
|
|
|
execute: makeLog(3),
|
|
|
|
gasCost: makeGasLog(3),
|
|
|
|
validateStack: makeStackFunc(5, -5),
|
|
|
|
memorySize: memoryLog,
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
LOG4: {
|
|
|
|
execute: makeLog(4),
|
|
|
|
gasCost: makeGasLog(4),
|
|
|
|
validateStack: makeStackFunc(6, -6),
|
|
|
|
memorySize: memoryLog,
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
CREATE: {
|
|
|
|
execute: opCreate,
|
|
|
|
gasCost: gasCreate,
|
|
|
|
validateStack: makeStackFunc(3, -2),
|
|
|
|
memorySize: memoryCreate,
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
CALL: {
|
|
|
|
execute: opCall,
|
|
|
|
gasCost: gasCall,
|
|
|
|
validateStack: makeStackFunc(7, -6),
|
|
|
|
memorySize: memoryCall,
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
CALLCODE: {
|
|
|
|
execute: opCallCode,
|
|
|
|
gasCost: gasCallCode,
|
|
|
|
validateStack: makeStackFunc(7, -6),
|
|
|
|
memorySize: memoryCall,
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
RETURN: {
|
|
|
|
execute: opReturn,
|
|
|
|
gasCost: gasReturn,
|
|
|
|
validateStack: makeStackFunc(2, -2),
|
|
|
|
memorySize: memoryReturn,
|
|
|
|
halts: true,
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
DELEGATECALL: {
|
|
|
|
execute: opDelegateCall,
|
|
|
|
gasCost: gasDelegateCall,
|
|
|
|
validateStack: makeStackFunc(6, -5),
|
|
|
|
memorySize: memoryDelegateCall,
|
|
|
|
valid: true,
|
|
|
|
},
|
|
|
|
SELFDESTRUCT: {
|
|
|
|
execute: opSuicide,
|
|
|
|
gasCost: gasSuicide,
|
|
|
|
validateStack: makeStackFunc(1, -1),
|
|
|
|
halts: true,
|
2017-01-05 02:52:10 -08:00
|
|
|
valid: true,
|
|
|
|
},
|
2016-01-19 14:50:00 -08:00
|
|
|
}
|
2015-08-30 01:19:10 -07:00
|
|
|
}
|