Non-Custodial | Smart Contract Staking | Peer-to-Peer Options Trading Platform.
Contracts | Description |
---|---|
SudoMod | Proxy for minting vaults |
Vault | Staking with peer-to-peer options trading |
Before you merge the code, make sure it builds and passes all tests using the command below.
$ cargo test
You can build release artifacts manually like this, which creates a reproducible
optimized build for each contract and saves them to the ./artifacts
directory:
$ 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.12.6
(See instructions on how to install archwayd
)
$ open ~/.archway/config/config.toml
Constantine-3 test-net on mintscan
$ archwayd keys add <wallet_name> --recover
$ archwayd keys list
# Export path to your go installation
$ source ~/.profile
$ export CHAIN_ID="constantine-3"
$ export RPC="https://rpc.constantine.archway.tech:443"
$ export NODE=(--node $RPC)
$ export TXFLAG=($NODE --chain-id $CHAIN_ID --gas-prices 20000000000000aconst --gas auto --gas-adjustment 1.3)
# export path to your go installation
$ source ~/.profile
$ export CHAIN_ID="archway-1"
$ export RPC="https://rpc.mainnet.archway.io:443"
$ export NODE=(--node $RPC)
$ export TXFLAG=($NODE --chain-id $CHAIN_ID --gas-prices 900000000000aarch --gas auto --gas-adjustment 1.3)
$ archwayd query bank total $NODE
$ archwayd query bank balances $(archwayd keys show -a palingram) $NODE
$ archwayd tx bank send <sender_account_name> <receiver_address> <amount><denom> $TXFLAG
$ archwayd query wasm list-code $NODE
$ export RES=$(archwayd tx wasm store artifacts/<contract_name.wasm> --from <account_name> $TXFLAG -y --output json -b block)
$ export CODE_ID=$(echo $RES | jq -r '.logs[0].events[-1].attributes[1].value')
$ echo $CODE_ID
$ archwayd query wasm list-contract-by-code $CODE_ID $NODE --output json
$ export INIT='{}'
$ archwayd tx wasm instantiate $CODE_ID "$INIT" --from <account_name> --label "CONTRACT LABEL" $TXFLAG -y --no-admin
$ export CONTRACT=$(archwayd query wasm list-contract-by-code $CODE_ID $NODE --output json | jq -r '.contracts[-1]')
$ echo $CONTRACT
$ archwayd query wasm contract $CONTRACT $NODE
$ archwayd query bank balances $CONTRACT $NODE
$ archwayd query wasm contract-state all $CONTRACT $NODE
$ archwayd query wasm contract-state raw $CONTRACT 636F6E666967 $NODE --output "json" | jq -r '.data' | base64 -d
$ export E_PAYLOAD='{"<prop>":{}}'
$ archwayd tx wasm execute $CONTRACT "$E_PAYLOAD" --from palingram $NODE $TXFLAG -y
$ export Q_PAYLOAD='{"query_list":{}}'
$ archwayd query wasm contract-state smart $CONTRACT "$Q_PAYLOAD" $NODE --output json
See TESTNET.md for the complete SudoStake smart contracts testing docs