From 078df362ec23ca09ac7fd8080d1518799abe7f17 Mon Sep 17 00:00:00 2001 From: Ladd Hoffman Date: Wed, 27 Mar 2024 20:00:46 -0500 Subject: [PATCH] Parameterize quorum --- ethereum/contracts/Proposal.sol | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ethereum/contracts/Proposal.sol b/ethereum/contracts/Proposal.sol index 3bd37cd..a66c6c7 100644 --- a/ethereum/contracts/Proposal.sol +++ b/ethereum/contracts/Proposal.sol @@ -44,9 +44,6 @@ contract Proposals is DAOContract { event ProposalFailed(uint proposalIndex, string reason); event ProposalAccepted(uint proposalIndex); - uint[3] referendaBindingPercent = [0, 1, 100]; - bool[3] referendaRedistributeLosingStakes = [false, false, true]; - constructor(DAO dao) DAOContract(dao) {} function propose( @@ -87,6 +84,11 @@ contract Proposals is DAOContract { attestation.amount = amount; } + // Sequences of validation pool parameters + uint[3] referendaBindingPercent = [0, 1, 100]; + bool[3] referendaRedistributeLosingStakes = [false, false, true]; + uint[2][3] referendaQuora = [[1, 3], [1, 2], [1, 3]]; + /// Internal convenience function to wrap our call to dao.initiateValidationPool /// and to emit an event function initiateValidationPool( @@ -103,8 +105,8 @@ contract Proposals is DAOContract { }( proposal.postIndex, proposal.referenda[referendumIndex].duration, - 1, - 3, + referendaQuora[referendumIndex][0], + referendaQuora[referendumIndex][1], bindingPercent, redistributeLosingStakes, true,