Common
This article will introduce the features of creating an account, locking MAPO, and various query interfaces.
createAccount
Create an account.
Parameter description:
rpcaddr: The address of the RPC service, which can be the provided RPC service address or your own RPC service address.keystore: The path to the keystore file.name: The name of the account.
./marker createAccount
--rpcaddr http://127.0.0.1:7445
--keystore ./UTC--2021-09-08T08-00-15.473724074Z--1c0edab88dbb72b119039c4d14b1663525b3ac15
--name "validator"lockedMAP
Lock MAPO for voting or registering validators.
Parameter description:
rpcaddr: The address of the RPC service, which can be the provided RPC service address or your own RPC service address.keystore: The path to the keystore file.lockedNum: The amount of MAPO to be locked.
unlockMap
Unlock MAPO, which can be redeemed after the lock period.
Parameter description:
rpcaddr: The address of the RPC service, which can be the provided RPC service address or your own RPC service address.keystore: The path to the keystore file.lockedNum: The amount of MAPO to be unlocked.
relockMAP
Relock MAPO that has been unlocked but not redeemed.
Parameter description:
rpcaddr: The address of the RPC service, which can be the provided RPC service address or your own RPC service address.keystore: The path to the keystore file.lockedNum: The amount of MAPO to be locked.relockIndex: The index of the request to be redeemed, obtained through the getPendingWithdrawals command.
withdrawMap
Redeem MAPO that has passed the unlock period.
Parameter description:
rpcaddr: The address of the RPC service, which can be the provided RPC service address or your own RPC service address.keystore: The path to the keystore file.withdrawIndex: The index of the request to be redeemed, obtained through the getPendingWithdrawals command.
getNumRegisteredValidators
Get the number of registered validators.
Parameter description:
rpcaddr: The address of the RPC service, which can be the provided RPC service address or your own RPC service address.
getTopValidators
Return the top N validators in the validator set.
Parameter description:
rpcaddr: The address of the RPC service, which can be the provided RPC service address or your own RPC service address.topNum: Specify the number of top validators to query.
getTotalVotesForEligibleValidators
Return the list of all eligible validators and the number of votes they have received.
Parameter description:
rpcaddr: The address of the RPC service, which can be the provided RPC service address or your own RPC service address.
getTotalVotes
Get the total number of votes received by all validators.
Parameter description:
rpcaddr: The address of the RPC service, which can be the provided RPC service address or your own RPC service address.
getValidatorEligibility
Check if a validator is eligible for receiving votes.
Parameter description:
rpcaddr: The address of the RPC service, which can be the provided RPC service address or your own RPC service address.target: The address of the validator to query.
getValidator
Get information about a specific validator.
Parameter description:
rpcaddr: The address of the RPC service, which can be the provided RPC service address or your own RPC service address.target: The address of the validator to query.
getValidatorRewardInfo
Return the reward information for the previous epoch of a validator.
Parameter description:
rpcaddr: The address of the RPC service, which can be the provided RPC service address or your own RPC service address.
getPendingVotesForValidatorByAccount
Get the pending vote count from a specific account for a specific validator.
Parameter description:
rpcaddr: The address of the RPC service, which can be the provided RPC service address or your own RPC service address.keystoreAddress: The address of the account.target: The address of the validator to query.
getActiveVotesForValidatorByAccount
Get the active vote count from a specific account for a specific validator.
Parameter description:
rpcaddr: The address of the RPC service, which can be the provided RPC service address or your own RPC service address.keystoreAddress: The address of the account.target: The address of the validator to query.
getPendingInfoForValidator
Retrieve the pending votes and corresponding epoch for a specified account on a specific validator.
Parameter description:
rpcaddr: The address of the RPC service, which can be the provided RPC service address or your own RPC service address.keystoreAddress: The address of the account.target: The address of the validator to query.
getValidatorsVotedForByAccount
Get the list of validators voted for by a specific account.
Parameter description:
rpcaddr: The address of the RPC service, which can be the provided RPC service address or your own RPC service address.target: The address of the account to query.
getAccountTotalLockedGold
Get the total amount of locked MAPO for a specific account.
Parameter description:
rpcaddr: The address of the RPC service, which can be the provided RPC service address or your own RPC service address.target: The address of the account to query.
getAccountNonvotingLockedGold
Get the total amount of non-voting locked MAPO for a specific account.
Parameter description:
rpcaddr: The address of the RPC service, which can be the provided RPC service address or your own RPC service address.target: The address of the account to query.
getPendingWithdrawals
Get the amount of pending MAPO withdrawals for a specific account.
Parameter description:
rpcaddr: The address of the RPC service, which can be the provided RPC service address or your own RPC service address.target: The address of the account to query.
transfer
Transfer MAPO from one account to another.
Parameter description:
rpcaddr: The address of the RPC service, which can be the provided RPC service address or your own RPC service address.keystore: The path to the keystore file.target: The address of the recipient's account.amount: The amount of MAPO to transfer.
getAccountMetadataURL
Get the metadata URL for a specific account.
Parameter description:
rpcaddr: The address of the RPC service, which can be the provided RPC service address or your own RPC service address.target: The address of the account to query.
setAccountMetadataURL
Set the metadata URL for a specific account.
Parameter description:
rpcaddr: The address of the RPC service, which can be the provided RPC service address or your own RPC service address.keystore: The path to the keystore file.target: The address of the account.
getAccountName
Get the name of an account.
Parameter description:
rpcaddr: The address of the RPC service, which can be the provided RPC service address or your own RPC service address.target: The address of the account.
setAccountName
Set the name for an account.
Parameter description:
rpcaddr: The address of the RPC service, which can be the provided RPC service address or your own RPC service address.keystore: The path to the keystore file.name: The name to set for the account.
setNextCommissionUpdate
Add a validator commission update request to the queue. If there is an existing update request, it will be overridden.
Parameter description:
rpcaddr: The address of the RPC service, which can be the provided RPC service address or your own RPC service address.keystore: The path to the keystore file.commission: The commission rate for the validator, expressed as a ratio relative to 1000000. The range of the commission parameter is from 0 to 1000000. If you want to set the commission rate to 15%, you would set this parameter to 150000 (150000/1000000=15%). This is one of the parameters that voters consider when voting.
updateCommission
Update the commission based on the previous update request in the queue. This operation can only be executed after 2000 blocks have passed since setNextCommissionUpdate was executed.
Parameter description:
rpcaddr: The address of the RPC service, which can be the provided RPC service address or your own RPC service address.keystore: The path to the keystore file.
Last updated