Skip to content

Instantly share code, notes, and snippets.

@cgcardona
Created September 23, 2021 00:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cgcardona/d125824b8be54ce3073582899cc335ce to your computer and use it in GitHub Desktop.
Save cgcardona/d125824b8be54ce3073582899cc335ce to your computer and use it in GitHub Desktop.

Onramp Avash User

Dependencies

Golang

First, confirm you have the latest and greatest version of Golang and if not then install it.

go version
go version go1.17.1 darwin/amd64

AvalancheGo

Next, confirm you have the latest version of AvalancheGo installed and built.

cd /path/to/avalanchego
git fetch -p
git checkout v1.6.0
./scripts/build.sh
...building
...building
Build Successful

./build/avalanchego --version
avalanche/1.6.0 [database=v1.4.5, commit=43ab26923909bf5750c1edeb8477a3b912e40eaa]

Avash

Then, confirm you have the latest versions of Avash installed and built. Also make sure to run the five_node_staking.lua script to fire up a local network w/ 5 nodes.

cd /path/to/avash
git fetch -p
git checkout v1.2.0
go build

./avash
avash> runscript scripts/five_node_staking.lua

Now open a new tab and run this curl

curl --location --request POST 'http://localhost:9650/ext/info' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc":"2.0",
    "id"     :1,
    "method" :"info.getNetworkName",
    "params" :{
    }
}'

{
    "jsonrpc": "2.0",
    "result": {
        "networkName": "local"
    },
    "id": 1
}

Summary

If you successfully completed each of the previous steps then your local avash network is good to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment