-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
unable to extract issuedSupply #59
Comments
This looks like a bug. Anyway, I think in https://github.com/RGB-WG/rgb-wallet/blob/8981d7d9818bd54c7e2898dd0b68442254101281/std/src/interface/rgb20.rs#LL125C52-L125C64 we need to change |
|
Ok, here's why it happens: Interfaces declare ABI which contract schemata must follow. But interfaces do not enforce or verify whether the contract implementing some interface actually follows that (the same as in Ethereum). Why? Since interfaces are not in the consensus layer! Thus, the contract (schema) writer must ensure that the schema is appropriately written and follows the interface requirements. In the future, it will be the responsibility of the Contractum compiler to do that checks for the authors and fail compilation if the schema implementation is invalid. However, today we do not have yet Contractum compiler, thus we need to check that manually. The current NIA schema doesn't define global fields Also, I am doing a PR which will add a simple API to the Finally, I did a change in the RGB20 standard matching the fixed |
Closing as completed with #64 |
I cannot find a way to retrieve the
issuedSupply
global field from an RGB20 contract.By doing
contract.global("issuedSupply")
I receiveErr(FieldNameUnknown(FieldName("issuedSupply")))
. I've tried also inspecting genesis data, since from the rgb20 interface definitionissuedSupply
seems to be required only in theglobal
key of thegenesis
, but I didn't succeed to extract it.@dr-orlovsky could you please help me with this?
The text was updated successfully, but these errors were encountered: