Skip to content

Commit

Permalink
Fix typos (backport #1185) (#1194)
Browse files Browse the repository at this point in the history
* Fix typos

(cherry picked from commit c88b819)

# Conflicts:
#	proto/cosmwasm/wasm/v1/tx.proto

* Fix merge conflict

---------

Co-authored-by: Alex Peters <alpe@users.noreply.github.com>
  • Loading branch information
mergify[bot] and alpe authored Jan 30, 2023
1 parent a6fcba2 commit 388b175
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/proto/proto-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,7 @@ MsgStoreCode submit Wasm code to the system

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `sender` | [string](#string) | | Sender is the that actor that signed the messages |
| `sender` | [string](#string) | | Sender is the actor that signed the messages |
| `wasm_byte_code` | [bytes](#bytes) | | WASMByteCode can be raw or gzip compressed |
| `instantiate_permission` | [AccessConfig](#cosmwasm.wasm.v1.AccessConfig) | | InstantiatePermission access control to apply on contract creation, optional |

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 @@ -38,7 +38,7 @@ service Msg {
message MsgStoreCode {
option (cosmos.msg.v1.signer) = "sender";

// Sender is the that actor that signed the messages
// Sender is the actor that signed the messages
string sender = 1;
// WASMByteCode can be raw or gzip compressed
bytes wasm_byte_code = 2 [ (gogoproto.customname) = "WASMByteCode" ];
Expand Down
6 changes: 3 additions & 3 deletions x/wasm/keeper/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import (
)

const (
// DefaultGasCostHumanAddress is how moch SDK gas we charge to convert to a human address format
// DefaultGasCostHumanAddress is how much SDK gas we charge to convert to a human address format
DefaultGasCostHumanAddress = 5
// DefaultGasCostCanonicalAddress is how moch SDK gas we charge to convert to a canonical address format
// DefaultGasCostCanonicalAddress is how much SDK gas we charge to convert to a canonical address format
DefaultGasCostCanonicalAddress = 4

// DefaultDeserializationCostPerByte The formular should be `len(data) * deserializationCostPerByte`
// DefaultDeserializationCostPerByte The formula should be `len(data) * deserializationCostPerByte`
DefaultDeserializationCostPerByte = 1
)

Expand Down
4 changes: 2 additions & 2 deletions x/wasm/keeper/gas_register.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func DefaultPerByteUncompressCost() wasmvmtypes.UFraction {

// GasRegister abstract source for gas costs
type GasRegister interface {
// NewContractInstanceCosts costs to crate a new contract instance from code
// NewContractInstanceCosts costs to create a new contract instance from code
NewContractInstanceCosts(pinned bool, msgLen int) sdk.Gas
// CompileCosts costs to persist and "compile" a new wasm contract
CompileCosts(byteLength int) sdk.Gas
Expand Down Expand Up @@ -147,7 +147,7 @@ func NewWasmGasRegister(c WasmGasRegisterConfig) WasmGasRegister {
}
}

// NewContractInstanceCosts costs to crate a new contract instance from code
// NewContractInstanceCosts costs to create a new contract instance from code
func (g WasmGasRegister) NewContractInstanceCosts(pinned bool, msgLen int) storetypes.Gas {
return g.InstantiateContractCosts(pinned, msgLen)
}
Expand Down
1 change: 0 additions & 1 deletion x/wasm/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ func (k Keeper) instantiate(
instanceCosts := k.gasRegister.NewContractInstanceCosts(k.IsPinnedCode(ctx, codeID), len(initMsg))
ctx.GasMeter().ConsumeGas(instanceCosts, "Loading CosmWasm module: instantiate")

// get contact info
codeInfo := k.GetCodeInfo(ctx, codeID)
if codeInfo == nil {
return nil, nil, sdkerrors.Wrap(types.ErrNotFound, "code")
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.

6 changes: 3 additions & 3 deletions x/wasm/types/wasmer_engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ type WasmerEngine interface {
Cleanup()

// IBCChannelOpen is available on IBC-enabled contracts and is a hook to call into
// during the handshake pahse
// during the handshake phase
IBCChannelOpen(
checksum wasmvm.Checksum,
env wasmvmtypes.Env,
Expand All @@ -154,7 +154,7 @@ type WasmerEngine interface {
) (*wasmvmtypes.IBC3ChannelOpenResponse, uint64, error)

// IBCChannelConnect is available on IBC-enabled contracts and is a hook to call into
// during the handshake pahse
// during the handshake phase
IBCChannelConnect(
checksum wasmvm.Checksum,
env wasmvmtypes.Env,
Expand Down Expand Up @@ -211,7 +211,7 @@ type WasmerEngine interface {
) (*wasmvmtypes.IBCBasicResponse, uint64, error)

// IBCPacketTimeout is available on IBC-enabled contracts and is called when an
// outgoing packet (previously sent by this contract) will provably never be executed.
// outgoing packet (previously sent by this contract) will probably never be executed.
// Usually handled like ack returning an error
IBCPacketTimeout(
checksum wasmvm.Checksum,
Expand Down

0 comments on commit 388b175

Please sign in to comment.