Skip to content
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

Handle wasmvm Burn message #489

Merged
merged 3 commits into from
Apr 13, 2021
Merged

Handle wasmvm Burn message #489

merged 3 commits into from
Apr 13, 2021

Conversation

alpe
Copy link
Contributor

@alpe alpe commented Apr 13, 2021

Continue #479

@alpe alpe requested a review from ethanfrey April 13, 2021 08:28
@codecov
Copy link

codecov bot commented Apr 13, 2021

Codecov Report

Merging #489 (39eed79) into wasmvm-0.14.0-beta3 (42ca87d) will increase coverage by 0.07%.
The diff coverage is 68.75%.

Impacted file tree graph

@@                   Coverage Diff                   @@
##           wasmvm-0.14.0-beta3     #489      +/-   ##
=======================================================
+ Coverage                56.89%   56.97%   +0.07%     
=======================================================
  Files                       41       41              
  Lines                     4396     4411      +15     
=======================================================
+ Hits                      2501     2513      +12     
- Misses                    1687     1689       +2     
- Partials                   208      209       +1     
Impacted Files Coverage Δ
app/app.go 86.85% <ø> (ø)
x/wasm/keeper/handler_plugin.go 84.26% <66.66%> (-0.87%) ⬇️
x/wasm/keeper/keeper.go 86.11% <100.00%> (-0.41%) ⬇️
x/wasm/keeper/handler_plugin_encoders.go 79.42% <0.00%> (+1.14%) ⬆️

Copy link
Member

@ethanfrey ethanfrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff. Thanks

@@ -15,8 +15,8 @@ WORKDIR /code
COPY . /code/

# See https://github.com/CosmWasm/wasmvm/releases
ADD https://github.com/CosmWasm/wasmvm/releases/download/v0.14.0-beta1/libwasmvm_muslc.a /lib/libwasmvm_muslc.a
RUN sha256sum /lib/libwasmvm_muslc.a | grep b69cf9ffbdfb2f1bd1e6f730ecee1eb0d06a1473840a24709aec7a7df5907d45
ADD https://github.com/CosmWasm/wasmvm/releases/download/v0.14.0-beta3/libwasmvm_muslc.a /lib/libwasmvm_muslc.a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, you fixed this. Thank you

@@ -181,6 +181,7 @@ var (
stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking},
govtypes.ModuleName: {authtypes.Burner},
ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner},
wasm.ModuleName: {authtypes.Burner},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯


var _ Messenger = MessageHandlerFunc(nil)

// MessageHandlerFunc is a helper to construct simple function based message handler
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it.

if err != nil {
return nil, nil, err
}
if err := burner.SendCoinsFromAccountToModule(ctx, contractAddr, types.ModuleName, coins); err != nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, it is a two step process? Only module accounts can burn.

Glad you took this on and not me. So many gotchas

require.NoError(t, err)
example := InstantiateHackatomExampleContract(t, ctx, keepers) // with deposit of 100 stake

specs := map[string]struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ethanfrey ethanfrey merged commit 7029368 into wasmvm-0.14.0-beta3 Apr 13, 2021
@ethanfrey ethanfrey deleted the msg_burn_479 branch April 13, 2021 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants