Software
./ava --version
avalanche/0.5.7 [database=v0.5.0, network=testnet/denali]
go version
go version go1.13.12 darwin/amd64
First, fire up avash.
- branch:
master
- commit:
6f609a0219ded433e49a26277a56845459de5678
cd path/to/avash
./avash
runscript scripts/five_node_staking.lua
Next, install Metamask.
Now, add your local network to Metamask. Networks -> Custom RPC -> New Network
- Network Name: Avalanche C-Chain
- New RPC URL: http://localhost:9650/ext/C/rpc
- ChainID: 43110
- Symbol: C-AVA
Now, import the local network C Chain whale. In metamask "Import Account"
- Private Key
0xabd71b35d559563fea757f0f5edbde286fb8c043105b15abb7cd57189306d7d1
This will give you a balance of 1,000,000,000 C-AVA
Next, go to Remix. In the Deploy and Run tab set ENVIRONMENT
to "Injected Web3". This will prompt you to connect Remix to Metamask. Next, Open Storage.sol
in the File Explorers tab. Now, in the Solidity Compiler tab click Compile 1_Storage.sol
Back in the Deploy and Run tab click Deploy
. Even if you get the failure popup just click through and approve the tx with metamask. In the same tab under the "Deployed Contracts" heading open the Storage
contract and paste 31415927
in to the store
input field. Confirm and pay the tx with metamask. Lastly, click the retrieve
button to get the value from the blockchain.