Delegation Guide

Wallet Based Delegation

Since the release of the beta version of the light walletarrow-up-right, delegators may use the graphical interface of the wallet to delegate their testnet WAN. Delegators may also choose to use the command line to delegate. See beta light wallet instructions for more details

Command Line Based Delegation

Step 1: Install Docker (Ubuntu):

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

$ sudo usermod -aG docker YourUserName

$ exit

Step 2: Start GWANarrow-up-right with Docker, create account, and view delegate node list: (Make sure to replace YourContainerID, and YourPassword with your own information.)

$ docker run -d -v /home/YourUserName/.wanchain:/root/.wanchain wanchain/client-go:2.1.2 /bin/gwan --testnet

YourContainerID

$ docker exec -it YourContainerID /bin/bash

root> gwan attach .wanchain/testnet/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
	}
]

Take note of the values YourAccountAddress, DelegateAddress, and FeeRate which are returned from the above script.

Step 3: Get test WAN for "YourAccountAddress"

See instructions for getting testnet WAN.

Step 4: Create a script file in path: /home/YourUserName/.wanchain/sendDelegate.js

Step 5: Run the registration script in GWAN

Load the script in GWAN to complete delegation.

Last updated