Tags: mh-x/eos-go
Tags
Merge pull request eoscanada#118 from eoscanada/fix/abi-decoding Fixes a few problem with ABI decoding
Merge pull request eoscanada#117 from eoscanada/feature/support-tx-pa… …cked-json-compression-as-int Added support for int compression type in JSON
Refactor `NewSetContract` to re-use `NewSetCode` and `NewSetABI` and … …allow empty ABI file It's now possible to pass an `ABI` file that is fully empty enabling the possibility to "unset" an `ABI`. It was not working properly because we try parse as JSON regardless if there is something or not. At the same time, factorized `NewSetContract` to re-use `NewSetCode` and `NewSetABI` instead of deplucation the same code twice.
Turned unknown key error returned from `EOSIO` API into ErrNotFound e… …rror Some endpoint like `/v1/chain/get_account` returns a body in the form: ``` { "code": 500, "message": "Internal Service Error", "error": { "code": 0, "name": "exception", "what": "unspecified", "details": [{ "message": "unknown key (<... redacted ...>): (0 eos.rex)", "file": "http_plugin.cpp", "line_number": 589, "method": "handle_exception" }] } } ``` This is problematic as the API only flag ErrNotFound when the HTTP code is 404. We added a new method `IsUnknownKeyError` on the `APIError` struct so one can check if the `APIError` respects conditions making it an unknown key error. When it's the case, the API will now return `ErrNotFound` error in those cases instead of the weird and bad `EOSIO` error.
PreviousNext