mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge remote-tracking branch 'upstream/develop' into addTests
This commit is contained in:
commit
67fae64c9f
54
Assembly.cpp
54
Assembly.cpp
@ -74,17 +74,19 @@ eth::AssemblyItems compileContract(const string& _sourceCode)
|
||||
return AssemblyItems();
|
||||
}
|
||||
|
||||
void checkAssemblyLocations(AssemblyItems const& _items, std::vector<SourceLocation> _locations)
|
||||
void checkAssemblyLocations(AssemblyItems const& _items, vector<SourceLocation> const& _locations)
|
||||
{
|
||||
size_t i = 0;
|
||||
BOOST_CHECK_EQUAL(_items.size(), _locations.size());
|
||||
for (auto const& it: _items)
|
||||
for (size_t i = 0; i < min(_items.size(), _locations.size()); ++i)
|
||||
{
|
||||
BOOST_CHECK_MESSAGE(it.getLocation() == _locations[i],
|
||||
std::string("Location mismatch for assembly item ") + std::to_string(i));
|
||||
++i;
|
||||
BOOST_CHECK_MESSAGE(
|
||||
_items[i].getLocation() == _locations[i],
|
||||
"Location mismatch for assembly item " + to_string(i) + ". Found: " +
|
||||
to_string(_items[i].getLocation().start) + "-" +
|
||||
to_string(_items[i].getLocation().end) + ", expected: " +
|
||||
to_string(_locations[i].start) + "-" +
|
||||
to_string(_locations[i].end));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // end anonymous namespace
|
||||
@ -93,31 +95,21 @@ BOOST_AUTO_TEST_SUITE(Assembly)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(location_test)
|
||||
{
|
||||
char const* sourceCode = "contract test {\n"
|
||||
" function f() returns (uint256 a)\n"
|
||||
" {\n"
|
||||
" return 16;\n"
|
||||
" }\n"
|
||||
"}\n";
|
||||
std::shared_ptr<std::string const> n = make_shared<std::string>("source");
|
||||
char const* sourceCode = R"(
|
||||
contract test {
|
||||
function f() returns (uint256 a) {
|
||||
return 16;
|
||||
}
|
||||
}
|
||||
)";
|
||||
shared_ptr<string const> n = make_shared<string>("source");
|
||||
AssemblyItems items = compileContract(sourceCode);
|
||||
std::vector<SourceLocation> locations {
|
||||
SourceLocation(0, 77, n), SourceLocation(0, 77, n),
|
||||
SourceLocation(0, 77, n), SourceLocation(0, 77, n),
|
||||
SourceLocation(0, 77, n), SourceLocation(0, 77, n),
|
||||
SourceLocation(0, 77, n), SourceLocation(0, 77, n),
|
||||
SourceLocation(), SourceLocation(),
|
||||
SourceLocation(0, 77, n), SourceLocation(0, 77, n),
|
||||
SourceLocation(), SourceLocation(), SourceLocation(),
|
||||
SourceLocation(0, 77, n), SourceLocation(0, 77, n),
|
||||
SourceLocation(0, 77, n), SourceLocation(0, 77, n),
|
||||
SourceLocation(0, 77, n), SourceLocation(0, 77, n),
|
||||
SourceLocation(0, 77, n),
|
||||
SourceLocation(18, 75, n), SourceLocation(40, 49, n),
|
||||
SourceLocation(61, 70, n), SourceLocation(61, 70, n), SourceLocation(61, 70, n),
|
||||
SourceLocation(), SourceLocation(),
|
||||
SourceLocation(61, 70, n), SourceLocation(61, 70, n), SourceLocation(61, 70, n)
|
||||
};
|
||||
vector<SourceLocation> locations =
|
||||
vector<SourceLocation>(11, SourceLocation(2, 75, n)) +
|
||||
vector<SourceLocation>(12, SourceLocation(20, 72, n)) +
|
||||
vector<SourceLocation>{SourceLocation(42, 51, n), SourceLocation(65, 67, n)} +
|
||||
vector<SourceLocation>(4, SourceLocation(58, 67, n)) +
|
||||
vector<SourceLocation>(3, SourceLocation(20, 72, n));
|
||||
checkAssemblyLocations(items, locations);
|
||||
}
|
||||
|
||||
|
@ -439,8 +439,6 @@ void userDefinedTest(string testTypeFlag, std::function<void(json_spirit::mValue
|
||||
}
|
||||
g_logVerbosity = currentVerbosity;
|
||||
}
|
||||
else
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
@ -449,32 +447,27 @@ void executeTests(const string& _name, const string& _testPathAppendix, std::fun
|
||||
string testPath = getTestPath();
|
||||
testPath += _testPathAppendix;
|
||||
|
||||
for (int i = 1; i < boost::unit_test::framework::master_test_suite().argc; ++i)
|
||||
if (Options::get().fillTests)
|
||||
{
|
||||
string arg = boost::unit_test::framework::master_test_suite().argv[i];
|
||||
if (arg == "--filltests")
|
||||
try
|
||||
{
|
||||
try
|
||||
{
|
||||
cnote << "Populating tests...";
|
||||
json_spirit::mValue v;
|
||||
boost::filesystem::path p(__FILE__);
|
||||
boost::filesystem::path dir = p.parent_path();
|
||||
string s = asString(dev::contents(dir.string() + "/" + _name + "Filler.json"));
|
||||
BOOST_REQUIRE_MESSAGE(s.length() > 0, "Contents of " + dir.string() + "/" + _name + "Filler.json is empty.");
|
||||
json_spirit::read_string(s, v);
|
||||
doTests(v, true);
|
||||
writeFile(testPath + "/" + _name + ".json", asBytes(json_spirit::write_string(v, true)));
|
||||
}
|
||||
catch (Exception const& _e)
|
||||
{
|
||||
BOOST_ERROR("Failed filling test with Exception: " << diagnostic_information(_e));
|
||||
}
|
||||
catch (std::exception const& _e)
|
||||
{
|
||||
BOOST_ERROR("Failed filling test with Exception: " << _e.what());
|
||||
}
|
||||
break;
|
||||
cnote << "Populating tests...";
|
||||
json_spirit::mValue v;
|
||||
boost::filesystem::path p(__FILE__);
|
||||
boost::filesystem::path dir = p.parent_path();
|
||||
string s = asString(dev::contents(dir.string() + "/" + _name + "Filler.json"));
|
||||
BOOST_REQUIRE_MESSAGE(s.length() > 0, "Contents of " + dir.string() + "/" + _name + "Filler.json is empty.");
|
||||
json_spirit::read_string(s, v);
|
||||
doTests(v, true);
|
||||
writeFile(testPath + "/" + _name + ".json", asBytes(json_spirit::write_string(v, true)));
|
||||
}
|
||||
catch (Exception const& _e)
|
||||
{
|
||||
BOOST_ERROR("Failed filling test with Exception: " << diagnostic_information(_e));
|
||||
}
|
||||
catch (std::exception const& _e)
|
||||
{
|
||||
BOOST_ERROR("Failed filling test with Exception: " << _e.what());
|
||||
}
|
||||
}
|
||||
|
||||
@ -541,21 +534,48 @@ RLPStream createRLPStreamFromTransactionFields(json_spirit::mObject& _tObj)
|
||||
return rlpStream;
|
||||
}
|
||||
|
||||
void processCommandLineOptions()
|
||||
Options::Options()
|
||||
{
|
||||
auto argc = boost::unit_test::framework::master_test_suite().argc;
|
||||
auto argv = boost::unit_test::framework::master_test_suite().argv;
|
||||
|
||||
for (auto i = 0; i < argc; ++i)
|
||||
for (auto i = 0; i < argc; ++i)
|
||||
{
|
||||
if (std::string(argv[i]) == "--jit")
|
||||
auto arg = std::string{argv[i]};
|
||||
if (arg == "--jit")
|
||||
{
|
||||
jit = true;
|
||||
eth::VMFactory::setKind(eth::VMKind::JIT);
|
||||
break;
|
||||
}
|
||||
else if (arg == "--vmtrace")
|
||||
vmtrace = true;
|
||||
else if (arg == "--performance")
|
||||
performance = true;
|
||||
else if (arg == "--quadratic")
|
||||
quadratic = true;
|
||||
else if (arg == "--memory")
|
||||
memory = true;
|
||||
else if (arg == "--inputlimits")
|
||||
inputLimits = true;
|
||||
else if (arg == "--bigdata")
|
||||
bigData = true;
|
||||
else if (arg == "--all")
|
||||
{
|
||||
performance = true;
|
||||
quadratic = true;
|
||||
memory = true;
|
||||
inputLimits = true;
|
||||
bigData = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Options const& Options::get()
|
||||
{
|
||||
static Options instance;
|
||||
return instance;
|
||||
}
|
||||
|
||||
LastHashes lastHashes(u256 _currentBlockNumber)
|
||||
{
|
||||
LastHashes ret;
|
||||
|
27
TestHelper.h
27
TestHelper.h
@ -141,7 +141,6 @@ void executeTests(const std::string& _name, const std::string& _testPathAppendix
|
||||
std::string getTestPath();
|
||||
void userDefinedTest(std::string testTypeFlag, std::function<void(json_spirit::mValue&, bool)> doTests);
|
||||
RLPStream createRLPStreamFromTransactionFields(json_spirit::mObject& _tObj);
|
||||
void processCommandLineOptions();
|
||||
eth::LastHashes lastHashes(u256 _currentBlockNumber);
|
||||
json_spirit::mObject fillJsonWithState(eth::State _state);
|
||||
|
||||
@ -158,5 +157,31 @@ void checkAddresses(mapType& _expectedAddrs, mapType& _resultAddrs)
|
||||
BOOST_CHECK(_expectedAddrs == _resultAddrs);
|
||||
}
|
||||
|
||||
class Options
|
||||
{
|
||||
public:
|
||||
bool jit = false; ///< Use JIT
|
||||
bool vmtrace = false; ///< Create EVM execution tracer // TODO: Link with log verbosity?
|
||||
bool showTimes = false; ///< Print test groups execution times
|
||||
bool fillTests = false; ///< Create JSON test files from execution results
|
||||
|
||||
/// Test selection
|
||||
/// @{
|
||||
bool performance = false;
|
||||
bool quadratic = false;
|
||||
bool memory = false;
|
||||
bool inputLimits = false;
|
||||
bool bigData = false;
|
||||
/// @}
|
||||
|
||||
/// Get reference to options
|
||||
/// The first time used, options are parsed
|
||||
static Options const& get();
|
||||
|
||||
private:
|
||||
Options();
|
||||
Options(Options const&) = delete;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
1
peer.cpp
1
peer.cpp
@ -63,6 +63,7 @@ BOOST_AUTO_TEST_CASE(save_nodes)
|
||||
for (auto i:{0,1,2,3,4,5})
|
||||
{
|
||||
Host* h = new Host("Test", NetworkPreferences(30300 + i, "127.0.0.1", true, true));
|
||||
h->setIdealPeerCount(10);
|
||||
// starting host is required so listenport is available
|
||||
h->start();
|
||||
while (!h->isStarted())
|
||||
|
@ -3,7 +3,7 @@
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "5",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentGasLimit" : "100000000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : 1,
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
@ -16,7 +16,7 @@
|
||||
"storage": {}
|
||||
},
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
"balance" : "100000",
|
||||
"balance" : "1000000",
|
||||
"nonce" : "0",
|
||||
"code" : "",
|
||||
"storage": {}
|
||||
@ -25,7 +25,7 @@
|
||||
"transaction" : {
|
||||
"nonce" : "0",
|
||||
"gasPrice" : "1",
|
||||
"gasLimit" : "28500",
|
||||
"gasLimit" : "285000",
|
||||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
|
||||
"value" : "10",
|
||||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
|
||||
@ -37,7 +37,7 @@
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "257",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentGasLimit" : "100000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : 1,
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
@ -50,7 +50,7 @@
|
||||
"storage": {}
|
||||
},
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
"balance" : "100000",
|
||||
"balance" : "1000000",
|
||||
"nonce" : "0",
|
||||
"code" : "",
|
||||
"storage": {}
|
||||
@ -59,7 +59,7 @@
|
||||
"transaction" : {
|
||||
"nonce" : "0",
|
||||
"gasPrice" : "1",
|
||||
"gasLimit" : "28500",
|
||||
"gasLimit" : "285000",
|
||||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
|
||||
"value" : "10",
|
||||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
|
||||
@ -71,7 +71,7 @@
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "257",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentGasLimit" : "100000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : 1,
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
@ -84,7 +84,7 @@
|
||||
"storage": {}
|
||||
},
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
"balance" : "100000",
|
||||
"balance" : "1000000",
|
||||
"nonce" : "0",
|
||||
"code" : "",
|
||||
"storage": {}
|
||||
@ -93,7 +93,7 @@
|
||||
"transaction" : {
|
||||
"nonce" : "0",
|
||||
"gasPrice" : "1",
|
||||
"gasLimit" : "28500",
|
||||
"gasLimit" : "285000",
|
||||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
|
||||
"value" : "10",
|
||||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
|
||||
|
@ -371,6 +371,46 @@
|
||||
}
|
||||
},
|
||||
|
||||
"CallContractToCreateContractOOGBonusGas" : {
|
||||
"env" : {
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
|
||||
"currentDifficulty" : "45678256",
|
||||
"currentGasLimit" : "100000000",
|
||||
"currentNumber" : "0",
|
||||
"currentTimestamp" : 1,
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
|
||||
},
|
||||
"pre" :
|
||||
{
|
||||
"095e7baea6a6c7c4c2dfeb977efac326af552d87": {
|
||||
"balance": "112",
|
||||
"nonce": "0",
|
||||
"//": "(CREATE 0 64 32)",
|
||||
"//": "{[[0]] 12 (MSTORE 32 0x602060406000f0)(RETURN 57 7)}",
|
||||
"code": "{(MSTORE 0 0x600c60005566602060406000f060205260076039f3)[[0]](CREATE 1 11 21)(CALL 0 (SLOAD 0) 12 0 0 0 0)}",
|
||||
"storage": {}
|
||||
},
|
||||
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
"balance" : "100000000",
|
||||
"code" : "",
|
||||
"nonce" : "0",
|
||||
"storage" : {
|
||||
}
|
||||
}
|
||||
},
|
||||
"transaction" :
|
||||
{
|
||||
"data" : "0x00",
|
||||
"gasLimit" : "20000000",
|
||||
"gasPrice" : "1",
|
||||
"nonce" : "0",
|
||||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
|
||||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
|
||||
"value" : "0"
|
||||
}
|
||||
},
|
||||
|
||||
"CallContractToCreateContractOOG" : {
|
||||
"env" : {
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
|
||||
@ -385,6 +425,7 @@
|
||||
"095e7baea6a6c7c4c2dfeb977efac326af552d87": {
|
||||
"balance": "0",
|
||||
"nonce": "0",
|
||||
"//": "Create should fail. So CALL goes to 0x0...0",
|
||||
"//": "(CREATE 0 64 32)",
|
||||
"//": "{[[0]] 12 (MSTORE 32 0x602060406000f0)(RETURN 57 7)}",
|
||||
"code": "{(MSTORE 0 0x600c60005566602060406000f060205260076039f3)[[0]](CREATE 1 11 21)(CALL 0 (SLOAD 0) 0 0 0 0 0)}",
|
||||
|
@ -25,7 +25,7 @@
|
||||
"transaction" : {
|
||||
"nonce" : "0",
|
||||
"gasPrice" : "1",
|
||||
"gasLimit" : "22000",
|
||||
"gasLimit" : "220000",
|
||||
"to" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"value" : "10",
|
||||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
|
||||
|
@ -12,7 +12,7 @@
|
||||
"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)) }",
|
||||
"code": "{ (MSTORE 0 0x18c547e4f7b0f325ad1e56f57e26c745b09a3e503d86e00e5255ff7f715d3d1c) (MSTORE 32 28) (MSTORE 64 0x73b1693892219d736caba55bdb67216e485557ea6b6af75f37096c9aa6a5a75f) (MSTORE 96 0xeeb940b1d03b21e36b0e47e79769f095fe2ab855bd91e3a38756b7d75a9c4549) [[ 2 ]] (CALL 100000 1 0 0 128 128 32) [[ 0 ]] (MOD (MLOAD 128) (EXP 2 160)) [[ 1 ]] (EQ (ORIGIN) (SLOAD 0)) }",
|
||||
"storage": {}
|
||||
},
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
@ -25,7 +25,7 @@
|
||||
"transaction" : {
|
||||
"nonce" : "0",
|
||||
"gasPrice" : "1",
|
||||
"gasLimit" : "365224",
|
||||
"gasLimit" : "3652240",
|
||||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
|
||||
"value" : "100000",
|
||||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
|
||||
@ -46,7 +46,7 @@
|
||||
"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 64 32) [[ 0 ]] (MOD (MLOAD 64) (EXP 2 160)) [[ 1 ]] (EQ (ORIGIN) (SLOAD 0)) }",
|
||||
"code": "{ (MSTORE 0 0x18c547e4f7b0f325ad1e56f57e26c745b09a3e503d86e00e5255ff7f715d3d1c) (MSTORE 32 28) (MSTORE 64 0x73b1693892219d736caba55bdb67216e485557ea6b6af75f37096c9aa6a5a75f) (MSTORE 96 0xeeb940b1d03b21e36b0e47e79769f095fe2ab855bd91e3a38756b7d75a9c4549) [[ 2 ]] (CALL 100000 1 0 0 128 64 32) [[ 0 ]] (MOD (MLOAD 64) (EXP 2 160)) [[ 1 ]] (EQ (ORIGIN) (SLOAD 0)) }",
|
||||
"storage": {}
|
||||
},
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
@ -81,7 +81,7 @@
|
||||
"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 ]] (MLOAD 128) }",
|
||||
"code": "{ (MSTORE 0 0x18c547e4f7b0f325ad1e56f57e26c745b09a3e503d86e00e5255ff7f715d3d1c) (MSTORE 32 28) (MSTORE 64 0x73b1693892219d736caba55bdb67216e485557ea6b6af75f37096c9aa6a5a75f) (MSTORE 96 0xeeb940b1d03b21e36b0e47e79769f095fe2ab855bd91e3a38756b7d75a9c4549) [[ 2 ]] (CALL 100000 1 0 0 128 128 32) [[ 0 ]] (MLOAD 128) }",
|
||||
"storage": {}
|
||||
},
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
@ -102,7 +102,7 @@
|
||||
}
|
||||
},
|
||||
|
||||
"CallEcrecover0_gas500": {
|
||||
"CallEcrecover0_gas3000": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
@ -115,7 +115,7 @@
|
||||
"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)) }",
|
||||
"code": "{ (MSTORE 0 0x18c547e4f7b0f325ad1e56f57e26c745b09a3e503d86e00e5255ff7f715d3d1c) (MSTORE 32 28) (MSTORE 64 0x73b1693892219d736caba55bdb67216e485557ea6b6af75f37096c9aa6a5a75f) (MSTORE 96 0xeeb940b1d03b21e36b0e47e79769f095fe2ab855bd91e3a38756b7d75a9c4549) [[ 2 ]] (CALL 3000 1 0 0 128 128 32) [[ 0 ]] (MOD (MLOAD 128) (EXP 2 160)) [[ 1 ]] (EQ (ORIGIN) (SLOAD 0)) }",
|
||||
"storage": {}
|
||||
},
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
@ -136,7 +136,7 @@
|
||||
}
|
||||
},
|
||||
|
||||
"CallEcrecover0_Gas499": {
|
||||
"CallEcrecover0_BonusGas": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
@ -149,7 +149,41 @@
|
||||
"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)) }",
|
||||
"code": "{ (MSTORE 0 0x18c547e4f7b0f325ad1e56f57e26c745b09a3e503d86e00e5255ff7f715d3d1c) (MSTORE 32 28) (MSTORE 64 0x73b1693892219d736caba55bdb67216e485557ea6b6af75f37096c9aa6a5a75f) (MSTORE 96 0xeeb940b1d03b21e36b0e47e79769f095fe2ab855bd91e3a38756b7d75a9c4549) [[ 2 ]] (CALL 0 1 1 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_Gas2999": {
|
||||
"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 2999 1 0 0 128 128 32) [[ 0 ]] (MOD (MLOAD 128) (EXP 2 160)) [[ 1 ]] (EQ (ORIGIN) (SLOAD 0)) }",
|
||||
"storage": {}
|
||||
},
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
@ -183,7 +217,7 @@
|
||||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
|
||||
"balance" : "20000000",
|
||||
"nonce" : "0",
|
||||
"code": "{ [[ 2 ]] (CALL 1000 1 0 0 128 128 32) [[ 0 ]] (MOD (MLOAD 128) (EXP 2 160)) }",
|
||||
"code": "{ [[ 2 ]] (CALL 100000 1 0 0 128 128 32) [[ 0 ]] (MOD (MLOAD 128) (EXP 2 160)) }",
|
||||
"storage": {}
|
||||
},
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
@ -217,7 +251,7 @@
|
||||
"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)) }",
|
||||
"code": "{ (MSTORE 0 0x18c547e4f7b0f325ad1e56f57e26c745b09a3e503d86e00e5255ff7f715d3d1c) (MSTORE 32 1) (MSTORE 64 0x73b1693892219d736caba55bdb67216e485557ea6b6af75f37096c9aa6a5a75f) (MSTORE 96 0xeeb940b1d03b21e36b0e47e79769f095fe2ab855bd91e3a38756b7d75a9c4549) [[ 2 ]] (CALL 100000 1 0 0 128 128 32) [[ 0 ]] (MOD (MLOAD 128) (EXP 2 160)) [[ 1 ]] (EQ (ORIGIN) (SLOAD 0)) }",
|
||||
"storage": {}
|
||||
},
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
@ -251,7 +285,7 @@
|
||||
"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)) }",
|
||||
"code": "{ (MSTORE 0 0x18c547e4f7b0f325ad1e56f57e26c745b09a3e503d86e00e5255ff7f715d3d1c) (MSTORE 32 28) (MSTORE 33 0x73b1693892219d736caba55bdb67216e485557ea6b6af75f37096c9aa6a5a75f) (MSTORE 65 0xeeb940b1d03b21e36b0e47e79769f095fe2ab855bd91e3a38756b7d75a9c4549) [[ 2 ]] (CALL 100000 1 0 0 97 97 32) [[ 0 ]] (MOD (MLOAD 97) (EXP 2 160)) [[ 1 ]] (EQ (ORIGIN) (SLOAD 0)) }",
|
||||
"storage": {}
|
||||
},
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
@ -285,7 +319,7 @@
|
||||
"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)) }",
|
||||
"code": "{ (MSTORE 0 0x2f380a2dea7e778d81affc2443403b8fe4644db442ae4862ff5bb3732829cdb9) (MSTORE 32 27) (MSTORE 64 0x6b65ccb0558806e9b097f27a396d08f964e37b8b7af6ceeb516ff86739fbea0a) (MSTORE 96 0x37cbc8d883e129a4b1ef9d5f1df53c4f21a3ef147cf2a50a4ede0eb06ce092d4) [[ 2 ]] (CALL 100000 1 0 0 128 128 32) [[ 0 ]] (MOD (MLOAD 128) (EXP 2 160)) [[ 1 ]] (EQ (ORIGIN) (SLOAD 0)) }",
|
||||
"storage": {}
|
||||
},
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
@ -625,7 +659,7 @@
|
||||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
|
||||
"balance" : "20000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 2 ]] (CALL 500 3 0 0 0 0 32) [[ 0 ]] (MLOAD 0)}",
|
||||
"code" : "{ [[ 2 ]] (CALL 600 3 0 0 0 0 32) [[ 0 ]] (MLOAD 0)}",
|
||||
"storage": {}
|
||||
},
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
@ -659,7 +693,7 @@
|
||||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
|
||||
"balance" : "20000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ (MSTORE 5 0xf34578907f) [[ 2 ]] (CALL 500 3 0 0 37 0 32) [[ 0 ]] (MLOAD 0)}",
|
||||
"code" : "{ (MSTORE 5 0xf34578907f) [[ 2 ]] (CALL 600 3 0 0 37 0 32) [[ 0 ]] (MLOAD 0)}",
|
||||
"storage": {}
|
||||
},
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
@ -693,7 +727,7 @@
|
||||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
|
||||
"balance" : "20000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ (MSTORE 0 0xf34578907f) [[ 2 ]] (CALL 500 3 0 0 37 0 32) [[ 0 ]] (MLOAD 0)}",
|
||||
"code" : "{ (MSTORE 0 0xf34578907f) [[ 2 ]] (CALL 600 3 0 0 37 0 32) [[ 0 ]] (MLOAD 0)}",
|
||||
"storage": {}
|
||||
},
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
@ -727,7 +761,7 @@
|
||||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
|
||||
"balance" : "20000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ (MSTORE 0 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) [[ 2 ]] (CALL 100 3 0 0 32 0 32) [[ 0 ]] (MLOAD 0)}",
|
||||
"code" : "{ (MSTORE 0 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) [[ 2 ]] (CALL 120 3 0 0 32 0 32) [[ 0 ]] (MLOAD 0)}",
|
||||
"storage": {}
|
||||
},
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
@ -761,7 +795,7 @@
|
||||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
|
||||
"balance" : "20000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ (MSTORE 0 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) [[ 2 ]] (CALL 99 3 0 0 32 0 32) [[ 0 ]] (MLOAD 0)}",
|
||||
"code" : "{ (MSTORE 0 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) [[ 2 ]] (CALL 119 3 0 0 32 0 32) [[ 0 ]] (MLOAD 0)}",
|
||||
"storage": {}
|
||||
},
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
@ -795,7 +829,7 @@
|
||||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
|
||||
"balance" : "20000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ (MSTORE 0 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) [[ 2 ]] (CALL 500 3 0 0 1000000 0 32) [[ 0 ]] (MLOAD 0)}",
|
||||
"code" : "{ (MSTORE 0 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) [[ 2 ]] (CALL 600 3 0 0 1000000 0 32) [[ 0 ]] (MLOAD 0)}",
|
||||
"storage": {}
|
||||
},
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
|
@ -3,7 +3,7 @@
|
||||
"env" : {
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
|
||||
"currentDifficulty" : "45678256",
|
||||
"currentGasLimit" : "1000000000000000000000",
|
||||
"currentGasLimit" : "1000000000000000000000000",
|
||||
"currentNumber" : "120",
|
||||
"currentTimestamp" : 1,
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
|
||||
@ -11,7 +11,7 @@
|
||||
"pre" :
|
||||
{
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
"balance" : "10000000000000000",
|
||||
"balance" : "1000000000000000000",
|
||||
"code" : "",
|
||||
"nonce" : "0",
|
||||
"storage" : {
|
||||
@ -19,7 +19,7 @@
|
||||
},
|
||||
|
||||
"d94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
"balance" : "100000",
|
||||
"balance" : "1000000",
|
||||
"//" : " ",
|
||||
"//" : "contract TestContract ",
|
||||
"//" : "{ ",
|
||||
@ -203,7 +203,7 @@
|
||||
"//" : " a = new TestContract(); ",
|
||||
"//" : " } ",
|
||||
"//" : "} ",
|
||||
"code" : "0x60003560e060020a900480630c4c9a8014610084578063296df0df146100965780632a9afb83146100a8578063380e4396146100ba5780634893d88a146100cc5780637ee17e12146100da578063981a3165146100e8578063a60eedda146100fa578063e0a9fd281461010c578063e97384dc1461011e578063ed973fe91461013057005b61008c6102c0565b8060005260206000f35b61009e61067b565b8060005260206000f35b6100b06101ba565b8060005260206000f35b6100c261049b565b8060005260206000f35b6100d461087d565b60006000f35b6100e26101a4565b60006000f35b6100f06102ab565b8060005260206000f35b610102610695565b8060005260206000f35b610114610732565b8060005260206000f35b61012661055a565b8060005260206000f35b610138610142565b8060005260206000f35b600060006060610889600039606060006000f0905080600160a060020a031663b9c3d0a5602060008260e060020a026000526004600060008660155a03f150505060005160e1146101925761019b565b600191506101a0565b600091505b5090565b60006060610889600039606060006000f0905090565b60006001905060005460ff14156101d0576101d9565b600090506102a8565b60025460005414156101ea576101f3565b600090506102a8565b600154600160a060020a031673a94f5374fce5edbc8e2a8697c15331677e6ebf0b141561021f57610228565b600090506102a8565b6003547f676c6f62616c2064617461203332206c656e67746820737472696e6700000000141561025757610260565b600090506102a8565b600460006000815260200190815260200160002054600160a060020a031673a94f5374fce5edbc8e2a8697c15331677e6ebf0b141561029e576102a7565b600090506102a8565b5b90565b6000600090506102b961087d565b6001905090565b6000600090506102ce6101a4565b506102d761049b565b156102e157610307565b7ff000000000000000000000000000000000000000000000000000000000000000810190505b61030f610142565b156103195761033f565b7f0f00000000000000000000000000000000000000000000000000000000000000810190505b610347610695565b1561035157610376565b7ef0000000000000000000000000000000000000000000000000000000000000810190505b61037e61055a565b15610388576103ad565b7e0f000000000000000000000000000000000000000000000000000000000000810190505b60ff60008190555073a94f5374fce5edbc8e2a8697c15331677e6ebf0b60018190555060ff6002819055507f676c6f62616c2064617461203332206c656e67746820737472696e670000000060038190555073a94f5374fce5edbc8e2a8697c15331677e6ebf0b6004600060008152602001908152602001600020819055506104346101ba565b1561043e57610462565b7df00000000000000000000000000000000000000000000000000000000000810190505b61046a610732565b1561047457610498565b7d0f0000000000000000000000000000000000000000000000000000000000810190505b90565b6000600060006000915060009250816000146104b65761053a565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7821315610530575b600a8212156104f55781806001019250506104df565b81600a146105025761052b565b600a90505b60008160ff16111561052a57818060019003925050808060019003915050610507565b5b610539565b60009250610555565b5b8160001461054757610550565b60019250610555565b600092505b505090565b60006001905041600160a060020a0316732adc25665018aa1fe0e6bc666dac8fc2697ff9ba141561058a57610593565b60009050610678565b446302b8feb014156105a4576105ad565b60009050610678565b45683635c9adc5dea0000014156105c3576105cc565b60009050610678565b43607814156105da576105e3565b60009050610678565b33600160a060020a031673a94f5374fce5edbc8e2a8697c15331677e6ebf0b141561060d57610616565b60009050610678565b34606414156106245761062d565b60009050610678565b3a6001141561063b57610644565b60009050610678565b32600160a060020a031673a94f5374fce5edbc8e2a8697c15331677e6ebf0b141561066e57610677565b60009050610678565b5b90565b6000600090505b60011561068e57610682565b6001905090565b60006000600191506060610889600039606060006000f0905080600160a060020a031662f55d9d600060008260e060020a02600052600441600160a060020a03168152602001600060008660155a03f150505080600160a060020a031663b9c3d0a5602060008260e060020a026000526004600060008660155a03f150505060005160e114156107245761072d565b6000915061072e565b5b5090565b60006001905060007f74657374737472696e67000000000000000000000000000000000000000000008152600a016000207f43c4b4524adb81e4e9a5c4648a98e9d320e3908ac5b6c889144b642cd08ae16d141561078f57610798565b6000905061087a565b60026020600060007f74657374737472696e67000000000000000000000000000000000000000000008152600a01600060008560155a03f150506000517f3c8727e019a42b444667a587b6001251becadabbb36bfed8087a92c18882d11114156108015761080a565b6000905061087a565b60036020600060007f74657374737472696e67000000000000000000000000000000000000000000008152600a01600060008560155a03f15050600051600160a060020a031673cd566972b5e50104011a92b59fa8e0b1234851ae141561087057610879565b6000905061087a565b5b90565b6108856102ab565b505600605480600c6000396000f30060003560e060020a90048062f55d9d14601e578063b9c3d0a514602d57005b60276004356046565b60006000f35b6033603d565b8060005260206000f35b600060e1905090565b80600160a060020a0316ff5056",
|
||||
"code" : "0x60003560e060020a900480630c4c9a80146100635780632a9afb8314610075578063380e4396146100875780637ee17e1214610099578063a60eedda146100a7578063e0a9fd28146100b9578063e97384dc146100cb578063ed973fe9146100dd57005b61006b610473565b8060005260206000f35b61007d61064e565b8060005260206000f35b61008f61073f565b8060005260206000f35b6100a16107fe565b60006000f35b6100af6100ef565b8060005260206000f35b6100c1610196565b8060005260206000f35b6100d3610352565b8060005260206000f35b6100e56102eb565b8060005260206000f35b60006000600191506060610815600039606060006000f0905080600160a060020a031662f55d9d600060008260e060020a02600052600441600160a060020a03168152602001600060008660325a03f161014557005b505080600160a060020a031663b9c3d0a5602060008260e060020a026000526004600060008660325a03f161017657005b505060005160e1141561018857610191565b60009150610192565b5b5090565b60006001905060007f74657374737472696e67000000000000000000000000000000000000000000008152600a016000207f43c4b4524adb81e4e9a5c4648a98e9d320e3908ac5b6c889144b642cd08ae16d14156101f3576101fc565b600090506102e8565b60026020600060007f74657374737472696e67000000000000000000000000000000000000000000008152600a01600060008560325a03f161023a57005b506000517f3c8727e019a42b444667a587b6001251becadabbb36bfed8087a92c18882d111141561026a57610273565b600090506102e8565b60036020600060007f74657374737472696e67000000000000000000000000000000000000000000008152600a01600060008560325a03f16102b157005b50600051600160a060020a031673cd566972b5e50104011a92b59fa8e0b1234851ae14156102de576102e7565b600090506102e8565b5b90565b600060006060610815600039606060006000f0905080600160a060020a031663b9c3d0a5602060008260e060020a026000526004600060008660325a03f161032f57005b505060005160e11461034057610349565b6001915061034e565b600091505b5090565b60006001905041600160a060020a0316732adc25665018aa1fe0e6bc666dac8fc2697ff9ba14156103825761038b565b60009050610470565b446302b8feb0141561039c576103a5565b60009050610470565b45683635c9adc5dea0000014156103bb576103c4565b60009050610470565b43607814156103d2576103db565b60009050610470565b33600160a060020a031673a94f5374fce5edbc8e2a8697c15331677e6ebf0b14156104055761040e565b60009050610470565b346064141561041c57610425565b60009050610470565b3a600114156104335761043c565b60009050610470565b32600160a060020a031673a94f5374fce5edbc8e2a8697c15331677e6ebf0b14156104665761046f565b60009050610470565b5b90565b6000600090506104816107fe565b5061048a61073f565b15610494576104ba565b7ff000000000000000000000000000000000000000000000000000000000000000810190505b6104c26102eb565b156104cc576104f2565b7f0f00000000000000000000000000000000000000000000000000000000000000810190505b6104fa6100ef565b1561050457610529565b7ef0000000000000000000000000000000000000000000000000000000000000810190505b610531610352565b1561053b57610560565b7e0f000000000000000000000000000000000000000000000000000000000000810190505b60ff60008190555073a94f5374fce5edbc8e2a8697c15331677e6ebf0b60018190555060ff6002819055507f676c6f62616c2064617461203332206c656e67746820737472696e670000000060038190555073a94f5374fce5edbc8e2a8697c15331677e6ebf0b6004600060008152602001908152602001600020819055506105e761064e565b156105f157610615565b7df00000000000000000000000000000000000000000000000000000000000810190505b61061d610196565b156106275761064b565b7d0f0000000000000000000000000000000000000000000000000000000000810190505b90565b60006001905060005460ff14156106645761066d565b6000905061073c565b600254600054141561067e57610687565b6000905061073c565b600154600160a060020a031673a94f5374fce5edbc8e2a8697c15331677e6ebf0b14156106b3576106bc565b6000905061073c565b6003547f676c6f62616c2064617461203332206c656e67746820737472696e670000000014156106eb576106f4565b6000905061073c565b600460006000815260200190815260200160002054600160a060020a031673a94f5374fce5edbc8e2a8697c15331677e6ebf0b14156107325761073b565b6000905061073c565b5b90565b60006000600060009150600092508160001461075a576107de565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe78213156107d4575b600a821215610799578180600101925050610783565b81600a146107a6576107cf565b600a90505b60008160ff1611156107ce578180600190039250508080600190039150506107ab565b5b6107dd565b600092506107f9565b5b816000146107eb576107f4565b600192506107f9565b600092505b505090565b60006060610815600039606060006000f09050905600605480600c6000396000f30060003560e060020a90048062f55d9d14601e578063b9c3d0a514602d57005b60276004356046565b60006000f35b6033603d565b8060005260206000f35b600060e1905090565b80600160a060020a0316ff5056",
|
||||
"nonce" : "0",
|
||||
"storage" : {
|
||||
}
|
||||
@ -216,7 +216,7 @@
|
||||
"data" : "0x7ee17e12",
|
||||
"//" : "runSolidityTests()",
|
||||
"data" : "0x0c4c9a80",
|
||||
"gasLimit" : "465224",
|
||||
"gasLimit" : "15000000",
|
||||
"gasPrice" : "1",
|
||||
"nonce" : "0",
|
||||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
|
||||
@ -249,11 +249,13 @@
|
||||
"//": "contract main ",
|
||||
"//": "{ ",
|
||||
"//": " uint data; ",
|
||||
"//": " address msgsender; ",
|
||||
"//": " function run() returns (uint) ",
|
||||
"//": " { ",
|
||||
"//": " data = 1; ",
|
||||
"//": " msgsender = 0x095e7baea6a6c7c4c2dfeb977efac326af552d87; ",
|
||||
"//": " subcaller a = new subcaller(); ",
|
||||
"//": " a.init(msg.sender); ",
|
||||
"//": " a.init(msgsender); ",
|
||||
"//": " return data; ",
|
||||
"//": " } ",
|
||||
"//": " ",
|
||||
@ -262,13 +264,13 @@
|
||||
"//": " data = _data; ",
|
||||
"//": " } ",
|
||||
"//": "}",
|
||||
"code" : "0x60e060020a60003504806330debb4214610020578063c04062261461003157005b61002b6004356100a4565b60006000f35b610039610043565b8060005260206000f35b60006000600160008190555060656100af600039606560006000f0905080600160a060020a03166319ab453c600060008260e060020a02600052600433600160a060020a03168152602001600060008660155a03f150505060005491505090565b80600081905550505600605980600c6000396000f30060e060020a60003504806319ab453c14601457005b601d6004356023565b60006000f35b80600160a060020a03166330debb42600060008260e060020a02600052600460e18152602001600060008660155a03f15050505056",
|
||||
"code" : "0x60003560e060020a9004806330debb4214610021578063c04062261461003257005b61002c6004356100c7565b60006000f35b61003a610044565b8060005260206000f35b60006000600160008190555073095e7baea6a6c7c4c2dfeb977efac326af552d87600181905550606a6100d2600039606a60006000f0905080600160a060020a03166319ab453c600060008260e060020a026000526004600154600160a060020a03168152602001600060008660325a03f16100bc57005b505060005491505090565b80600081905550505600605e80600c6000396000f30060003560e060020a9004806319ab453c14601557005b601e6004356024565b60006000f35b80600160a060020a03166330debb42600060008260e060020a02600052600460e18152602001600060008660325a03f1605957005b50505056",
|
||||
"nonce" : "0",
|
||||
"storage" : {
|
||||
}
|
||||
},
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
"balance" : "100000",
|
||||
"balance" : "1000000",
|
||||
"nonce" : "0",
|
||||
"code" : "",
|
||||
"storage": {}
|
||||
@ -278,7 +280,7 @@
|
||||
{
|
||||
"//" : "run()",
|
||||
"data" : "0xc0406226",
|
||||
"gasLimit" : "35000",
|
||||
"gasLimit" : "350000",
|
||||
"gasPrice" : "1",
|
||||
"nonce" : "0",
|
||||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
|
||||
@ -287,7 +289,7 @@
|
||||
}
|
||||
},
|
||||
|
||||
"CallRecursiveMethods" : {
|
||||
"CallRecursiveMethods" : {
|
||||
"env" : {
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
|
||||
"currentDifficulty" : "45678256",
|
||||
@ -317,13 +319,13 @@
|
||||
"//" : " testRecursiveMethods(); ",
|
||||
"//" : " } ",
|
||||
"//" : "}",
|
||||
"code" : "0x60e060020a600035048063296df0df1460285780634893d88a146034578063981a316514604057005b602e604c565b60006000f35b603a6061565b60006000f35b60466059565b60006000f35b5b600115605757604d565b565b605f6061565b565b60676059565b56",
|
||||
"code" : "0x60003560e060020a90048063296df0df1460295780634893d88a146035578063981a316514604157005b602f604d565b60006000f35b603b6062565b60006000f35b6047605a565b60006000f35b5b600115605857604e565b565b60606062565b565b6068605a565b56",
|
||||
"nonce" : "0",
|
||||
"storage" : {
|
||||
}
|
||||
},
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
"balance" : "100000",
|
||||
"balance" : "500000",
|
||||
"nonce" : "0",
|
||||
"code" : "",
|
||||
"storage": {}
|
||||
@ -333,7 +335,7 @@
|
||||
{
|
||||
"//" : "testRecursiveMethods()",
|
||||
"data" : "0x981a3165",
|
||||
"gasLimit" : "25000",
|
||||
"gasLimit" : "30000",
|
||||
"gasPrice" : "1",
|
||||
"nonce" : "0",
|
||||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
|
||||
@ -372,13 +374,13 @@
|
||||
"//" : " testRecursiveMethods(); ",
|
||||
"//" : " } ",
|
||||
"//" : "}",
|
||||
"code" : "0x60e060020a600035048063296df0df1460285780634893d88a146034578063981a316514604057005b602e604c565b60006000f35b603a6061565b60006000f35b60466059565b60006000f35b5b600115605757604d565b565b605f6061565b565b60676059565b56",
|
||||
"code" : "0x60003560e060020a90048063296df0df1460295780634893d88a146035578063981a316514604157005b602f604d565b60006000f35b603b6062565b60006000f35b6047605a565b60006000f35b5b600115605857604e565b565b60606062565b565b6068605a565b56",
|
||||
"nonce" : "0",
|
||||
"storage" : {
|
||||
}
|
||||
},
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
"balance" : "50000",
|
||||
"balance" : "500000",
|
||||
"nonce" : "0",
|
||||
"code" : "",
|
||||
"storage": {}
|
||||
@ -388,7 +390,86 @@
|
||||
{
|
||||
"//" : "testInfiniteLoop()",
|
||||
"data" : "0x296df0df",
|
||||
"gasLimit" : "30000",
|
||||
"gasLimit" : "300000",
|
||||
"gasPrice" : "1",
|
||||
"nonce" : "0",
|
||||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
|
||||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
|
||||
"value" : "1"
|
||||
}
|
||||
},
|
||||
|
||||
"RecursiveCreateContractsCreate4Contracts" : {
|
||||
"env" : {
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
|
||||
"currentDifficulty" : "45678256",
|
||||
"currentGasLimit" : "100000000",
|
||||
"currentNumber" : "0",
|
||||
"currentTimestamp" : 1,
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
|
||||
},
|
||||
"pre" :
|
||||
{
|
||||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
|
||||
"balance" : "1000000000000000000000000000000000",
|
||||
"//" : "contract recursiveCreate1 ",
|
||||
"//" : "{ ",
|
||||
"//" : " uint depp; ",
|
||||
"//" : " function recursiveCreate1(address a, uint depth) ",
|
||||
"//" : " { ",
|
||||
"//" : " depth = depth - 1; ",
|
||||
"//" : " depp = depth; ",
|
||||
"//" : " if(depth > 0) ",
|
||||
"//" : " main(a).create2(depth); ",
|
||||
"//" : " } ",
|
||||
"//" : "} ",
|
||||
"//" : " ",
|
||||
"//" : "contract recursiveCreate2 ",
|
||||
"//" : "{ ",
|
||||
"//" : " uint depp; ",
|
||||
"//" : " function recursiveCreate2(address a, uint depth) ",
|
||||
"//" : " { ",
|
||||
"//" : " depth = depth - 1; ",
|
||||
"//" : " depp = depth; ",
|
||||
"//" : " if(depth > 0) ",
|
||||
"//" : " recursiveCreate1 rec1 = new recursiveCreate1(a, depth); ",
|
||||
"//" : " } ",
|
||||
"//" : "} ",
|
||||
"//" : " ",
|
||||
"//" : "contract main ",
|
||||
"//" : "{ ",
|
||||
"//" : " address maincontract; ",
|
||||
"//" : " uint depp; ",
|
||||
"//" : " function run(uint depth) ",
|
||||
"//" : " { ",
|
||||
"//" : " maincontract = 0x095e7baea6a6c7c4c2dfeb977efac326af552d87; ",
|
||||
"//" : " depp = depth; ",
|
||||
"//" : " recursiveCreate1 rec1 = new recursiveCreate1(maincontract, depth); ",
|
||||
"//" : " } ",
|
||||
"//" : " ",
|
||||
"//" : " function create2(uint depth) ",
|
||||
"//" : " { ",
|
||||
"//" : " recursiveCreate2 rec2 = new recursiveCreate2(maincontract, depth); ",
|
||||
"//" : " address(rec2).send(2); ",
|
||||
"//" : " } ",
|
||||
"//" : "}",
|
||||
"code" : "0x60003560e060020a90048063820b13f614610021578063a444f5e91461003257005b61002c600435610093565b60006000f35b61003d600435610043565b60006000f35b600073095e7baea6a6c7c4c2dfeb977efac326af552d8760008190555081600181905550606b6101ad600039606b600054600160a060020a0316815260200182815260200160006000f090505050565b600060c86100e560003960c8600054600160a060020a0316815260200182815260200160006000f0905080600160a060020a0316600060026000600060006000848787f16100dd57005b50505050505600604060c860043960045160245160006001820391508160008190555060008211602657604c565b606b605d600039606b83600160a060020a0316815260200182815260200160006000f090505b505050600180605c6000396000f300006040606b6004396004516024516001810390508060008190555060008111602457605b565b81600160a060020a031663820b13f6600060008260e060020a026000526004858152602001600060008660325a03f1605857005b50505b5050600180606a6000396000f300006040606b6004396004516024516001810390508060008190555060008111602457605b565b81600160a060020a031663820b13f6600060008260e060020a026000526004858152602001600060008660325a03f1605857005b50505b5050600180606a6000396000f30000",
|
||||
"nonce" : "0",
|
||||
"storage" : {
|
||||
}
|
||||
},
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
"balance" : "5000000",
|
||||
"nonce" : "0",
|
||||
"code" : "",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"transaction" :
|
||||
{
|
||||
"//" : "run(uint256)",
|
||||
"data" : "0xa444f5e90000000000000000000000000000000000000000000000000000000000000004",
|
||||
"gasLimit" : "300000",
|
||||
"gasPrice" : "1",
|
||||
"nonce" : "0",
|
||||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
|
||||
@ -409,12 +490,14 @@
|
||||
"pre" :
|
||||
{
|
||||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
|
||||
"balance" : "1000000",
|
||||
"balance" : "1000000000000000000000000000000000",
|
||||
"//" : "contract recursiveCreate1 ",
|
||||
"//" : "{ ",
|
||||
"//" : " uint depp; ",
|
||||
"//" : " function recursiveCreate1(address a, uint depth) ",
|
||||
"//" : " { ",
|
||||
"//" : " depth = depth - 1; ",
|
||||
"//" : " depp = depth; ",
|
||||
"//" : " if(depth > 0) ",
|
||||
"//" : " main(a).create2(depth); ",
|
||||
"//" : " } ",
|
||||
@ -422,9 +505,11 @@
|
||||
"//" : " ",
|
||||
"//" : "contract recursiveCreate2 ",
|
||||
"//" : "{ ",
|
||||
"//" : " uint depp; ",
|
||||
"//" : " function recursiveCreate2(address a, uint depth) ",
|
||||
"//" : " { ",
|
||||
"//" : " depth = depth - 1; ",
|
||||
"//" : " depp = depth; ",
|
||||
"//" : " if(depth > 0) ",
|
||||
"//" : " recursiveCreate1 rec1 = new recursiveCreate1(a, depth); ",
|
||||
"//" : " } ",
|
||||
@ -436,7 +521,7 @@
|
||||
"//" : " uint depp; ",
|
||||
"//" : " function run(uint depth) ",
|
||||
"//" : " { ",
|
||||
"//" : " maincontract = msg.sender; ",
|
||||
"//" : " maincontract = 0x095e7baea6a6c7c4c2dfeb977efac326af552d87; ",
|
||||
"//" : " depp = depth; ",
|
||||
"//" : " recursiveCreate1 rec1 = new recursiveCreate1(maincontract, depth); ",
|
||||
"//" : " } ",
|
||||
@ -447,13 +532,13 @@
|
||||
"//" : " address(rec2).send(2); ",
|
||||
"//" : " } ",
|
||||
"//" : "}",
|
||||
"code" : "0x60003560e060020a90048063820b13f614610021578063a444f5e91461003257005b61002c600435610043565b60006000f35b61003d60043561008f565b60006000f35b600060c66100cc60003960c6600054600160a060020a0316815260200182815260200160006000f0905080600160a060020a0316600060026000600060006000848787f1505050505050565b6000336000819055508160018190555060686101926000396068600054600160a060020a0316815260200182815260200160006000f09050505056006012604060c6600439600451602451601e565b60018060c56000396000f35b6000600182039150600082116031576057565b6068605d600039606883600160a060020a0316815260200182815260200160006000f090505b5050505600601260406068600439600451602451601e565b60018060676000396000f35b60018103905060008111602f576062565b81600160a060020a031663820b13f6600060008260e060020a026000526004858152602001600060008660155a03f15050505b505056000000601260406068600439600451602451601e565b60018060676000396000f35b60018103905060008111602f576062565b81600160a060020a031663820b13f6600060008260e060020a026000526004858152602001600060008660155a03f15050505b5050560000",
|
||||
"code" : "0x60003560e060020a90048063820b13f614610021578063a444f5e91461003257005b61002c600435610093565b60006000f35b61003d600435610043565b60006000f35b600073095e7baea6a6c7c4c2dfeb977efac326af552d8760008190555081600181905550606b6101ad600039606b600054600160a060020a0316815260200182815260200160006000f090505050565b600060c86100e560003960c8600054600160a060020a0316815260200182815260200160006000f0905080600160a060020a0316600060026000600060006000848787f16100dd57005b50505050505600604060c860043960045160245160006001820391508160008190555060008211602657604c565b606b605d600039606b83600160a060020a0316815260200182815260200160006000f090505b505050600180605c6000396000f300006040606b6004396004516024516001810390508060008190555060008111602457605b565b81600160a060020a031663820b13f6600060008260e060020a026000526004858152602001600060008660325a03f1605857005b50505b5050600180606a6000396000f300006040606b6004396004516024516001810390508060008190555060008111602457605b565b81600160a060020a031663820b13f6600060008260e060020a026000526004858152602001600060008660325a03f1605857005b50505b5050600180606a6000396000f30000",
|
||||
"nonce" : "0",
|
||||
"storage" : {
|
||||
}
|
||||
},
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
"balance" : "500000",
|
||||
"balance" : "5000000",
|
||||
"nonce" : "0",
|
||||
"code" : "",
|
||||
"storage": {}
|
||||
@ -462,8 +547,8 @@
|
||||
"transaction" :
|
||||
{
|
||||
"//" : "run(uint256)",
|
||||
"data" : "0xa444f5e900000000000000000000000000000000000000000000000000000000000204",
|
||||
"gasLimit" : "30000",
|
||||
"data" : "0xa444f5e90000000000000000000000000000000000000000000000000000000000000204",
|
||||
"gasLimit" : "300000",
|
||||
"gasPrice" : "1",
|
||||
"nonce" : "0",
|
||||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
|
||||
@ -508,7 +593,7 @@
|
||||
}
|
||||
},
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
"balance" : "50000",
|
||||
"balance" : "500000",
|
||||
"nonce" : "0",
|
||||
"code" : "",
|
||||
"storage": {}
|
||||
@ -518,7 +603,7 @@
|
||||
{
|
||||
"//" : "run()",
|
||||
"data" : "0xc0406226",
|
||||
"gasLimit" : "30000",
|
||||
"gasLimit" : "300000",
|
||||
"gasPrice" : "1",
|
||||
"nonce" : "0",
|
||||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
|
||||
|
@ -1177,6 +1177,7 @@
|
||||
},
|
||||
"transaction" :
|
||||
{
|
||||
"data" : "cost (0 - 4 !0 - 68) 10*4 + 9*68 = 652",
|
||||
"data" : "0x00000000000000000000112233445566778f32",
|
||||
"gasLimit" : "22000",
|
||||
"gasPrice" : "1",
|
||||
|
52
state.cpp
52
state.cpp
@ -41,7 +41,7 @@ namespace dev { namespace test {
|
||||
|
||||
void doStateTests(json_spirit::mValue& v, bool _fillin)
|
||||
{
|
||||
processCommandLineOptions();
|
||||
Options::get(); // process command line options
|
||||
|
||||
for (auto& i: v.get_obj())
|
||||
{
|
||||
@ -177,48 +177,40 @@ BOOST_AUTO_TEST_CASE(stBlockHashTest)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(stQuadraticComplexityTest)
|
||||
{
|
||||
for (int i = 1; i < boost::unit_test::framework::master_test_suite().argc; ++i)
|
||||
{
|
||||
string arg = boost::unit_test::framework::master_test_suite().argv[i];
|
||||
if (arg == "--quadratic" || arg == "--all")
|
||||
{
|
||||
auto start = chrono::steady_clock::now();
|
||||
if (test::Options::get().quadratic)
|
||||
{
|
||||
auto start = chrono::steady_clock::now();
|
||||
|
||||
dev::test::executeTests("stQuadraticComplexityTest", "/StateTests", dev::test::doStateTests);
|
||||
dev::test::executeTests("stQuadraticComplexityTest", "/StateTests", dev::test::doStateTests);
|
||||
|
||||
auto end = chrono::steady_clock::now();
|
||||
auto duration(chrono::duration_cast<chrono::milliseconds>(end - start));
|
||||
cnote << "test duration: " << duration.count() << " milliseconds.\n";
|
||||
}
|
||||
}
|
||||
auto end = chrono::steady_clock::now();
|
||||
auto duration(chrono::duration_cast<chrono::milliseconds>(end - start));
|
||||
cnote << "test duration: " << duration.count() << " milliseconds.\n";
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(stMemoryStressTest)
|
||||
{
|
||||
for (int i = 1; i < boost::unit_test::framework::master_test_suite().argc; ++i)
|
||||
{
|
||||
string arg = boost::unit_test::framework::master_test_suite().argv[i];
|
||||
if (arg == "--memory" || arg == "--all")
|
||||
{
|
||||
auto start = chrono::steady_clock::now();
|
||||
if (test::Options::get().memory)
|
||||
{
|
||||
auto start = chrono::steady_clock::now();
|
||||
|
||||
dev::test::executeTests("stMemoryStressTest", "/StateTests", dev::test::doStateTests);
|
||||
dev::test::executeTests("stMemoryStressTest", "/StateTests", dev::test::doStateTests);
|
||||
|
||||
auto end = chrono::steady_clock::now();
|
||||
auto duration(chrono::duration_cast<chrono::milliseconds>(end - start));
|
||||
cnote << "test duration: " << duration.count() << " milliseconds.\n";
|
||||
}
|
||||
}
|
||||
auto end = chrono::steady_clock::now();
|
||||
auto duration(chrono::duration_cast<chrono::milliseconds>(end - start));
|
||||
cnote << "test duration: " << duration.count() << " milliseconds.\n";
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(stSolidityTest)
|
||||
{
|
||||
dev::test::executeTests("stSolidityTest", "/StateTests", dev::test::doStateTests);
|
||||
}
|
||||
BOOST_AUTO_TEST_CASE(stSolidityTest)
|
||||
{
|
||||
dev::test::executeTests("stSolidityTest", "/StateTests", dev::test::doStateTests);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(stMemoryTest)
|
||||
{
|
||||
dev::test::executeTests("stMemoryTest", "/StateTests", dev::test::doStateTests);
|
||||
dev::test::executeTests("stMemoryTest", "/StateTests", dev::test::doStateTests);
|
||||
}
|
||||
|
||||
|
||||
|
@ -116,21 +116,16 @@ BOOST_AUTO_TEST_CASE(ttWrongRLPTransaction)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(tt10mbDataField)
|
||||
{
|
||||
for (int i = 1; i < boost::unit_test::framework::master_test_suite().argc; ++i)
|
||||
if (test::Options::get().bigData)
|
||||
{
|
||||
string arg = boost::unit_test::framework::master_test_suite().argv[i];
|
||||
if (arg == "--bigdata" || arg == "--all")
|
||||
{
|
||||
auto start = chrono::steady_clock::now();
|
||||
auto start = chrono::steady_clock::now();
|
||||
|
||||
dev::test::executeTests("tt10mbDataField", "/TransactionTests", dev::test::doTransactionTests);
|
||||
dev::test::executeTests("tt10mbDataField", "/TransactionTests", dev::test::doTransactionTests);
|
||||
|
||||
auto end = chrono::steady_clock::now();
|
||||
auto duration(chrono::duration_cast<chrono::milliseconds>(end - start));
|
||||
cnote << "test duration: " << duration.count() << " milliseconds.\n";
|
||||
}
|
||||
auto end = chrono::steady_clock::now();
|
||||
auto duration(chrono::duration_cast<chrono::milliseconds>(end - start));
|
||||
cnote << "test duration: " << duration.count() << " milliseconds.\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(ttCreateTest)
|
||||
|
69
vm.cpp
69
vm.cpp
@ -312,7 +312,7 @@ namespace dev { namespace test {
|
||||
|
||||
void doVMTests(json_spirit::mValue& v, bool _fillin)
|
||||
{
|
||||
processCommandLineOptions();
|
||||
Options::get(); // process command line options // TODO: We need to control the main() function
|
||||
|
||||
for (auto& i: v.get_obj())
|
||||
{
|
||||
@ -344,7 +344,8 @@ void doVMTests(json_spirit::mValue& v, bool _fillin)
|
||||
try
|
||||
{
|
||||
auto vm = eth::VMFactory::create(fev.gas);
|
||||
output = vm->go(fev, fev.simpleTrace()).toBytes();
|
||||
auto vmtrace = Options::get().vmtrace ? fev.simpleTrace() : OnOpFunc{};
|
||||
output = vm->go(fev, vmtrace).toBytes();
|
||||
gas = vm->gas();
|
||||
}
|
||||
catch (VMException const&)
|
||||
@ -364,18 +365,12 @@ void doVMTests(json_spirit::mValue& v, bool _fillin)
|
||||
}
|
||||
|
||||
auto endTime = std::chrono::high_resolution_clock::now();
|
||||
auto argc = boost::unit_test::framework::master_test_suite().argc;
|
||||
auto argv = boost::unit_test::framework::master_test_suite().argv;
|
||||
for (auto i = 0; i < argc; ++i)
|
||||
if (Options::get().showTimes)
|
||||
{
|
||||
if (std::string(argv[i]) == "--show-times")
|
||||
{
|
||||
auto testDuration = endTime - startTime;
|
||||
cnote << "Execution time: "
|
||||
<< std::chrono::duration_cast<std::chrono::milliseconds>(testDuration).count()
|
||||
<< " ms";
|
||||
break;
|
||||
}
|
||||
auto testDuration = endTime - startTime;
|
||||
cnote << "Execution time: "
|
||||
<< std::chrono::duration_cast<std::chrono::milliseconds>(testDuration).count()
|
||||
<< " ms";
|
||||
}
|
||||
|
||||
// delete null entries in storage for the sake of comparison
|
||||
@ -517,58 +512,42 @@ BOOST_AUTO_TEST_CASE(vmSystemOperationsTest)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(vmPerformanceTest)
|
||||
{
|
||||
for (int i = 1; i < boost::unit_test::framework::master_test_suite().argc; ++i)
|
||||
if (test::Options::get().performance)
|
||||
{
|
||||
string arg = boost::unit_test::framework::master_test_suite().argv[i];
|
||||
if (arg == "--performance" || arg == "--all")
|
||||
{
|
||||
auto start = chrono::steady_clock::now();
|
||||
auto start = chrono::steady_clock::now();
|
||||
|
||||
dev::test::executeTests("vmPerformanceTest", "/VMTests", dev::test::doVMTests);
|
||||
dev::test::executeTests("vmPerformanceTest", "/VMTests", dev::test::doVMTests);
|
||||
|
||||
auto end = chrono::steady_clock::now();
|
||||
auto duration(chrono::duration_cast<chrono::milliseconds>(end - start));
|
||||
cnote << "test duration: " << duration.count() << " milliseconds.\n";
|
||||
}
|
||||
auto end = chrono::steady_clock::now();
|
||||
auto duration(chrono::duration_cast<chrono::milliseconds>(end - start));
|
||||
cnote << "test duration: " << duration.count() << " milliseconds.\n";
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(vmInputLimitsTest1)
|
||||
{
|
||||
for (int i = 1; i < boost::unit_test::framework::master_test_suite().argc; ++i)
|
||||
if (test::Options::get().inputLimits)
|
||||
{
|
||||
string arg = boost::unit_test::framework::master_test_suite().argv[i];
|
||||
if (arg == "--inputlimits" || arg == "--all")
|
||||
{
|
||||
auto start = chrono::steady_clock::now();
|
||||
auto start = chrono::steady_clock::now();
|
||||
|
||||
dev::test::executeTests("vmInputLimits1", "/VMTests", dev::test::doVMTests);
|
||||
dev::test::executeTests("vmInputLimits1", "/VMTests", dev::test::doVMTests);
|
||||
|
||||
auto end = chrono::steady_clock::now();
|
||||
auto duration(chrono::duration_cast<chrono::milliseconds>(end - start));
|
||||
cnote << "test duration: " << duration.count() << " milliseconds.\n";
|
||||
}
|
||||
auto end = chrono::steady_clock::now();
|
||||
auto duration(chrono::duration_cast<chrono::milliseconds>(end - start));
|
||||
cnote << "test duration: " << duration.count() << " milliseconds.\n";
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(vmInputLimitsTest2)
|
||||
{
|
||||
for (int i = 1; i < boost::unit_test::framework::master_test_suite().argc; ++i)
|
||||
{
|
||||
string arg = boost::unit_test::framework::master_test_suite().argv[i];
|
||||
if (arg == "--inputlimits" || arg == "--all")
|
||||
dev::test::executeTests("vmInputLimits2", "/VMTests", dev::test::doVMTests);
|
||||
}
|
||||
if (test::Options::get().inputLimits)
|
||||
dev::test::executeTests("vmInputLimits2", "/VMTests", dev::test::doVMTests);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(vmInputLimitsLightTest)
|
||||
{
|
||||
for (int i = 1; i < boost::unit_test::framework::master_test_suite().argc; ++i)
|
||||
{
|
||||
string arg = boost::unit_test::framework::master_test_suite().argv[i];
|
||||
if (arg == "--inputlimits" || arg == "--all")
|
||||
dev::test::executeTests("vmInputLimitsLight", "/VMTests", dev::test::doVMTests);
|
||||
}
|
||||
if (test::Options::get().inputLimits)
|
||||
dev::test::executeTests("vmInputLimitsLight", "/VMTests", dev::test::doVMTests);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(vmRandom)
|
||||
|
@ -22,6 +22,26 @@ class WebThreeStubClient : public jsonrpc::Client
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
std::string net_peerCount() throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p = Json::nullValue;
|
||||
Json::Value result = this->CallMethod("net_peerCount",p);
|
||||
if (result.isString())
|
||||
return result.asString();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
bool net_listening() throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p = Json::nullValue;
|
||||
Json::Value result = this->CallMethod("net_listening",p);
|
||||
if (result.isBool())
|
||||
return result.asBool();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
std::string eth_coinbase() throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
@ -32,36 +52,6 @@ class WebThreeStubClient : public jsonrpc::Client
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
bool eth_setCoinbase(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_setCoinbase",p);
|
||||
if (result.isBool())
|
||||
return result.asBool();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
bool eth_listening() throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p = Json::nullValue;
|
||||
Json::Value result = this->CallMethod("eth_listening",p);
|
||||
if (result.isBool())
|
||||
return result.asBool();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
bool eth_setListening(bool param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_setListening",p);
|
||||
if (result.isBool())
|
||||
return result.asBool();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
bool eth_mining() throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
@ -72,16 +62,6 @@ class WebThreeStubClient : public jsonrpc::Client
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
bool eth_setMining(bool param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_setMining",p);
|
||||
if (result.isBool())
|
||||
return result.asBool();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
std::string eth_gasPrice() throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
@ -102,151 +82,127 @@ class WebThreeStubClient : public jsonrpc::Client
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
int eth_peerCount() throw (jsonrpc::JsonRpcException)
|
||||
std::string eth_blockNumber() throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p = Json::nullValue;
|
||||
Json::Value result = this->CallMethod("eth_peerCount",p);
|
||||
if (result.isInt())
|
||||
return result.asInt();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
int eth_defaultBlock() throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p = Json::nullValue;
|
||||
Json::Value result = this->CallMethod("eth_defaultBlock",p);
|
||||
if (result.isInt())
|
||||
return result.asInt();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
bool eth_setDefaultBlock(int param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_setDefaultBlock",p);
|
||||
if (result.isBool())
|
||||
return result.asBool();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
int eth_number() throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p = Json::nullValue;
|
||||
Json::Value result = this->CallMethod("eth_number",p);
|
||||
if (result.isInt())
|
||||
return result.asInt();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
std::string eth_balanceAt(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_balanceAt",p);
|
||||
Json::Value result = this->CallMethod("eth_blockNumber",p);
|
||||
if (result.isString())
|
||||
return result.asString();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
std::string eth_stateAt(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
|
||||
std::string eth_getBalance(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
p.append(param2);
|
||||
Json::Value result = this->CallMethod("eth_stateAt",p);
|
||||
Json::Value result = this->CallMethod("eth_getBalance",p);
|
||||
if (result.isString())
|
||||
return result.asString();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
Json::Value eth_storageAt(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
Json::Value eth_getStorage(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_storageAt",p);
|
||||
p.append(param2);
|
||||
Json::Value result = this->CallMethod("eth_getStorage",p);
|
||||
if (result.isObject())
|
||||
return result;
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
double eth_countAt(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
std::string eth_getStorageAt(const std::string& param1, const std::string& param2, const std::string& param3) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_countAt",p);
|
||||
if (result.isDouble())
|
||||
return result.asDouble();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
double eth_transactionCountByHash(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_transactionCountByHash",p);
|
||||
if (result.isDouble())
|
||||
return result.asDouble();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
double eth_transactionCountByNumber(int param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_transactionCountByNumber",p);
|
||||
if (result.isDouble())
|
||||
return result.asDouble();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
double eth_uncleCountByHash(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_uncleCountByHash",p);
|
||||
if (result.isDouble())
|
||||
return result.asDouble();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
double eth_uncleCountByNumber(int param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_uncleCountByNumber",p);
|
||||
if (result.isDouble())
|
||||
return result.asDouble();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
std::string eth_codeAt(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_codeAt",p);
|
||||
p.append(param2);
|
||||
p.append(param3);
|
||||
Json::Value result = this->CallMethod("eth_getStorageAt",p);
|
||||
if (result.isString())
|
||||
return result.asString();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
std::string eth_transact(const Json::Value& param1) throw (jsonrpc::JsonRpcException)
|
||||
std::string eth_getTransactionCount(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_transact",p);
|
||||
p.append(param2);
|
||||
Json::Value result = this->CallMethod("eth_getTransactionCount",p);
|
||||
if (result.isString())
|
||||
return result.asString();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
std::string eth_call(const Json::Value& param1) throw (jsonrpc::JsonRpcException)
|
||||
std::string eth_getBlockTransactionCountByHash(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_getBlockTransactionCountByHash",p);
|
||||
if (result.isString())
|
||||
return result.asString();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
std::string eth_getBlockTransactionCountByNumber(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_getBlockTransactionCountByNumber",p);
|
||||
if (result.isString())
|
||||
return result.asString();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
std::string eth_getUncleCountByBlockHash(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_getUncleCountByBlockHash",p);
|
||||
if (result.isString())
|
||||
return result.asString();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
std::string eth_getUncleCountByBlockNumber(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_getUncleCountByBlockNumber",p);
|
||||
if (result.isString())
|
||||
return result.asString();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
std::string eth_getData(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
p.append(param2);
|
||||
Json::Value result = this->CallMethod("eth_getData",p);
|
||||
if (result.isString())
|
||||
return result.asString();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
std::string eth_sendTransaction(const Json::Value& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_sendTransaction",p);
|
||||
if (result.isString())
|
||||
return result.asString();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
std::string eth_call(const Json::Value& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
p.append(param2);
|
||||
Json::Value result = this->CallMethod("eth_call",p);
|
||||
if (result.isString())
|
||||
return result.asString();
|
||||
@ -263,131 +219,143 @@ class WebThreeStubClient : public jsonrpc::Client
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
Json::Value eth_blockByHash(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_blockByHash",p);
|
||||
if (result.isObject())
|
||||
return result;
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
Json::Value eth_blockByNumber(int param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_blockByNumber",p);
|
||||
if (result.isObject())
|
||||
return result;
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
Json::Value eth_transactionByHash(const std::string& param1, int param2) throw (jsonrpc::JsonRpcException)
|
||||
Json::Value eth_getBlockByHash(const std::string& param1, bool param2) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
p.append(param2);
|
||||
Json::Value result = this->CallMethod("eth_transactionByHash",p);
|
||||
Json::Value result = this->CallMethod("eth_getBlockByHash",p);
|
||||
if (result.isObject())
|
||||
return result;
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
Json::Value eth_transactionByNumber(int param1, int param2) throw (jsonrpc::JsonRpcException)
|
||||
Json::Value eth_getBlockByNumber(const std::string& param1, bool param2) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
p.append(param2);
|
||||
Json::Value result = this->CallMethod("eth_transactionByNumber",p);
|
||||
Json::Value result = this->CallMethod("eth_getBlockByNumber",p);
|
||||
if (result.isObject())
|
||||
return result;
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
Json::Value eth_uncleByHash(const std::string& param1, int param2) throw (jsonrpc::JsonRpcException)
|
||||
Json::Value eth_getTransactionByHash(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_getTransactionByHash",p);
|
||||
if (result.isObject())
|
||||
return result;
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
Json::Value eth_getTransactionByBlockHashAndIndex(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
p.append(param2);
|
||||
Json::Value result = this->CallMethod("eth_uncleByHash",p);
|
||||
Json::Value result = this->CallMethod("eth_getTransactionByBlockHashAndIndex",p);
|
||||
if (result.isObject())
|
||||
return result;
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
Json::Value eth_uncleByNumber(int param1, int param2) throw (jsonrpc::JsonRpcException)
|
||||
Json::Value eth_getTransactionByBlockNumberAndIndex(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
p.append(param2);
|
||||
Json::Value result = this->CallMethod("eth_uncleByNumber",p);
|
||||
Json::Value result = this->CallMethod("eth_getTransactionByBlockNumberAndIndex",p);
|
||||
if (result.isObject())
|
||||
return result;
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
Json::Value eth_compilers() throw (jsonrpc::JsonRpcException)
|
||||
Json::Value eth_getUncleByBlockHashAndIndex(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
p.append(param2);
|
||||
Json::Value result = this->CallMethod("eth_getUncleByBlockHashAndIndex",p);
|
||||
if (result.isObject())
|
||||
return result;
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
Json::Value eth_getUncleByBlockNumberAndIndex(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
p.append(param2);
|
||||
Json::Value result = this->CallMethod("eth_getUncleByBlockNumberAndIndex",p);
|
||||
if (result.isObject())
|
||||
return result;
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
Json::Value eth_getCompilers() throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p = Json::nullValue;
|
||||
Json::Value result = this->CallMethod("eth_compilers",p);
|
||||
Json::Value result = this->CallMethod("eth_getCompilers",p);
|
||||
if (result.isArray())
|
||||
return result;
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
std::string eth_lll(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
std::string eth_compileLLL(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_lll",p);
|
||||
Json::Value result = this->CallMethod("eth_compileLLL",p);
|
||||
if (result.isString())
|
||||
return result.asString();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
std::string eth_solidity(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
std::string eth_compileSerpent(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_solidity",p);
|
||||
Json::Value result = this->CallMethod("eth_compileSerpent",p);
|
||||
if (result.isString())
|
||||
return result.asString();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
std::string eth_serpent(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
std::string eth_compileSolidity(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_serpent",p);
|
||||
Json::Value result = this->CallMethod("eth_compileSolidity",p);
|
||||
if (result.isString())
|
||||
return result.asString();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
int eth_newFilter(const Json::Value& param1) throw (jsonrpc::JsonRpcException)
|
||||
std::string eth_newFilter(const Json::Value& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_newFilter",p);
|
||||
if (result.isInt())
|
||||
return result.asInt();
|
||||
if (result.isString())
|
||||
return result.asString();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
int eth_newFilterString(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
std::string eth_newBlockFilter(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_newFilterString",p);
|
||||
if (result.isInt())
|
||||
return result.asInt();
|
||||
Json::Value result = this->CallMethod("eth_newBlockFilter",p);
|
||||
if (result.isString())
|
||||
return result.asString();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
bool eth_uninstallFilter(int param1) throw (jsonrpc::JsonRpcException)
|
||||
bool eth_uninstallFilter(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
@ -397,31 +365,31 @@ class WebThreeStubClient : public jsonrpc::Client
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
Json::Value eth_changed(int param1) throw (jsonrpc::JsonRpcException)
|
||||
Json::Value eth_getFilterChanges(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_changed",p);
|
||||
Json::Value result = this->CallMethod("eth_getFilterChanges",p);
|
||||
if (result.isArray())
|
||||
return result;
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
Json::Value eth_filterLogs(int param1) throw (jsonrpc::JsonRpcException)
|
||||
Json::Value eth_getFilterLogs(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_filterLogs",p);
|
||||
Json::Value result = this->CallMethod("eth_getFilterLogs",p);
|
||||
if (result.isArray())
|
||||
return result;
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
Json::Value eth_logs(const Json::Value& param1) throw (jsonrpc::JsonRpcException)
|
||||
Json::Value eth_getLogs(const Json::Value& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_logs",p);
|
||||
Json::Value result = this->CallMethod("eth_getLogs",p);
|
||||
if (result.isArray())
|
||||
return result;
|
||||
else
|
||||
@ -448,17 +416,17 @@ class WebThreeStubClient : public jsonrpc::Client
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
int eth_register(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
std::string eth_register(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_register",p);
|
||||
if (result.isInt())
|
||||
return result.asInt();
|
||||
if (result.isString())
|
||||
return result.asString();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
bool eth_unregister(int param1) throw (jsonrpc::JsonRpcException)
|
||||
bool eth_unregister(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
@ -468,11 +436,11 @@ class WebThreeStubClient : public jsonrpc::Client
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
Json::Value eth_queuedTransactions(int param1) throw (jsonrpc::JsonRpcException)
|
||||
Json::Value eth_fetchQueuedTransactions(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_queuedTransactions",p);
|
||||
Json::Value result = this->CallMethod("eth_fetchQueuedTransactions",p);
|
||||
if (result.isArray())
|
||||
return result;
|
||||
else
|
||||
@ -501,29 +469,6 @@ class WebThreeStubClient : public jsonrpc::Client
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
bool db_putString(const std::string& param1, const std::string& param2, const std::string& param3) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
p.append(param2);
|
||||
p.append(param3);
|
||||
Json::Value result = this->CallMethod("db_putString",p);
|
||||
if (result.isBool())
|
||||
return result.asBool();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
std::string db_getString(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
p.append(param2);
|
||||
Json::Value result = this->CallMethod("db_getString",p);
|
||||
if (result.isString())
|
||||
return result.asString();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
bool shh_post(const Json::Value& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
@ -544,11 +489,11 @@ class WebThreeStubClient : public jsonrpc::Client
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
bool shh_haveIdentity(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
bool shh_hasIdentity(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("shh_haveIdentity",p);
|
||||
Json::Value result = this->CallMethod("shh_hasIdentity",p);
|
||||
if (result.isBool())
|
||||
return result.asBool();
|
||||
else
|
||||
@ -576,17 +521,17 @@ class WebThreeStubClient : public jsonrpc::Client
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
int shh_newFilter(const Json::Value& param1) throw (jsonrpc::JsonRpcException)
|
||||
std::string shh_newFilter(const Json::Value& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("shh_newFilter",p);
|
||||
if (result.isInt())
|
||||
return result.asInt();
|
||||
if (result.isString())
|
||||
return result.asString();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
bool shh_uninstallFilter(int param1) throw (jsonrpc::JsonRpcException)
|
||||
bool shh_uninstallFilter(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
@ -596,17 +541,17 @@ class WebThreeStubClient : public jsonrpc::Client
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
Json::Value shh_changed(int param1) throw (jsonrpc::JsonRpcException)
|
||||
Json::Value shh_getFilterChanges(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("shh_changed",p);
|
||||
Json::Value result = this->CallMethod("shh_getFilterChanges",p);
|
||||
if (result.isArray())
|
||||
return result;
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
Json::Value shh_getMessages(int param1) throw (jsonrpc::JsonRpcException)
|
||||
Json::Value shh_getMessages(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
|
Loading…
Reference in New Issue
Block a user