cw-desmos-dummy-tokenomics

Crates.iocw-desmos-dummy-tokenomics
lib.rscw-desmos-dummy-tokenomics
version0.0.3
sourcesrc
created_at2021-11-01 16:13:12.72904
updated_at2021-11-18 14:08:34.391113
descriptionA cosmwasm contract that manage a simple Desmos tokenomics
homepage
repositoryhttps://github.com/desmos-labs/desmos-contracts
max_upload_size
id475310
size311,337
Leonardo Bragagnolo (bragaz)

documentation

README

Dummy tokenomics contract

This contract is an attempt to implement a simple "dummy" tokenomics inside the Desmos chain by using a smart contract and sudo messages.

dummy-tokenomics-flow

Store, instantiate and Interact with the contract on Desmos chain

Store the contract (if not stored before)

desmos tx wasm store <contract_name.wasm> --chain-id <chain_id> --from <key_name> --gas 1050000

Instantiate the contract

First you need to get the code_id of the previously stored contract. You can check it from the tx_response or alternatively by executing the following query:

desmos query wasm list-code

Response's example:

code_infos:
- creator: desmos1k8u92hx3k33a5vgppkyzq6m4frxx7ewnlkyjrh
  data_hash: 151EF9413F16C8953EE18FE527692B5DEA142EBF02027C3564852AC874844B7A
  id: 1
pagination: {}

After getting the contract's id you can now instatiate it by doing:

desmos tx wasm instantiate <code_id> '{"token_denom": "<name>"}' --label <contract_name> --from <key_name> --chain-id <chain_id> --amount <amount>
Commit count: 652

cargo fmt