-
-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interface refactoring #162
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't compile in rgb-lib because it breaks compilation of rgb-schemata. I don't think we should merge this without first having a PR for rgb-schemata.
@zoedberg right, fully forgot about that. Here it is: RGB-WG/rgb-schemata#36 I will also work on the RGB wallet changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated rgb-lib to try the PRs refactoring the interfaces (#162, RGB-WG/rgb-schemata#36 and RGB-WG/rgb#154) but when doing:
let iface_nia = Rgb20::from(contract_iface);
let terms = iface_nia.contract_terms();
I encounter the following panic:
thread 'wallet::test::send::success' panicked at /home/zoe/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strict_types-2.7.0-beta.2/src/value/val.rs:399:32:
StrictVal struct doesn't have field named terms
I've found a fix for this, see the provided suggestions.
After fixing this I've found another issue: before I was retrieving the asset timestamp with contract.global("created")
, but I see this PR removed the created
global state. Why this has been removed and how can we now retrieve this information?
Thanks for finding a fix. Regarding the created timestamp, it is moved into the genesis itself, as was proposed in RCP-240227A and discussed in Telegram. If you need to have an access to it, you can just read |
Co-authored-by: Zoe Faltibà <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, thanks, sorry I missed that. I've updated rgb-lib timestamp extraction code and now all tests are passing. ACK 00f1983
RGB20 has isufficientReserves but doesn't provide reserves state(it does, in metadata)