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

Add proposal instantiate 2 #1106

Merged
merged 9 commits into from
Dec 2, 2022

Conversation

GNaD13
Copy link
Contributor

@GNaD13 GNaD13 commented Nov 22, 2022

Close #1062

@GNaD13 GNaD13 marked this pull request as ready for review November 23, 2022 11:06
@GNaD13 GNaD13 requested a review from alpe as a code owner November 23, 2022 11:06
@codecov
Copy link

codecov bot commented Nov 23, 2022

Codecov Report

Merging #1106 (a741389) into main (a589fe9) will decrease coverage by 0.42%.
The diff coverage is 40.76%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1106      +/-   ##
==========================================
- Coverage   59.95%   59.52%   -0.43%     
==========================================
  Files          54       54              
  Lines        7406     7563     +157     
==========================================
+ Hits         4440     4502      +62     
- Misses       2641     2730      +89     
- Partials      325      331       +6     
Impacted Files Coverage Δ
x/wasm/client/cli/gov_tx.go 12.80% <0.00%> (-1.10%) ⬇️
x/wasm/types/proposal.go 52.73% <33.87%> (-2.60%) ⬇️
x/wasm/keeper/proposal_handler.go 64.00% <60.00%> (-0.45%) ⬇️
x/wasm/types/test_fixtures.go 93.61% <93.54%> (-0.01%) ⬇️
x/wasm/types/codec.go 100.00% <100.00%> (ø)
x/wasm/keeper/keeper.go 87.40% <0.00%> (-0.32%) ⬇️

@GNaD13 GNaD13 marked this pull request as draft November 25, 2022 08:57
@GNaD13 GNaD13 marked this pull request as ready for review November 25, 2022 10:08
Copy link
Contributor

@alpe alpe left a comment

Choose a reason for hiding this comment

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

👍 This looks great! Thanks a lot for the PR! 🥇
If you would run make format, then you can get rid of the unrelated protobuf changes.

I would like to to tag v0.30.0 final on main in the next days. I would keep your PR open to merge asap for v0.31

@@ -21,4 +21,5 @@ var ProposalHandlers = []govclient.ProposalHandler{
govclient.NewProposalHandler(cli.ProposalUnpinCodesCmd, rest.UnpinCodeProposalHandler),
govclient.NewProposalHandler(cli.ProposalUpdateInstantiateConfigCmd, rest.UpdateInstantiateConfigProposalHandler),
govclient.NewProposalHandler(cli.ProposalStoreAndInstantiateContractCmd, rest.EmptyRestHandler),
govclient.NewProposalHandler(cli.ProposalInstantiateContract2Cmd, rest.EmptyRestHandler),
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 easy to miss

}
}

_, data, err := k.Instantiate2(ctx, p.CodeID, runAsAddr, adminAddr, p.Msg, p.Label, p.Funds, p.Salt, p.FixMsg)
Copy link
Contributor

Choose a reason for hiding this comment

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

:thu

@@ -34,6 +35,7 @@ var DisableAllProposals []ProposalType
var EnableAllProposals = []ProposalType{
ProposalTypeStoreCode,
ProposalTypeInstantiateContract,
ProposalTypeInstantiateContract2,
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

require.Len(t, em.Events()[2].Attributes, 1)
require.NotEmpty(t, em.Events()[2].Attributes[0])
}

Copy link
Contributor

Choose a reason for hiding this comment

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

good test

@@ -5,25 +5,21 @@ package types

import (
fmt "fmt"
io "io"
Copy link
Contributor

Choose a reason for hiding this comment

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

Please run make format or make proto-all when you built from protobuf.

}),
expErr: true,
},
"init with empty salt": {
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 good test cases

m(p)
}
return p
}
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 very helpful

@GNaD13
Copy link
Contributor Author

GNaD13 commented Nov 30, 2022

+1 This looks great! Thanks a lot for the PR! 1st_place_medal If you would run make format, then you can get rid of the unrelated protobuf changes.

I would like to to tag v0.30.0 final on main in the next days. I would keep your PR open to merge asap for v0.31

Thank a lot for your reviews :3

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 25 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@alpe alpe merged commit bc00a6b into CosmWasm:main Dec 2, 2022
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.

Add InstantiateContract2Proposal
2 participants