Contracts
Deployed Address
token goRice address 0xfD389D20E58b1a19c96f57FCA3fBe7dd1E897588
feeDistributor (compensation) address 0x7c1eA8Fc7aB0A2823C92797234d2982fc96A0d01
swapHelper address 0xf12ae5e3ed803fdaE6f04F6a7A4E27EE0b43F938
treasury address 0x47485e4FF4E0BD99eB7d34D08456649cDaf4C2DC
feeTransmutation address 0x91Ee395a5fE445ba80C790FFE61d145F56a561BE
buybackPool 0xb667494D8B00c4E372E867E0bed9b3a964978fDf
burnAddress address 0x529E7E9bbc69e19E2Ac391CFa7CD55d25FcB557F
cacheFeeDistributorPool address 0xE0D9061eb9540baA27bF854fc385973390D88703
riceRewardPool address 0xF29a8CF9953CFdcd708b7f2D5Ff80Cb772f2D0a9
dao address: 0x4aaDf93ba023220032E2Ca12a89a243bc3cd3B5B
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
Development Query URL
Github Repo
Contract
TheGraph
← Previous
Next →