3 ms·
> After the fork, eth.getTransactionReceipt(…) will return a status field. The status field has a value of 0 when a transaction has failed and 1 when the transa
by adewinter 9y ago
> After the fork, eth.getTransactionReceipt(…) will return a status field. The status field has a value of 0 when a transaction has failed and 1 when the transaction has succeeded.
I wonder why they chose to do it the wrong way around...
- tyleraldrich 9y agoIt's a status field, not an error code. 0 = False, 1 = True seems like the right way to do things.
- ulrikrasmussen 9y agoBut why not return a proper Boolean value then?
- tyleraldrich 9y agoWho knows, maybe for legacy code reasons? This seems to be the documentation: https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_gettransactionreceipt https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_gettransa...
- vvillena 9y agoThats how booleans are encoded in the Ethereum ABI. 0x0 is false, 0x1 is true.