🏛️ChancellorSenateControl
Extension to handle comunication with the Senate Contract
The ChancellorSenateControl extension is the one that allows communication with the Senate contract to fetch senate settings (proposalThreshold, votingDelay and VotingPeriod) and the senator (holder) data (votingPower, member status, senator status).
One-trip external call
Since all data is on the Senate Contract, including the Settings in case the SenateSettings extension is been used, the contract that uses the Chancellor pattern must implements a getSettings function.
/**
* @dev return Senate Settings
*
* Note: Since the settings are kept in the Senate contract and one external call is obligatory, the external call bulks all data in one object to avoid more than one call.
*
*/
function getSettings()
public
view
virtual
returns (
uint256 proposalThreshold,
uint256 votingDelay,
uint256 votingPeriod,
bytes memory senatorRepresentations,
uint256 votingPower,
bool validSenator,
bool validMembers
);
The ChancellorSenateControl extension is the one that will implement this function for you, but you can easily override it and do your thing.
Last updated