Delegation Guide

Wallet Based Delegation

For simple delegation, please delegate through the official WanWallet or MyWanWallet. See WanWallet delegation instructions to get started.

Command Line Based Delegation

1)Install docker(Ubuntu):

$ sudo wget -qO- https://get.docker.com/ | sh

$ sudo usermod -aG docker YourUserName

$ exit

2)Create an account and find the validator node information.

Please note that before using pos.getStakerInfo to get the validator node information you should confirm that it has been synchronized to the latest block. This can be viewed by eth.blockNumber.

The verification node information can be found through the command line or through the explorer.

$ docker run -d -v /home/YourUserName/.wanchain:/root/.wanchain wanchain/wanpos /bin/gwan

YourContainerID

$ docker exec -it YourContainerID /bin/bash

root> gwan attach .wanchain/gwan.ipc

> personal.newAccount('YourPassword')

"YourAccountAddress"

> pos.getStakerInfo(eth.blockNumber)
[
  {...},
  {...},
  {  Address: "DelegateAddress",
    Amount: 2e+23,
    Clients: [],
    FeeRate: 10,
    From: "...",
    LockEpochs: 30,
    PubBn256: "...",
    PubSec256: "...",
    StakingEpoch: 117
  }
]

Through the above procedure, the local account YourAccountAddress and the validator node address DelegateAddress with the commission rate FeeRate are obtained.

3)Make sure your test account address has sufficient WAN test coins (at least 100 clients)

4)Create script /home/YourUserName/.wanchain/sendDelegate.js

5)Run delegation script in GWAN to finish

Last updated