Execute commands
Now we complete the task - sending some tokens that have been delegated to a key
Last updated
sourced tx wasm execute <contract-addr> \
'{"increase_allowance":{"spender":"<key-B>","amount":{"denom":"usource","amount":"2000000"}}}' \
--from <admin-key-A> \
--chain-id <chain-id> \
--gas-prices 0.1usource --gas auto --gas-adjustment 1.3 -b blocksourced query wasm contract-state smart <contract-addr> '{"allowance":{"spender":"<key-B>"}}' --chain-id <chain-id>data:
balance:
- amount: "2000000"
denom: usource
expires:
never: {}sourced q bank balances <key-C>balances:
- amount: "500"
denom: usource
pagination:
next_key: null
total: "0"{
execute: {
msgs: [{
bank: {
send: {
to_address: "<key-C>",
amount: [{
denom: "usource",
amount: "500"
}]
}
}
}]
}
};sourced tx wasm execute <contract-addr> \
'{"execute":{"msgs":[{"bank":{"send":{"to_address":"<key-C>","amount":[{"denom":"usource","amount":"500"}]}}}]}}' \
--from <key-B> \
--chain-id <chain-id> \
--gas-prices 0.1usource --gas auto --gas-adjustment 1.3 -b blocksourced q bank balances <key-C>balances:
- amount: "1000"
denom: usource
pagination:
next_key: null
total: "0"sourced query wasm contract-state smart <contract-addr> '{"allowance":{"spender":"<key-B>"}}' --chain-id <chain-id>data:
balance:
- amount: "1999500"
denom: usource
expires:
never: {}