MAPO Developer Docs
  • MAPO Developer Docs
  • Base
    • MAPO Introduction
    • MAPO token
    • Omnichain DAPP
    • Differences Between Omnichain Applications and Single or Multi-Chain Applications
    • Differences Between Third-Party Trusted Cross-Chain and Peer-to-Peer Cross-Chain Solutions
    • BTC layer2
      • brc-201
    • Oracle
      • Supra: Decentralized Oracle on MAP Protocol
    • Account
    • Transactions
    • block
    • MPT tree
    • RLP
    • Gas fee
    • Cross Chain Message
    • light client
      • MAPO light client
    • MOS
      • MOS interface and functions
      • deploy MOS
      • Messenger
    • map-relay-chain(atlas)
      • atlas architecture
        • atlas architecture
        • atlas genesis
          • genesis config
          • genesis contract
            • ABI
              • Accounts
              • Election
              • EpochRewards
              • LockedGold
              • Validators
            • address
            • deploy
        • precompile-contract
        • protocol
          • Proof of Stake
          • consensus
          • election
          • rewards
          • governance
      • deploy atlas
        • run atlas
        • run atlas(archive)
        • run atlas(bootnodes)
        • run atlas(validator)
        • run atlas(RPC)
      • Marker tool
        • Genesis
        • Validator
        • Vote
        • Common
      • make private network(atlas)
      • public service
        • public network
      • example
        • how-to-vote
        • how-to-withdraw
        • how-to-become-a-new-validator
        • how-to-become-a-new-validator(advanced)
    • Compass(maintainer,messenger)
      • Compass - arch and model
      • Compass - config
      • Compass - deploy
      • Compass secondary development - define your own routing service based on compass
  • MAPO Stack
    • stack
      • Connected Chains and Corresponding Addresses
    • Compatible-EVM
      • Smart Contracts Language
      • Smart Contracts Anatomy
      • Smart Contracts Libraries
      • Smart Contracts Compile
      • Smart Contracts Testing
      • Smart Contracts Deploy
      • Smart Contracts Composability
      • Smart Contracts Security
      • Formal-Verification
      • Frameworks
      • dev-network
    • MAPO Implement Cross-chain Interoperability
      • integration of MAP with EVM-Compatible Chains
        • light client verify
        • light client update state
        • MOS
      • integration of MAP with TON Network
      • integration of MAP with Non-EVM-Compatible Chains
        • light client verify
        • light client update state
        • MOS
    • How to develop cross-chain applications
    • light client address
    • SDK/API
      • MOS interface
      • Light client interface
      • Atlas RPC
        • json-rpc
          • atlas json rpc
          • atlas consensus rpc
        • javaScript sdk
        • go-sdk
      • Backend API
        • SCAN API
  • Zero-Knowledge Proof
    • zk proof
Powered by GitBook
On this page
  • vote
  • quicklyVote
  • activate
  • revokePending
  • revokeActive
  1. Base
  2. map-relay-chain(atlas)
  3. Marker tool

Vote

PreviousValidatorNextCommon

Last updated 1 year ago

Introduction to commands related to voting operations

vote

Vote for the specified validator.

You must enough MAPO tokens in the LockedGold contract in advance and register your information in the contract.

This operation will decrease the total votes and unvoted amount of your previously registered account in the LockedGold contract, and increase the total votes and pending votes of the validator in the Election contract.

Parameter description:

  • rpcaddr: The address of the RPC service, which can be either the provided or your own RPC service address.

  • keystore: The path to the keystore file.

  • target: The address of the validator you want to vote for.

  • voteNum: The number of MAPO tokens you want to vote with.

./marker vote
--rpcaddr http://127.0.0.1:7445
--keystore ./UTC--2021-09-08T08-00-15.473724074Z--1c0edab88dbb72b119039c4d14b1663525b3ac15
--target "0x81f02fd21657df80783755874a92c996749777bf"
--voteNum 10000

quicklyVote

If you have not created an account and locked MAPO tokens yet, you can quickly vote using the quicklyVote command, which integrates the createAccount, lockedMAP, and vote commands. Please note that you can only use this command once. Regardless of the success or failure of the command, it includes the operations corresponding to the createAccount, lockedMAP, and vote commands and does not have the feature of being reusable.

Parameter description:

  • keystore: The path to the keystore file.

  • target: The address of the validator you want to vote for.

  • voteNum: The number of MAPO tokens you want to vote with.

  • lockedNum: The number of MAPO tokens you want to lock.

./marker quicklyVote
--rpcaddr http://127.0.0.1:7445
--keystore ./UTC--2021-09-08T08-00-15.473724074Z--1c0edab88dbb72b119039c4d14b1663525b3ac15
--target "0x81f02fd21657df80783755874a92c996749777bf"
--voteNum 10000
--lockedNum 10000

activate

Activate pending votes to start earning rewards.

As a voter, you need to activate your pending votes at some point after the end of the epoch in which the pending votes were generated. This means converting the pending votes of your account into active votes.

Parameter description:

  • keystore: The path to the keystore file.

  • target: The address of the validator for which you want to activate votes.

./marker activate
--rpcaddr http://127.0.0.1:7445
--keystore ./UTC--2021-09-08T08-00-15.473724074Z--1c0edab88dbb72b119039c4d14b1663525b3ac15
--target "0x81f02fd21657df80783755874a92c996749777bf"

revokePending

Revoke pending votes for a validator.

This command converts the voting state of MAPO tokens to non-voting MAPO tokens and increases the total votes and non-votes of your previously registered account in the LockedGold contract. In the Election contract, it decreases the total votes and pending votes of the validator.

Parameter description:

  • keystore: The path to the keystore file.

  • target: The address of the validator for which you want to revoke pending votes.

  • lockNum: The number of MAPO tokens you want to revoke from the validator's pending votes.

./marker revokePending
--rpcaddr http://127.0.0.1:7445
--keystore ./UTC--2021-09-08T08-00-15.473724074Z--1c0edab88dbb72b119039c4d14b1663525b3ac15
--target "0x81f02fd21657df80783755874a92c996749777bf"
--lockedNum 10000

revokeActive

Revoke active votes for a validator.

This command converts voting MAPO tokens to non-voting MAPO tokens. It increases the total votes and non-votes of your previously registered account in the LockedGold contract. In the Election contract, it decreases the total votes and active votes of the validator.

Parameter description:

  • keystore: The path to the keystore file.

  • target: The address of the validator for which you want to revoke active votes.

  • lockNum: The number of MAPO tokens you want to revoke from the validator's active votes.

./marker revokeActive
--rpcaddr http://127.0.0.1:7445
--keystore ./UTC--2021-09-08T08-00-15.473724074Z--1c0edab88dbb72b119039c4d14b1663525b3ac15
--target "0x81f02fd21657df80783755874a92c996749777bf"
--lockedNum 10000

rpcaddr: The address of the RPC service, which can be either the provided or your own RPC service address.

rpcaddr: The address of the RPC service, which can be either the provided or your own RPC service address.

rpcaddr: The address of the RPC service, which can be either the provided or your own RPC service address.

rpcaddr: The address of the RPC service, which can be either the provided or your own RPC service address.

locked
RPC service address
RPC service address
RPC service address
RPC service address
RPC service address