Crates.io | cosm-script |
lib.rs | cosm-script |
version | 0.1.0 |
source | src |
created_at | 2022-06-10 11:31:42.971582 |
updated_at | 2022-06-10 11:31:42.971582 |
description | Stripting library for deploying and interacting with CosmWasm smart-contracts |
homepage | |
repository | https://github.com/CyberHoward/cosm-rust-script |
max_upload_size | |
id | 603489 |
size | 113,877 |
A Rust gRPC-based scripting library.
These env variables might contain sensitive information (like a mnemonic phrase). I am not responsible for your security practices.
A new chain/network scaffold will be automatically generated when you try to run a script with unknown
.env
values.
Entry | Description |
---|---|
CHAIN | Name of the chain you're targeting (juno, terra, osmosis, ...) |
NETWORK | The kind of network you are targeting (local, testnet, mainnet) |
DEPLOYMENT | Name of the targeted deployment group |
RUST_LOG | Debug level for logging |
WASM_DIR | Directory path that holds optimized .wasm builds |
STORE | File that stores network info and state |
LOCAL_MNEMONIC | Mnemonic used when NETWORK="local" |
TEST_MNEMONIC | Mnemonic used when NETWORK="testnet" |
MAIN_MNEMONIC | Mnemonic used when NETWORK="mainnet" |
LOCAL_MULTISIG | Multisig addr used when NETWORK="local" |
TEST_MULTISIG | Multisig addr used when NETWORK="testnet" |
MAIN_MULTISIG | Multisig addr used when NETWORK="mainnet" |
$ mkdir my_scripts
$ cd my_scripts
$ cargo init --bin
example.env
file to your scripting workspace and rename it to .env
. Update the values as required and make sure .env
is included in your .gitignore
file!default_store.json
and add whatever chain you want.[dependencies]
cosm-script = {git = "", tag = "v1.0.0"}
Your layout should then look something like this
my_scripts/
├─ src/
│ ├─ bin/
│ │ ├─ first_stript.rs
│ │ ├─ // My actual scripts
│ ├─ main.rs
├─ default_store.json
├─ .env
├─ Cargo.toml
You can then add a custom library, similar to cw-plus-script, that holds your custom contract interface definitions.
See the cw-20 example