CW1-subkeys ready to be tested on GaiaFlex network

Orkun Kulce
1 min readOct 7, 2020
From https://www.wikiwand.com/en/Roman_Senate

In the CosmWasm Governance Voting Event: Simulate UniFi DAO funding
blog post, we presented you with the idea of funding using smart contracts. Smart contract deployment has been executed successfully.

Now you learn how to interact with the smart contract and maybe initiate your own!

export CONTRACT_ADDRESS=cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5

If you have admin access to the contract you can add or remove admins by running the command:

export UPDATE_ADMINS_MSG=’{“update_admins”: {“admins”:[“cosmos1u3nufc2kjslj2t3pugxhjv4zc8adw5thuwu0tm”, “cosmos1fp9qlazkm8kgq304kalev6e69pyp5kmdd5pcgj”]}}’gaiaflex tx wasm execute $CONTRACT_ADDRESS “$UPDATE_ADMINS_MSG” \
--from account

Subkey allowances can execute send token transaction using the command:

export SEND_MSG=’{“execute”:{“msgs”:[{“bank”:{“send”:{“amount”:[{“denom”:”umuon”,”amount”:”1000"}],”from_address”:”cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5",”to_address”:”cosmos1cs63ehtq6lw86vc87t42cnhcmydtnrffzdjhkz”}}}]}}’gaiaflex tx wasm execute $CONTRACT_ADDRESS “$SEND_MSG” --from account

If you like how it sounds so far, you can initiate your own smart contract.
For this please first request tokens on the Discord Gaiaflex channel.

Here is the gaiaflex cw1-subkeys smart contract initiation command:

export INIT=’{“mutable”:true, “admins”: [“cosmos1lj0cuh34c5useycd2wl3puqfr57lxd39hn8qcv”, “cosmos1cs63ehtq6lw86vc87t42cnhcmydtnrffzdjhkz”, “cosmos1v0m347yxhuxzsg6vqc0twseefnsk8e0537uxlw”,”cosmos10r2ppjcf6neh9zdf5tejwwv6ygjuvzeqf82as2"]}’gaiaflex tx wasm instantiate 1 “$INIT” \
--from account --amount=50000umuon --label “New cw1-subkeys contract”

Happy Coding!

--

--

Orkun Kulce

Software crafter. Bedroom electronic music producer.