Contracts
Deployed Address
token goRice address 0xB151955b1B5D660b46D1d9c6E2De8b23D0105631
feeDistributor (compensation) address 0xFfE62Fd0B28d32b0EA94a18C588b7Cc5Aa0bfdbE
swapHelper address 0x13B54A783cD3c49bEDdB43711aFd984DEEc17c27
treasury address 0xeD43F109847b8c9466F067eEC225732eEf7931E1
feeTransmutation address 0x1e173CA4eE58513fedd6A6edBA36E512530d84DC
burnAddress address 0x727f559c36276E1540f9583fac86522df33eA3c0
cacheFeeDistributorPool address 0xBEA413473B926E566abAD6a29D8D1A51d5424CBF
riceRewardPool address 0xA8cE437851D031066a8C3688b6aaD34144083372
dao address: 0x8cF474557E0CC5a0b80Cb9b15A7cB7cb077eF919
FeeTransmutation
interface IFeeTransmutation {
function receiveProtocolFee(
address token,
uint amount,
address contributor,
address claimer
) external;
function transmutation() external returns (bool swapSuccess);
function claim() external;
}
DAO Contract Call
struct CallContractInfo {
address target;
bytes4 functionSelector;
bytes params;
}
function submitProposal(
string memory description,
string memory tag,
CallContractInfo[] memory details
) external returns (uint proposalId)
function submitVote(
uint proposalId,
uint8 uintVote
) external;
function processProposal(
uint proposalId
) external;
Submit Proposal
bytes4(abi.encodeWithSignature("setMinSupportRatio(uint256)"))
ethers v5
ethers.getFunctionSelector("setMinSupportRatio(uint256)")
// or
const interface = new ethers.Interface(["function setMinSupportRatio(uint256)"]);
const selector = interface.getFunction("setMinSupportRatio").selector;
Query Proposal Status
struct Proposal {
address proposer; // the account that submitted the proposal (can be non-member)
uint snapshotBlock; // use for member weight
uint yesVotes; // the total number of YES votes for this proposal
uint noVotes; // the total number of NO votes for this proposal
uint startingPeriod; // the period in which voting can start for this proposal
bool[2] flags; // [processed, didPass]
string description; // proposal description - could be IPFS hash, plaintext, or JSON
uint minSupportRatio; // snap for minSupportRatio
uint minQuorumRatio; // snap for minQuorumRatio
uint goRiceLimit; // snap for goRiceLimit
}
get period start time
function getPeriodStartTimestamp(uint period) external view returns (uint);
DAO Parameter Adjustments
struct CallContractInfo {
address target;
bytes4 functionSelector;
bytes params;
}
the target refers to the DAO's own address here
// Update goRice limit
// Only addresses that reach this goRice limit can participate in governance
function setGoRiveLimit(uint newLimit) external;
// Update minimum support ratio
function setMinSupportRatio(uint newRatio) external;
// Update minimum quorum ratio
function setMinQuorumRatio(uint newRatio) external;
// Add whitelisted addresses that can be governed by the DAO
// If an address is not whitelisted, it cannot be used as a target in CallContractInfo
function addWhitelistContract(address _contract) external;
// Batch add
function addWhitelistContracts(
address[] memory _contracts
) external;
// Remove whitelisted addresses that can be governed
function removeWhitelistContract(address _contract) external;
// Batch remove
function removeWhitelistContracts(
address[] memory _contracts
) external;
Treasury
// Initiate a proposal to withdraw Treasury funds
function withdraw(
address token,
uint amount,
address to
) external;
//Initiate a proposal to swap treasury tokens
function swap(
address tokenIn,
address tokenOut,
uint amount
) external;
// The swap contract can be updated and replaced through governance if it no longer meets requirements.
function setSwapHelperAddress(address _swapHelper) external;
TheGraph
Github Repo
Contract
https://github.com/DAOSquare/gov-rice
TheGraph
https://github.com/DAOSquare/gov-graph
← Previous
Next →