Saltar al contenido principal

ParamsControl

ParamsControl at address 0x0888000000000000000000000000000000000007 with the following interfaces. Which can be used to participate chain parameter DAO vote.

// SPDX-License-Identifier: MIT

pragma solidity >=0.8.0;

interface ParamsControl {
struct Vote {
uint16 topic_index;
uint256[3] votes;
}

/*** Query Functions ***/
/**
* @dev cast vote for parameters
* @param vote_round The round to vote for
* @param vote_data The list of votes to cast
*/
function castVote(uint64 vote_round, Vote[] calldata vote_data) external;

/**
* @dev read the vote data of an account
* @param addr The address of the account to read
*/
function readVote(address addr) external view returns (Vote[] memory);

/**
* @dev Current vote round
*/
function currentRound() external view returns (uint64);

/**
* @dev read the total votes of given round
* @param vote_round The vote number
*/
function totalVotes(uint64 vote_round) external view returns (Vote[] memory);

/**
* @dev read the PoS stake for the round.
*/
function posStakeForVotes(uint64) external view returns (uint256);

event CastVote(uint64 indexed vote_round, address indexed addr, uint16 indexed topic_index, uint256[3] votes);
event RevokeVote(uint64 indexed vote_round, address indexed addr, uint16 indexed topic_index, uint256[3] votes);
}