-
Notifications
You must be signed in to change notification settings - Fork 410
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 gov proposal simulations #1107
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1107 +/- ##
==========================================
- Coverage 59.95% 59.72% -0.23%
==========================================
Files 54 54
Lines 7406 7434 +28
==========================================
Hits 4440 4440
- Misses 2641 2669 +28
Partials 325 325
|
8faacec
to
9a785e8
Compare
1310833
to
56b3faa
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.
This looks great and simulation passed! 👏 🏄
// Simulate pin contract proposal | ||
func SimulatePinContractProposal(wasmKeeper WasmKeeper, codeSelector CodeIDSelector) simtypes.ContentSimulatorFn { | ||
return func(r *rand.Rand, ctx sdk.Context, accs []simtypes.Account) simtypes.Content { | ||
codeID := codeSelector(ctx, wasmKeeper) |
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 checked the doc and the execution is idempotent so it does not really matter if it was pinned before
simtypes.RandStringOfLength(r, 10), | ||
simtypes.RandStringOfLength(r, 10), | ||
[]types.AccessConfigUpdate{configUpdate}, | ||
) |
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.
👍
x/wasm/types/proposal.go
Outdated
func NewUpdateInstantiateConfigProposal( | ||
title string, | ||
description string, | ||
accessConfigUpdates []AccessConfigUpdate, |
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.
personal preference:
accessConfigUpdates []AccessConfigUpdate, | |
accessConfigUpdates ...AccessConfigUpdate, |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Part of #1063
Add gov proposal simulations: