You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# from inside EnigmaBlockchain
make build_linux
cp ./cosmwasm/lib/wasmi-runtime/librust_cosmwasm_enclave.signed.so .
rm -rf ~/.enigma*
./enigmacli config chain-id enigma-testnet # now we won't need to type --chain-id enigma-testnet every time
./enigmacli config output json
./enigmacli config indent true
./enigmacli config trust-node true# true if you trust the full-node you are connecting to, false otherwise
./enigmad init banana --chain-id enigma-testnet # banana==moniker==user-agent of this node
perl -i -pe 's/"stake"/"uscrt"/g'~/.enigmad/config/genesis.json # change the default staking denom from stake to uscrt
yes | ./enigmacli keys add a
./enigmad add-genesis-account $(./enigmacli keys show -a a) 1000000000000uscrt # 1 SCRT == 10^6 uSCRT
./enigmad validate-genesis # make sure genesis file is correct# `./enigmad export` to send genesis.json to validators
./enigmad gentx --name a --amount 1000000uscrt # generate a genesis transaction - this makes a a validator on genesis which stakes 1000000uscrt (1 SCRT)
./enigmad collect-gentxs # input the genTx into the genesis file, so that the chain is aware of the validators
./enigmad validate-genesis
RUST_BACKTRACE=1 ./enigmad start
Terminal 2:
# get erc20 wasm from https://raw.githubusercontent.com/CosmWasm/cosmwasm-examples/f5ea00a85247abae8f8cbcba301f94ef21c66087/erc20/contract.wasm
yes | ./enigmacli tx compute store ~/contract.wasm --from a --gas 6037498
# get XXX with `./enigmacli keys show -a a`# this command may take a few minutes to execute because SGX is initializing its memory
yes | ./enigmacli tx compute instantiate 1 '{"decimals":10,"initial_balances":[{"address":"XXX","amount":"108"},{"address":"enigma1f395p0gg67mmfd5zcqvpnp9cxnu0hg6rp5vqd4","amount":"53"}],"name":"ReuvenPersonalRustCoin","symbol":"RVN"}' --label RVNCoin --from a
# this^ calls write_db, canonicalize_address
./enigmacli q compute contract-state smart $(./enigmacli q compute list-contract-by-code 1 | jq -r '.[].address'| tail -1)'{"balance":{"address":"enigma1f395p0gg67mmfd5zcqvpnp9cxnu0hg6rp5vqd4"}}'# returns 53# this^ calls read_db, canonicalize_address
./enigmacli q compute contract-state smart $(./enigmacli q compute list-contract-by-code 1 | jq -r '.[].address'| tail -1)'{"balance":{"address":"XXX"}}'# returns 108
./enigmacli tx compute execute enigma1hqrdl6wstt8qzshwc6mrumpjk9338k0lja5ur0 '{"transfer":{"amount":"10","recipient":"enigma1f395p0gg67mmfd5zcqvpnp9cxnu0hg6rp5vqd4"}}' --from a
# this^ calls read_db, write_db, humanize_address, canonicalize_address
./enigmacli q compute contract-state smart $(./enigmacli q compute list-contract-by-code 1 | jq -r '.[].address'| tail -1)'{"balance":{"address":"enigma1f395p0gg67mmfd5zcqvpnp9cxnu0hg6rp5vqd4"}}'# returns 63
./enigmacli q compute contract-state smart $(./enigmacli q compute list-contract-by-code 1 | jq -r '.[].address'| tail -1)'{"balance":{"address":"XXX"}}'# returns 98
The text was updated successfully, but these errors were encountered: