casper-network / casper-network/casper-node
Better argument reader in contracts.
Open
- Dominant language
- Rust
- Stars
- 399
- Forks
- 224
- Avg merge
- 15h 44m
- Merged PRs (30d)
- 2
Description
When reading more then one argument it is hard to guess which one is missing, because both throw `ApiError::MissingArgument`. It would be handy to have `get_named_arg` that returns `Result` or `Option`. This way I could manually throw custom errors like `AmountArgIsMissing`.
To keep the backward compatibility I'd suggest adding new method `try_get_named_arg` to `casper-contrac` crate.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.