-
Notifications
You must be signed in to change notification settings - Fork 608
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
Enable wasm mint bindings #1445
Conversation
015ec4f
to
2734e3c
Compare
Codecov Report
@@ Coverage Diff @@
## main #1445 +/- ##
==========================================
- Coverage 19.82% 19.40% -0.43%
==========================================
Files 202 229 +27
Lines 27685 31452 +3767
==========================================
+ Hits 5489 6102 +613
- Misses 21175 24237 +3062
- Partials 1021 1113 +92
Continue to review full report at Codecov.
|
2734e3c
to
289b1dd
Compare
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.
Nice one.
One test I would like to see (minting the same subdenom twice). Otherwise good to merge.
One open question for the Osmosis core devs before this is tagged. But please don't block merging this, we can enhance it in a follow up.
|
||
msgServer := tokenfactorykeeper.NewMsgServerImpl(*f) | ||
|
||
// Check if denom already exists |
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.
Okay, this is the critical question.
Assuming we never set any metadata that is not present in the MintTokens command, this works great and makes a simple API.
However, if they plan to add more metadata there, we will want a separate command to run once to register the metadata (and another to query it?).
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 would merge this as is (we can test stuff with it), but have a discussion with @ValarDragon and @sunnya97 before tagging an Osmosis release.
If they want to add more required metadata, they should add it in Go and we should expose it in Rust now. Otherwise, it will most likely be a breaking contract API change, which we want very much to avoid.
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 once CI is passing
@@ -2,6 +2,7 @@ package wasm | |||
|
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.
Can we make this a wasm_test
package as well as all of the other test files:
custom_msg_test.go
custom_query_test.go
messages_test.go
queries_test.go
Let's not block merge on this but creating an issue for that would be great!
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.
What is the reasoning here?
Basically, the default is usually the same package, and there are valid reasons to make it a separate wasm_test
package, but it is good to discuss which one to prefer
6d8c061
to
bff2f7e
Compare
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!
I don't have permission to update the branch, but once its updated lets go ahead and merge this in |
8e46fe3
to
1d54f4b
Compare
1d54f4b
to
a64b13f
Compare
@maurolacy What process did you use here to update
Is there something I'm missing there? |
If you use the committed version of the wasm file, you should be good to go for tests. |
@maurolacy thanks for the quick reply! ...Using the committed version I get the a "variant missing" error. Which makes sense, since that wasm file doesn't have information about the new type I've added on
|
That wasn't it. Clearly the internal tests of the rust package shouldn't affect the go test. |
Closes / Related to: #1029
What is the purpose of the change
Re-instate the CoswmWasm message handlers for Mint and FullDenom. Related to osmosis-labs/bindings#25 on the Rust side.
Brief change log
Mint
usingTokenFactory
.FullDenom
in terms ofTokenFactory
.Testing and Verifying
Uncommented and adapted already existing tests.
Documentation and Release Note
Unreleased
section inCHANGELOG.md
? (will do)