-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Web3: Create basic coverage report (#526)
* web3.md: store all the opcodes of a contract * web3.md: implement firefly_getCoverageData and #serializeCoverage * web3.md: fix #serializeCoverage * add test for firefly_getCoverageData * web3.md: implement #serializePrograms * web3.md: compute coverage percentages * web3.md: make #parseByteCode tail recursive * move failing test to tests/web3/failing * add test for firefly_getCoverageData * fix test * web3.md:rename List2JSONList * Remove unused `Float` addition * web3.md: more likely to not round towards zero * web3: formatting * tweaks * web3.md: implement qsort * web3.md: formatting
- Loading branch information
Showing
3 changed files
with
114 additions
and
1 deletion.
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 @@ | ||
[{"jsonrpc":"2.0","id":1,"result":true},{"jsonrpc":"2.0","id":2,"result":true},{"jsonrpc":"2.0","id":3,"result":"0x0000000000000000000000000000000000000000000000000000000000ffffff"},{"jsonrpc":"2.0","id":3,"result":{"coverages":[{"93758614234106549757282766802448384239213770766359592192750614820519184033004":{"RUNTIME":100}}],"coveredOpcodes":[{"93758614234106549757282766802448384239213770766359592192750614820519184033004":{"RUNTIME":[0,4,6,7,9,11]}}],"programs":[{"93758614234106549757282766802448384239213770766359592192750614820519184033004":{"RUNTIME":[0,4,6,7,9,11]}}]}}] |
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,42 @@ | ||
[ | ||
{ | ||
"jsonrpc": "2.0", | ||
"id": 1, | ||
"method": "firefly_addAccount", | ||
"params": [ | ||
{ | ||
"key": "0x5fffe36d0218b8b8d45d4e70788096a5e0c289cf89c907f97d1cdecdccaa8b6b", | ||
"balance": "0x56BC75E2D63100000" | ||
} | ||
] | ||
}, | ||
{ | ||
"jsonrpc": "2.0", | ||
"id": 2, | ||
"method": "firefly_addAccount", | ||
"params": [ | ||
{ | ||
"address": "0xdf1db454e4dc226da2b0f8d471976180555355e2", | ||
"code": "0x62FFFFFF60005260206000F3" | ||
} | ||
] | ||
}, | ||
{ | ||
"jsonrpc": "2.0", | ||
"id": 3, | ||
"method": "eth_call", | ||
"params": [ | ||
{ | ||
"from": "0xee70809B448816B3D2D40C1DB8B44aACf50BAD3a", | ||
"to": "0xdf1db454e4dc226da2b0f8d471976180555355e2" | ||
}, | ||
"latest" | ||
] | ||
}, | ||
{ | ||
"jsonrpc": "2.0", | ||
"id": 3, | ||
"method": "firefly_getCoverageData", | ||
"params": [] | ||
} | ||
] |
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