-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial implementation * More comprehensive test * Added TODOs * Test passes * Cleaning up PR * Tests pass * Cleaned up get_logs, starting to work on rpc * eth get logs should be done. still working on rpc * RPC test works with get_balance * Formatting * Removed pub * Minor solidity fixes * Remake public * Cheats -> vm * chore: docs * chore: docs * chore: clippy * fmt * chore: fix path * chore: enable permissions * enable permissions --------- Co-authored-by: Enrique Ortiz <[email protected]>
- Loading branch information
Showing
10 changed files
with
549 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Fixture Generation Instructions | ||
|
||
### `eth_getLogs.json` | ||
|
||
To generate this fixture, send a POST request to a Eth Mainnet (chainId = 1) RPC | ||
|
||
``` | ||
{ | ||
"jsonrpc": "2.0", | ||
"method": "eth_getLogs", | ||
"id": "1", | ||
"params": [ | ||
{ | ||
"address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", | ||
"fromBlock": "0x10CEB1B", | ||
"toBlock": "0x10CEB1B", | ||
"topics": [ | ||
"0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65" | ||
] | ||
} | ||
] | ||
} | ||
``` | ||
|
||
Then you must change the `address` key to `emitter` because in Solidity, a struct's name cannot be `address` as that is a keyword. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
["0x8D97689C9818892B700e27F316cc3E41e17fBeb9", "latest"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
[ | ||
{ | ||
"emitter": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", | ||
"topics": [ | ||
"0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65", | ||
"0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d" | ||
], | ||
"data": "0x0000000000000000000000000000000000000000000000000186faccfe3e2bcc", | ||
"blockNumber": "0x10ceb1b", | ||
"transactionHash": "0xa08f7b4aaa57cb2baec601ad96878d227ae3289a8dd48df98cce30c168588ce7", | ||
"transactionIndex": "0xc", | ||
"blockHash": "0xe4299c95a140ddad351e9831cfb16c35cc0014e8cbd8465de2e5112847d70465", | ||
"logIndex": "0x42", | ||
"removed": false | ||
}, | ||
{ | ||
"emitter": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", | ||
"topics": [ | ||
"0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65", | ||
"0x0000000000000000000000002ec705d306b51e486b1bc0d6ebee708e0661add1" | ||
], | ||
"data": "0x000000000000000000000000000000000000000000000000004befaedcfaea00", | ||
"blockNumber": "0x10ceb1b", | ||
"transactionHash": "0x2cd5355bd917ec5c28194735ad539a4cb58e4b08815a038f6e2373290caeee1d", | ||
"transactionIndex": "0x11", | ||
"blockHash": "0xe4299c95a140ddad351e9831cfb16c35cc0014e8cbd8465de2e5112847d70465", | ||
"logIndex": "0x56", | ||
"removed": false | ||
}, | ||
{ | ||
"emitter": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", | ||
"topics": [ | ||
"0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65", | ||
"0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d" | ||
], | ||
"data": "0x000000000000000000000000000000000000000000000000003432a29cd0ed22", | ||
"blockNumber": "0x10ceb1b", | ||
"transactionHash": "0x4e762d9a572084e0ec412ddf6c4e6d0b746b10e9714d4e786c13579e2e3c3187", | ||
"transactionIndex": "0x16", | ||
"blockHash": "0xe4299c95a140ddad351e9831cfb16c35cc0014e8cbd8465de2e5112847d70465", | ||
"logIndex": "0x68", | ||
"removed": false | ||
} | ||
] |