61 changed files with 2250 additions and 514 deletions
@ -1,63 +1,66 @@ |
|||||
[ |
[ |
||||
{ "name": "web3_sha3", "params": [""], "order": [], "returns" : "" }, |
{ "name": "web3_sha3", "params": [""], "order": [], "returns" : "" }, |
||||
{ "name": "web3_clientVersion", "params": [], "order": [], "returns" : "" }, |
{ "name": "web3_clientVersion", "params": [], "order": [], "returns" : "" }, |
||||
|
|
||||
{ "name": "net_version", "params": [], "order": [], "returns" : "" }, |
{ "name": "net_version", "params": [], "order": [], "returns" : "" }, |
||||
{ "name": "net_peerCount", "params": [], "order": [], "returns" : "" }, |
{ "name": "net_peerCount", "params": [], "order": [], "returns" : "" }, |
||||
{ "name": "net_listening", "params": [], "order": [], "returns" : false }, |
{ "name": "net_listening", "params": [], "order": [], "returns" : false }, |
||||
|
|
||||
{ "name": "eth_protocolVersion", "params": [], "order": [], "returns" : "" }, |
{ "name": "eth_protocolVersion", "params": [], "order": [], "returns" : "" }, |
||||
{ "name": "eth_hashrate", "params": [], "order": [], "returns" : "" }, |
{ "name": "eth_hashrate", "params": [], "order": [], "returns" : "" }, |
||||
{ "name": "eth_coinbase", "params": [], "order": [], "returns" : "" }, |
{ "name": "eth_coinbase", "params": [], "order": [], "returns" : "" }, |
||||
{ "name": "eth_mining", "params": [], "order": [], "returns" : false }, |
{ "name": "eth_mining", "params": [], "order": [], "returns" : false }, |
||||
{ "name": "eth_gasPrice", "params": [], "order": [], "returns" : "" }, |
{ "name": "eth_gasPrice", "params": [], "order": [], "returns" : "" }, |
||||
{ "name": "eth_accounts", "params": [], "order": [], "returns" : [] }, |
{ "name": "eth_accounts", "params": [], "order": [], "returns" : [] }, |
||||
{ "name": "eth_blockNumber", "params": [], "order": [], "returns" : ""}, |
{ "name": "eth_blockNumber", "params": [], "order": [], "returns" : ""}, |
||||
{ "name": "eth_getBalance", "params": ["", ""], "order": [], "returns" : ""}, |
{ "name": "eth_getBalance", "params": ["", ""], "order": [], "returns" : ""}, |
||||
{ "name": "eth_getStorageAt", "params": ["", "", ""], "order": [], "returns": ""}, |
{ "name": "eth_getStorageAt", "params": ["", "", ""], "order": [], "returns": ""}, |
||||
{ "name": "eth_getTransactionCount", "params": ["", ""], "order": [], "returns" : ""}, |
{ "name": "eth_getTransactionCount", "params": ["", ""], "order": [], "returns" : ""}, |
||||
{ "name": "eth_getBlockTransactionCountByHash", "params": [""], "order": [], "returns" : ""}, |
{ "name": "eth_getBlockTransactionCountByHash", "params": [""], "order": [], "returns" : ""}, |
||||
{ "name": "eth_getBlockTransactionCountByNumber", "params": [""], "order": [], "returns" : ""}, |
{ "name": "eth_getBlockTransactionCountByNumber", "params": [""], "order": [], "returns" : ""}, |
||||
{ "name": "eth_getUncleCountByBlockHash", "params": [""], "order": [], "returns" : ""}, |
{ "name": "eth_getUncleCountByBlockHash", "params": [""], "order": [], "returns" : ""}, |
||||
{ "name": "eth_getUncleCountByBlockNumber", "params": [""], "order": [], "returns" : ""}, |
{ "name": "eth_getUncleCountByBlockNumber", "params": [""], "order": [], "returns" : ""}, |
||||
{ "name": "eth_getCode", "params": ["", ""], "order": [], "returns": ""}, |
{ "name": "eth_getCode", "params": ["", ""], "order": [], "returns": ""}, |
||||
{ "name": "eth_sendTransaction", "params": [{}], "order": [], "returns": ""}, |
{ "name": "eth_sendTransaction", "params": [{}], "order": [], "returns": ""}, |
||||
{ "name": "eth_call", "params": [{}, ""], "order": [], "returns": ""}, |
{ "name": "eth_call", "params": [{}, ""], "order": [], "returns": ""}, |
||||
{ "name": "eth_flush", "params": [], "order": [], "returns" : true}, |
{ "name": "eth_flush", "params": [], "order": [], "returns" : true}, |
||||
{ "name": "eth_getBlockByHash", "params": ["", false],"order": [], "returns": {}}, |
{ "name": "eth_getBlockByHash", "params": ["", false],"order": [], "returns": {}}, |
||||
{ "name": "eth_getBlockByNumber", "params": ["", false],"order": [], "returns": {}}, |
{ "name": "eth_getBlockByNumber", "params": ["", false],"order": [], "returns": {}}, |
||||
{ "name": "eth_getTransactionByHash", "params": [""], "order": [], "returns": {}}, |
{ "name": "eth_getTransactionByHash", "params": [""], "order": [], "returns": {}}, |
||||
{ "name": "eth_getTransactionByBlockHashAndIndex", "params": ["", ""], "order": [], "returns": {}}, |
{ "name": "eth_getTransactionByBlockHashAndIndex", "params": ["", ""], "order": [], "returns": {}}, |
||||
{ "name": "eth_getTransactionByBlockNumberAndIndex", "params": ["", ""], "order": [], "returns": {}}, |
{ "name": "eth_getTransactionByBlockNumberAndIndex", "params": ["", ""], "order": [], "returns": {}}, |
||||
{ "name": "eth_getUncleByBlockHashAndIndex", "params": ["", ""], "order": [], "returns": {}}, |
{ "name": "eth_getUncleByBlockHashAndIndex", "params": ["", ""], "order": [], "returns": {}}, |
||||
{ "name": "eth_getUncleByBlockNumberAndIndex", "params": ["", ""], "order": [], "returns": {}}, |
{ "name": "eth_getUncleByBlockNumberAndIndex", "params": ["", ""], "order": [], "returns": {}}, |
||||
{ "name": "eth_getCompilers", "params": [], "order": [], "returns": []}, |
{ "name": "eth_getCompilers", "params": [], "order": [], "returns": []}, |
||||
{ "name": "eth_compileLLL", "params": [""], "order": [], "returns": ""}, |
{ "name": "eth_compileLLL", "params": [""], "order": [], "returns": ""}, |
||||
{ "name": "eth_compileSerpent", "params": [""], "order": [], "returns": ""}, |
{ "name": "eth_compileSerpent", "params": [""], "order": [], "returns": ""}, |
||||
{ "name": "eth_compileSolidity", "params": [""], "order": [], "returns": ""}, |
{ "name": "eth_compileSolidity", "params": [""], "order": [], "returns": ""}, |
||||
{ "name": "eth_newFilter", "params": [{}], "order": [], "returns": ""}, |
{ "name": "eth_newFilter", "params": [{}], "order": [], "returns": ""}, |
||||
{ "name": "eth_newBlockFilter", "params": [""], "order": [], "returns": ""}, |
{ "name": "eth_newBlockFilter", "params": [""], "order": [], "returns": ""}, |
||||
{ "name": "eth_uninstallFilter", "params": [""], "order": [], "returns": true}, |
{ "name": "eth_uninstallFilter", "params": [""], "order": [], "returns": true}, |
||||
{ "name": "eth_getFilterChanges", "params": [""], "order": [], "returns": []}, |
{ "name": "eth_getFilterChanges", "params": [""], "order": [], "returns": []}, |
||||
{ "name": "eth_getFilterLogs", "params": [""], "order": [], "returns": []}, |
{ "name": "eth_getFilterLogs", "params": [""], "order": [], "returns": []}, |
||||
{ "name": "eth_getLogs", "params": [{}], "order": [], "returns": []}, |
{ "name": "eth_getLogs", "params": [{}], "order": [], "returns": []}, |
||||
{ "name": "eth_getWork", "params": [], "order": [], "returns": []}, |
{ "name": "eth_getWork", "params": [], "order": [], "returns": []}, |
||||
{ "name": "eth_submitWork", "params": ["", "", ""], "order": [], "returns": true}, |
{ "name": "eth_submitWork", "params": ["", "", ""], "order": [], "returns": true}, |
||||
{ "name": "eth_register", "params": [""], "order": [], "returns": ""}, |
{ "name": "eth_register", "params": [""], "order": [], "returns": ""}, |
||||
{ "name": "eth_unregister", "params": [""], "order": [], "returns": true}, |
{ "name": "eth_unregister", "params": [""], "order": [], "returns": true}, |
||||
{ "name": "eth_fetchQueuedTransactions", "params": [""], "order": [], "returns": []}, |
{ "name": "eth_fetchQueuedTransactions", "params": [""], "order": [], "returns": []}, |
||||
|
{ "name": "eth_signTransaction", "params": [{}], "order": [], "returns": ""}, |
||||
|
{ "name": "eth_inspectTransaction", "params": [""], "order": [], "returns": {}}, |
||||
|
{ "name": "eth_injectTransaction", "params": [""], "order": [], "returns": true}, |
||||
|
|
||||
{ "name": "db_put", "params": ["", "", ""], "order": [], "returns": true}, |
{ "name": "db_put", "params": ["", "", ""], "order": [], "returns": true}, |
||||
{ "name": "db_get", "params": ["", ""], "order": [], "returns": ""}, |
{ "name": "db_get", "params": ["", ""], "order": [], "returns": ""}, |
||||
|
|
||||
{ "name": "shh_post", "params": [{}], "order": [], "returns": true}, |
{ "name": "shh_post", "params": [{}], "order": [], "returns": true}, |
||||
{ "name": "shh_newIdentity", "params": [], "order": [], "returns": ""}, |
{ "name": "shh_newIdentity", "params": [], "order": [], "returns": ""}, |
||||
{ "name": "shh_hasIdentity", "params": [""], "order": [], "returns": false}, |
{ "name": "shh_hasIdentity", "params": [""], "order": [], "returns": false}, |
||||
{ "name": "shh_newGroup", "params": ["", ""], "order": [], "returns": ""}, |
{ "name": "shh_newGroup", "params": ["", ""], "order": [], "returns": ""}, |
||||
{ "name": "shh_addToGroup", "params": ["", ""], "order": [], "returns": ""}, |
{ "name": "shh_addToGroup", "params": ["", ""], "order": [], "returns": ""}, |
||||
{ "name": "shh_newFilter", "params": [{}], "order": [], "returns": ""}, |
{ "name": "shh_newFilter", "params": [{}], "order": [], "returns": ""}, |
||||
{ "name": "shh_uninstallFilter", "params": [""], "order": [], "returns": true}, |
{ "name": "shh_uninstallFilter", "params": [""], "order": [], "returns": true}, |
||||
{ "name": "shh_getFilterChanges", "params": [""], "order": [], "returns": []}, |
{ "name": "shh_getFilterChanges", "params": [""], "order": [], "returns": []}, |
||||
{ "name": "shh_getMessages", "params": [""], "order": [], "returns": []} |
{ "name": "shh_getMessages", "params": [""], "order": [], "returns": []} |
||||
] |
] |
||||
|
|
||||
|
@ -0,0 +1,386 @@ |
|||||
|
{ |
||||
|
"highGasUsage" : { |
||||
|
"genesisBlockHeader" : { |
||||
|
"bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", |
||||
|
"coinbase" : "0x8888f1f195afa192cfee860698584c030f4c9db1", |
||||
|
"difficulty" : "131072", |
||||
|
"extraData" : "0x42", |
||||
|
"gasLimit" : "31415920", |
||||
|
"gasUsed" : "0", |
||||
|
"mixHash" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", |
||||
|
"nonce" : "0x0102030405060708", |
||||
|
"number" : "0", |
||||
|
"parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", |
||||
|
"receiptTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", |
||||
|
"stateRoot" : "0xf99eb1626cfa6db435c0836235942d7ccaa935f1ae247d3f1c21e495685f903a", |
||||
|
"timestamp" : "0x54c98c81", |
||||
|
"transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", |
||||
|
"uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" |
||||
|
}, |
||||
|
"expect" : { |
||||
|
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { |
||||
|
"balance" : "10000000000" |
||||
|
} |
||||
|
}, |
||||
|
"pre" : { |
||||
|
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { |
||||
|
"balance" : "9000000000000000000000000000", |
||||
|
"nonce" : "0", |
||||
|
"code" : "", |
||||
|
"storage": {} |
||||
|
}, |
||||
|
"aaaf5374fce5edbc8e2a8697c15331677e6ebf0b" : { |
||||
|
"balance" : "10000000000", |
||||
|
"nonce" : "0", |
||||
|
"code" : "0x60003551", |
||||
|
"storage": {} |
||||
|
} |
||||
|
}, |
||||
|
"blocks" : [ |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
{ |
||||
|
"data" : "0xffffffffffff", |
||||
|
"gasLimit" : "850000", |
||||
|
"gasPrice" : "10000000000000", |
||||
|
"nonce" : "0", |
||||
|
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
||||
|
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
||||
|
"value" : "10" |
||||
|
} |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
{ |
||||
|
"data" : "0xffffffffffff", |
||||
|
"gasLimit" : "850000", |
||||
|
"gasPrice" : "12000000000000", |
||||
|
"nonce" : "1", |
||||
|
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
||||
|
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
||||
|
"value" : "10" |
||||
|
} |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
{ |
||||
|
"data" : "0xffffffffffff", |
||||
|
"gasLimit" : "850000", |
||||
|
"gasPrice" : "14000000000000", |
||||
|
"nonce" : "2", |
||||
|
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
||||
|
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
||||
|
"value" : "10" |
||||
|
} |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
{ |
||||
|
"data" : "0xffffffffffff", |
||||
|
"gasLimit" : "850000", |
||||
|
"gasPrice" : "16000000000000", |
||||
|
"nonce" : "3", |
||||
|
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
||||
|
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
||||
|
"value" : "10" |
||||
|
} |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
{ |
||||
|
"data" : "0xffffffffffff", |
||||
|
"gasLimit" : "850000", |
||||
|
"gasPrice" : "18000000000000", |
||||
|
"nonce" : "4", |
||||
|
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
||||
|
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
||||
|
"value" : "10" |
||||
|
} |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
{ |
||||
|
"data" : "0xffffffffffff", |
||||
|
"gasLimit" : "850000", |
||||
|
"gasPrice" : "20000000000000", |
||||
|
"nonce" : "5", |
||||
|
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
||||
|
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
||||
|
"value" : "10" |
||||
|
} |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
{ |
||||
|
"data" : "0xffffffffffff", |
||||
|
"gasLimit" : "850000", |
||||
|
"gasPrice" : "22000000000000", |
||||
|
"nonce" : "6", |
||||
|
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
||||
|
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
||||
|
"value" : "10" |
||||
|
} |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
{ |
||||
|
"data" : "0xffffffffffff", |
||||
|
"gasLimit" : "850000", |
||||
|
"gasPrice" : "24000000000000", |
||||
|
"nonce" : "7", |
||||
|
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
||||
|
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
||||
|
"value" : "10" |
||||
|
} |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
{ |
||||
|
"data" : "0xffffffffffff", |
||||
|
"gasLimit" : "850000", |
||||
|
"gasPrice" : "26000000000000", |
||||
|
"nonce" : "8", |
||||
|
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
||||
|
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
||||
|
"value" : "10" |
||||
|
} |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
{ |
||||
|
"data" : "0xffffffffffff", |
||||
|
"gasLimit" : "850000", |
||||
|
"gasPrice" : "28000000000000", |
||||
|
"nonce" : "9", |
||||
|
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
||||
|
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
||||
|
"value" : "10" |
||||
|
} |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
{ |
||||
|
"data" : "0xffffffffffff", |
||||
|
"gasLimit" : "850000", |
||||
|
"gasPrice" : "30000000000000", |
||||
|
"nonce" : "10", |
||||
|
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", |
||||
|
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", |
||||
|
"value" : "10" |
||||
|
} |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
|
||||
|
"notxs" : { |
||||
|
"genesisBlockHeader" : { |
||||
|
"bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", |
||||
|
"coinbase" : "0x8888f1f195afa192cfee860698584c030f4c9db1", |
||||
|
"difficulty" : "131072", |
||||
|
"extraData" : "0x42", |
||||
|
"gasLimit" : "3141592", |
||||
|
"gasUsed" : "0", |
||||
|
"mixHash" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", |
||||
|
"nonce" : "0x0102030405060708", |
||||
|
"number" : "0", |
||||
|
"parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", |
||||
|
"receiptTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", |
||||
|
"stateRoot" : "0xf99eb1626cfa6db435c0836235942d7ccaa935f1ae247d3f1c21e495685f903a", |
||||
|
"timestamp" : "0x54c98c81", |
||||
|
"transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", |
||||
|
"uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" |
||||
|
}, |
||||
|
"expect" : { |
||||
|
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { |
||||
|
"balance" : "10000000000" |
||||
|
} |
||||
|
}, |
||||
|
"pre" : { |
||||
|
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { |
||||
|
"balance" : "10000000000", |
||||
|
"nonce" : "0", |
||||
|
"code" : "", |
||||
|
"storage": {} |
||||
|
} |
||||
|
}, |
||||
|
"blocks" : [ |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"transactions" : [ |
||||
|
], |
||||
|
"uncleHeaders" : [ |
||||
|
] |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
} |
@ -0,0 +1,140 @@ |
|||||
|
/*
|
||||
|
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 gasPricer.cpp
|
||||
|
* @author Christoph Jentzsch <cj@ethdev.com> |
||||
|
* @date 2015 |
||||
|
*/ |
||||
|
|
||||
|
#include <libtestutils/BlockChainLoader.h> |
||||
|
#include <libethereum/State.h> |
||||
|
#include <libethereum/BlockChain.h> |
||||
|
#include <libethereum/Client.h> |
||||
|
#include <libdevcore/TransientDirectory.h> |
||||
|
#include "../TestHelper.h" |
||||
|
|
||||
|
using namespace std; |
||||
|
using namespace dev; |
||||
|
using namespace dev::eth; |
||||
|
|
||||
|
namespace dev { namespace test { |
||||
|
|
||||
|
void executeGasPricerTest(const string name, double _etherPrice, double _blockFee, const string bcTestPath, TransactionPriority _txPrio, u256 _expectedAsk, u256 _expectedBid) |
||||
|
{ |
||||
|
cnote << name; |
||||
|
BasicGasPricer gp(u256(double(ether / 1000) / _etherPrice), u256(_blockFee * 1000)); |
||||
|
|
||||
|
Json::Value vJson = test::loadJsonFromFile(test::getTestPath() + bcTestPath); |
||||
|
test::BlockChainLoader bcLoader(vJson[name]); |
||||
|
BlockChain const& bc = bcLoader.bc(); |
||||
|
|
||||
|
gp.update(bc); |
||||
|
BOOST_CHECK_EQUAL(gp.ask(State()), _expectedAsk); |
||||
|
BOOST_CHECK_EQUAL(gp.bid(_txPrio), _expectedBid); |
||||
|
} |
||||
|
} } |
||||
|
|
||||
|
BOOST_AUTO_TEST_SUITE(GasPricer) |
||||
|
|
||||
|
BOOST_AUTO_TEST_CASE(trivialGasPricer) |
||||
|
{ |
||||
|
cnote << "trivialGasPricer"; |
||||
|
std::shared_ptr<dev::eth::GasPricer> gp(new TrivialGasPricer); |
||||
|
BOOST_CHECK_EQUAL(gp->ask(State()), 10 * szabo); |
||||
|
BOOST_CHECK_EQUAL(gp->bid(), 10 * szabo); |
||||
|
gp->update(BlockChain(bytes(), TransientDirectory().path(), WithExisting::Kill)); |
||||
|
BOOST_CHECK_EQUAL(gp->ask(State()), 10 * szabo); |
||||
|
BOOST_CHECK_EQUAL(gp->bid(), 10 * szabo); |
||||
|
} |
||||
|
|
||||
|
BOOST_AUTO_TEST_CASE(basicGasPricerNoUpdate) |
||||
|
{ |
||||
|
cnote << "basicGasPricer"; |
||||
|
BasicGasPricer gp(u256(double(ether / 1000) / 30.679), u256(15.0 * 1000)); |
||||
|
BOOST_CHECK_EQUAL(gp.ask(State()), 155632494086); |
||||
|
BOOST_CHECK_EQUAL(gp.bid(), 155632494086); |
||||
|
|
||||
|
gp.setRefPrice(u256(0)); |
||||
|
BOOST_CHECK_EQUAL(gp.ask(State()), 0); |
||||
|
BOOST_CHECK_EQUAL(gp.bid(), 0); |
||||
|
|
||||
|
gp.setRefPrice(u256(1)); |
||||
|
gp.setRefBlockFees(u256(0)); |
||||
|
BOOST_CHECK_EQUAL(gp.ask(State()), 0); |
||||
|
BOOST_CHECK_EQUAL(gp.bid(), 0); |
||||
|
|
||||
|
gp.setRefPrice(u256("0x100000000000000000000000000000000")); |
||||
|
BOOST_CHECK_THROW(gp.setRefBlockFees(u256("0x100000000000000000000000000000000")), Overflow); |
||||
|
BOOST_CHECK_EQUAL(gp.ask(State()), 0); |
||||
|
BOOST_CHECK_EQUAL(gp.bid(), 0); |
||||
|
|
||||
|
gp.setRefPrice(1); |
||||
|
gp.setRefBlockFees(u256("0x100000000000000000000000000000000")); |
||||
|
BOOST_CHECK_THROW(gp.setRefPrice(u256("0x100000000000000000000000000000000")), Overflow); |
||||
|
BOOST_CHECK_EQUAL(gp.ask(State()), u256("108315264019305646138446560671076")); |
||||
|
BOOST_CHECK_EQUAL(gp.bid(), u256("108315264019305646138446560671076")); |
||||
|
} |
||||
|
|
||||
|
BOOST_AUTO_TEST_CASE(basicGasPricer_RPC_API_Test) |
||||
|
{ |
||||
|
dev::test::executeGasPricerTest("RPC_API_Test", 30.679, 15.0, "/BlockTests/bcRPC_API_Test.json", TransactionPriority::Medium, 155632494086, 1); |
||||
|
} |
||||
|
|
||||
|
BOOST_AUTO_TEST_CASE(basicGasPricer_bcValidBlockTest) |
||||
|
{ |
||||
|
dev::test::executeGasPricerTest("SimpleTx", 30.679, 15.0, "/BlockTests/bcValidBlockTest.json", TransactionPriority::Medium, 155632494086, 10); |
||||
|
} |
||||
|
|
||||
|
BOOST_AUTO_TEST_CASE(basicGasPricer_bcUncleTest) |
||||
|
{ |
||||
|
dev::test::executeGasPricerTest("twoUncle", 30.679, 15.0, "/BlockTests/bcUncleTest.json", TransactionPriority::Medium, 155632494086, 1); |
||||
|
} |
||||
|
|
||||
|
BOOST_AUTO_TEST_CASE(basicGasPricer_bcUncleHeaderValiditiy) |
||||
|
{ |
||||
|
dev::test::executeGasPricerTest("correct", 30.679, 15.0, "/BlockTests/bcUncleHeaderValiditiy.json", TransactionPriority::Medium, 155632494086, 1); |
||||
|
} |
||||
|
|
||||
|
BOOST_AUTO_TEST_CASE(basicGasPricer_notxs) |
||||
|
{ |
||||
|
dev::test::executeGasPricerTest("notxs", 30.679, 15.0, "/BlockTests/bcGasPricerTest.json", TransactionPriority::Medium, 155632494086, 155632494086); |
||||
|
} |
||||
|
|
||||
|
BOOST_AUTO_TEST_CASE(basicGasPricer_highGasUsage_LowestPrio) |
||||
|
{ |
||||
|
dev::test::executeGasPricerTest("highGasUsage", 30.679, 15.0, "/BlockTests/bcGasPricerTest.json", TransactionPriority::Lowest, 15731292650, 10000000000000); |
||||
|
} |
||||
|
|
||||
|
BOOST_AUTO_TEST_CASE(basicGasPricer_highGasUsage_LowPrio) |
||||
|
{ |
||||
|
dev::test::executeGasPricerTest("highGasUsage", 30.679, 15.0, "/BlockTests/bcGasPricerTest.json", TransactionPriority::Low, 15731292650, 15734152261884); |
||||
|
} |
||||
|
|
||||
|
BOOST_AUTO_TEST_CASE(basicGasPricer_highGasUsage_MediumPrio) |
||||
|
{ |
||||
|
dev::test::executeGasPricerTest("highGasUsage", 30.679, 15.0, "/BlockTests/bcGasPricerTest.json", TransactionPriority::Medium, 15731292650, 20000000000000); |
||||
|
} |
||||
|
|
||||
|
BOOST_AUTO_TEST_CASE(basicGasPricer_highGasUsage_HighPrio) |
||||
|
{ |
||||
|
dev::test::executeGasPricerTest("highGasUsage", 30.679, 15.0, "/BlockTests/bcGasPricerTest.json", TransactionPriority::High, 15731292650, 24265847738115); |
||||
|
} |
||||
|
|
||||
|
BOOST_AUTO_TEST_CASE(basicGasPricer_highGasUsage_HighestPrio) |
||||
|
{ |
||||
|
dev::test::executeGasPricerTest("highGasUsage", 30.679, 15.0, "/BlockTests/bcGasPricerTest.json", TransactionPriority::Highest, 15731292650, 30000000000000); |
||||
|
} |
||||
|
BOOST_AUTO_TEST_SUITE_END() |
@ -0,0 +1,626 @@ |
|||||
|
/**
|
||||
|
* This file is generated by jsonrpcstub, DO NOT CHANGE IT MANUALLY! |
||||
|
*/ |
||||
|
|
||||
|
#ifndef JSONRPC_CPP_STUB_WEBTHREESTUBCLIENT_H_ |
||||
|
#define JSONRPC_CPP_STUB_WEBTHREESTUBCLIENT_H_ |
||||
|
|
||||
|
#include <jsonrpccpp/client.h> |
||||
|
|
||||
|
class WebThreeStubClient : public jsonrpc::Client |
||||
|
{ |
||||
|
public: |
||||
|
WebThreeStubClient(jsonrpc::IClientConnector &conn, jsonrpc::clientVersion_t type = jsonrpc::JSONRPC_CLIENT_V2) : jsonrpc::Client(conn, type) {} |
||||
|
|
||||
|
std::string web3_sha3(const std::string& param1) throw (jsonrpc::JsonRpcException) |
||||
|
{ |
||||
|
Json::Value p; |
||||
|
p.append(param1); |
||||
|
Json::Value result = this->CallMethod("web3_sha3",p); |
||||
|
if (result.isString()) |
||||
|
return result.asString(); |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
std::string web3_clientVersion() throw (jsonrpc::JsonRpcException) |
||||
|
{ |
||||
|
Json::Value p; |
||||
|
p = Json::nullValue; |
||||
|
Json::Value result = this->CallMethod("web3_clientVersion",p); |
||||
|
if (result.isString()) |
||||
|
return result.asString(); |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
std::string net_version() throw (jsonrpc::JsonRpcException) |
||||
|
{ |
||||
|
Json::Value p; |
||||
|
p = Json::nullValue; |
||||
|
Json::Value result = this->CallMethod("net_version",p); |
||||
|
if (result.isString()) |
||||
|
return result.asString(); |
||||
|
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_protocolVersion() throw (jsonrpc::JsonRpcException) |
||||
|
{ |
||||
|
Json::Value p; |
||||
|
p = Json::nullValue; |
||||
|
Json::Value result = this->CallMethod("eth_protocolVersion",p); |
||||
|
if (result.isString()) |
||||
|
return result.asString(); |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
std::string eth_hashrate() throw (jsonrpc::JsonRpcException) |
||||
|
{ |
||||
|
Json::Value p; |
||||
|
p = Json::nullValue; |
||||
|
Json::Value result = this->CallMethod("eth_hashrate",p); |
||||
|
if (result.isString()) |
||||
|
return result.asString(); |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
std::string eth_coinbase() throw (jsonrpc::JsonRpcException) |
||||
|
{ |
||||
|
Json::Value p; |
||||
|
p = Json::nullValue; |
||||
|
Json::Value result = this->CallMethod("eth_coinbase",p); |
||||
|
if (result.isString()) |
||||
|
return result.asString(); |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
bool eth_mining() throw (jsonrpc::JsonRpcException) |
||||
|
{ |
||||
|
Json::Value p; |
||||
|
p = Json::nullValue; |
||||
|
Json::Value result = this->CallMethod("eth_mining",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; |
||||
|
p = Json::nullValue; |
||||
|
Json::Value result = this->CallMethod("eth_gasPrice",p); |
||||
|
if (result.isString()) |
||||
|
return result.asString(); |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
Json::Value eth_accounts() throw (jsonrpc::JsonRpcException) |
||||
|
{ |
||||
|
Json::Value p; |
||||
|
p = Json::nullValue; |
||||
|
Json::Value result = this->CallMethod("eth_accounts",p); |
||||
|
if (result.isArray()) |
||||
|
return result; |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
std::string eth_blockNumber() throw (jsonrpc::JsonRpcException) |
||||
|
{ |
||||
|
Json::Value p; |
||||
|
p = Json::nullValue; |
||||
|
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_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_getBalance",p); |
||||
|
if (result.isString()) |
||||
|
return result.asString(); |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
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); |
||||
|
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_getTransactionCount(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_getTransactionCount",p); |
||||
|
if (result.isString()) |
||||
|
return result.asString(); |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
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_getCode(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_getCode",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(); |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
bool eth_flush() throw (jsonrpc::JsonRpcException) |
||||
|
{ |
||||
|
Json::Value p; |
||||
|
p = Json::nullValue; |
||||
|
Json::Value result = this->CallMethod("eth_flush",p); |
||||
|
if (result.isBool()) |
||||
|
return result.asBool(); |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
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_getBlockByHash",p); |
||||
|
if (result.isObject()) |
||||
|
return result; |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
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_getBlockByNumber",p); |
||||
|
if (result.isObject()) |
||||
|
return result; |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
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_getTransactionByBlockHashAndIndex",p); |
||||
|
if (result.isObject()) |
||||
|
return result; |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
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_getTransactionByBlockNumberAndIndex",p); |
||||
|
if (result.isObject()) |
||||
|
return result; |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
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_getCompilers",p); |
||||
|
if (result.isArray()) |
||||
|
return result; |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
std::string eth_compileLLL(const std::string& param1) throw (jsonrpc::JsonRpcException) |
||||
|
{ |
||||
|
Json::Value p; |
||||
|
p.append(param1); |
||||
|
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_compileSerpent(const std::string& param1) throw (jsonrpc::JsonRpcException) |
||||
|
{ |
||||
|
Json::Value p; |
||||
|
p.append(param1); |
||||
|
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_compileSolidity(const std::string& param1) throw (jsonrpc::JsonRpcException) |
||||
|
{ |
||||
|
Json::Value p; |
||||
|
p.append(param1); |
||||
|
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()); |
||||
|
} |
||||
|
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.isString()) |
||||
|
return result.asString(); |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
std::string eth_newBlockFilter(const std::string& param1) throw (jsonrpc::JsonRpcException) |
||||
|
{ |
||||
|
Json::Value p; |
||||
|
p.append(param1); |
||||
|
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(const std::string& param1) throw (jsonrpc::JsonRpcException) |
||||
|
{ |
||||
|
Json::Value p; |
||||
|
p.append(param1); |
||||
|
Json::Value result = this->CallMethod("eth_uninstallFilter",p); |
||||
|
if (result.isBool()) |
||||
|
return result.asBool(); |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
Json::Value eth_getFilterChanges(const std::string& param1) throw (jsonrpc::JsonRpcException) |
||||
|
{ |
||||
|
Json::Value p; |
||||
|
p.append(param1); |
||||
|
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_getFilterLogs(const std::string& param1) throw (jsonrpc::JsonRpcException) |
||||
|
{ |
||||
|
Json::Value p; |
||||
|
p.append(param1); |
||||
|
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_getLogs(const Json::Value& param1) throw (jsonrpc::JsonRpcException) |
||||
|
{ |
||||
|
Json::Value p; |
||||
|
p.append(param1); |
||||
|
Json::Value result = this->CallMethod("eth_getLogs",p); |
||||
|
if (result.isArray()) |
||||
|
return result; |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
Json::Value eth_getWork() throw (jsonrpc::JsonRpcException) |
||||
|
{ |
||||
|
Json::Value p; |
||||
|
p = Json::nullValue; |
||||
|
Json::Value result = this->CallMethod("eth_getWork",p); |
||||
|
if (result.isArray()) |
||||
|
return result; |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
bool eth_submitWork(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("eth_submitWork",p); |
||||
|
if (result.isBool()) |
||||
|
return result.asBool(); |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
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.isString()) |
||||
|
return result.asString(); |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
bool eth_unregister(const std::string& param1) throw (jsonrpc::JsonRpcException) |
||||
|
{ |
||||
|
Json::Value p; |
||||
|
p.append(param1); |
||||
|
Json::Value result = this->CallMethod("eth_unregister",p); |
||||
|
if (result.isBool()) |
||||
|
return result.asBool(); |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
Json::Value eth_fetchQueuedTransactions(const std::string& param1) throw (jsonrpc::JsonRpcException) |
||||
|
{ |
||||
|
Json::Value p; |
||||
|
p.append(param1); |
||||
|
Json::Value result = this->CallMethod("eth_fetchQueuedTransactions",p); |
||||
|
if (result.isArray()) |
||||
|
return result; |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
std::string eth_signTransaction(const Json::Value& param1) throw (jsonrpc::JsonRpcException) |
||||
|
{ |
||||
|
Json::Value p; |
||||
|
p.append(param1); |
||||
|
Json::Value result = this->CallMethod("eth_signTransaction",p); |
||||
|
if (result.isString()) |
||||
|
return result.asString(); |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
Json::Value eth_inspectTransaction(const std::string& param1) throw (jsonrpc::JsonRpcException) |
||||
|
{ |
||||
|
Json::Value p; |
||||
|
p.append(param1); |
||||
|
Json::Value result = this->CallMethod("eth_inspectTransaction",p); |
||||
|
if (result.isObject()) |
||||
|
return result; |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
bool eth_injectTransaction(const std::string& param1) throw (jsonrpc::JsonRpcException) |
||||
|
{ |
||||
|
Json::Value p; |
||||
|
p.append(param1); |
||||
|
Json::Value result = this->CallMethod("eth_injectTransaction",p); |
||||
|
if (result.isBool()) |
||||
|
return result.asBool(); |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
bool db_put(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_put",p); |
||||
|
if (result.isBool()) |
||||
|
return result.asBool(); |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
std::string db_get(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_get",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; |
||||
|
p.append(param1); |
||||
|
Json::Value result = this->CallMethod("shh_post",p); |
||||
|
if (result.isBool()) |
||||
|
return result.asBool(); |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
std::string shh_newIdentity() throw (jsonrpc::JsonRpcException) |
||||
|
{ |
||||
|
Json::Value p; |
||||
|
p = Json::nullValue; |
||||
|
Json::Value result = this->CallMethod("shh_newIdentity",p); |
||||
|
if (result.isString()) |
||||
|
return result.asString(); |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
bool shh_hasIdentity(const std::string& param1) throw (jsonrpc::JsonRpcException) |
||||
|
{ |
||||
|
Json::Value p; |
||||
|
p.append(param1); |
||||
|
Json::Value result = this->CallMethod("shh_hasIdentity",p); |
||||
|
if (result.isBool()) |
||||
|
return result.asBool(); |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
std::string shh_newGroup(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("shh_newGroup",p); |
||||
|
if (result.isString()) |
||||
|
return result.asString(); |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
std::string shh_addToGroup(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("shh_addToGroup",p); |
||||
|
if (result.isString()) |
||||
|
return result.asString(); |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
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.isString()) |
||||
|
return result.asString(); |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
bool shh_uninstallFilter(const std::string& param1) throw (jsonrpc::JsonRpcException) |
||||
|
{ |
||||
|
Json::Value p; |
||||
|
p.append(param1); |
||||
|
Json::Value result = this->CallMethod("shh_uninstallFilter",p); |
||||
|
if (result.isBool()) |
||||
|
return result.asBool(); |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
Json::Value shh_getFilterChanges(const std::string& param1) throw (jsonrpc::JsonRpcException) |
||||
|
{ |
||||
|
Json::Value p; |
||||
|
p.append(param1); |
||||
|
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(const std::string& param1) throw (jsonrpc::JsonRpcException) |
||||
|
{ |
||||
|
Json::Value p; |
||||
|
p.append(param1); |
||||
|
Json::Value result = this->CallMethod("shh_getMessages",p); |
||||
|
if (result.isArray()) |
||||
|
return result; |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
#endif //JSONRPC_CPP_STUB_WEBTHREESTUBCLIENT_H_
|
Loading…
Reference in new issue