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

Fix typo in "predictable". #1957

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/proto/proto-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -1536,7 +1536,7 @@ code id.

### MsgInstantiateContract2
MsgInstantiateContract2 create a new smart contract instance for the given
code id with a predicable address.
code id with a predictable address.


| Field | Type | Label | Description |
Expand Down
2 changes: 1 addition & 1 deletion proto/cosmwasm/wasm/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ message MsgInstantiateContractResponse {
}

// MsgInstantiateContract2 create a new smart contract instance for the given
// code id with a predicable address.
// code id with a predictable address.
message MsgInstantiateContract2 {
option (amino.name) = "wasm/MsgInstantiateContract2";
option (cosmos.msg.v1.signer) = "sender";
Expand Down
2 changes: 1 addition & 1 deletion x/wasm/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ $ %s tx wasm instantiate 1 '{"foo":"bar"}' --admin="$(%s keys show mykey -a)" \
return cmd
}

// InstantiateContract2Cmd will instantiate a contract from previously uploaded code with predicable address generated
// InstantiateContract2Cmd will instantiate a contract from previously uploaded code with predictable address generated
func InstantiateContract2Cmd() *cobra.Command {
decoder := newArgDecoder(hex.DecodeString)
cmd := &cobra.Command{
Expand Down
4 changes: 2 additions & 2 deletions x/wasm/keeper/addresses.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ func (k Keeper) ClassicAddressGenerator() AddressGenerator {
}
}

// PredicableAddressGenerator generates a predictable contract address
func PredicableAddressGenerator(creator sdk.AccAddress, salt, msg []byte, fixMsg bool) AddressGenerator {
// PredictableAddressGenerator generates a predictable contract address
func PredictableAddressGenerator(creator sdk.AccAddress, salt, msg []byte, fixMsg bool) AddressGenerator {
xavierlepretre marked this conversation as resolved.
Show resolved Hide resolved
return func(_ context.Context, _ uint64, checksum []byte) sdk.AccAddress {
if !fixMsg { // clear msg to not be included in the address generation
msg = []byte{}
Expand Down
2 changes: 1 addition & 1 deletion x/wasm/keeper/contract_keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (p PermissionedKeeper) Instantiate2(
initMsg,
label,
deposit,
PredicableAddressGenerator(creator, salt, initMsg, fixMsg),
PredictableAddressGenerator(creator, salt, initMsg, fixMsg),
p.authZPolicy,
)
}
Expand Down
2 changes: 1 addition & 1 deletion x/wasm/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (m msgServer) InstantiateContract2(ctx context.Context, msg *types.MsgInsta

policy := m.selectAuthorizationPolicy(ctx, msg.Sender)

addrGenerator := PredicableAddressGenerator(senderAddr, msg.Salt, msg.Msg, msg.FixMsg)
addrGenerator := PredictableAddressGenerator(senderAddr, msg.Salt, msg.Msg, msg.FixMsg)

contractAddr, data, err := m.keeper.instantiate(ctx, msg.CodeID, senderAddr, adminAddr, msg.Msg, msg.Label, msg.Funds, addrGenerator, policy)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion x/wasm/types/tx.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.