Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sei-protocol/sei-cosmwasm
Sei utilities for usage in cosmwasm smart contracts
https://github.com/sei-protocol/sei-cosmwasm
Last synced: 4 days ago
JSON representation
Sei utilities for usage in cosmwasm smart contracts
- Host: GitHub
- URL: https://github.com/sei-protocol/sei-cosmwasm
- Owner: sei-protocol
- License: apache-2.0
- Created: 2022-06-22T15:24:38.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-30T19:27:10.000Z (4 months ago)
- Last Synced: 2025-01-08T02:13:00.470Z (11 days ago)
- Language: Rust
- Size: 168 KB
- Stars: 54
- Watchers: 4
- Forks: 37
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ccamel - sei-protocol/sei-cosmwasm - Sei utilities for usage in cosmwasm smart contracts (Rust)
README
# Sei-Cosmwasm Package
This repository contains the sei-cosmwasm package to support smart contract querying and messages to the modules in sei-chain. It also includes an example contract that can be used to test package behavior locally and can be used as a reference for implementation details to include sei-chain integration in your smart contracts.
## Build Sei Tester Contract
```shell
docker run --rm -v "$(pwd)":/code \
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
cosmwasm/rust-optimizer:0.14.0
```## Testing with LocalSei
### Store Contract Code
```shell
seid tx wasm store artifacts/sei_tester.wasm -y --from --chain-id -b block --gas=3000000 --fees=1000sei
```Make sure to note the code ID for the contract from the tx response. You can also find it in the list of uploaded code with this query:
```shell
seid q wasm list-code
```### Instantiate Contract
```shell
seid tx wasm instantiate '{}' -y --no-admin --from --chain-id --gas=1500000 --fees=1000sei -b block --label sei-tester
```Make sure to note the contract address for the contract from the tx response. You can also find it with this query:
```shell
seid q wasm list-contract-by-code
```### Query Smart Contract
```shell
seid q wasm contract-state smart
```The json literal may look something like this:
```json
'{"exchange_rates": {}}'
```