Skip to content

Commit

Permalink
eth_call fixes (#615)
Browse files Browse the repository at this point in the history
* Add RPC calls to partial tests that make them fail

* Add partial tests to failing list

* web3.md: Separate common functionality into #loadTx

* eth_call fixing

* web3.md: Use 'from' address as key when signing 'fake' transactions

* Extend partial tests

* Add another rpcResponseError signature

* Update web3.md

Co-Authored-By: ehildenb <everett.hildenbrandt@gmail.com>
  • Loading branch information
2 people authored and rv-jenkins committed Dec 11, 2019
1 parent 03cab97 commit 0aef385
Show file tree
Hide file tree
Showing 5 changed files with 283 additions and 46 deletions.
63 changes: 63 additions & 0 deletions tests/web3/erc20/erc20capped-partial.expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@
"uncles": []
}
}
{
"jsonrpc": "2.0",
"id": 0,
"result": "1574063625"
}
{
"jsonrpc": "2.0",
"id": 11,
Expand All @@ -193,3 +198,61 @@
}
}
}
{
"jsonrpc": "2.0",
"id": 1574063625304,
"error": {
"message": "VM Exception while processing transaction: revert",
"code": -32000,
"data": {
"0x36e741688d4fb97a3212bf240316feb9673bf94d4272a050a81472be18d99054": {
"error": "revert",
"program_counter": 223,
"return": "0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001545524332304361707065643a2063617020697320300000000000000000000000"
}
}
}
}
{
"jsonrpc": "2.0",
"id": 12,
"result": "0x1"
}
{
"jsonrpc": "2.0",
"id": 13,
"result": "28346"
}
{
"jsonrpc": "2.0",
"id": 14,
"result": {
"number": "0x1",
"hash": "0xa19f384e0a5f751471ce5142e6ccf64dd89060ec069c4d0106a424e7625e5727",
"parentHash": "0xc069a51a464337f57f6c962d41bb5c6319ec570738fd5d2553b72614d07429ea",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x0000000000000000",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"transactionsRoot": "0x91cef50c078494a1bf72809ec100e70460a3f2f336afade0ad3fbd631735db09",
"stateRoot": "0x0b7349a377723c5d0d8d670760c526bd67c713de6635d0b69295f6fea3e2dec2",
"receiptsRoot": "0xdf63965852f62ec5843ceae3b898019d6b73c6ab5be9d6617160281dfdf62bfa",
"miner": "0x0000000000000000000000000000000000000000",
"difficulty": "0x0",
"totalDifficulty": "0x0",
"extraData": "0x",
"size": "0x3e8",
"gasLimit": "0x6691b7",
"gasUsed": "0x77aff",
"timestamp": "0x5dd24e09",
"transactions": [
"0x9d1432e5c5e6f682920c8b6be69a18f2a9a99eda35deaa9976982790856532d2"
],
"uncles": []
}
}
{
"jsonrpc": "2.0",
"id": 15,
"result": "0x1f67206881a62c71931c4e5b768f28094bdf5d44d047d5659cb783e026eb3ca9"
}
54 changes: 54 additions & 0 deletions tests/web3/erc20/erc20capped-partial.in.json

Large diffs are not rendered by default.

58 changes: 58 additions & 0 deletions tests/web3/erc20/tokentimelock-partial.expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -305,3 +305,61 @@
}
}
}
{
"jsonrpc": "2.0",
"id": 1574066889773,
"error": {
"message": "VM Exception while processing transaction: revert",
"code": -32000,
"data": {
"0xe9e73063c7b85dde4546959e21aa1e47b08212abad7d4786d2a59b9af118ec22": {
"error": "revert",
"program_counter": 176,
"return": "0x08c379a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000032546f6b656e54696d656c6f636b3a2072656c656173652074696d65206973206265666f72652063757272656e742074696d650000000000000000000000000000"
}
}
}
}
{
"jsonrpc": "2.0",
"id": 17,
"result": "0x2"
}
{
"jsonrpc": "2.0",
"id": 18,
"result": "28346"
}
{
"jsonrpc": "2.0",
"id": 19,
"result": {
"number": "0x2",
"hash": "0x8d9cd44bafe8f9bb1db1eaf184bb07929a2461e0d1e553751955de007bc9007e",
"parentHash": "0xd3cb4b716eee5b3a6eefbfa6d881067312f8be3f9d25f41ede62814f7583107b",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x0000000000000000",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"transactionsRoot": "0x7aeb0bb9353ec96d81af4915b1621b82c958b9be7d665438b53ed811fd9e2edc",
"stateRoot": "0xc98e975419d7fa04f0d23cc9d8a51953ae7d2db84e650218b89be25a41ed39a5",
"receiptsRoot": "0x8e886e6f4c5f790c727eed4d6c945ff9c2a8fc80a74c101866795924f37ac6ba",
"miner": "0x0000000000000000000000000000000000000000",
"difficulty": "0x0",
"totalDifficulty": "0x0",
"extraData": "0x",
"size": "0x3e8",
"gasLimit": "0x6691b7",
"gasUsed": "0x308d0",
"timestamp": "0x5dd25ac9",
"transactions": [
"0xa38c6b1f00c5f8044560efda83a32e3a621303a47fc8a9cc099446752f81dcb1"
],
"uncles": []
}
}
{
"jsonrpc": "2.0",
"id": 20,
"result": "0xbbe8a9185e49aaffc5f0204b512235ddf9c446af90ab6e176bdc554d5daccd20"
}
Loading

0 comments on commit 0aef385

Please sign in to comment.