ICX delegation script
If you're an ICON validator, learn how to use this script to track the votes you receive through Omm.
bOMM holders can participate in ICON’s voting system by delegating ICX from the ICON market towards up to 5 ICON validators (see Vote for ICON validators).
Some validators offer voting incentives to ICX stakers. bOMM has more voting power than staked ICX – and it's cheaper – so validators can use the ICX delegation script to offer incentives to bOMM holders.
The delegation script (view on GitHub) fetches the wallet addresses used to vote for a specific validator, and their voting power in ICX. The output is saved to a JSON file using this format:
First, make sure you have Python 3 and PIP installed on your device. Then:
- 1.Install the required libraries:
pip3 install -r requirements.txt
2. Run the script to fetch a list of wallet addresses and their voting power for a specific validator (also known as a P-Rep):
python3 prep-icx-delegations.py -prep PREP_ADDRESS
python3 prep-icx-delegations.py -prep hx0000000000000000000000000000000000000000
3. Open the
timestamp_prepaddress_delegations.jsonfile the script created, then divide the number beside each wallet address by 1,000,000,000,000,000,000 (10^18) to get the ICX amount.
Community trackers don't pick up the votes cast via Omm, because the votes are routed through the Balanced staking contract before they're assigned to a validator.
getAddressDelegations, then query Omm's lending pool contract address:
- 3.Locate your validator address, then copy the value beside it.
Vote for ICON validators includes details about validator incentives that support Omm users. The app also indicates which validators offer incentives, so it's easier for voters to choose.