VinuChain
  • VinuChain | VC
  • 📃Whitepaper
    • Whitepaper
      • Disclaimer
      • Abstract
      • Introduction
      • Background
      • VinuChain Protocol
      • Consensus Mechanism
      • Quota System
      • Network Architecture
      • VinuChain Coin (VC)
      • Conclusion
      • References
    • Tokenomics
    • Launchpads
    • Roadmap
  • 🧑‍💻Technical Docs
    • VinuChain Mainnet
      • Connect to Mainnet
      • Install Read-Only Node
      • Install Validator Node
      • Install API Node
    • VinuChain Testnet
      • Connect to Testnet
      • Install Read-Only Node
      • Install Validator Node
      • Private Network (Fakenet)
    • Nodes & Validators
      • Read-Only Node
      • Become a Validator
      • Update Validator Info
      • API Node
      • Delegation Calls
      • Lockup Calls
      • Reward Calls
      • Validator Calls
      • Troubleshooting
      • FAQ
    • Staking
      • Overview
      • Stake VC on VinuChain
      • FAQ - Staking
    • Smart Contracts
      • Deploy a Smart Contract
    • API
      • Public API Endpoints
      • GraphQL
      • REST API
    • Web3 Methods
      • gasprice.js
      • transfer.js
      • web3.eth.abi.js
      • web3.eth.accounts.js
      • web3.eth.contract.js
      • web3.eth.iban.js
      • web3.eth.js
      • web3.eth.net.js
      • web3.eth.subscribe.js
      • web3.eth.utils.js
      • .gitignore
      • LICENSE
      • app.js
      • common.js
      • constants.js
      • package-lock.json
      • package.json
      • yarn.lock
    • Cross-chain Bridging
      • Native $VC vs Wrapped $VC
      • Wanbridge
      • Add bep20 VC to Trust Wallet
Powered by GitBook
On this page
  • Config File
  • Update your info in the smart contract
  1. Technical Docs
  2. Nodes & Validators

Update Validator Info

How to update your Validator info

Config File

Create a config file in JSON format that contains the following parameters (you can also leave parameters empty):

{  "name": "VALIDATOR_NAME", /* Name of the validator */
  "logoUrl": "LOGO_URL", /* Validator logo (PNG|JPEG|SVG) - 100px x 100px is enough */
  "website": "WEBSITE_URL", /* Website icon on the right */
  "contact": "CONTACT_URL" /* Contact icon on the right */
}

Example:

{
  "name": "any",
  "logoUrl": "https://any.site/vinu/any.png",
  "website": "https://any.site",
  "contact": "https://t.me/any_vinu"
}

Then host it somewhere publicly accessible.

Update your info in the smart contract

  1. Connect to your validator node

  2. Open up a go-opera console session via go-opera attach

  3. Load the stakerInfoContract ABI and instantiate the contract:

abi = JSON.parse('[{"inputs":[{"internalType":"address","name":"_stakerContractAddress","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"stakerID","type":"uint256"}],"name":"InfoUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakerInfos","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_stakerContractAddress","type":"address"}],"name":"updateStakerContractAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"_configUrl","type":"string"}],"name":"updateInfo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"_stakerID","type":"uint256"}],"name":"getInfo","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"}]')

Mainnet:

stakerInfoContract = web3.vc.contract(abi).at("0xb914a0b16111BaB228ae6214e6E1FD4a5EaE877C")

Testnet:

stakerInfoContract = web3.vc.contract(abi).at("0x6b39bcd174DddF5A17d065822BDC43353eB6112A")
  1. Unlock validator account

# Unlock validator wallet
personal.unlockAccount("VALIDATOR_WALLET_ADDRESS", "PASSWORD", 300)
  1. Call the updateInfo function of the stakerInfoContract (make sure you have enough VC on your wallet to cover the transaction fee)

stakerInfoContract.updateInfo("CONFIG_URL", 
{ from: "VALIDATOR_ADDRESS" })

Example:

stakerInfoContract.updateInfo("https://any.site/vinu/config.json", 
{ from: "VALIDATOR_WALLET_ADDRESS" })
  1. Validate if you updated your info correctly

stakerInfoContract.getInfo(STAKER_ID)

Example:

stakerInfoContract.getInfo(14)
PreviousBecome a ValidatorNextAPI Node

Last updated 11 months ago

🧑‍💻