Skip to content

Commit

Permalink
And properly pin it on governance vote
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanfrey committed Jan 20, 2022
1 parent 67247e1 commit 231f2c8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions x/wasm/keeper/proposal_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,11 @@ func handleStoreCodeProposal(ctx sdk.Context, k types.ContractOpsKeeper, p types
if err != nil {
return sdkerrors.Wrap(err, "run as address")
}
_, err = k.Create(ctx, runAsAddr, p.WASMByteCode, p.InstantiatePermission)
return err
codeID, err := k.Create(ctx, runAsAddr, p.WASMByteCode, p.InstantiatePermission)
if err != nil {
return err
}
return k.PinCode(ctx, codeID)
}

func handleInstantiateProposal(ctx sdk.Context, k types.ContractOpsKeeper, p types.InstantiateContractProposal) error {
Expand Down

0 comments on commit 231f2c8

Please sign in to comment.