Uploads new code to the blockchain and results in a new code ID, if successful. WASMByteCode is accepted as either uncompressed or gzipped binary data encoded as Base64.
Copy
type MsgStoreCode struct{
Sender sdk.AccAddress `json:"sender" yaml:"sender"`// WASMByteCode can be raw or gzip compressed
WASMByteCode core.Base64Bytes `json:"wasm_byte_code" yaml:"wasm_byte_code"`}
Creates a new instance of a smart contract. Initial configuration is provided in the InitMsg, which is a JSON message encoded in Base64. If Migratable is set to true, the owner of the contract is permitted to reset the contract's code ID to a new one.
Copy
type MsgInstantiateContract struct{// Sender is an sender address
Sender string`protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty" yaml:"sender"`// Admin is an optional admin address who can migrate the contract
Admin string`protobuf:"bytes,2,opt,name=admin,proto3" json:"admin,omitempty" yaml:"admin"`// CodeID is the reference to the stored WASM code
CodeID uint64`protobuf:"varint,3,opt,name=code_id,json=codeId,proto3" json:"code_id,omitempty" yaml:"code_id"`// InitMsg json encoded message to be passed to the contract on instantiation
InitMsg encoding_json.RawMessage `protobuf:"bytes,4,opt,name=init_msg,json=initMsg,proto3,casttype=encoding/json.RawMessage" json:"init_msg,omitempty" yaml:"init_msg"`// InitCoins that are transferred to the contract on execution
InitCoins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,5,rep,name=init_coins,json=initCoins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"init_coins" yaml:"init_coins"`}