Paweł Bylica
10 years ago
108 changed files with 4976 additions and 1592 deletions
@ -0,0 +1,36 @@ |
|||
/*
|
|||
This file is part of cpp-ethereum. |
|||
|
|||
cpp-ethereum is free software: you can redistribute it and/or modify |
|||
it under the terms of the GNU General Public License as published by |
|||
the Free Software Foundation, either version 3 of the License, or |
|||
(at your option) any later version. |
|||
|
|||
cpp-ethereum 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 General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU General Public License |
|||
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
/** @file Exceptions.h
|
|||
* @author Christian <c@ethdev.com> |
|||
* @date 2014 |
|||
*/ |
|||
|
|||
#pragma once |
|||
|
|||
#include <libdevcore/Exceptions.h> |
|||
|
|||
namespace dev |
|||
{ |
|||
namespace eth |
|||
{ |
|||
|
|||
struct AssemblyException: virtual Exception {}; |
|||
struct InvalidDeposit: virtual AssemblyException {}; |
|||
struct InvalidOpcode: virtual AssemblyException {}; |
|||
|
|||
} |
|||
} |
@ -0,0 +1,337 @@ |
|||
/*
|
|||
This file is part of cpp-ethereum. |
|||
|
|||
cpp-ethereum is free software: you can redistribute it and/or modify |
|||
it under the terms of the GNU General Public License as published by |
|||
the Free Software Foundation, either version 3 of the License, or |
|||
(at your option) any later version. |
|||
|
|||
cpp-ethereum 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 General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU General Public License |
|||
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
/** @file Instruction.cpp
|
|||
* @author Gav Wood <i@gavwood.com> |
|||
* @date 2014 |
|||
*/ |
|||
|
|||
#include "Instruction.h" |
|||
|
|||
#include <libdevcore/Common.h> |
|||
#include <libdevcore/CommonIO.h> |
|||
#include <libdevcore/Log.h> |
|||
using namespace std; |
|||
using namespace dev; |
|||
using namespace dev::eth; |
|||
|
|||
const std::map<std::string, Instruction> dev::eth::c_instructions = |
|||
{ |
|||
{ "STOP", Instruction::STOP }, |
|||
{ "ADD", Instruction::ADD }, |
|||
{ "SUB", Instruction::SUB }, |
|||
{ "MUL", Instruction::MUL }, |
|||
{ "DIV", Instruction::DIV }, |
|||
{ "SDIV", Instruction::SDIV }, |
|||
{ "MOD", Instruction::MOD }, |
|||
{ "SMOD", Instruction::SMOD }, |
|||
{ "EXP", Instruction::EXP }, |
|||
{ "BNOT", Instruction::NOT }, |
|||
{ "LT", Instruction::LT }, |
|||
{ "GT", Instruction::GT }, |
|||
{ "SLT", Instruction::SLT }, |
|||
{ "SGT", Instruction::SGT }, |
|||
{ "EQ", Instruction::EQ }, |
|||
{ "NOT", Instruction::ISZERO }, |
|||
{ "AND", Instruction::AND }, |
|||
{ "OR", Instruction::OR }, |
|||
{ "XOR", Instruction::XOR }, |
|||
{ "BYTE", Instruction::BYTE }, |
|||
{ "ADDMOD", Instruction::ADDMOD }, |
|||
{ "MULMOD", Instruction::MULMOD }, |
|||
{ "SIGNEXTEND", Instruction::SIGNEXTEND }, |
|||
{ "SHA3", Instruction::SHA3 }, |
|||
{ "ADDRESS", Instruction::ADDRESS }, |
|||
{ "BALANCE", Instruction::BALANCE }, |
|||
{ "ORIGIN", Instruction::ORIGIN }, |
|||
{ "CALLER", Instruction::CALLER }, |
|||
{ "CALLVALUE", Instruction::CALLVALUE }, |
|||
{ "CALLDATALOAD", Instruction::CALLDATALOAD }, |
|||
{ "CALLDATASIZE", Instruction::CALLDATASIZE }, |
|||
{ "CALLDATACOPY", Instruction::CALLDATACOPY }, |
|||
{ "CODESIZE", Instruction::CODESIZE }, |
|||
{ "CODECOPY", Instruction::CODECOPY }, |
|||
{ "GASPRICE", Instruction::GASPRICE }, |
|||
{ "EXTCODESIZE", Instruction::EXTCODESIZE }, |
|||
{ "EXTCODECOPY", Instruction::EXTCODECOPY }, |
|||
{ "PREVHASH", Instruction::PREVHASH }, |
|||
{ "COINBASE", Instruction::COINBASE }, |
|||
{ "TIMESTAMP", Instruction::TIMESTAMP }, |
|||
{ "NUMBER", Instruction::NUMBER }, |
|||
{ "DIFFICULTY", Instruction::DIFFICULTY }, |
|||
{ "GASLIMIT", Instruction::GASLIMIT }, |
|||
{ "POP", Instruction::POP }, |
|||
{ "MLOAD", Instruction::MLOAD }, |
|||
{ "MSTORE", Instruction::MSTORE }, |
|||
{ "MSTORE8", Instruction::MSTORE8 }, |
|||
{ "SLOAD", Instruction::SLOAD }, |
|||
{ "SSTORE", Instruction::SSTORE }, |
|||
{ "JUMP", Instruction::JUMP }, |
|||
{ "JUMPI", Instruction::JUMPI }, |
|||
{ "PC", Instruction::PC }, |
|||
{ "MSIZE", Instruction::MSIZE }, |
|||
{ "GAS", Instruction::GAS }, |
|||
{ "JUMPDEST", Instruction::JUMPDEST }, |
|||
{ "PUSH1", Instruction::PUSH1 }, |
|||
{ "PUSH2", Instruction::PUSH2 }, |
|||
{ "PUSH3", Instruction::PUSH3 }, |
|||
{ "PUSH4", Instruction::PUSH4 }, |
|||
{ "PUSH5", Instruction::PUSH5 }, |
|||
{ "PUSH6", Instruction::PUSH6 }, |
|||
{ "PUSH7", Instruction::PUSH7 }, |
|||
{ "PUSH8", Instruction::PUSH8 }, |
|||
{ "PUSH9", Instruction::PUSH9 }, |
|||
{ "PUSH10", Instruction::PUSH10 }, |
|||
{ "PUSH11", Instruction::PUSH11 }, |
|||
{ "PUSH12", Instruction::PUSH12 }, |
|||
{ "PUSH13", Instruction::PUSH13 }, |
|||
{ "PUSH14", Instruction::PUSH14 }, |
|||
{ "PUSH15", Instruction::PUSH15 }, |
|||
{ "PUSH16", Instruction::PUSH16 }, |
|||
{ "PUSH17", Instruction::PUSH17 }, |
|||
{ "PUSH18", Instruction::PUSH18 }, |
|||
{ "PUSH19", Instruction::PUSH19 }, |
|||
{ "PUSH20", Instruction::PUSH20 }, |
|||
{ "PUSH21", Instruction::PUSH21 }, |
|||
{ "PUSH22", Instruction::PUSH22 }, |
|||
{ "PUSH23", Instruction::PUSH23 }, |
|||
{ "PUSH24", Instruction::PUSH24 }, |
|||
{ "PUSH25", Instruction::PUSH25 }, |
|||
{ "PUSH26", Instruction::PUSH26 }, |
|||
{ "PUSH27", Instruction::PUSH27 }, |
|||
{ "PUSH28", Instruction::PUSH28 }, |
|||
{ "PUSH29", Instruction::PUSH29 }, |
|||
{ "PUSH30", Instruction::PUSH30 }, |
|||
{ "PUSH31", Instruction::PUSH31 }, |
|||
{ "PUSH32", Instruction::PUSH32 }, |
|||
{ "DUP1", Instruction::DUP1 }, |
|||
{ "DUP2", Instruction::DUP2 }, |
|||
{ "DUP3", Instruction::DUP3 }, |
|||
{ "DUP4", Instruction::DUP4 }, |
|||
{ "DUP5", Instruction::DUP5 }, |
|||
{ "DUP6", Instruction::DUP6 }, |
|||
{ "DUP7", Instruction::DUP7 }, |
|||
{ "DUP8", Instruction::DUP8 }, |
|||
{ "DUP9", Instruction::DUP9 }, |
|||
{ "DUP10", Instruction::DUP10 }, |
|||
{ "DUP11", Instruction::DUP11 }, |
|||
{ "DUP12", Instruction::DUP12 }, |
|||
{ "DUP13", Instruction::DUP13 }, |
|||
{ "DUP14", Instruction::DUP14 }, |
|||
{ "DUP15", Instruction::DUP15 }, |
|||
{ "DUP16", Instruction::DUP16 }, |
|||
{ "SWAP1", Instruction::SWAP1 }, |
|||
{ "SWAP2", Instruction::SWAP2 }, |
|||
{ "SWAP3", Instruction::SWAP3 }, |
|||
{ "SWAP4", Instruction::SWAP4 }, |
|||
{ "SWAP5", Instruction::SWAP5 }, |
|||
{ "SWAP6", Instruction::SWAP6 }, |
|||
{ "SWAP7", Instruction::SWAP7 }, |
|||
{ "SWAP8", Instruction::SWAP8 }, |
|||
{ "SWAP9", Instruction::SWAP9 }, |
|||
{ "SWAP10", Instruction::SWAP10 }, |
|||
{ "SWAP11", Instruction::SWAP11 }, |
|||
{ "SWAP12", Instruction::SWAP12 }, |
|||
{ "SWAP13", Instruction::SWAP13 }, |
|||
{ "SWAP14", Instruction::SWAP14 }, |
|||
{ "SWAP15", Instruction::SWAP15 }, |
|||
{ "SWAP16", Instruction::SWAP16 }, |
|||
{ "LOG0", Instruction::LOG0 }, |
|||
{ "LOG1", Instruction::LOG1 }, |
|||
{ "LOG2", Instruction::LOG2 }, |
|||
{ "LOG3", Instruction::LOG3 }, |
|||
{ "LOG4", Instruction::LOG4 }, |
|||
{ "CREATE", Instruction::CREATE }, |
|||
{ "CALL", Instruction::CALL }, |
|||
{ "CALLCODE", Instruction::CALLCODE }, |
|||
{ "RETURN", Instruction::RETURN }, |
|||
{ "SUICIDE", Instruction::SUICIDE } |
|||
}; |
|||
|
|||
static const std::map<Instruction, InstructionInfo> c_instructionInfo = |
|||
{ // Add, Args, Ret, SideEffects
|
|||
{ Instruction::STOP, { "STOP", 0, 0, 0, true } }, |
|||
{ Instruction::ADD, { "ADD", 0, 2, 1, false } }, |
|||
{ Instruction::SUB, { "SUB", 0, 2, 1, false } }, |
|||
{ Instruction::MUL, { "MUL", 0, 2, 1, false } }, |
|||
{ Instruction::DIV, { "DIV", 0, 2, 1, false } }, |
|||
{ Instruction::SDIV, { "SDIV", 0, 2, 1, false } }, |
|||
{ Instruction::MOD, { "MOD", 0, 2, 1, false } }, |
|||
{ Instruction::SMOD, { "SMOD", 0, 2, 1, false } }, |
|||
{ Instruction::EXP, { "EXP", 0, 2, 1, false } }, |
|||
{ Instruction::NOT, { "NOT", 0, 1, 1, false } }, |
|||
{ Instruction::LT, { "LT", 0, 2, 1, false } }, |
|||
{ Instruction::GT, { "GT", 0, 2, 1, false } }, |
|||
{ Instruction::SLT, { "SLT", 0, 2, 1, false } }, |
|||
{ Instruction::SGT, { "SGT", 0, 2, 1, false } }, |
|||
{ Instruction::EQ, { "EQ", 0, 2, 1, false } }, |
|||
{ Instruction::ISZERO, { "ISZERO", 0, 1, 1, false } }, |
|||
{ Instruction::AND, { "AND", 0, 2, 1, false } }, |
|||
{ Instruction::OR, { "OR", 0, 2, 1, false } }, |
|||
{ Instruction::XOR, { "XOR", 0, 2, 1, false } }, |
|||
{ Instruction::BYTE, { "BYTE", 0, 2, 1, false } }, |
|||
{ Instruction::ADDMOD, { "ADDMOD", 0, 3, 1, false } }, |
|||
{ Instruction::MULMOD, { "MULMOD", 0, 3, 1, false } }, |
|||
{ Instruction::SIGNEXTEND, { "SIGNEXTEND", 0, 2, 1, false } }, |
|||
{ Instruction::SHA3, { "SHA3", 0, 2, 1, false } }, |
|||
{ Instruction::ADDRESS, { "ADDRESS", 0, 0, 1, false } }, |
|||
{ Instruction::BALANCE, { "BALANCE", 0, 1, 1, false } }, |
|||
{ Instruction::ORIGIN, { "ORIGIN", 0, 0, 1, false } }, |
|||
{ Instruction::CALLER, { "CALLER", 0, 0, 1, false } }, |
|||
{ Instruction::CALLVALUE, { "CALLVALUE", 0, 0, 1, false } }, |
|||
{ Instruction::CALLDATALOAD,{ "CALLDATALOAD", 0, 1, 1, false } }, |
|||
{ Instruction::CALLDATASIZE,{ "CALLDATASIZE", 0, 0, 1, false } }, |
|||
{ Instruction::CALLDATACOPY,{ "CALLDATACOPY", 0, 3, 0, true } }, |
|||
{ Instruction::CODESIZE, { "CODESIZE", 0, 0, 1, false } }, |
|||
{ Instruction::CODECOPY, { "CODECOPY", 0, 3, 0, true } }, |
|||
{ Instruction::GASPRICE, { "GASPRICE", 0, 0, 1, false } }, |
|||
{ Instruction::EXTCODESIZE, { "EXTCODESIZE", 0, 1, 1, false } }, |
|||
{ Instruction::EXTCODECOPY, { "EXTCODECOPY", 0, 4, 0, true } }, |
|||
{ Instruction::PREVHASH, { "PREVHASH", 0, 0, 1, false } }, |
|||
{ Instruction::COINBASE, { "COINBASE", 0, 0, 1, false } }, |
|||
{ Instruction::TIMESTAMP, { "TIMESTAMP", 0, 0, 1, false } }, |
|||
{ Instruction::NUMBER, { "NUMBER", 0, 0, 1, false } }, |
|||
{ Instruction::DIFFICULTY, { "DIFFICULTY", 0, 0, 1, false } }, |
|||
{ Instruction::GASLIMIT, { "GASLIMIT", 0, 0, 1, false } }, |
|||
{ Instruction::POP, { "POP", 0, 1, 0, false } }, |
|||
{ Instruction::MLOAD, { "MLOAD", 0, 1, 1, false } }, |
|||
{ Instruction::MSTORE, { "MSTORE", 0, 2, 0, true } }, |
|||
{ Instruction::MSTORE8, { "MSTORE8", 0, 2, 0, true } }, |
|||
{ Instruction::SLOAD, { "SLOAD", 0, 1, 1, false } }, |
|||
{ Instruction::SSTORE, { "SSTORE", 0, 2, 0, true } }, |
|||
{ Instruction::JUMP, { "JUMP", 0, 1, 0, true } }, |
|||
{ Instruction::JUMPI, { "JUMPI", 0, 2, 0, true } }, |
|||
{ Instruction::PC, { "PC", 0, 0, 1, false } }, |
|||
{ Instruction::MSIZE, { "MSIZE", 0, 0, 1, false } }, |
|||
{ Instruction::GAS, { "GAS", 0, 0, 1, false } }, |
|||
{ Instruction::JUMPDEST, { "JUMPDEST", 0, 1, 0, true } }, |
|||
{ Instruction::PUSH1, { "PUSH1", 1, 0, 1, false } }, |
|||
{ Instruction::PUSH2, { "PUSH2", 2, 0, 1, false } }, |
|||
{ Instruction::PUSH3, { "PUSH3", 3, 0, 1, false } }, |
|||
{ Instruction::PUSH4, { "PUSH4", 4, 0, 1, false } }, |
|||
{ Instruction::PUSH5, { "PUSH5", 5, 0, 1, false } }, |
|||
{ Instruction::PUSH6, { "PUSH6", 6, 0, 1, false } }, |
|||
{ Instruction::PUSH7, { "PUSH7", 7, 0, 1, false } }, |
|||
{ Instruction::PUSH8, { "PUSH8", 8, 0, 1, false } }, |
|||
{ Instruction::PUSH9, { "PUSH9", 9, 0, 1, false } }, |
|||
{ Instruction::PUSH10, { "PUSH10", 10, 0, 1, false } }, |
|||
{ Instruction::PUSH11, { "PUSH11", 11, 0, 1, false } }, |
|||
{ Instruction::PUSH12, { "PUSH12", 12, 0, 1, false } }, |
|||
{ Instruction::PUSH13, { "PUSH13", 13, 0, 1, false } }, |
|||
{ Instruction::PUSH14, { "PUSH14", 14, 0, 1, false } }, |
|||
{ Instruction::PUSH15, { "PUSH15", 15, 0, 1, false } }, |
|||
{ Instruction::PUSH16, { "PUSH16", 16, 0, 1, false } }, |
|||
{ Instruction::PUSH17, { "PUSH17", 17, 0, 1, false } }, |
|||
{ Instruction::PUSH18, { "PUSH18", 18, 0, 1, false } }, |
|||
{ Instruction::PUSH19, { "PUSH19", 19, 0, 1, false } }, |
|||
{ Instruction::PUSH20, { "PUSH20", 20, 0, 1, false } }, |
|||
{ Instruction::PUSH21, { "PUSH21", 21, 0, 1, false } }, |
|||
{ Instruction::PUSH22, { "PUSH22", 22, 0, 1, false } }, |
|||
{ Instruction::PUSH23, { "PUSH23", 23, 0, 1, false } }, |
|||
{ Instruction::PUSH24, { "PUSH24", 24, 0, 1, false } }, |
|||
{ Instruction::PUSH25, { "PUSH25", 25, 0, 1, false } }, |
|||
{ Instruction::PUSH26, { "PUSH26", 26, 0, 1, false } }, |
|||
{ Instruction::PUSH27, { "PUSH27", 27, 0, 1, false } }, |
|||
{ Instruction::PUSH28, { "PUSH28", 28, 0, 1, false } }, |
|||
{ Instruction::PUSH29, { "PUSH29", 29, 0, 1, false } }, |
|||
{ Instruction::PUSH30, { "PUSH30", 30, 0, 1, false } }, |
|||
{ Instruction::PUSH31, { "PUSH31", 31, 0, 1, false } }, |
|||
{ Instruction::PUSH32, { "PUSH32", 32, 0, 1, false } }, |
|||
{ Instruction::DUP1, { "DUP1", 0, 1, 2, false } }, |
|||
{ Instruction::DUP2, { "DUP2", 0, 2, 3, false } }, |
|||
{ Instruction::DUP3, { "DUP3", 0, 3, 4, false } }, |
|||
{ Instruction::DUP4, { "DUP4", 0, 4, 5, false } }, |
|||
{ Instruction::DUP5, { "DUP5", 0, 5, 6, false } }, |
|||
{ Instruction::DUP6, { "DUP6", 0, 6, 7, false } }, |
|||
{ Instruction::DUP7, { "DUP7", 0, 7, 8, false } }, |
|||
{ Instruction::DUP8, { "DUP8", 0, 8, 9, false } }, |
|||
{ Instruction::DUP9, { "DUP9", 0, 9, 10, false } }, |
|||
{ Instruction::DUP10, { "DUP10", 0, 10, 11, false } }, |
|||
{ Instruction::DUP11, { "DUP11", 0, 11, 12, false } }, |
|||
{ Instruction::DUP12, { "DUP12", 0, 12, 13, false } }, |
|||
{ Instruction::DUP13, { "DUP13", 0, 13, 14, false } }, |
|||
{ Instruction::DUP14, { "DUP14", 0, 14, 15, false } }, |
|||
{ Instruction::DUP15, { "DUP15", 0, 15, 16, false } }, |
|||
{ Instruction::DUP16, { "DUP16", 0, 16, 17, false } }, |
|||
{ Instruction::SWAP1, { "SWAP1", 0, 2, 2, false } }, |
|||
{ Instruction::SWAP2, { "SWAP2", 0, 3, 3, false } }, |
|||
{ Instruction::SWAP3, { "SWAP3", 0, 4, 4, false } }, |
|||
{ Instruction::SWAP4, { "SWAP4", 0, 5, 5, false } }, |
|||
{ Instruction::SWAP5, { "SWAP5", 0, 6, 6, false } }, |
|||
{ Instruction::SWAP6, { "SWAP6", 0, 7, 7, false } }, |
|||
{ Instruction::SWAP7, { "SWAP7", 0, 8, 8, false } }, |
|||
{ Instruction::SWAP8, { "SWAP8", 0, 9, 9, false } }, |
|||
{ Instruction::SWAP9, { "SWAP9", 0, 10, 10, false } }, |
|||
{ Instruction::SWAP10, { "SWAP10", 0, 11, 11, false } }, |
|||
{ Instruction::SWAP11, { "SWAP11", 0, 12, 12, false } }, |
|||
{ Instruction::SWAP12, { "SWAP12", 0, 13, 13, false } }, |
|||
{ Instruction::SWAP13, { "SWAP13", 0, 14, 14, false } }, |
|||
{ Instruction::SWAP14, { "SWAP14", 0, 15, 15, false } }, |
|||
{ Instruction::SWAP15, { "SWAP15", 0, 16, 16, false } }, |
|||
{ Instruction::SWAP16, { "SWAP16", 0, 17, 17, false } }, |
|||
{ Instruction::LOG0, { "LOG0", 0, 2, 0, true } }, |
|||
{ Instruction::LOG1, { "LOG1", 0, 3, 0, true } }, |
|||
{ Instruction::LOG2, { "LOG2", 0, 4, 0, true } }, |
|||
{ Instruction::LOG3, { "LOG3", 0, 5, 0, true } }, |
|||
{ Instruction::LOG4, { "LOG4", 0, 6, 0, true } }, |
|||
{ Instruction::CREATE, { "CREATE", 0, 3, 1, true } }, |
|||
{ Instruction::CALL, { "CALL", 0, 7, 1, true } }, |
|||
{ Instruction::CALLCODE, { "CALLCODE", 0, 7, 1, true } }, |
|||
{ Instruction::RETURN, { "RETURN", 0, 2, 0, true } }, |
|||
{ Instruction::SUICIDE, { "SUICIDE", 0, 1, 0, true } } |
|||
}; |
|||
|
|||
string dev::eth::disassemble(bytes const& _mem) |
|||
{ |
|||
stringstream ret; |
|||
unsigned numerics = 0; |
|||
for (auto it = _mem.begin(); it != _mem.end(); ++it) |
|||
{ |
|||
byte n = *it; |
|||
auto iit = c_instructionInfo.find((Instruction)n); |
|||
if (numerics || iit == c_instructionInfo.end() || (byte)iit->first != n) // not an instruction or expecting an argument...
|
|||
{ |
|||
if (numerics) |
|||
numerics--; |
|||
ret << "0x" << hex << (int)n << " "; |
|||
} |
|||
else |
|||
{ |
|||
auto const& ii = iit->second; |
|||
ret << ii.name << " "; |
|||
numerics = ii.additional; |
|||
} |
|||
} |
|||
return ret.str(); |
|||
} |
|||
|
|||
InstructionInfo dev::eth::instructionInfo(Instruction _inst) |
|||
{ |
|||
try |
|||
{ |
|||
return c_instructionInfo.at(_inst); |
|||
} |
|||
catch (...) |
|||
{ |
|||
cwarn << "<INVALID_INSTRUCTION: " << toString((unsigned)_inst) << ">\n" << boost::current_exception_diagnostic_information(); |
|||
return InstructionInfo({"<INVALID_INSTRUCTION: " + toString((unsigned)_inst) + ">", 0, 0, 0, false}); |
|||
} |
|||
} |
|||
|
|||
bool dev::eth::isValidInstruction(Instruction _inst) |
|||
{ |
|||
return !!c_instructionInfo.count(_inst); |
|||
} |
@ -1,337 +0,0 @@ |
|||
/*
|
|||
This file is part of cpp-ethereum. |
|||
|
|||
cpp-ethereum is free software: you can redistribute it and/or modify |
|||
it under the terms of the GNU General Public License as published by |
|||
the Free Software Foundation, either version 3 of the License, or |
|||
(at your option) any later version. |
|||
|
|||
cpp-ethereum 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 General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU General Public License |
|||
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
/** @file Instruction.cpp
|
|||
* @author Gav Wood <i@gavwood.com> |
|||
* @date 2014 |
|||
*/ |
|||
|
|||
#include "Instruction.h" |
|||
|
|||
#include <libdevcore/Common.h> |
|||
#include <libdevcore/CommonIO.h> |
|||
#include <libdevcore/Log.h> |
|||
using namespace std; |
|||
using namespace dev; |
|||
using namespace dev::eth; |
|||
|
|||
const std::map<std::string, Instruction> dev::eth::c_instructions = |
|||
{ |
|||
{ "STOP", Instruction::STOP }, |
|||
{ "ADD", Instruction::ADD }, |
|||
{ "SUB", Instruction::SUB }, |
|||
{ "MUL", Instruction::MUL }, |
|||
{ "DIV", Instruction::DIV }, |
|||
{ "SDIV", Instruction::SDIV }, |
|||
{ "MOD", Instruction::MOD }, |
|||
{ "SMOD", Instruction::SMOD }, |
|||
{ "EXP", Instruction::EXP }, |
|||
{ "BNOT", Instruction::NOT }, |
|||
{ "LT", Instruction::LT }, |
|||
{ "GT", Instruction::GT }, |
|||
{ "SLT", Instruction::SLT }, |
|||
{ "SGT", Instruction::SGT }, |
|||
{ "EQ", Instruction::EQ }, |
|||
{ "NOT", Instruction::ISZERO }, |
|||
{ "AND", Instruction::AND }, |
|||
{ "OR", Instruction::OR }, |
|||
{ "XOR", Instruction::XOR }, |
|||
{ "BYTE", Instruction::BYTE }, |
|||
{ "ADDMOD", Instruction::ADDMOD }, |
|||
{ "MULMOD", Instruction::MULMOD }, |
|||
{ "SIGNEXTEND", Instruction::SIGNEXTEND }, |
|||
{ "SHA3", Instruction::SHA3 }, |
|||
{ "ADDRESS", Instruction::ADDRESS }, |
|||
{ "BALANCE", Instruction::BALANCE }, |
|||
{ "ORIGIN", Instruction::ORIGIN }, |
|||
{ "CALLER", Instruction::CALLER }, |
|||
{ "CALLVALUE", Instruction::CALLVALUE }, |
|||
{ "CALLDATALOAD", Instruction::CALLDATALOAD }, |
|||
{ "CALLDATASIZE", Instruction::CALLDATASIZE }, |
|||
{ "CALLDATACOPY", Instruction::CALLDATACOPY }, |
|||
{ "CODESIZE", Instruction::CODESIZE }, |
|||
{ "CODECOPY", Instruction::CODECOPY }, |
|||
{ "GASPRICE", Instruction::GASPRICE }, |
|||
{ "EXTCODESIZE", Instruction::EXTCODESIZE }, |
|||
{ "EXTCODECOPY", Instruction::EXTCODECOPY }, |
|||
{ "PREVHASH", Instruction::PREVHASH }, |
|||
{ "COINBASE", Instruction::COINBASE }, |
|||
{ "TIMESTAMP", Instruction::TIMESTAMP }, |
|||
{ "NUMBER", Instruction::NUMBER }, |
|||
{ "DIFFICULTY", Instruction::DIFFICULTY }, |
|||
{ "GASLIMIT", Instruction::GASLIMIT }, |
|||
{ "POP", Instruction::POP }, |
|||
{ "MLOAD", Instruction::MLOAD }, |
|||
{ "MSTORE", Instruction::MSTORE }, |
|||
{ "MSTORE8", Instruction::MSTORE8 }, |
|||
{ "SLOAD", Instruction::SLOAD }, |
|||
{ "SSTORE", Instruction::SSTORE }, |
|||
{ "JUMP", Instruction::JUMP }, |
|||
{ "JUMPI", Instruction::JUMPI }, |
|||
{ "PC", Instruction::PC }, |
|||
{ "MSIZE", Instruction::MSIZE }, |
|||
{ "GAS", Instruction::GAS }, |
|||
{ "JUMPDEST", Instruction::JUMPDEST }, |
|||
{ "PUSH1", Instruction::PUSH1 }, |
|||
{ "PUSH2", Instruction::PUSH2 }, |
|||
{ "PUSH3", Instruction::PUSH3 }, |
|||
{ "PUSH4", Instruction::PUSH4 }, |
|||
{ "PUSH5", Instruction::PUSH5 }, |
|||
{ "PUSH6", Instruction::PUSH6 }, |
|||
{ "PUSH7", Instruction::PUSH7 }, |
|||
{ "PUSH8", Instruction::PUSH8 }, |
|||
{ "PUSH9", Instruction::PUSH9 }, |
|||
{ "PUSH10", Instruction::PUSH10 }, |
|||
{ "PUSH11", Instruction::PUSH11 }, |
|||
{ "PUSH12", Instruction::PUSH12 }, |
|||
{ "PUSH13", Instruction::PUSH13 }, |
|||
{ "PUSH14", Instruction::PUSH14 }, |
|||
{ "PUSH15", Instruction::PUSH15 }, |
|||
{ "PUSH16", Instruction::PUSH16 }, |
|||
{ "PUSH17", Instruction::PUSH17 }, |
|||
{ "PUSH18", Instruction::PUSH18 }, |
|||
{ "PUSH19", Instruction::PUSH19 }, |
|||
{ "PUSH20", Instruction::PUSH20 }, |
|||
{ "PUSH21", Instruction::PUSH21 }, |
|||
{ "PUSH22", Instruction::PUSH22 }, |
|||
{ "PUSH23", Instruction::PUSH23 }, |
|||
{ "PUSH24", Instruction::PUSH24 }, |
|||
{ "PUSH25", Instruction::PUSH25 }, |
|||
{ "PUSH26", Instruction::PUSH26 }, |
|||
{ "PUSH27", Instruction::PUSH27 }, |
|||
{ "PUSH28", Instruction::PUSH28 }, |
|||
{ "PUSH29", Instruction::PUSH29 }, |
|||
{ "PUSH30", Instruction::PUSH30 }, |
|||
{ "PUSH31", Instruction::PUSH31 }, |
|||
{ "PUSH32", Instruction::PUSH32 }, |
|||
{ "DUP1", Instruction::DUP1 }, |
|||
{ "DUP2", Instruction::DUP2 }, |
|||
{ "DUP3", Instruction::DUP3 }, |
|||
{ "DUP4", Instruction::DUP4 }, |
|||
{ "DUP5", Instruction::DUP5 }, |
|||
{ "DUP6", Instruction::DUP6 }, |
|||
{ "DUP7", Instruction::DUP7 }, |
|||
{ "DUP8", Instruction::DUP8 }, |
|||
{ "DUP9", Instruction::DUP9 }, |
|||
{ "DUP10", Instruction::DUP10 }, |
|||
{ "DUP11", Instruction::DUP11 }, |
|||
{ "DUP12", Instruction::DUP12 }, |
|||
{ "DUP13", Instruction::DUP13 }, |
|||
{ "DUP14", Instruction::DUP14 }, |
|||
{ "DUP15", Instruction::DUP15 }, |
|||
{ "DUP16", Instruction::DUP16 }, |
|||
{ "SWAP1", Instruction::SWAP1 }, |
|||
{ "SWAP2", Instruction::SWAP2 }, |
|||
{ "SWAP3", Instruction::SWAP3 }, |
|||
{ "SWAP4", Instruction::SWAP4 }, |
|||
{ "SWAP5", Instruction::SWAP5 }, |
|||
{ "SWAP6", Instruction::SWAP6 }, |
|||
{ "SWAP7", Instruction::SWAP7 }, |
|||
{ "SWAP8", Instruction::SWAP8 }, |
|||
{ "SWAP9", Instruction::SWAP9 }, |
|||
{ "SWAP10", Instruction::SWAP10 }, |
|||
{ "SWAP11", Instruction::SWAP11 }, |
|||
{ "SWAP12", Instruction::SWAP12 }, |
|||
{ "SWAP13", Instruction::SWAP13 }, |
|||
{ "SWAP14", Instruction::SWAP14 }, |
|||
{ "SWAP15", Instruction::SWAP15 }, |
|||
{ "SWAP16", Instruction::SWAP16 }, |
|||
{ "LOG0", Instruction::LOG0 }, |
|||
{ "LOG1", Instruction::LOG1 }, |
|||
{ "LOG2", Instruction::LOG2 }, |
|||
{ "LOG3", Instruction::LOG3 }, |
|||
{ "LOG4", Instruction::LOG4 }, |
|||
{ "CREATE", Instruction::CREATE }, |
|||
{ "CALL", Instruction::CALL }, |
|||
{ "CALLCODE", Instruction::CALLCODE }, |
|||
{ "RETURN", Instruction::RETURN }, |
|||
{ "SUICIDE", Instruction::SUICIDE } |
|||
}; |
|||
|
|||
static const std::map<Instruction, InstructionInfo> c_instructionInfo = |
|||
{ // Add, Args, Ret
|
|||
{ Instruction::STOP, { "STOP", 0, 0, 0 } }, |
|||
{ Instruction::ADD, { "ADD", 0, 2, 1 } }, |
|||
{ Instruction::SUB, { "SUB", 0, 2, 1 } }, |
|||
{ Instruction::MUL, { "MUL", 0, 2, 1 } }, |
|||
{ Instruction::DIV, { "DIV", 0, 2, 1 } }, |
|||
{ Instruction::SDIV, { "SDIV", 0, 2, 1 } }, |
|||
{ Instruction::MOD, { "MOD", 0, 2, 1 } }, |
|||
{ Instruction::SMOD, { "SMOD", 0, 2, 1 } }, |
|||
{ Instruction::EXP, { "EXP", 0, 2, 1 } }, |
|||
{ Instruction::NOT, { "BNOT", 0, 1, 1 } }, |
|||
{ Instruction::LT, { "LT", 0, 2, 1 } }, |
|||
{ Instruction::GT, { "GT", 0, 2, 1 } }, |
|||
{ Instruction::SLT, { "SLT", 0, 2, 1 } }, |
|||
{ Instruction::SGT, { "SGT", 0, 2, 1 } }, |
|||
{ Instruction::EQ, { "EQ", 0, 2, 1 } }, |
|||
{ Instruction::ISZERO, { "NOT", 0, 1, 1 } }, |
|||
{ Instruction::AND, { "AND", 0, 2, 1 } }, |
|||
{ Instruction::OR, { "OR", 0, 2, 1 } }, |
|||
{ Instruction::XOR, { "XOR", 0, 2, 1 } }, |
|||
{ Instruction::BYTE, { "BYTE", 0, 2, 1 } }, |
|||
{ Instruction::ADDMOD, { "ADDMOD", 0, 3, 1 } }, |
|||
{ Instruction::MULMOD, { "MULMOD", 0, 3, 1 } }, |
|||
{ Instruction::SIGNEXTEND, { "SIGNEXTEND", 0, 2, 1 } }, |
|||
{ Instruction::SHA3, { "SHA3", 0, 2, 1 } }, |
|||
{ Instruction::ADDRESS, { "ADDRESS", 0, 0, 1 } }, |
|||
{ Instruction::BALANCE, { "BALANCE", 0, 1, 1 } }, |
|||
{ Instruction::ORIGIN, { "ORIGIN", 0, 0, 1 } }, |
|||
{ Instruction::CALLER, { "CALLER", 0, 0, 1 } }, |
|||
{ Instruction::CALLVALUE, { "CALLVALUE", 0, 0, 1 } }, |
|||
{ Instruction::CALLDATALOAD,{ "CALLDATALOAD", 0, 1, 1 } }, |
|||
{ Instruction::CALLDATASIZE,{ "CALLDATASIZE", 0, 0, 1 } }, |
|||
{ Instruction::CALLDATACOPY,{ "CALLDATACOPY", 0, 3, 0 } }, |
|||
{ Instruction::CODESIZE, { "CODESIZE", 0, 0, 1 } }, |
|||
{ Instruction::CODECOPY, { "CODECOPY", 0, 3, 0 } }, |
|||
{ Instruction::GASPRICE, { "GASPRICE", 0, 0, 1 } }, |
|||
{ Instruction::EXTCODESIZE, { "EXTCODESIZE", 0, 1, 1 } }, |
|||
{ Instruction::EXTCODECOPY, { "EXTCODECOPY", 0, 4, 0 } }, |
|||
{ Instruction::PREVHASH, { "PREVHASH", 0, 0, 1 } }, |
|||
{ Instruction::COINBASE, { "COINBASE", 0, 0, 1 } }, |
|||
{ Instruction::TIMESTAMP, { "TIMESTAMP", 0, 0, 1 } }, |
|||
{ Instruction::NUMBER, { "NUMBER", 0, 0, 1 } }, |
|||
{ Instruction::DIFFICULTY, { "DIFFICULTY", 0, 0, 1 } }, |
|||
{ Instruction::GASLIMIT, { "GASLIMIT", 0, 0, 1 } }, |
|||
{ Instruction::POP, { "POP", 0, 1, 0 } }, |
|||
{ Instruction::MLOAD, { "MLOAD", 0, 1, 1 } }, |
|||
{ Instruction::MSTORE, { "MSTORE", 0, 2, 0 } }, |
|||
{ Instruction::MSTORE8, { "MSTORE8", 0, 2, 0 } }, |
|||
{ Instruction::SLOAD, { "SLOAD", 0, 1, 1 } }, |
|||
{ Instruction::SSTORE, { "SSTORE", 0, 2, 0 } }, |
|||
{ Instruction::JUMP, { "JUMP", 0, 1, 0 } }, |
|||
{ Instruction::JUMPI, { "JUMPI", 0, 2, 0 } }, |
|||
{ Instruction::PC, { "PC", 0, 0, 1 } }, |
|||
{ Instruction::MSIZE, { "MSIZE", 0, 0, 1 } }, |
|||
{ Instruction::GAS, { "GAS", 0, 0, 1 } }, |
|||
{ Instruction::JUMPDEST, { "JUMPDEST", 0, 1, 0 } }, |
|||
{ Instruction::PUSH1, { "PUSH1", 1, 0, 1 } }, |
|||
{ Instruction::PUSH2, { "PUSH2", 2, 0, 1 } }, |
|||
{ Instruction::PUSH3, { "PUSH3", 3, 0, 1 } }, |
|||
{ Instruction::PUSH4, { "PUSH4", 4, 0, 1 } }, |
|||
{ Instruction::PUSH5, { "PUSH5", 5, 0, 1 } }, |
|||
{ Instruction::PUSH6, { "PUSH6", 6, 0, 1 } }, |
|||
{ Instruction::PUSH7, { "PUSH7", 7, 0, 1 } }, |
|||
{ Instruction::PUSH8, { "PUSH8", 8, 0, 1 } }, |
|||
{ Instruction::PUSH9, { "PUSH9", 9, 0, 1 } }, |
|||
{ Instruction::PUSH10, { "PUSH10", 10, 0, 1 } }, |
|||
{ Instruction::PUSH11, { "PUSH11", 11, 0, 1 } }, |
|||
{ Instruction::PUSH12, { "PUSH12", 12, 0, 1 } }, |
|||
{ Instruction::PUSH13, { "PUSH13", 13, 0, 1 } }, |
|||
{ Instruction::PUSH14, { "PUSH14", 14, 0, 1 } }, |
|||
{ Instruction::PUSH15, { "PUSH15", 15, 0, 1 } }, |
|||
{ Instruction::PUSH16, { "PUSH16", 16, 0, 1 } }, |
|||
{ Instruction::PUSH17, { "PUSH17", 17, 0, 1 } }, |
|||
{ Instruction::PUSH18, { "PUSH18", 18, 0, 1 } }, |
|||
{ Instruction::PUSH19, { "PUSH19", 19, 0, 1 } }, |
|||
{ Instruction::PUSH20, { "PUSH20", 20, 0, 1 } }, |
|||
{ Instruction::PUSH21, { "PUSH21", 21, 0, 1 } }, |
|||
{ Instruction::PUSH22, { "PUSH22", 22, 0, 1 } }, |
|||
{ Instruction::PUSH23, { "PUSH23", 23, 0, 1 } }, |
|||
{ Instruction::PUSH24, { "PUSH24", 24, 0, 1 } }, |
|||
{ Instruction::PUSH25, { "PUSH25", 25, 0, 1 } }, |
|||
{ Instruction::PUSH26, { "PUSH26", 26, 0, 1 } }, |
|||
{ Instruction::PUSH27, { "PUSH27", 27, 0, 1 } }, |
|||
{ Instruction::PUSH28, { "PUSH28", 28, 0, 1 } }, |
|||
{ Instruction::PUSH29, { "PUSH29", 29, 0, 1 } }, |
|||
{ Instruction::PUSH30, { "PUSH30", 30, 0, 1 } }, |
|||
{ Instruction::PUSH31, { "PUSH31", 31, 0, 1 } }, |
|||
{ Instruction::PUSH32, { "PUSH32", 32, 0, 1 } }, |
|||
{ Instruction::DUP1, { "DUP1", 0, 1, 2 } }, |
|||
{ Instruction::DUP2, { "DUP2", 0, 2, 3 } }, |
|||
{ Instruction::DUP3, { "DUP3", 0, 3, 4 } }, |
|||
{ Instruction::DUP4, { "DUP4", 0, 4, 5 } }, |
|||
{ Instruction::DUP5, { "DUP5", 0, 5, 6 } }, |
|||
{ Instruction::DUP6, { "DUP6", 0, 6, 7 } }, |
|||
{ Instruction::DUP7, { "DUP7", 0, 7, 8 } }, |
|||
{ Instruction::DUP8, { "DUP8", 0, 8, 9 } }, |
|||
{ Instruction::DUP9, { "DUP9", 0, 9, 10 } }, |
|||
{ Instruction::DUP10, { "DUP10", 0, 10, 11 } }, |
|||
{ Instruction::DUP11, { "DUP11", 0, 11, 12 } }, |
|||
{ Instruction::DUP12, { "DUP12", 0, 12, 13 } }, |
|||
{ Instruction::DUP13, { "DUP13", 0, 13, 14 } }, |
|||
{ Instruction::DUP14, { "DUP14", 0, 14, 15 } }, |
|||
{ Instruction::DUP15, { "DUP15", 0, 15, 16 } }, |
|||
{ Instruction::DUP16, { "DUP16", 0, 16, 17 } }, |
|||
{ Instruction::SWAP1, { "SWAP1", 0, 2, 2 } }, |
|||
{ Instruction::SWAP2, { "SWAP2", 0, 3, 3 } }, |
|||
{ Instruction::SWAP3, { "SWAP3", 0, 4, 4 } }, |
|||
{ Instruction::SWAP4, { "SWAP4", 0, 5, 5 } }, |
|||
{ Instruction::SWAP5, { "SWAP5", 0, 6, 6 } }, |
|||
{ Instruction::SWAP6, { "SWAP6", 0, 7, 7 } }, |
|||
{ Instruction::SWAP7, { "SWAP7", 0, 8, 8 } }, |
|||
{ Instruction::SWAP8, { "SWAP8", 0, 9, 9 } }, |
|||
{ Instruction::SWAP9, { "SWAP9", 0, 10, 10 } }, |
|||
{ Instruction::SWAP10, { "SWAP10", 0, 11, 11 } }, |
|||
{ Instruction::SWAP11, { "SWAP11", 0, 12, 12 } }, |
|||
{ Instruction::SWAP12, { "SWAP12", 0, 13, 13 } }, |
|||
{ Instruction::SWAP13, { "SWAP13", 0, 14, 14 } }, |
|||
{ Instruction::SWAP14, { "SWAP14", 0, 15, 15 } }, |
|||
{ Instruction::SWAP15, { "SWAP15", 0, 16, 16 } }, |
|||
{ Instruction::SWAP16, { "SWAP16", 0, 17, 17 } }, |
|||
{ Instruction::LOG0, { "LOG0", 0, 1, 0 } }, |
|||
{ Instruction::LOG1, { "LOG1", 0, 2, 0 } }, |
|||
{ Instruction::LOG2, { "LOG2", 0, 3, 0 } }, |
|||
{ Instruction::LOG3, { "LOG3", 0, 4, 0 } }, |
|||
{ Instruction::LOG4, { "LOG4", 0, 5, 0 } }, |
|||
{ Instruction::CREATE, { "CREATE", 0, 3, 1 } }, |
|||
{ Instruction::CALL, { "CALL", 0, 7, 1 } }, |
|||
{ Instruction::CALLCODE, { "CALLCODE", 0, 7, 1 } }, |
|||
{ Instruction::RETURN, { "RETURN", 0, 2, 0 } }, |
|||
{ Instruction::SUICIDE, { "SUICIDE", 0, 1, 0} } |
|||
}; |
|||
|
|||
string dev::eth::disassemble(bytes const& _mem) |
|||
{ |
|||
stringstream ret; |
|||
unsigned numerics = 0; |
|||
for (auto it = _mem.begin(); it != _mem.end(); ++it) |
|||
{ |
|||
byte n = *it; |
|||
auto iit = c_instructionInfo.find((Instruction)n); |
|||
if (numerics || iit == c_instructionInfo.end() || (byte)iit->first != n) // not an instruction or expecting an argument...
|
|||
{ |
|||
if (numerics) |
|||
numerics--; |
|||
ret << "0x" << hex << (int)n << " "; |
|||
} |
|||
else |
|||
{ |
|||
auto const& ii = iit->second; |
|||
ret << ii.name << " "; |
|||
numerics = ii.additional; |
|||
} |
|||
} |
|||
return ret.str(); |
|||
} |
|||
|
|||
InstructionInfo dev::eth::instructionInfo(Instruction _inst) |
|||
{ |
|||
try |
|||
{ |
|||
return c_instructionInfo.at(_inst); |
|||
} |
|||
catch (...) |
|||
{ |
|||
cwarn << "<INVALID_INSTRUCTION: " << toString((unsigned)_inst) << ">\n" << boost::current_exception_diagnostic_information(); |
|||
return InstructionInfo({"<INVALID_INSTRUCTION: " + toString((unsigned)_inst) + ">", 0, 0, 0}); |
|||
} |
|||
} |
|||
|
|||
bool dev::eth::isValidInstruction(Instruction _inst) |
|||
{ |
|||
return !!c_instructionInfo.count(_inst); |
|||
} |
@ -1,54 +1,55 @@ |
|||
[ |
|||
{ "method": "coinbase", "params": [], "order": [], "returns" : "" }, |
|||
{ "method": "setCoinbase", "params": [""], "order": [], "returns" : true }, |
|||
{ "method": "listening", "params": [], "order": [], "returns" : false }, |
|||
{ "method": "setListening", "params": [false], "order" : [], "returns" : true }, |
|||
{ "method": "mining", "params": [], "order": [], "returns" : false }, |
|||
{ "method": "setMining", "params": [false], "order" : [], "returns" : true }, |
|||
{ "method": "gasPrice", "params": [], "order": [], "returns" : "" }, |
|||
{ "method": "accounts", "params": [], "order": [], "returns" : [] }, |
|||
{ "method": "peerCount", "params": [], "order": [], "returns" : 0 }, |
|||
{ "method": "defaultBlock", "params": [], "order": [], "returns" : 0}, |
|||
{ "method": "setDefaultBlock", "params": [0], "order": [], "returns" : true}, |
|||
{ "method": "number", "params": [], "order": [], "returns" : 0}, |
|||
|
|||
{ "method": "balanceAt", "params": [""], "order": [], "returns" : ""}, |
|||
{ "method": "stateAt", "params": ["", ""], "order": [], "returns": ""}, |
|||
{ "method": "countAt", "params": [""], "order": [], "returns" : 0.0}, |
|||
{ "method": "codeAt", "params": [""], "order": [], "returns": ""}, |
|||
|
|||
{ "method": "transact", "params": [{}], "order": [], "returns": ""}, |
|||
{ "method": "call", "params": [{}], "order": [], "returns": ""}, |
|||
|
|||
{ "method": "blockByHash", "params": [""],"order": [], "returns": {}}, |
|||
{ "method": "blockByNumber", "params": [0],"order": [], "returns": {}}, |
|||
{ "method": "transactionByHash", "params": ["", 0], "order": [], "returns": {}}, |
|||
{ "method": "transactionByNumber", "params": [0, 0], "order": [], "returns": {}}, |
|||
{ "method": "uncleByHash", "params": ["", 0], "order": [], "returns": {}}, |
|||
{ "method": "uncleByNumber", "params": [0, 0], "order": [], "returns": {}}, |
|||
|
|||
{ "method": "compile", "params": [""], "order": [], "returns": ""}, |
|||
|
|||
{ "method": "newFilter", "params": [{}], "order": [], "returns": 0}, |
|||
{ "method": "newFilterString", "params": [""], "order": [], "returns": 0}, |
|||
{ "method": "uninstallFilter", "params": [0], "order": [], "returns": true}, |
|||
{ "method": "changed", "params": [0], "order": [], "returns": false}, |
|||
{ "method": "getMessages", "params": [0], "order": [], "returns": []}, |
|||
|
|||
{ "method": "put", "params": ["", "", ""], "order": [], "returns": true}, |
|||
{ "method": "get", "params": ["", ""], "order": [], "returns": ""}, |
|||
{ "method": "putString", "params": ["", "", ""], "order": [], "returns": true}, |
|||
{ "method": "getString", "params": ["", ""], "order": [], "returns": ""}, |
|||
|
|||
{ "method": "post", "params": [{}], "order": [], "returns": true}, |
|||
{ "method": "newIdentity", "params": [], "order": [], "returns": ""}, |
|||
{ "method": "haveIdentity", "params": [""], "order": [], "returns": false}, |
|||
{ "method": "newGroup", "params": ["", ""], "order": [], "returns": ""}, |
|||
{ "method": "addToGroup", "params": ["", ""], "order": [], "returns": ""}, |
|||
{ "method": "eth_coinbase", "params": [], "order": [], "returns" : "" }, |
|||
{ "method": "eth_setCoinbase", "params": [""], "order": [], "returns" : true }, |
|||
{ "method": "eth_listening", "params": [], "order": [], "returns" : false }, |
|||
{ "method": "eth_setListening", "params": [false], "order" : [], "returns" : true }, |
|||
{ "method": "eth_mining", "params": [], "order": [], "returns" : false }, |
|||
{ "method": "eth_setMining", "params": [false], "order" : [], "returns" : true }, |
|||
{ "method": "eth_gasPrice", "params": [], "order": [], "returns" : "" }, |
|||
{ "method": "eth_accounts", "params": [], "order": [], "returns" : [] }, |
|||
{ "method": "eth_peerCount", "params": [], "order": [], "returns" : 0 }, |
|||
{ "method": "eth_defaultBlock", "params": [], "order": [], "returns" : 0}, |
|||
{ "method": "eth_setDefaultBlock", "params": [0], "order": [], "returns" : true}, |
|||
{ "method": "eth_number", "params": [], "order": [], "returns" : 0}, |
|||
|
|||
{ "method": "eth_balanceAt", "params": [""], "order": [], "returns" : ""}, |
|||
{ "method": "eth_stateAt", "params": ["", ""], "order": [], "returns": ""}, |
|||
{ "method": "eth_countAt", "params": [""], "order": [], "returns" : 0.0}, |
|||
{ "method": "eth_codeAt", "params": [""], "order": [], "returns": ""}, |
|||
|
|||
{ "method": "eth_transact", "params": [{}], "order": [], "returns": ""}, |
|||
{ "method": "eth_call", "params": [{}], "order": [], "returns": ""}, |
|||
|
|||
{ "method": "eth_blockByHash", "params": [""],"order": [], "returns": {}}, |
|||
{ "method": "eth_blockByNumber", "params": [0],"order": [], "returns": {}}, |
|||
{ "method": "eth_transactionByHash", "params": ["", 0], "order": [], "returns": {}}, |
|||
{ "method": "eth_transactionByNumber", "params": [0, 0], "order": [], "returns": {}}, |
|||
{ "method": "eth_uncleByHash", "params": ["", 0], "order": [], "returns": {}}, |
|||
{ "method": "eth_uncleByNumber", "params": [0, 0], "order": [], "returns": {}}, |
|||
|
|||
{ "method": "eth_lll", "params": [""], "order": [], "returns": ""}, |
|||
{ "method": "eth_compile", "params": [""], "order": [], "returns": ""}, |
|||
|
|||
{ "method": "eth_newFilter", "params": [{}], "order": [], "returns": 0}, |
|||
{ "method": "eth_newFilterString", "params": [""], "order": [], "returns": 0}, |
|||
{ "method": "eth_uninstallFilter", "params": [0], "order": [], "returns": true}, |
|||
{ "method": "eth_changed", "params": [0], "order": [], "returns": false}, |
|||
{ "method": "eth_getMessages", "params": [0], "order": [], "returns": []}, |
|||
|
|||
{ "method": "db_put", "params": ["", "", ""], "order": [], "returns": true}, |
|||
{ "method": "db_get", "params": ["", ""], "order": [], "returns": ""}, |
|||
{ "method": "db_putString", "params": ["", "", ""], "order": [], "returns": true}, |
|||
{ "method": "db_getString", "params": ["", ""], "order": [], "returns": ""}, |
|||
|
|||
{ "method": "shh_post", "params": [{}], "order": [], "returns": true}, |
|||
{ "method": "shh_newIdentity", "params": [], "order": [], "returns": ""}, |
|||
{ "method": "shh_haveIdentity", "params": [""], "order": [], "returns": false}, |
|||
{ "method": "shh_newGroup", "params": ["", ""], "order": [], "returns": ""}, |
|||
{ "method": "shh_addToGroup", "params": ["", ""], "order": [], "returns": ""}, |
|||
|
|||
{ "method": "shhNewFilter", "params": [{}], "order": [], "returns": 0}, |
|||
{ "method": "shhUninstallFilter", "params": [0], "order": [], "returns": true}, |
|||
{ "method": "shhChanged", "params": [0], "order": [], "returns": []} |
|||
{ "method": "shh_newFilter", "params": [{}], "order": [], "returns": 0}, |
|||
{ "method": "shh_uninstallFilter", "params": [0], "order": [], "returns": true}, |
|||
{ "method": "shh_changed", "params": [0], "order": [], "returns": []} |
|||
|
|||
] |
|||
|
|||
|
@ -0,0 +1,214 @@ |
|||
/*
|
|||
This file is part of cpp-ethereum. |
|||
|
|||
cpp-ethereum is free software: you can redistribute it and/or modify |
|||
it under the terms of the GNU General Public License as published by |
|||
the Free Software Foundation, either version 3 of the License, or |
|||
(at your option) any later version. |
|||
|
|||
cpp-ethereum 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 General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU General Public License |
|||
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
/**
|
|||
* @author Marek Kotewicz <marek@ethdev.com> |
|||
* @date 2014 |
|||
* Unit tests for the solidity compiler JSON Interface output. |
|||
*/ |
|||
|
|||
#include <boost/test/unit_test.hpp> |
|||
#include <libsolidity/CompilerStack.h> |
|||
#include <jsonrpc/json/json.h> |
|||
|
|||
namespace dev |
|||
{ |
|||
namespace solidity |
|||
{ |
|||
namespace test |
|||
{ |
|||
|
|||
class InterfaceChecker |
|||
{ |
|||
public: |
|||
bool checkInterface(std::string const& _code, std::string const& _expectedInterfaceString) |
|||
{ |
|||
m_compilerStack.parse(_code); |
|||
std::string generatedInterfaceString = m_compilerStack.getInterface(); |
|||
Json::Value generatedInterface; |
|||
m_reader.parse(generatedInterfaceString, generatedInterface); |
|||
Json::Value expectedInterface; |
|||
m_reader.parse(_expectedInterfaceString, expectedInterface); |
|||
return expectedInterface == generatedInterface; |
|||
} |
|||
|
|||
private: |
|||
CompilerStack m_compilerStack; |
|||
Json::Reader m_reader; |
|||
}; |
|||
|
|||
BOOST_FIXTURE_TEST_SUITE(SolidityCompilerJSONInterfaceOutput, InterfaceChecker) |
|||
|
|||
BOOST_AUTO_TEST_CASE(basic_test) |
|||
{ |
|||
char const* sourceCode = "contract test {\n" |
|||
" function f(uint a) returns(uint d) { return a * 7; }\n" |
|||
"}\n"; |
|||
|
|||
char const* interface = R"([ |
|||
{ |
|||
"name": "f", |
|||
"inputs": [ |
|||
{ |
|||
"name": "a", |
|||
"type": "uint256" |
|||
} |
|||
], |
|||
"outputs": [ |
|||
{ |
|||
"name": "d", |
|||
"type": "uint256" |
|||
} |
|||
] |
|||
} |
|||
])"; |
|||
|
|||
BOOST_CHECK(checkInterface(sourceCode, interface)); |
|||
} |
|||
|
|||
BOOST_AUTO_TEST_CASE(empty_contract) |
|||
{ |
|||
char const* sourceCode = "contract test {\n" |
|||
"}\n"; |
|||
|
|||
char const* interface = "[]"; |
|||
|
|||
BOOST_CHECK(checkInterface(sourceCode, interface)); |
|||
} |
|||
|
|||
BOOST_AUTO_TEST_CASE(multiple_methods) |
|||
{ |
|||
char const* sourceCode = "contract test {\n" |
|||
" function f(uint a) returns(uint d) { return a * 7; }\n" |
|||
" function g(uint b) returns(uint e) { return b * 8; }\n" |
|||
"}\n"; |
|||
|
|||
char const* interface = R"([ |
|||
{ |
|||
"name": "f", |
|||
"inputs": [ |
|||
{ |
|||
"name": "a", |
|||
"type": "uint256" |
|||
} |
|||
], |
|||
"outputs": [ |
|||
{ |
|||
"name": "d", |
|||
"type": "uint256" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"name": "g", |
|||
"inputs": [ |
|||
{ |
|||
"name": "b", |
|||
"type": "uint256" |
|||
} |
|||
], |
|||
"outputs": [ |
|||
{ |
|||
"name": "e", |
|||
"type": "uint256" |
|||
} |
|||
] |
|||
} |
|||
])"; |
|||
|
|||
BOOST_CHECK(checkInterface(sourceCode, interface)); |
|||
} |
|||
|
|||
BOOST_AUTO_TEST_CASE(multiple_params) |
|||
{ |
|||
char const* sourceCode = "contract test {\n" |
|||
" function f(uint a, uint b) returns(uint d) { return a + b; }\n" |
|||
"}\n"; |
|||
|
|||
char const* interface = R"([ |
|||
{ |
|||
"name": "f", |
|||
"inputs": [ |
|||
{ |
|||
"name": "a", |
|||
"type": "uint256" |
|||
}, |
|||
{ |
|||
"name": "b", |
|||
"type": "uint256" |
|||
} |
|||
], |
|||
"outputs": [ |
|||
{ |
|||
"name": "d", |
|||
"type": "uint256" |
|||
} |
|||
] |
|||
} |
|||
])"; |
|||
|
|||
BOOST_CHECK(checkInterface(sourceCode, interface)); |
|||
} |
|||
|
|||
BOOST_AUTO_TEST_CASE(multiple_methods_order) |
|||
{ |
|||
// methods are expected to be in alpabetical order
|
|||
char const* sourceCode = "contract test {\n" |
|||
" function f(uint a) returns(uint d) { return a * 7; }\n" |
|||
" function c(uint b) returns(uint e) { return b * 8; }\n" |
|||
"}\n"; |
|||
|
|||
char const* interface = R"([ |
|||
{ |
|||
"name": "c", |
|||
"inputs": [ |
|||
{ |
|||
"name": "b", |
|||
"type": "uint256" |
|||
} |
|||
], |
|||
"outputs": [ |
|||
{ |
|||
"name": "e", |
|||
"type": "uint256" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"name": "f", |
|||
"inputs": [ |
|||
{ |
|||
"name": "a", |
|||
"type": "uint256" |
|||
} |
|||
], |
|||
"outputs": [ |
|||
{ |
|||
"name": "d", |
|||
"type": "uint256" |
|||
} |
|||
] |
|||
} |
|||
])"; |
|||
|
|||
BOOST_CHECK(checkInterface(sourceCode, interface)); |
|||
} |
|||
|
|||
BOOST_AUTO_TEST_SUITE_END() |
|||
|
|||
} |
|||
} |
|||
} |
@ -0,0 +1,717 @@ |
|||
{ |
|||
"CallEcrecover0": { |
|||
"env" : { |
|||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", |
|||
"currentNumber" : "0", |
|||
"currentGasLimit" : "10000000", |
|||
"currentDifficulty" : "256", |
|||
"currentTimestamp" : 1, |
|||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" |
|||
}, |
|||
"pre" : { |
|||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : { |
|||
"balance" : "20000000", |
|||
"nonce" : 0, |
|||
"code": "{ (MSTORE 0 0x18c547e4f7b0f325ad1e56f57e26c745b09a3e503d86e00e5255ff7f715d3d1c) (MSTORE 32 28) (MSTORE 64 0x73b1693892219d736caba55bdb67216e485557ea6b6af75f37096c9aa6a5a75f) (MSTORE 96 0xeeb940b1d03b21e36b0e47e79769f095fe2ab855bd91e3a38756b7d75a9c4549) [[ 2 ]] (CALL 1000 1 0 0 128 128 32) [[ 0 ]] (MOD (MLOAD 128) (EXP 2 160)) [[ 1 ]] (EQ (ORIGIN) (SLOAD 0)) }", |
|||
"storage": {} |
|||
}, |
|||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { |
|||
"balance" : "1000000000000000000", |
|||
"nonce" : 0, |
|||
"code" : "", |
|||
"storage": {} |
|||
} |
|||
}, |
|||
"transaction" : { |
|||
"nonce" : "0", |
|||
"gasPrice" : "1", |
|||
"gasLimit" : "365224", |
|||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
|||
"value" : "100000", |
|||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
|||
"data" : "" |
|||
} |
|||
}, |
|||
|
|||
"CallEcrecover0_gas500": { |
|||
"env" : { |
|||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", |
|||
"currentNumber" : "0", |
|||
"currentGasLimit" : "10000000", |
|||
"currentDifficulty" : "256", |
|||
"currentTimestamp" : 1, |
|||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" |
|||
}, |
|||
"pre" : { |
|||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : { |
|||
"balance" : "20000000", |
|||
"nonce" : 0, |
|||
"code": "{ (MSTORE 0 0x18c547e4f7b0f325ad1e56f57e26c745b09a3e503d86e00e5255ff7f715d3d1c) (MSTORE 32 28) (MSTORE 64 0x73b1693892219d736caba55bdb67216e485557ea6b6af75f37096c9aa6a5a75f) (MSTORE 96 0xeeb940b1d03b21e36b0e47e79769f095fe2ab855bd91e3a38756b7d75a9c4549) [[ 2 ]] (CALL 500 1 0 0 128 128 32) [[ 0 ]] (MOD (MLOAD 128) (EXP 2 160)) [[ 1 ]] (EQ (ORIGIN) (SLOAD 0)) }", |
|||
"storage": {} |
|||
}, |
|||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { |
|||
"balance" : "1000000000000000000", |
|||
"nonce" : 0, |
|||
"code" : "", |
|||
"storage": {} |
|||
} |
|||
}, |
|||
"transaction" : { |
|||
"nonce" : "0", |
|||
"gasPrice" : "1", |
|||
"gasLimit" : "365224", |
|||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
|||
"value" : "100000", |
|||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
|||
"data" : "" |
|||
} |
|||
}, |
|||
|
|||
"CallEcrecover0_Gas499": { |
|||
"env" : { |
|||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", |
|||
"currentNumber" : "0", |
|||
"currentGasLimit" : "10000000", |
|||
"currentDifficulty" : "256", |
|||
"currentTimestamp" : 1, |
|||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" |
|||
}, |
|||
"pre" : { |
|||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : { |
|||
"balance" : "20000000", |
|||
"nonce" : 0, |
|||
"code": "{ (MSTORE 0 0x18c547e4f7b0f325ad1e56f57e26c745b09a3e503d86e00e5255ff7f715d3d1c) (MSTORE 32 28) (MSTORE 64 0x73b1693892219d736caba55bdb67216e485557ea6b6af75f37096c9aa6a5a75f) (MSTORE 96 0xeeb940b1d03b21e36b0e47e79769f095fe2ab855bd91e3a38756b7d75a9c4549) [[ 2 ]] (CALL 499 1 0 0 128 128 32) [[ 0 ]] (MOD (MLOAD 128) (EXP 2 160)) [[ 1 ]] (EQ (ORIGIN) (SLOAD 0)) }", |
|||
"storage": {} |
|||
}, |
|||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { |
|||
"balance" : "1000000000000000000", |
|||
"nonce" : 0, |
|||
"code" : "", |
|||
"storage": {} |
|||
} |
|||
}, |
|||
"transaction" : { |
|||
"nonce" : "0", |
|||
"gasPrice" : "1", |
|||
"gasLimit" : "365224", |
|||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
|||
"value" : "100000", |
|||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
|||
"data" : "" |
|||
} |
|||
}, |
|||
|
|||
"CallEcrecover0_0input": { |
|||
"env" : { |
|||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", |
|||
"currentNumber" : "0", |
|||
"currentGasLimit" : "10000000", |
|||
"currentDifficulty" : "256", |
|||
"currentTimestamp" : 1, |
|||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" |
|||
}, |
|||
"pre" : { |
|||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : { |
|||
"balance" : "20000000", |
|||
"nonce" : 0, |
|||
"code": "{ [[ 2 ]] (CALL 1000 1 0 0 128 128 32) [[ 0 ]] (MOD (MLOAD 128) (EXP 2 160)) }", |
|||
"storage": {} |
|||
}, |
|||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { |
|||
"balance" : "1000000000000000000", |
|||
"nonce" : 0, |
|||
"code" : "", |
|||
"storage": {} |
|||
} |
|||
}, |
|||
"transaction" : { |
|||
"nonce" : "0", |
|||
"gasPrice" : "1", |
|||
"gasLimit" : "365224", |
|||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
|||
"value" : "100000", |
|||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
|||
"data" : "" |
|||
} |
|||
}, |
|||
|
|||
"CallEcrecover1": { |
|||
"env" : { |
|||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", |
|||
"currentNumber" : "0", |
|||
"currentGasLimit" : "10000000", |
|||
"currentDifficulty" : "256", |
|||
"currentTimestamp" : 1, |
|||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" |
|||
}, |
|||
"pre" : { |
|||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : { |
|||
"balance" : "20000000", |
|||
"nonce" : 0, |
|||
"code": "{ (MSTORE 0 0x18c547e4f7b0f325ad1e56f57e26c745b09a3e503d86e00e5255ff7f715d3d1c) (MSTORE 32 1) (MSTORE 64 0x73b1693892219d736caba55bdb67216e485557ea6b6af75f37096c9aa6a5a75f) (MSTORE 96 0xeeb940b1d03b21e36b0e47e79769f095fe2ab855bd91e3a38756b7d75a9c4549) [[ 2 ]] (CALL 1000 1 0 0 128 128 32) [[ 0 ]] (MOD (MLOAD 128) (EXP 2 160)) [[ 1 ]] (EQ (ORIGIN) (SLOAD 0)) }", |
|||
"storage": {} |
|||
}, |
|||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { |
|||
"balance" : "1000000000000000000", |
|||
"nonce" : 0, |
|||
"code" : "", |
|||
"storage": {} |
|||
} |
|||
}, |
|||
"transaction" : { |
|||
"nonce" : "0", |
|||
"gasPrice" : "1", |
|||
"gasLimit" : "365224", |
|||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
|||
"value" : "100000", |
|||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
|||
"data" : "" |
|||
} |
|||
}, |
|||
|
|||
"CallEcrecover2": { |
|||
"env" : { |
|||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", |
|||
"currentNumber" : "0", |
|||
"currentGasLimit" : "10000000", |
|||
"currentDifficulty" : "256", |
|||
"currentTimestamp" : 1, |
|||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" |
|||
}, |
|||
"pre" : { |
|||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : { |
|||
"balance" : "20000000", |
|||
"nonce" : 0, |
|||
"code": "{ (MSTORE 0 0x18c547e4f7b0f325ad1e56f57e26c745b09a3e503d86e00e5255ff7f715d3d1c) (MSTORE 32 28) (MSTORE 33 0x73b1693892219d736caba55bdb67216e485557ea6b6af75f37096c9aa6a5a75f) (MSTORE 65 0xeeb940b1d03b21e36b0e47e79769f095fe2ab855bd91e3a38756b7d75a9c4549) [[ 2 ]] (CALL 1000 1 0 0 97 97 32) [[ 0 ]] (MOD (MLOAD 97) (EXP 2 160)) [[ 1 ]] (EQ (ORIGIN) (SLOAD 0)) }", |
|||
"storage": {} |
|||
}, |
|||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { |
|||
"balance" : "1000000000000000000", |
|||
"nonce" : 0, |
|||
"code" : "", |
|||
"storage": {} |
|||
} |
|||
}, |
|||
"transaction" : { |
|||
"nonce" : "0", |
|||
"gasPrice" : "1", |
|||
"gasLimit" : "365224", |
|||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
|||
"value" : "100000", |
|||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
|||
"data" : "" |
|||
} |
|||
}, |
|||
|
|||
"CallEcrecover3": { |
|||
"env" : { |
|||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", |
|||
"currentNumber" : "0", |
|||
"currentGasLimit" : "10000000", |
|||
"currentDifficulty" : "256", |
|||
"currentTimestamp" : 1, |
|||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" |
|||
}, |
|||
"pre" : { |
|||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : { |
|||
"balance" : "20000000", |
|||
"nonce" : 0, |
|||
"code": "{ (MSTORE 0 0x2f380a2dea7e778d81affc2443403b8fe4644db442ae4862ff5bb3732829cdb9) (MSTORE 32 27) (MSTORE 64 0x6b65ccb0558806e9b097f27a396d08f964e37b8b7af6ceeb516ff86739fbea0a) (MSTORE 96 0x37cbc8d883e129a4b1ef9d5f1df53c4f21a3ef147cf2a50a4ede0eb06ce092d4) [[ 2 ]] (CALL 1000 1 0 0 128 128 32) [[ 0 ]] (MOD (MLOAD 128) (EXP 2 160)) [[ 1 ]] (EQ (ORIGIN) (SLOAD 0)) }", |
|||
"storage": {} |
|||
}, |
|||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { |
|||
"balance" : "1000000000000000000", |
|||
"nonce" : 0, |
|||
"code" : "", |
|||
"storage": {} |
|||
} |
|||
}, |
|||
"transaction" : { |
|||
"nonce" : "0", |
|||
"gasPrice" : "1", |
|||
"gasLimit" : "365224", |
|||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
|||
"value" : "100000", |
|||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
|||
"data" : "" |
|||
} |
|||
}, |
|||
|
|||
"CallSha256_0": { |
|||
"env" : { |
|||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", |
|||
"currentNumber" : "0", |
|||
"currentGasLimit" : "10000000", |
|||
"currentDifficulty" : "256", |
|||
"currentTimestamp" : 1, |
|||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" |
|||
}, |
|||
"pre" : { |
|||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : { |
|||
"balance" : "20000000", |
|||
"nonce" : 0, |
|||
"code" : "0x600160005260206000602060006000600260fff1600051600055", |
|||
"storage": {} |
|||
}, |
|||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { |
|||
"balance" : "1000000000000000000", |
|||
"nonce" : 0, |
|||
"code" : "", |
|||
"storage": {} |
|||
} |
|||
}, |
|||
"transaction" : { |
|||
"nonce" : "0", |
|||
"gasPrice" : "1", |
|||
"gasLimit" : "365224", |
|||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
|||
"value" : "100000", |
|||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
|||
"data" : "" |
|||
} |
|||
}, |
|||
|
|||
"CallSha256_1": { |
|||
"env" : { |
|||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", |
|||
"currentNumber" : "0", |
|||
"currentGasLimit" : "10000000", |
|||
"currentDifficulty" : "256", |
|||
"currentTimestamp" : 1, |
|||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" |
|||
}, |
|||
"pre" : { |
|||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : { |
|||
"balance" : "20000000", |
|||
"nonce" : 0, |
|||
"code" : "{ [[ 2 ]] (CALL 500 2 0 0 0 0 32) [[ 0 ]] (MLOAD 0)}", |
|||
"storage": {} |
|||
}, |
|||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { |
|||
"balance" : "1000000000000000000", |
|||
"nonce" : 0, |
|||
"code" : "", |
|||
"storage": {} |
|||
} |
|||
}, |
|||
"transaction" : { |
|||
"nonce" : "0", |
|||
"gasPrice" : "1", |
|||
"gasLimit" : "365224", |
|||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
|||
"value" : "100000", |
|||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
|||
"data" : "" |
|||
} |
|||
}, |
|||
|
|||
"CallSha256_2": { |
|||
"env" : { |
|||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", |
|||
"currentNumber" : "0", |
|||
"currentGasLimit" : "10000000", |
|||
"currentDifficulty" : "256", |
|||
"currentTimestamp" : 1, |
|||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" |
|||
}, |
|||
"pre" : { |
|||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : { |
|||
"balance" : "20000000", |
|||
"nonce" : 0, |
|||
"code" : "{ (MSTORE 5 0xf34578907f) [[ 2 ]] (CALL 500 2 0 0 37 0 32) [[ 0 ]] (MLOAD 0)}", |
|||
"storage": {} |
|||
}, |
|||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { |
|||
"balance" : "1000000000000000000", |
|||
"nonce" : 0, |
|||
"code" : "", |
|||
"storage": {} |
|||
} |
|||
}, |
|||
"transaction" : { |
|||
"nonce" : "0", |
|||
"gasPrice" : "1", |
|||
"gasLimit" : "365224", |
|||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
|||
"value" : "100000", |
|||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
|||
"data" : "" |
|||
} |
|||
}, |
|||
|
|||
"CallSha256_3": { |
|||
"env" : { |
|||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", |
|||
"currentNumber" : "0", |
|||
"currentGasLimit" : "10000000", |
|||
"currentDifficulty" : "256", |
|||
"currentTimestamp" : 1, |
|||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" |
|||
}, |
|||
"pre" : { |
|||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : { |
|||
"balance" : "20000000", |
|||
"nonce" : 0, |
|||
"code" : "{ (MSTORE 0 0xf34578907f) [[ 2 ]] (CALL 500 2 0 0 37 0 32) [[ 0 ]] (MLOAD 0)}", |
|||
"storage": {} |
|||
}, |
|||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { |
|||
"balance" : "1000000000000000000", |
|||
"nonce" : 0, |
|||
"code" : "", |
|||
"storage": {} |
|||
} |
|||
}, |
|||
"transaction" : { |
|||
"nonce" : "0", |
|||
"gasPrice" : "1", |
|||
"gasLimit" : "365224", |
|||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
|||
"value" : "100000", |
|||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
|||
"data" : "" |
|||
} |
|||
}, |
|||
|
|||
"CallSha256_4": { |
|||
"env" : { |
|||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", |
|||
"currentNumber" : "0", |
|||
"currentGasLimit" : "10000000", |
|||
"currentDifficulty" : "256", |
|||
"currentTimestamp" : 1, |
|||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" |
|||
}, |
|||
"pre" : { |
|||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : { |
|||
"balance" : "20000000", |
|||
"nonce" : 0, |
|||
"code" : "{ (MSTORE 0 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) [[ 2 ]] (CALL 100 2 0 0 32 0 32) [[ 0 ]] (MLOAD 0)}", |
|||
"storage": {} |
|||
}, |
|||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { |
|||
"balance" : "1000000000000000000", |
|||
"nonce" : 0, |
|||
"code" : "", |
|||
"storage": {} |
|||
} |
|||
}, |
|||
"transaction" : { |
|||
"nonce" : "0", |
|||
"gasPrice" : "1", |
|||
"gasLimit" : "365224", |
|||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
|||
"value" : "100000", |
|||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
|||
"data" : "" |
|||
} |
|||
}, |
|||
|
|||
"CallSha256_4_gas99": { |
|||
"env" : { |
|||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", |
|||
"currentNumber" : "0", |
|||
"currentGasLimit" : "10000000", |
|||
"currentDifficulty" : "256", |
|||
"currentTimestamp" : 1, |
|||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" |
|||
}, |
|||
"pre" : { |
|||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : { |
|||
"balance" : "20000000", |
|||
"nonce" : 0, |
|||
"code" : "{ (MSTORE 0 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) [[ 2 ]] (CALL 99 2 0 0 32 0 32) [[ 0 ]] (MLOAD 0)}", |
|||
"storage": {} |
|||
}, |
|||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { |
|||
"balance" : "1000000000000000000", |
|||
"nonce" : 0, |
|||
"code" : "", |
|||
"storage": {} |
|||
} |
|||
}, |
|||
"transaction" : { |
|||
"nonce" : "0", |
|||
"gasPrice" : "1", |
|||
"gasLimit" : "365224", |
|||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
|||
"value" : "100000", |
|||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
|||
"data" : "" |
|||
} |
|||
}, |
|||
|
|||
"CallSha256_5": { |
|||
"env" : { |
|||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", |
|||
"currentNumber" : "0", |
|||
"currentGasLimit" : "10000000", |
|||
"currentDifficulty" : "256", |
|||
"currentTimestamp" : 1, |
|||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" |
|||
}, |
|||
"pre" : { |
|||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : { |
|||
"balance" : "20000000", |
|||
"nonce" : 0, |
|||
"code" : "{ (MSTORE 0 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) [[ 2 ]] (CALL 500 2 0 0 1000000 0 32) [[ 0 ]] (MLOAD 0)}", |
|||
"storage": {} |
|||
}, |
|||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { |
|||
"balance" : "1000000000000000000", |
|||
"nonce" : 0, |
|||
"code" : "", |
|||
"storage": {} |
|||
} |
|||
}, |
|||
"transaction" : { |
|||
"nonce" : "0", |
|||
"gasPrice" : "1", |
|||
"gasLimit" : "10000000", |
|||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
|||
"value" : "100000", |
|||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
|||
"data" : "" |
|||
} |
|||
}, |
|||
|
|||
"CallRipemd160_0": { |
|||
"env" : { |
|||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", |
|||
"currentNumber" : "0", |
|||
"currentGasLimit" : "10000000", |
|||
"currentDifficulty" : "256", |
|||
"currentTimestamp" : 1, |
|||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" |
|||
}, |
|||
"pre" : { |
|||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : { |
|||
"balance" : "20000000", |
|||
"nonce" : 0, |
|||
"code" : "0x600160005260206000602060006000600360fff1600051600055", |
|||
"storage": {} |
|||
}, |
|||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { |
|||
"balance" : "1000000000000000000", |
|||
"nonce" : 0, |
|||
"code" : "", |
|||
"storage": {} |
|||
} |
|||
}, |
|||
"transaction" : { |
|||
"nonce" : "0", |
|||
"gasPrice" : "1", |
|||
"gasLimit" : "365224", |
|||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
|||
"value" : "100000", |
|||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
|||
"data" : "" |
|||
} |
|||
}, |
|||
|
|||
"CallRipemd160_1": { |
|||
"env" : { |
|||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", |
|||
"currentNumber" : "0", |
|||
"currentGasLimit" : "10000000", |
|||
"currentDifficulty" : "256", |
|||
"currentTimestamp" : 1, |
|||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" |
|||
}, |
|||
"pre" : { |
|||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : { |
|||
"balance" : "20000000", |
|||
"nonce" : 0, |
|||
"code" : "{ [[ 2 ]] (CALL 500 3 0 0 0 0 32) [[ 0 ]] (MLOAD 0)}", |
|||
"storage": {} |
|||
}, |
|||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { |
|||
"balance" : "1000000000000000000", |
|||
"nonce" : 0, |
|||
"code" : "", |
|||
"storage": {} |
|||
} |
|||
}, |
|||
"transaction" : { |
|||
"nonce" : "0", |
|||
"gasPrice" : "1", |
|||
"gasLimit" : "365224", |
|||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
|||
"value" : "100000", |
|||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
|||
"data" : "" |
|||
} |
|||
}, |
|||
|
|||
"CallRipemd160_2": { |
|||
"env" : { |
|||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", |
|||
"currentNumber" : "0", |
|||
"currentGasLimit" : "10000000", |
|||
"currentDifficulty" : "256", |
|||
"currentTimestamp" : 1, |
|||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" |
|||
}, |
|||
"pre" : { |
|||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : { |
|||
"balance" : "20000000", |
|||
"nonce" : 0, |
|||
"code" : "{ (MSTORE 5 0xf34578907f) [[ 2 ]] (CALL 500 3 0 0 37 0 32) [[ 0 ]] (MLOAD 0)}", |
|||
"storage": {} |
|||
}, |
|||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { |
|||
"balance" : "1000000000000000000", |
|||
"nonce" : 0, |
|||
"code" : "", |
|||
"storage": {} |
|||
} |
|||
}, |
|||
"transaction" : { |
|||
"nonce" : "0", |
|||
"gasPrice" : "1", |
|||
"gasLimit" : "365224", |
|||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
|||
"value" : "100000", |
|||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
|||
"data" : "" |
|||
} |
|||
}, |
|||
|
|||
"CallRipemd160_3": { |
|||
"env" : { |
|||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", |
|||
"currentNumber" : "0", |
|||
"currentGasLimit" : "10000000", |
|||
"currentDifficulty" : "256", |
|||
"currentTimestamp" : 1, |
|||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" |
|||
}, |
|||
"pre" : { |
|||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : { |
|||
"balance" : "20000000", |
|||
"nonce" : 0, |
|||
"code" : "{ (MSTORE 0 0xf34578907f) [[ 2 ]] (CALL 500 3 0 0 37 0 32) [[ 0 ]] (MLOAD 0)}", |
|||
"storage": {} |
|||
}, |
|||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { |
|||
"balance" : "1000000000000000000", |
|||
"nonce" : 0, |
|||
"code" : "", |
|||
"storage": {} |
|||
} |
|||
}, |
|||
"transaction" : { |
|||
"nonce" : "0", |
|||
"gasPrice" : "1", |
|||
"gasLimit" : "365224", |
|||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
|||
"value" : "100000", |
|||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
|||
"data" : "" |
|||
} |
|||
}, |
|||
|
|||
"CallRipemd160_4": { |
|||
"env" : { |
|||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", |
|||
"currentNumber" : "0", |
|||
"currentGasLimit" : "10000000", |
|||
"currentDifficulty" : "256", |
|||
"currentTimestamp" : 1, |
|||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" |
|||
}, |
|||
"pre" : { |
|||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : { |
|||
"balance" : "20000000", |
|||
"nonce" : 0, |
|||
"code" : "{ (MSTORE 0 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) [[ 2 ]] (CALL 100 3 0 0 32 0 32) [[ 0 ]] (MLOAD 0)}", |
|||
"storage": {} |
|||
}, |
|||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { |
|||
"balance" : "1000000000000000000", |
|||
"nonce" : 0, |
|||
"code" : "", |
|||
"storage": {} |
|||
} |
|||
}, |
|||
"transaction" : { |
|||
"nonce" : "0", |
|||
"gasPrice" : "1", |
|||
"gasLimit" : "365224", |
|||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
|||
"value" : "100000", |
|||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
|||
"data" : "" |
|||
} |
|||
}, |
|||
|
|||
"CallRipemd160_4_gas99": { |
|||
"env" : { |
|||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", |
|||
"currentNumber" : "0", |
|||
"currentGasLimit" : "10000000", |
|||
"currentDifficulty" : "256", |
|||
"currentTimestamp" : 1, |
|||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" |
|||
}, |
|||
"pre" : { |
|||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : { |
|||
"balance" : "20000000", |
|||
"nonce" : 0, |
|||
"code" : "{ (MSTORE 0 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) [[ 2 ]] (CALL 99 3 0 0 32 0 32) [[ 0 ]] (MLOAD 0)}", |
|||
"storage": {} |
|||
}, |
|||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { |
|||
"balance" : "1000000000000000000", |
|||
"nonce" : 0, |
|||
"code" : "", |
|||
"storage": {} |
|||
} |
|||
}, |
|||
"transaction" : { |
|||
"nonce" : "0", |
|||
"gasPrice" : "1", |
|||
"gasLimit" : "365224", |
|||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
|||
"value" : "100000", |
|||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
|||
"data" : "" |
|||
} |
|||
}, |
|||
|
|||
"CallRipemd160_5": { |
|||
"env" : { |
|||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", |
|||
"currentNumber" : "0", |
|||
"currentGasLimit" : "10000000", |
|||
"currentDifficulty" : "256", |
|||
"currentTimestamp" : 1, |
|||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" |
|||
}, |
|||
"pre" : { |
|||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : { |
|||
"balance" : "20000000", |
|||
"nonce" : 0, |
|||
"code" : "{ (MSTORE 0 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) [[ 2 ]] (CALL 500 3 0 0 1000000 0 32) [[ 0 ]] (MLOAD 0)}", |
|||
"storage": {} |
|||
}, |
|||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { |
|||
"balance" : "1000000000000000000", |
|||
"nonce" : 0, |
|||
"code" : "", |
|||
"storage": {} |
|||
} |
|||
}, |
|||
"transaction" : { |
|||
"nonce" : "0", |
|||
"gasPrice" : "1", |
|||
"gasLimit" : "10000000", |
|||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
|||
"value" : "100000", |
|||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
|||
"data" : "" |
|||
} |
|||
}, |
|||
|
|||
} |
|||
|
File diff suppressed because it is too large
@ -1,44 +0,0 @@ |
|||
{ |
|||
"ABAcalls0": { |
|||
"env" : { |
|||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", |
|||
"currentNumber" : "0", |
|||
"currentGasLimit" : "10000000", |
|||
"currentDifficulty" : "256", |
|||
"currentTimestamp" : 1, |
|||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" |
|||
}, |
|||
"pre" : { |
|||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : { |
|||
"balance" : "1000000000000000000", |
|||
"nonce" : 0, |
|||
"code" : "{ [[ (PC) ]] (CALL 1000 0x945304eb96065b2a98b57a48a06ae28d285a71b5 24 0 0 0 0) }", |
|||
"storage": {} |
|||
}, |
|||
"945304eb96065b2a98b57a48a06ae28d285a71b5" : { |
|||
"balance" : "23", |
|||
"code" : " { [[ (PC) ]] (ADD 1 (CALL 500 0x095e7baea6a6c7c4c2dfeb977efac326af552d87 23 0 0 0 0)) } ", |
|||
"nonce" : "0", |
|||
"storage" : { |
|||
} |
|||
}, |
|||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { |
|||
"balance" : "1000000000000000000", |
|||
"nonce" : 0, |
|||
"code" : "", |
|||
"storage": {} |
|||
} |
|||
|
|||
}, |
|||
"transaction" : { |
|||
"nonce" : "0", |
|||
"gasPrice" : "1", |
|||
"gasLimit" : "10000", |
|||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
|||
"value" : "100000", |
|||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
|||
"data" : "" |
|||
} |
|||
} |
|||
|
|||
} |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue