Deploy a Contract
Submit the code of a smart contract to chain and get its code id
PreRequisite
Upload
TXFLAGS="--chain-id=uni-6 --gas-prices=0.025ujunox --gas=auto --gas-adjustment 1.3"
junod tx wasm store artifacts/CONRTACT_NAME.wasm \
--from <KEY> $TXFLAGS -y --broadcast-mode=blockjunod q tx 38330E909CD219B80927009DA37FD69D334D19B2AD4EC47456A24E85034F0085 --output=json{
"height": "294601",
"txhash": "38330E909CD219B80927009DA37FD69D334D19B2AD4EC47456A24E85034F0085",
"codespace": "",
"code": 0,
"data": "0A460A1E2F636F736D7761736D2E7761736D2E76312E4D736753746F7265436F64651224080D12203318E74E8C68DBCC6E0317C42B8DB0AB642B61AEFAD487DEDB6ECB54FFED4D72",
"raw_log": "[{\"events\":[{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"/cosmwasm.wasm.v1.MsgStoreCode\"},{\"key\":\"module\",\"value\":\"wasm\"},{\"key\":\"sender\",\"value\":\"juno1hj5fveer5cjtn4wd6wstzugjfdxzl0xps73ftl\"}]},{\"type\":\"store_code\",\"attributes\":[{\"key\":\"code_checksum\",\"value\":\"3318e74e8c68dbcc6e0317c42b8db0ab642b61aefad487dedb6ecb54ffed4d72\"},{\"key\":\"code_id\",\"value\":\"13\"}]}]}]",
"logs": [
{
"msg_index": 0,
"log": "",
"events": [
{
"type": "message",
"attributes": [
{
"key": "action",
"value": "/cosmwasm.wasm.v1.MsgStoreCode"
},
{
"key": "module",
"value": "wasm"
},
{
"key": "sender",
"value": "juno1hj5fveer5cjtn4wd6wstzugjfdxzl0xps73ftl"
}
]
},
{
"type": "store_code",
"attributes": [
{
"key": "code_checksum",
"value": "3318e74e8c68dbcc6e0317c42b8db0ab642b61aefad487dedb6ecb54ffed4d72"
},
{
"key": "code_id",
"value": "13"
}
]
}
]
}
}]
}Instantiate
Last updated
Was this helpful?