-
Notifications
You must be signed in to change notification settings - Fork 10
fix: nonfungible api mismatched balance type #526
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
@@ Coverage Diff @@
## main #526 +/- ##
=======================================
Coverage 64.43% 64.43%
=======================================
Files 124 124
Lines 23325 23325
Branches 23325 23325
=======================================
Hits 15029 15029
Misses 7637 7637
Partials 659 659 🚀 New features to boost your workflow:
|
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.
LGTM, lets get this on testnet next!
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.
LGTM. Made a few improvement suggestions.
Not approving yet as when I try to create a collection by deploying the non-fungibles integration tests contract to local devnet, and calling create, it errors with 'contract reverted'
The reason for the failure when testing manually was due to the contract not having sufficient balance for the collection deposit. Whilst the goal of these tests is ensuring the non-fungibles pallet works, they perhaps set a bad example, especially as there is no explicit non-fungibles example. I found https://github.com/r0gue-io/pop-api-examples so perhaps that could be migrated across and improved? Ideally such functions should be
I'm not suggesting a change here now, just that some proper example is made available which uses a more realistic flow. |
I see we have:
We really just need a simple starter example at https://github.com/r0gue-io/pop-node/tree/main/pop-api/examples. |
7285348
to
c835858
Compare
c835858
to
7d236b9
Compare
I'll add the example contract for nonfungible in #386 after this PR. Would love to have this PR merged first to resolve the issue on testnet! |
The problem isnt specific to testnet, its |
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.
Looks great, thanks for addressing the feedback so promptly.
Will merge once CI is green.
There is an issue in the nonfungible API that when user calls
api::nonfungibles::create
, it throwsContract Decode Failed
. Reason to that is the mismatched type in theprice
field ofMintSettings
in the runtime and in the API crate.u32
type in the nonfungibles api crate. Use theprimitives::Balance
type instead.None
.