-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit 'd12ec9ecf0c06ce33217c5bce74b425aea4dcdef' into no-gb
- Loading branch information
Showing
11 changed files
with
181 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Cosmwasm | ||
|
||
## Example smart contract to interact with umee native modules (leverage and oracle) | ||
|
||
- [umee-cosmwasm](https://github.com/umee-network/umee-cosmwasm) | ||
|
||
## Cosmwasm Built-in capabilities | ||
|
||
- [Built-in capabilities](https://github.com/CosmWasm/cosmwasm/blob/main/docs/CAPABILITIES-BUILT-IN.md) - iterator, staking, stargate, cosmwasm_1_1, cosmwasm_1_2 | ||
- Custom capability of umee chain: `umee` | ||
|
||
## Allowed native module queries | ||
|
||
Queries for all native Umee modules: | ||
|
||
- [ugov](https://github.com/umee-network/umee/blob/main/proto/umee/ugov/v1/query.proto) | ||
- [leverage](https://github.com/umee-network/umee/blob/main/proto/umee/leverage/v1/query.proto) | ||
- [oracle](https://github.com/umee-network/umee/blob/main/proto/umee/oracle/v1/query.proto) | ||
- [uibc](https://github.com/umee-network/umee/blob/main/proto/umee/uibc/v1/quota.proto) | ||
|
||
```json | ||
{ | ||
"chain": { | ||
"custom": { | ||
"leverage_parameters": {} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
Example command to execute a query: | ||
|
||
```bash | ||
$ umeed q wasm contract-state smart ${json_input} | ||
$ umeed q wasm contract-state smart umee14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9scsdqqx '{"chain":{"custom":{"leverage_params":{}}}}' | ||
``` | ||
|
||
## Allowed native module transactions | ||
|
||
Only [leverage module transactions](https://github.com/umee-network/umee/blob/main/proto/umee/leverage/v1/tx.proto) are allowed. Example JSON input for Umee native module: | ||
|
||
```json | ||
{ | ||
"umee": { | ||
"leverage": { | ||
"supply": { | ||
"supplier": "", | ||
"asset": { | ||
"denom": "uumee", | ||
"amount": "123123123" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
Example commands to execute a transaction: | ||
|
||
```bash | ||
$ umeed tx wasm execute ${contract_id} ${json_input} | ||
$ umeed tx wasm execute umee14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9scsdqqx '{"umee":{"leverage":{"supply_collateral":{"supplier":"umee1s84d29zk3k20xk9f0hvczkax90l9t94g72n6wm","asset":{"denom":"uumee","amount":"1234"}}}}}' | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.