pinax-network / antelope.rs

Antelope Standard Library for Rust
https://docs.rs/antelope
Apache License 2.0
0 stars 0 forks source link

💡 Implement infallible conversions from &str #14

Closed YaroShkvorets closed 8 months ago

YaroShkvorets commented 8 months ago

Start Date

No response

Implementation PR

No response

Reference Issues

No response

Summary

In some cases we can't just panic when parsing invalid types on chain, due to nodeos bugs. For example this trx: https://eos.eosq.eosnation.io/tx/ab8690feb4486a030cc16cec6e815108325b292d460b47b8c88b4a75c1959bad

image

Need a way to parse it into Result.

Basic Example

In addition to Asset::from() -> Self add Asset::from_str() -> Result<Self, Err>

Drawbacks

N/A

Unresolved questions

No response