Fix typos

This commit is contained in:
Alex Peters
2023-01-27 10:12:18 +01:00
parent c7670fae4e
commit c88b8194cb
5 changed files with 9 additions and 10 deletions

View File

@@ -35,7 +35,7 @@ service Msg {
// MsgStoreCode submit Wasm code to the system // MsgStoreCode submit Wasm code to the system
message MsgStoreCode { message MsgStoreCode {
// Sender is the that actor that signed the messages // Sender is the actor that signed the messages
string sender = 1; string sender = 1;
// WASMByteCode can be raw or gzip compressed // WASMByteCode can be raw or gzip compressed
bytes wasm_byte_code = 2 [ (gogoproto.customname) = "WASMByteCode" ]; bytes wasm_byte_code = 2 [ (gogoproto.customname) = "WASMByteCode" ];

View File

@@ -7,12 +7,12 @@ import (
) )
const ( 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 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 DefaultGasCostCanonicalAddress = 4
// DefaultDeserializationCostPerByte The formular should be `len(data) * deserializationCostPerByte` // DefaultDeserializationCostPerByte The formula should be `len(data) * deserializationCostPerByte`
DefaultDeserializationCostPerByte = 1 DefaultDeserializationCostPerByte = 1
) )

View File

@@ -68,7 +68,7 @@ func DefaultPerByteUncompressCost() wasmvmtypes.UFraction {
// GasRegister abstract source for gas costs // GasRegister abstract source for gas costs
type GasRegister interface { 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 NewContractInstanceCosts(pinned bool, msgLen int) sdk.Gas
// CompileCosts costs to persist and "compile" a new wasm contract // CompileCosts costs to persist and "compile" a new wasm contract
CompileCosts(byteLength int) sdk.Gas CompileCosts(byteLength int) sdk.Gas
@@ -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 { func (g WasmGasRegister) NewContractInstanceCosts(pinned bool, msgLen int) storetypes.Gas {
return g.InstantiateContractCosts(pinned, msgLen) return g.InstantiateContractCosts(pinned, msgLen)
} }

View File

@@ -230,7 +230,6 @@ func (k Keeper) instantiate(
instanceCosts := k.gasRegister.NewContractInstanceCosts(k.IsPinnedCode(ctx, codeID), len(initMsg)) instanceCosts := k.gasRegister.NewContractInstanceCosts(k.IsPinnedCode(ctx, codeID), len(initMsg))
ctx.GasMeter().ConsumeGas(instanceCosts, "Loading CosmWasm module: instantiate") ctx.GasMeter().ConsumeGas(instanceCosts, "Loading CosmWasm module: instantiate")
// get contact info
codeInfo := k.GetCodeInfo(ctx, codeID) codeInfo := k.GetCodeInfo(ctx, codeID)
if codeInfo == nil { if codeInfo == nil {
return nil, nil, sdkerrors.Wrap(types.ErrNotFound, "code") return nil, nil, sdkerrors.Wrap(types.ErrNotFound, "code")

View File

@@ -140,7 +140,7 @@ type WasmerEngine interface {
Cleanup() Cleanup()
// IBCChannelOpen is available on IBC-enabled contracts and is a hook to call into // IBCChannelOpen is available on IBC-enabled contracts and is a hook to call into
// during the handshake pahse // during the handshake phase
IBCChannelOpen( IBCChannelOpen(
checksum wasmvm.Checksum, checksum wasmvm.Checksum,
env wasmvmtypes.Env, env wasmvmtypes.Env,
@@ -154,7 +154,7 @@ type WasmerEngine interface {
) (*wasmvmtypes.IBC3ChannelOpenResponse, uint64, error) ) (*wasmvmtypes.IBC3ChannelOpenResponse, uint64, error)
// IBCChannelConnect is available on IBC-enabled contracts and is a hook to call into // IBCChannelConnect is available on IBC-enabled contracts and is a hook to call into
// during the handshake pahse // during the handshake phase
IBCChannelConnect( IBCChannelConnect(
checksum wasmvm.Checksum, checksum wasmvm.Checksum,
env wasmvmtypes.Env, env wasmvmtypes.Env,
@@ -211,7 +211,7 @@ type WasmerEngine interface {
) (*wasmvmtypes.IBCBasicResponse, uint64, error) ) (*wasmvmtypes.IBCBasicResponse, uint64, error)
// IBCPacketTimeout is available on IBC-enabled contracts and is called when an // 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 // Usually handled like ack returning an error
IBCPacketTimeout( IBCPacketTimeout(
checksum wasmvm.Checksum, checksum wasmvm.Checksum,