forked from 0xPolygon/polygon-edge
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add unit tests for jsonrpc transaction encoding (0xPolygon#923)
* Add unit tests for jsonrpc transaction encoding * Remove TODO * Formatting fix * Fix linter Co-authored-by: Stefan Negovanović <stefan@ethernal.tech>
- Loading branch information
1 parent
5250168
commit f80b615
Showing
5 changed files
with
129 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"parentHash": "0x0100000000000000000000000000000000000000000000000000000000000000", | ||
"sha3Uncles": "0x0200000000000000000000000000000000000000000000000000000000000000", | ||
"miner": "0x0100000000000000000000000000000000000000", | ||
"stateRoot": "0x0400000000000000000000000000000000000000000000000000000000000000", | ||
"transactionsRoot": "0x0500000000000000000000000000000000000000000000000000000000000000", | ||
"receiptsRoot": "0x0600000000000000000000000000000000000000000000000000000000000000", | ||
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", | ||
"difficulty": "0xa", | ||
"totalDifficulty": "0x0", | ||
"size": "0x0", | ||
"number": "0xb", | ||
"gasLimit": "0xc", | ||
"gasUsed": "0xd", | ||
"timestamp": "0xe", | ||
"extraData": "0x616263646566", | ||
"mixHash": "0x0700000000000000000000000000000000000000000000000000000000000000", | ||
"nonce": "0x0a00000000000000", | ||
"hash": "0x0800000000000000000000000000000000000000000000000000000000000000", | ||
"transactions": [ | ||
{ | ||
"nonce": "0x1", | ||
"gasPrice": "0xa", | ||
"gas": "0x64", | ||
"to": "0x0000000000000000000000000000000000000000", | ||
"value": "0x3e8", | ||
"input": "0x0102", | ||
"v": "0x1", | ||
"r": "0x2", | ||
"s": "0x3", | ||
"hash": "0x0200000000000000000000000000000000000000000000000000000000000000", | ||
"from": "0x0300000000000000000000000000000000000000", | ||
"blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"blockNumber": "0x1", | ||
"transactionIndex": "0x2" | ||
} | ||
], | ||
"uncles": null | ||
} |
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,16 @@ | ||
{ | ||
"nonce": "0x1", | ||
"gasPrice": "0xa", | ||
"gas": "0x64", | ||
"to": "0x0000000000000000000000000000000000000000", | ||
"value": "0x3e8", | ||
"input": "0x0102", | ||
"v": "0x1", | ||
"r": "0x2", | ||
"s": "0x3", | ||
"hash": "0x0200000000000000000000000000000000000000000000000000000000000000", | ||
"from": "0x0300000000000000000000000000000000000000", | ||
"blockHash": null, | ||
"blockNumber": null, | ||
"transactionIndex": null | ||
} |
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,16 @@ | ||
{ | ||
"nonce": "0x1", | ||
"gasPrice": "0xa", | ||
"gas": "0x64", | ||
"to": "0x0000000000000000000000000000000000000000", | ||
"value": "0x3e8", | ||
"input": "0x0102", | ||
"v": "0x1", | ||
"r": "0x2", | ||
"s": "0x3", | ||
"hash": "0x0200000000000000000000000000000000000000000000000000000000000000", | ||
"from": "0x0300000000000000000000000000000000000000", | ||
"blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"blockNumber": "0x1", | ||
"transactionIndex": "0x2" | ||
} |
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