Zedxion Smart Chain(Zed20) Documentation
Choose Language
Zedxion Smart Chain(Zed20) Documentation
  • Summary
  • DOCUMENTATION
    • Learn about the ZEDXION Platform
      • ZEDXION Overview: vision, strategy and platform components
      • The ZEDXION Blockchain
        • Discovering the Network
        • ZEDXION Consensus
        • Delegation through Staking with Validators
        • Ethereum (EVM) Compatibility and Smart Contracts
        • Boosting ZEDXION’s Scalability
      • ZEDX Сoin
        • ZEDX Coin Economics
        • ZEDX Coin Wrappers
        • ZEDX on Other Chains
      • Interoperability
      • ZEDXION Governance and Development
        • ZEDXION Assembly
      • Wallets supporting ZEDXION
    • ZEDXION for Business
    • Things you can do on ZEDXION
      • Interacting with the ZEDXION Blockchain
      • ZEDXION Ecosystem
      • Community
      • Grants and Bounties
    • ZEDXION Mobile Infrastructure Use Cases
  • Developers
    • Network Details
      • ZEDXION Mainnet
      • ZEDXION Testnet
      • ZEDXION Faucet
      • Network Upgrades
        • Upgrade Guide
        • Upgrade Guide (explorer nodes)
        • Block 13,800,000 Fork
        • FIP's
    • Consensus
      • Stake, Delegate and Withdraw
      • Vote
      • End-of-Cycle Flow
      • Contract Addresses
    • Resources & Tools
      • TheGraph
      • WalletConnect on Zedx
    • Important smart contracts
      • Zedx Token
      • Zedx Dollar
      • Major Deployed Contracts
      • Bridges
        • Ethereum ↔ Zedx GoodDollar Token
        • Ethereum ↔ Zedx ZED20 Tokens
        • BSC ↔ Zedx BNB
        • BSC ↔ Zedx Native
        • BSC ↔ Zedx ZED20
        • Ethereum ↔ Zedx Native
    • How to become a validator
      • Getting started as a validator
    • Zeddex Contracts v2-v3 Zedx
    • Zeddex Contract v2-v3 BSC
    • API of ZedDex
  • Links
    • Discord
    • Facebook
    • GitHub
    • LinkedIn
    • Medium
    • Telegram
    • Twitter
    • YouTube
    • instagram
    • Slack
    • Zedxion Coin
    • Zedxion Exchange
    • Zedcex Exchange
Powered by GitBook
On this page
  • Open a new ballot
  • Check ballot info
  • Vote
  • getQuorumState
  • getAccepted/getRejected
  • activeBallots
  1. Developers
  2. Consensus

Vote

PreviousStake, Delegate and WithdrawNextEnd-of-Cycle Flow

Last updated 6 months ago

ZEDXION chain functionality can be change by voting on the contracts implementations. New implementations can be deployed, and opened to vote by validators for others to decide on whether to accept/reject the changes.

Open a new ballot

In order to open a new vote, a validator needs to call the `newBallot` function on the with the following params:

  • startAfterNumberOfCycles - number of cycles (minimum 1) after which the ballot is open for voting

  • cyclesDuration - number of cycles (minimum 2) for the ballot to remain open for voting

  • contractType

    • 1 - Consensus

    • 2 - BlockReward

    • 3 - ProxyStorage

    • 4 - Voting

  • proposedValue - address of the new implementation deployed for the relevant contract type

  • description - text description which should contain the reason/change introduced in the ballot

Check ballot info

Everyone can check all the ballots that were created using the `getBallotInfo` function. This function receives two params:

  • id - the ballot id

  • key - account address

Vote

Everyone can vote on open ballots, after the start block has passed and until the end block hasn't yet.

It's important to note that at the end of a vote, only validators count towards the final result.

Voting is done by calling the `vote` function, which receives two params:

  • id - the ballot id

  • choice - 1 is accept, 2 is reject

getQuorumState

Returns the state of a specific ballot id: 1 - in progress, 2 - accepted, 3 - rejected

getAccepted/getRejected

Returns the number of accepts/reject of a specific ballot id.

activeBallots

Returns an array of active ballot ids.

Some other useful functions on the are:

voting contract
voting contract
new ballot
getBallotInfo
vote