S
S
Stargaze
Search
⌃K

Deploy to Testnet

Explorer

Faucet

Join our Discord and request tokens in the #faucet channel. You will need the developer role from #pick-a-role.

Endpoints

Building starsd binary

git clone [email protected]:public-awesome/stargaze.git
cd stargaze
make install

Deploying a contract

Stargaze testnets are open and do not require a governance proposal to deploy new contracts. Follow the next steps to upload a contract.
1. Create a stars address
starsd keys add testnet-key
- name: testnet-key
type: local
address: stars1e9rf2y807g32jv88j9ydpe7082rk9ck8w79xtz
pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Aidseu5Pl9DYHGZpCE2CkqLckQ6KSgC5IJvLL1yc+lpo"}'
mnemonic: ""
2. Request funds through the #faucet channel
3. Configure RPC endpoint and Chain ID
starsd config node https://rpc.elgafar-1.stargaze-apis.com:443
starsd config chain-id elgafar-1
4. Check your account has balance
starsd query bank balances [address]
5. Deploy a contract
After executing this transaction you will have a code id that you can use to instantiate the contract.
starsd tx wasm store contract.wasm --from testnet-key --gas-prices 0.025ustars --gas-adjustment 1.7 --gas auto
6. Instantiating a contract
INSTANTIATE_MSG=$(cat <<EOF
{
"contract_param": "something"
}
EOF
)
starsd tx wasm instantiate [code_id] $INSTANTIATE_MSG --label "StargazeContract" --admin [my-address] --from testnet-key --amount "100000000ustars" --gas-prices 0.025ustars --gas-adjustment 1.7 --gas auto