Skip to content

Latest commit

 

History

History
1832 lines (959 loc) · 62.5 KB

proto-docs.md

File metadata and controls

1832 lines (959 loc) · 62.5 KB

Protobuf Documentation

Table of Contents

Top

cosmwasm/wasm/v1/authz.proto

AcceptedMessageKeysFilter

AcceptedMessageKeysFilter accept only the specific contract message keys in the json object to be executed. Since: wasmd 0.30

Field Type Label Description
keys string repeated Messages is the list of unique keys

AcceptedMessagesFilter

AcceptedMessagesFilter accept only the specific raw contract messages to be executed. Since: wasmd 0.30

Field Type Label Description
messages bytes repeated Messages is the list of raw contract messages

AllowAllMessagesFilter

AllowAllMessagesFilter is a wildcard to allow any type of contract payload message. Since: wasmd 0.30

CombinedLimit

CombinedLimit defines the maximal amounts that can be sent to a contract and the maximal number of calls executable. Both need to remain >0 to be valid. Since: wasmd 0.30

Field Type Label Description
calls_remaining uint64 Remaining number that is decremented on each execution
amounts cosmos.base.v1beta1.Coin repeated Amounts is the maximal amount of tokens transferable to the contract.

ContractExecutionAuthorization

ContractExecutionAuthorization defines authorization for wasm execute. Since: wasmd 0.30

Field Type Label Description
grants ContractGrant repeated Grants for contract executions

ContractGrant

ContractGrant a granted permission for a single contract Since: wasmd 0.30

Field Type Label Description
contract string Contract is the bech32 address of the smart contract
limit google.protobuf.Any Limit defines execution limits that are enforced and updated when the grant is applied. When the limit lapsed the grant is removed.
filter google.protobuf.Any Filter define more fine-grained control on the message payload passed to the contract in the operation. When no filter applies on execution, the operation is prohibited.

ContractMigrationAuthorization

ContractMigrationAuthorization defines authorization for wasm contract migration. Since: wasmd 0.30

Field Type Label Description
grants ContractGrant repeated Grants for contract migrations

MaxCallsLimit

MaxCallsLimit limited number of calls to the contract. No funds transferable. Since: wasmd 0.30

Field Type Label Description
remaining uint64 Remaining number that is decremented on each execution

MaxFundsLimit

MaxFundsLimit defines the maximal amounts that can be sent to the contract. Since: wasmd 0.30

Field Type Label Description
amounts cosmos.base.v1beta1.Coin repeated Amounts is the maximal amount of tokens transferable to the contract.

Top

cosmwasm/wasm/v1/types.proto

AbsoluteTxPosition

AbsoluteTxPosition is a unique transaction position that allows for global ordering of transactions.

Field Type Label Description
block_height uint64 BlockHeight is the block the contract was created at
tx_index uint64 TxIndex is a monotonic counter within the block (actual transaction index, or gas consumed)

AccessConfig

AccessConfig access control type.

Field Type Label Description
permission AccessType
address string Address Deprecated: replaced by addresses
addresses string repeated

AccessTypeParam

AccessTypeParam

Field Type Label Description
value AccessType

CodeInfo

CodeInfo is data for the uploaded contract WASM code

Field Type Label Description
code_hash bytes CodeHash is the unique identifier created by wasmvm
creator string Creator address who initially stored the code
instantiate_config AccessConfig InstantiateConfig access control to apply on contract creation, optional

ContractCodeHistoryEntry

ContractCodeHistoryEntry metadata to a contract.

Field Type Label Description
operation ContractCodeHistoryOperationType
code_id uint64 CodeID is the reference to the stored WASM code
updated AbsoluteTxPosition Updated Tx position when the operation was executed.
msg bytes

ContractInfo

ContractInfo stores a WASM contract instance

Field Type Label Description
code_id uint64 CodeID is the reference to the stored Wasm code
creator string Creator address who initially instantiated the contract
admin string Admin is an optional address that can execute migrations
label string Label is optional metadata to be stored with a contract instance.
created AbsoluteTxPosition Created Tx position when the contract was instantiated.
ibc_port_id string
extension google.protobuf.Any Extension is an extension point to store custom metadata within the persistence model.

Model

Model is a struct that holds a KV pair

Field Type Label Description
key bytes hex-encode key to read it better (this is often ascii)
value bytes base64-encode raw value

Params

Params defines the set of wasm parameters.

Field Type Label Description
code_upload_access AccessConfig
instantiate_default_permission AccessType

AccessType

AccessType permission types

Name Number Description
ACCESS_TYPE_UNSPECIFIED 0 AccessTypeUnspecified placeholder for empty value
ACCESS_TYPE_NOBODY 1 AccessTypeNobody forbidden
ACCESS_TYPE_ONLY_ADDRESS 2 AccessTypeOnlyAddress restricted to a single address Deprecated: use AccessTypeAnyOfAddresses instead
ACCESS_TYPE_EVERYBODY 3 AccessTypeEverybody unrestricted
ACCESS_TYPE_ANY_OF_ADDRESSES 4 AccessTypeAnyOfAddresses allow any of the addresses

ContractCodeHistoryOperationType

ContractCodeHistoryOperationType actions that caused a code change

Name Number Description
CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED 0 ContractCodeHistoryOperationTypeUnspecified placeholder for empty value
CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT 1 ContractCodeHistoryOperationTypeInit on chain contract instantiation
CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE 2 ContractCodeHistoryOperationTypeMigrate code migration
CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS 3 ContractCodeHistoryOperationTypeGenesis based on genesis data

Top

cosmwasm/wasm/v1/genesis.proto

Code

Code struct encompasses CodeInfo and CodeBytes

Field Type Label Description
code_id uint64
code_info CodeInfo
code_bytes bytes
pinned bool Pinned to wasmvm cache

Contract

Contract struct encompasses ContractAddress, ContractInfo, and ContractState

Field Type Label Description
contract_address string
contract_info ContractInfo
contract_state Model repeated
contract_code_history ContractCodeHistoryEntry repeated

GenesisState

GenesisState - genesis state of x/wasm

Field Type Label Description
params Params
codes Code repeated
contracts Contract repeated
sequences Sequence repeated

Sequence

Sequence key and value of an id generation counter

Field Type Label Description
id_key bytes
value uint64

Top

cosmwasm/wasm/v1/ibc.proto

MsgIBCCloseChannel

MsgIBCCloseChannel port and channel need to be owned by the contract

Field Type Label Description
channel string

MsgIBCSend

MsgIBCSend

Field Type Label Description
channel string the channel by which the packet will be sent
timeout_height uint64 Timeout height relative to the current block height. The timeout is disabled when set to 0.
timeout_timestamp uint64 Timeout timestamp (in nanoseconds) relative to the current block timestamp. The timeout is disabled when set to 0.
data bytes Data is the payload to transfer. We must not make assumption what format or content is in here.

MsgIBCSendResponse

MsgIBCSendResponse

Field Type Label Description
sequence uint64 Sequence number of the IBC packet sent

Top

cosmwasm/wasm/v1/proposal.proto

AccessConfigUpdate

AccessConfigUpdate contains the code id and the access config to be applied.

Field Type Label Description
code_id uint64 CodeID is the reference to the stored WASM code to be updated
instantiate_permission AccessConfig InstantiatePermission to apply to the set of code ids

ClearAdminProposal

Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for an explicit ClearAdminProposal. To clear the admin of a contract, a simple MsgClearAdmin can be invoked from the x/gov module via a v1 governance proposal.

Field Type Label Description
title string Title is a short summary
description string Description is a human readable text
contract string Contract is the address of the smart contract

ExecuteContractProposal

Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for an explicit ExecuteContractProposal. To call execute on a contract, a simple MsgExecuteContract can be invoked from the x/gov module via a v1 governance proposal.

Field Type Label Description
title string Title is a short summary
description string Description is a human readable text
run_as string RunAs is the address that is passed to the contract's environment as sender
contract string Contract is the address of the smart contract
msg bytes Msg json encoded message to be passed to the contract as execute
funds cosmos.base.v1beta1.Coin repeated Funds coins that are transferred to the contract on instantiation

InstantiateContract2Proposal

Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for an explicit InstantiateContract2Proposal. To instantiate contract 2, a simple MsgInstantiateContract2 can be invoked from the x/gov module via a v1 governance proposal.

Field Type Label Description
title string Title is a short summary
description string Description is a human readable text
run_as string RunAs is the address that is passed to the contract's enviroment as sender
admin string Admin is an optional address that can execute migrations
code_id uint64 CodeID is the reference to the stored WASM code
label string Label is optional metadata to be stored with a constract instance.
msg bytes Msg json encode message to be passed to the contract on instantiation
funds cosmos.base.v1beta1.Coin repeated Funds coins that are transferred to the contract on instantiation
salt bytes Salt is an arbitrary value provided by the sender. Size can be 1 to 64.
fix_msg bool FixMsg include the msg value into the hash for the predictable address. Default is false

InstantiateContractProposal

Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for an explicit InstantiateContractProposal. To instantiate a contract, a simple MsgInstantiateContract can be invoked from the x/gov module via a v1 governance proposal.

Field Type Label Description
title string Title is a short summary
description string Description is a human readable text
run_as string RunAs is the address that is passed to the contract's environment as sender
admin string Admin is an optional address that can execute migrations
code_id uint64 CodeID is the reference to the stored WASM code
label string Label is optional metadata to be stored with a constract instance.
msg bytes Msg json encoded message to be passed to the contract on instantiation
funds cosmos.base.v1beta1.Coin repeated Funds coins that are transferred to the contract on instantiation

MigrateContractProposal

Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for an explicit MigrateContractProposal. To migrate a contract, a simple MsgMigrateContract can be invoked from the x/gov module via a v1 governance proposal.

Field Type Label Description
title string Title is a short summary
description string Description is a human readable text

Note: skipping 3 as this was previously used for unneeded run_as | | contract | string | | Contract is the address of the smart contract | | code_id | uint64 | | CodeID references the new WASM code | | msg | bytes | | Msg json encoded message to be passed to the contract on migration |

PinCodesProposal

Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for an explicit PinCodesProposal. To pin a set of code ids in the wasmvm cache, a simple MsgPinCodes can be invoked from the x/gov module via a v1 governance proposal.

Field Type Label Description
title string Title is a short summary
description string Description is a human readable text
code_ids uint64 repeated CodeIDs references the new WASM codes

StoreAndInstantiateContractProposal

Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for an explicit StoreAndInstantiateContractProposal. To store and instantiate the contract, a simple MsgStoreAndInstantiateContract can be invoked from the x/gov module via a v1 governance proposal.

Field Type Label Description
title string Title is a short summary
description string Description is a human readable text
run_as string RunAs is the address that is passed to the contract's environment as sender
wasm_byte_code bytes WASMByteCode can be raw or gzip compressed
instantiate_permission AccessConfig InstantiatePermission to apply on contract creation, optional
unpin_code bool UnpinCode code on upload, optional
admin string Admin is an optional address that can execute migrations
label string Label is optional metadata to be stored with a constract instance.
msg bytes Msg json encoded message to be passed to the contract on instantiation
funds cosmos.base.v1beta1.Coin repeated Funds coins that are transferred to the contract on instantiation
source string Source is the URL where the code is hosted
builder string Builder is the docker image used to build the code deterministically, used for smart contract verification
code_hash bytes CodeHash is the SHA256 sum of the code outputted by builder, used for smart contract verification

StoreCodeProposal

Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for an explicit StoreCodeProposal. To submit WASM code to the system, a simple MsgStoreCode can be invoked from the x/gov module via a v1 governance proposal.

Field Type Label Description
title string Title is a short summary
description string Description is a human readable text
run_as string RunAs is the address that is passed to the contract's environment as sender
wasm_byte_code bytes WASMByteCode can be raw or gzip compressed
instantiate_permission AccessConfig InstantiatePermission to apply on contract creation, optional
unpin_code bool UnpinCode code on upload, optional
source string Source is the URL where the code is hosted
builder string Builder is the docker image used to build the code deterministically, used for smart contract verification
code_hash bytes CodeHash is the SHA256 sum of the code outputted by builder, used for smart contract verification

SudoContractProposal

Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for an explicit SudoContractProposal. To call sudo on a contract, a simple MsgSudoContract can be invoked from the x/gov module via a v1 governance proposal.

Field Type Label Description
title string Title is a short summary
description string Description is a human readable text
contract string Contract is the address of the smart contract
msg bytes Msg json encoded message to be passed to the contract as sudo

UnpinCodesProposal

Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for an explicit UnpinCodesProposal. To unpin a set of code ids in the wasmvm cache, a simple MsgUnpinCodes can be invoked from the x/gov module via a v1 governance proposal.

Field Type Label Description
title string Title is a short summary
description string Description is a human readable text
code_ids uint64 repeated CodeIDs references the WASM codes

UpdateAdminProposal

Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for an explicit UpdateAdminProposal. To set an admin for a contract, a simple MsgUpdateAdmin can be invoked from the x/gov module via a v1 governance proposal.

Field Type Label Description
title string Title is a short summary
description string Description is a human readable text
new_admin string NewAdmin address to be set
contract string Contract is the address of the smart contract

UpdateInstantiateConfigProposal

Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for an explicit UpdateInstantiateConfigProposal. To update instantiate config to a set of code ids, a simple MsgUpdateInstantiateConfig can be invoked from the x/gov module via a v1 governance proposal.

Field Type Label Description
title string Title is a short summary
description string Description is a human readable text
access_config_updates AccessConfigUpdate repeated AccessConfigUpdate contains the list of code ids and the access config to be applied.

Top

cosmwasm/wasm/v1/query.proto

CodeInfoResponse

CodeInfoResponse contains code meta data from CodeInfo

Field Type Label Description
code_id uint64 id for legacy support
creator string
data_hash bytes
instantiate_permission AccessConfig

QueryAllContractStateRequest

QueryAllContractStateRequest is the request type for the Query/AllContractState RPC method

Field Type Label Description
address string address is the address of the contract
pagination cosmos.base.query.v1beta1.PageRequest pagination defines an optional pagination for the request.

QueryAllContractStateResponse

QueryAllContractStateResponse is the response type for the Query/AllContractState RPC method

Field Type Label Description
models Model repeated
pagination cosmos.base.query.v1beta1.PageResponse pagination defines the pagination in the response.

QueryCodeRequest

QueryCodeRequest is the request type for the Query/Code RPC method

Field Type Label Description
code_id uint64 grpc-gateway_out does not support Go style CodID

QueryCodeResponse

QueryCodeResponse is the response type for the Query/Code RPC method

Field Type Label Description
code_info CodeInfoResponse
data bytes

QueryCodesRequest

QueryCodesRequest is the request type for the Query/Codes RPC method

Field Type Label Description
pagination cosmos.base.query.v1beta1.PageRequest pagination defines an optional pagination for the request.

QueryCodesResponse

QueryCodesResponse is the response type for the Query/Codes RPC method

Field Type Label Description
code_infos CodeInfoResponse repeated
pagination cosmos.base.query.v1beta1.PageResponse pagination defines the pagination in the response.

QueryContractHistoryRequest

QueryContractHistoryRequest is the request type for the Query/ContractHistory RPC method

Field Type Label Description
address string address is the address of the contract to query
pagination cosmos.base.query.v1beta1.PageRequest pagination defines an optional pagination for the request.

QueryContractHistoryResponse

QueryContractHistoryResponse is the response type for the Query/ContractHistory RPC method

Field Type Label Description
entries ContractCodeHistoryEntry repeated
pagination cosmos.base.query.v1beta1.PageResponse pagination defines the pagination in the response.

QueryContractInfoRequest

QueryContractInfoRequest is the request type for the Query/ContractInfo RPC method

Field Type Label Description
address string address is the address of the contract to query

QueryContractInfoResponse

QueryContractInfoResponse is the response type for the Query/ContractInfo RPC method

Field Type Label Description
address string address is the address of the contract
contract_info ContractInfo

QueryContractsByCodeRequest

QueryContractsByCodeRequest is the request type for the Query/ContractsByCode RPC method

Field Type Label Description
code_id uint64 grpc-gateway_out does not support Go style CodID
pagination cosmos.base.query.v1beta1.PageRequest pagination defines an optional pagination for the request.

QueryContractsByCodeResponse

QueryContractsByCodeResponse is the response type for the Query/ContractsByCode RPC method

Field Type Label Description
contracts string repeated contracts are a set of contract addresses
pagination cosmos.base.query.v1beta1.PageResponse pagination defines the pagination in the response.

QueryContractsByCreatorRequest

QueryContractsByCreatorRequest is the request type for the Query/ContractsByCreator RPC method.

Field Type Label Description
creator_address string CreatorAddress is the address of contract creator
pagination cosmos.base.query.v1beta1.PageRequest Pagination defines an optional pagination for the request.

QueryContractsByCreatorResponse

QueryContractsByCreatorResponse is the response type for the Query/ContractsByCreator RPC method.

Field Type Label Description
contract_addresses string repeated ContractAddresses result set
pagination cosmos.base.query.v1beta1.PageResponse Pagination defines the pagination in the response.

QueryParamsRequest

QueryParamsRequest is the request type for the Query/Params RPC method.

QueryParamsResponse

QueryParamsResponse is the response type for the Query/Params RPC method.

Field Type Label Description
params Params params defines the parameters of the module.

QueryPinnedCodesRequest

QueryPinnedCodesRequest is the request type for the Query/PinnedCodes RPC method

Field Type Label Description
pagination cosmos.base.query.v1beta1.PageRequest pagination defines an optional pagination for the request.

QueryPinnedCodesResponse

QueryPinnedCodesResponse is the response type for the Query/PinnedCodes RPC method

Field Type Label Description
code_ids uint64 repeated
pagination cosmos.base.query.v1beta1.PageResponse pagination defines the pagination in the response.

QueryRawContractStateRequest

QueryRawContractStateRequest is the request type for the Query/RawContractState RPC method

Field Type Label Description
address string address is the address of the contract
query_data bytes

QueryRawContractStateResponse

QueryRawContractStateResponse is the response type for the Query/RawContractState RPC method

Field Type Label Description
data bytes Data contains the raw store data

QuerySmartContractStateRequest

QuerySmartContractStateRequest is the request type for the Query/SmartContractState RPC method

Field Type Label Description
address string address is the address of the contract
query_data bytes QueryData contains the query data passed to the contract

QuerySmartContractStateResponse

QuerySmartContractStateResponse is the response type for the Query/SmartContractState RPC method

Field Type Label Description
data bytes Data contains the json data returned from the smart contract

Query

Query provides defines the gRPC querier service

Method Name Request Type Response Type Description HTTP Verb Endpoint
ContractInfo QueryContractInfoRequest QueryContractInfoResponse ContractInfo gets the contract meta data GET /cosmwasm/wasm/v1/contract/{address}
ContractHistory QueryContractHistoryRequest QueryContractHistoryResponse ContractHistory gets the contract code history GET /cosmwasm/wasm/v1/contract/{address}/history
ContractsByCode QueryContractsByCodeRequest QueryContractsByCodeResponse ContractsByCode lists all smart contracts for a code id GET /cosmwasm/wasm/v1/code/{code_id}/contracts
AllContractState QueryAllContractStateRequest QueryAllContractStateResponse AllContractState gets all raw store data for a single contract GET /cosmwasm/wasm/v1/contract/{address}/state
RawContractState QueryRawContractStateRequest QueryRawContractStateResponse RawContractState gets single key from the raw store data of a contract GET /cosmwasm/wasm/v1/contract/{address}/raw/{query_data}
SmartContractState QuerySmartContractStateRequest QuerySmartContractStateResponse SmartContractState get smart query result from the contract GET /cosmwasm/wasm/v1/contract/{address}/smart/{query_data}
Code QueryCodeRequest QueryCodeResponse Code gets the binary code and metadata for a singe wasm code GET /cosmwasm/wasm/v1/code/{code_id}
Codes QueryCodesRequest QueryCodesResponse Codes gets the metadata for all stored wasm codes GET /cosmwasm/wasm/v1/code
PinnedCodes QueryPinnedCodesRequest QueryPinnedCodesResponse PinnedCodes gets the pinned code ids GET /cosmwasm/wasm/v1/codes/pinned
Params QueryParamsRequest QueryParamsResponse Params gets the module params GET /cosmwasm/wasm/v1/codes/params
ContractsByCreator QueryContractsByCreatorRequest QueryContractsByCreatorResponse ContractsByCreator gets the contracts by creator GET /cosmwasm/wasm/v1/contracts/creator/{creator_address}

Top

cosmwasm/wasm/v1/tx.proto

MsgClearAdmin

MsgClearAdmin removes any admin stored for a smart contract

Field Type Label Description
sender string Sender is the actor that signed the messages
contract string Contract is the address of the smart contract

MsgClearAdminResponse

MsgClearAdminResponse returns empty data

MsgExecuteContract

MsgExecuteContract submits the given message data to a smart contract

Field Type Label Description
sender string Sender is the that actor that signed the messages
contract string Contract is the address of the smart contract
msg bytes Msg json encoded message to be passed to the contract
funds cosmos.base.v1beta1.Coin repeated Funds coins that are transferred to the contract on execution

MsgExecuteContractResponse

MsgExecuteContractResponse returns execution result data.

Field Type Label Description
data bytes Data contains bytes to returned from the contract

MsgInstantiateContract

MsgInstantiateContract create a new smart contract instance for the given code id.

Field Type Label Description
sender string Sender is the that actor that signed the messages
admin string Admin is an optional address that can execute migrations
code_id uint64 CodeID is the reference to the stored WASM code
label string Label is optional metadata to be stored with a contract instance.
msg bytes Msg json encoded message to be passed to the contract on instantiation
funds cosmos.base.v1beta1.Coin repeated Funds coins that are transferred to the contract on instantiation

MsgInstantiateContract2

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

Field Type Label Description
sender string Sender is the that actor that signed the messages
admin string Admin is an optional address that can execute migrations
code_id uint64 CodeID is the reference to the stored WASM code
label string Label is optional metadata to be stored with a contract instance.
msg bytes Msg json encoded message to be passed to the contract on instantiation
funds cosmos.base.v1beta1.Coin repeated Funds coins that are transferred to the contract on instantiation
salt bytes Salt is an arbitrary value provided by the sender. Size can be 1 to 64.
fix_msg bool FixMsg include the msg value into the hash for the predictable address. Default is false

MsgInstantiateContract2Response

MsgInstantiateContract2Response return instantiation result data

Field Type Label Description
address string Address is the bech32 address of the new contract instance.
data bytes Data contains bytes to returned from the contract

MsgInstantiateContractResponse

MsgInstantiateContractResponse return instantiation result data

Field Type Label Description
address string Address is the bech32 address of the new contract instance.
data bytes Data contains bytes to returned from the contract

MsgMigrateContract

MsgMigrateContract runs a code upgrade/ downgrade for a smart contract

Field Type Label Description
sender string Sender is the that actor that signed the messages
contract string Contract is the address of the smart contract
code_id uint64 CodeID references the new WASM code
msg bytes Msg json encoded message to be passed to the contract on migration

MsgMigrateContractResponse

MsgMigrateContractResponse returns contract migration result data.

Field Type Label Description
data bytes Data contains same raw bytes returned as data from the wasm contract. (May be empty)

MsgPinCodes

MsgPinCodes is the MsgPinCodes request type.

Since: 0.40

Field Type Label Description
authority string Authority is the address of the governance account.
code_ids uint64 repeated CodeIDs references the new WASM codes

MsgPinCodesResponse

MsgPinCodesResponse defines the response structure for executing a MsgPinCodes message.

Since: 0.40

MsgStoreAndInstantiateContract

MsgStoreAndInstantiateContract is the MsgStoreAndInstantiateContract request type.

Since: 0.40

Field Type Label Description
authority string Authority is the address of the governance account.
wasm_byte_code bytes WASMByteCode can be raw or gzip compressed
instantiate_permission AccessConfig InstantiatePermission to apply on contract creation, optional
unpin_code bool UnpinCode code on upload, optional. As default the uploaded contract is pinned to cache.
admin string Admin is an optional address that can execute migrations
label string Label is optional metadata to be stored with a constract instance.
msg bytes Msg json encoded message to be passed to the contract on instantiation
funds cosmos.base.v1beta1.Coin repeated Funds coins that are transferred from the authority account to the contract on instantiation
source string Source is the URL where the code is hosted
builder string Builder is the docker image used to build the code deterministically, used for smart contract verification
code_hash bytes CodeHash is the SHA256 sum of the code outputted by builder, used for smart contract verification

MsgStoreAndInstantiateContractResponse

MsgStoreAndInstantiateContractResponse defines the response structure for executing a MsgStoreAndInstantiateContract message.

Since: 0.40

Field Type Label Description
address string Address is the bech32 address of the new contract instance.
data bytes Data contains bytes to returned from the contract

MsgStoreCode

MsgStoreCode submit Wasm code to the system

Field Type Label Description
sender string Sender is the actor that signed the messages
wasm_byte_code bytes WASMByteCode can be raw or gzip compressed
instantiate_permission AccessConfig InstantiatePermission access control to apply on contract creation, optional

MsgStoreCodeResponse

MsgStoreCodeResponse returns store result data.

Field Type Label Description
code_id uint64 CodeID is the reference to the stored WASM code
checksum bytes Checksum is the sha256 hash of the stored code

MsgSudoContract

MsgSudoContract is the MsgSudoContract request type.

Since: 0.40

Field Type Label Description
authority string Authority is the address of the governance account.
contract string Contract is the address of the smart contract
msg bytes Msg json encoded message to be passed to the contract as sudo

MsgSudoContractResponse

MsgSudoContractResponse defines the response structure for executing a MsgSudoContract message.

Since: 0.40

Field Type Label Description
data bytes Data contains bytes to returned from the contract

MsgUnpinCodes

MsgUnpinCodes is the MsgUnpinCodes request type.

Since: 0.40

Field Type Label Description
authority string Authority is the address of the governance account.
code_ids uint64 repeated CodeIDs references the WASM codes

MsgUnpinCodesResponse

MsgUnpinCodesResponse defines the response structure for executing a MsgUnpinCodes message.

Since: 0.40

MsgUpdateAdmin

MsgUpdateAdmin sets a new admin for a smart contract

Field Type Label Description
sender string Sender is the that actor that signed the messages
new_admin string NewAdmin address to be set
contract string Contract is the address of the smart contract

MsgUpdateAdminResponse

MsgUpdateAdminResponse returns empty data

MsgUpdateInstantiateConfig

MsgUpdateInstantiateConfig updates instantiate config for a smart contract

Field Type Label Description
sender string Sender is the that actor that signed the messages
code_id uint64 CodeID references the stored WASM code
new_instantiate_permission AccessConfig NewInstantiatePermission is the new access control

MsgUpdateInstantiateConfigResponse

MsgUpdateInstantiateConfigResponse returns empty data

MsgUpdateParams

MsgUpdateParams is the MsgUpdateParams request type.

Since: 0.40

Field Type Label Description
authority string Authority is the address of the governance account.
params Params params defines the x/wasm parameters to update.

NOTE: All parameters must be supplied. |

MsgUpdateParamsResponse

MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message.

Since: 0.40

Msg

Msg defines the wasm Msg service.

Method Name Request Type Response Type Description HTTP Verb Endpoint
StoreCode MsgStoreCode MsgStoreCodeResponse StoreCode to submit Wasm code to the system
InstantiateContract MsgInstantiateContract MsgInstantiateContractResponse InstantiateContract creates a new smart contract instance for the given code id.
InstantiateContract2 MsgInstantiateContract2 MsgInstantiateContract2Response InstantiateContract2 creates a new smart contract instance for the given code id with a predictable address
ExecuteContract MsgExecuteContract MsgExecuteContractResponse Execute submits the given message data to a smart contract
MigrateContract MsgMigrateContract MsgMigrateContractResponse Migrate runs a code upgrade/ downgrade for a smart contract
UpdateAdmin MsgUpdateAdmin MsgUpdateAdminResponse UpdateAdmin sets a new admin for a smart contract
ClearAdmin MsgClearAdmin MsgClearAdminResponse ClearAdmin removes any admin stored for a smart contract
UpdateInstantiateConfig MsgUpdateInstantiateConfig MsgUpdateInstantiateConfigResponse UpdateInstantiateConfig updates instantiate config for a smart contract
UpdateParams MsgUpdateParams MsgUpdateParamsResponse UpdateParams defines a governance operation for updating the x/wasm module parameters. The authority is defined in the keeper.

Since: 0.40 | | | SudoContract | MsgSudoContract | MsgSudoContractResponse | SudoContract defines a governance operation for calling sudo on a contract. The authority is defined in the keeper.

Since: 0.40 | | | PinCodes | MsgPinCodes | MsgPinCodesResponse | PinCodes defines a governance operation for pinning a set of code ids in the wasmvm cache. The authority is defined in the keeper.

Since: 0.40 | | | UnpinCodes | MsgUnpinCodes | MsgUnpinCodesResponse | UnpinCodes defines a governance operation for unpinning a set of code ids in the wasmvm cache. The authority is defined in the keeper.

Since: 0.40 | | | StoreAndInstantiateContract | MsgStoreAndInstantiateContract | MsgStoreAndInstantiateContractResponse | StoreAndInstantiateContract defines a governance operation for storing and instantiating the contract. The authority is defined in the keeper.

Since: 0.40 | |

Scalar Value Types

.proto Type Notes C++ Java Python Go C# PHP Ruby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)