casper-network / casper-network/casper-node

Better argument reader in contracts.

Open
#4,048 0 comments 0 reactions 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.