MAPO Developer Docs
LearnDevelopRunWhitePaperBRC-201
English
English
  • Overview
  • Learn
    • About MAP Protocol
      • Background
      • Introduction of MAP Protocol
      • History of MAP Protocol
    • Comparison with other cross-chain models
      • MAP Protocol vs Cosmos & Polkadot
      • MAP vs other cross-chain solutions without relay chain
    • Technical Mechanism
      • MAP Protocol's Technical Mechanism
      • Three-layer Architecture
      • MAP Protocol Layer
        • Concept
        • Isomorphism with All Chains
        • Verification & Maintenance Network
      • MAP Omnichain Service (MOS) Layer
      • MAPO Application Layer
      • Peer-to-Peer Cross-chain Technology with ZK-enabled Light Clients
      • Interact with Bitcoin
    • Gas Fee Model
    • DAO
    • Construction of MAP Protocol
      • Developers
      • Validators
      • Maintainers
      • Messengers
      • Liquidity providers
      • End users
    • Tokenomics
    • Purchase $MAP
  • Develop
    • MAP Relay Chain
      • Getting Started
        • Build
        • Make Private Chain
        • How To Vote
        • How To Withdraw
        • Integrate an Exchange
        • Integrate MAP Relay Chain with EVM-Compatible Chains
      • Consensus
        • Overview
        • Proof-of-Stake
        • Validator
          • Validator
          • Locked MAP
        • Election
        • Rewards
        • Aggregated Seal
      • Contracts
        • Precompiled Contracts
        • Genesis Contracts
          • ABI
            • AccountsABI
            • ElectionABI
            • EpochRewardsABI
            • LockedGoldABI
            • ValidatorsABI
          • Deploy
      • Marker
        • Genesis
        • Validator
        • Vote
        • ContractOwner
        • Common
      • Account-Abstraction
    • Light Client
      • Verification based on Light Client
      • MAPO Light Client
        • EVM Chains
        • Near
      • Light Clients
        • Client Manager
        • BNB Smart Chain
        • Near Protocol
        • Polygon(Matic)
        • Ethereum 2.0
        • Klaytn
        • Conflux)
      • Maintainer
    • MAP Omnichain Service (MOS)
      • MOS Message Guides
        • How It Works
        • How To Use
        • EVM Chains Contract
      • MCS Guides
        • How It Works
        • How To Use
          • How To On Evm Chains
          • How To On Near Protocol
        • Relay Chain Contract
        • EVM Chains Contract
        • Near Protocol Contract
      • Messenger
      • API
    • OmniChain Examples
      • OmniApp
      • OmniDictionary
    • API & SDK
      • Butter SDK
      • Atlas JSON RPC
      • Atlas Consensus API
      • MAP Scan API
    • Connected Chains and Corresponding Addresses
  • Run
    • How To Become A New Validator
    • How To Become A New Validator[advanced]
    • Withdraw
Powered by GitBook
On this page
  • Vote
  • quicklyVote
  • Activate
  • RevokePending
  • RevokeActive

Was this helpful?

  1. Develop
  2. MAP Relay Chain
  3. Marker

Vote

Introduction about vote commands.

Vote

You must lock enough MAP into the lockedGold contract in advance and register your information into the contract.

Decrements the number of total and the number of nonvoting corresponding to your previously registered account in the LockedGold contract.

Increments the number of total and pending votes for validator in the Election contract.

USAGE
  $ ./marker vote

OPTIONS
  --keystore                                                   your keystore file path
  
  --rpcaddr                                                    HTTP-RPC server address 
                                                               
  --target                                                     Your target validator address
  
  --voteNum                                                    Your number of votes

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


RESPONSE:
success
or
Failed

quicklyVote

If you have not creat Account or locked the Map, you can quickly vote through the quicklyVote command, which integrates the createAccount lockedMAP

Please note that you can only use this command once. No matter whether the command succeeds or fails, this command only packs and combines createAccount lockedMAP commands and does not have the nature of reuse.

USAGE
$ ./marker  quicklyVote   

OPTIONS
  --keystore                                                   your keystore file path
  
  --rpcaddr                                                    HTTP-RPC server address 
                                                               
  --target                                                     Your target validator address
  
  --voteNum                                                    Your number of votes
  
  --lockedNum                                                  In order to vote to validator,
                                                               you will lock enough `MAP`.

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


RESPONSE:
success
or
Failed

Activate

Activate pending votes in validator elections to begin earning rewards. To earn rewards as a voter, it is required to activate your pending votes at some point after the end of the epoch in which they were made.

That means converts account's pending votes for validator to active votes.

USAGE
$ ./marker activate   

OPTIONS
  --keystore                                                   your keystore file path
  
  --rpcaddr                                                    HTTP-RPC server address 
                                                               
  --target                                                     Your target validator address
                                                               you can query it from 
                                                               `getTotalVotesForEligibleValidators`
                                                               command
  


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

RESPONSE:
success
or
Failed

RevokePending

Revokes value pending votes for validator.

This command will put the voting MAP turn into nonvoting MAP.

Increments the number of total and the number of nonvoting corresponding to your previously registered account in the LockedGold contract.

Decrements the number of total and pending votes for validator in the Election contract.

USAGE
$ ./marker revokePending   

OPTIONS
  --keystore                                                   your keystore file path

  --rpcaddr                                                    HTTP-RPC server address 
                                                               
  --target                                                     Your target validator address
                                                               you can query it from 
                                                               `getTotalVotesForEligibleValidators`
                                                               command
                                                               
  --lockedNum                                                   The `MAP` that you want to revoke from your penging votes for validator
  


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

RESPONSE:
success
or
Failed

RevokeActive

Revokes value active votes for validator

This command will put the voting MAP turn into nonvoting MAP.

Increments the number of total and the number of nonvoting corresponding to your previously registered account in the LockedGold contract.

Decrements the number of total and active votes for validator in the Election contract.

USAGE
$ ./marker revokeActive

OPTIONS
  --keystore                                                   your keystore file path

  --rpcaddr                                                    HTTP-RPC server address 
                                                               
  --target                                                     Your target validator address
                                                               you can query it from 
                                                               `getTotalVotesForEligibleValidators`
                                                               command
                                                               
  --lockedNum                                                   The `MAP` that you want to revoke from your active votes for validator
                                                                                                             
EXAMPLES:
./marker revokeActive
--rpcaddr http://127.0.0.1:7445
--keystore ./UTC--2021-09-08T08-00-15.473724074Z--1c0edab88dbb72b119039c4d14b1663525b3ac15
--target "0x81f02fd21657df80783755874a92c996749777bf"
--lockedNum 10000

RESPONSE:
success
or
Failed
PreviousValidatorNextContractOwner

Last updated 2 years ago

Was this helpful?