Governor implementation

I'm looking how to implement Governor, and I walked through the wizard and the docs, but I have a couple of question I cannot solve by myself:
1- TimeLocker is a requirement? I would like to maintain manually the execution of the pool result, but looking at the modules seems that I cannot mange the setting because of th "onlyGovernor" modifier (that, by the way, is not really clear how to works, because I did not understand what address(this) exactly does)
2 - I would like to customize the Counter, having to choose between 5 alternatives (not the standard For,Against, abstention): how should I change the COUNTING_MODE support key? I understood that "bravo" is for the 0,1,2 mode, and I would like to use UI like tally

:computer: Environment

Truffle, Remix

Hey @sbabaro,

  1. Timelock.sol is not technically a requirement for using the Governor contract. If you don't inherit from GovernorTimelockControl, then the onlyGovernance references the address of the Governor deployment itself. If you do inherit GovernorTimelockControl (or the Compound equivalent from the contract Wizard) then onlyGovernance references the address of the timelock contract since this is the contract which actually executes proposals. This is handled via function overrides.

  2. If you want to have 5 choices for voting instead of 3, you could take the GovernorCountingSimple.sol contract and start by extenting enum VoteTypes to have all 5 votes types you want and aslo struct ProposalVote to contain all 5 voting choices. Then you would need to modify function _countVote with the appropriate logic for how to handle these two new options you will have added. You'll also need to update _quorumReached and _voteSucceeded if you want the change the criteria for a successful proposal. The COUNTING_MODE() pure function should indicate that you have a customized implementation. So it might look something like returns "support=custom&quorum=for,abstain,newoption1,newoption2".

Hi @TtheBC01
Thanks for the reply
For the second question, I have customized the GovernorCountingSimple.sol
In particular the idea is that each option is an alternative proect to choose, so _voteSucceeded will be always true, depending just from the quorum, the most voted is the winner. Obviously no action can be taken automatically. That's why we are thinking to manage this contract (setting up the proposals) by the account that effectively will manage the project. So We've called this kind of calculation "pool".
So, our idea to answer to COUNTING_MODE() is returning something like "support=pool&quorum=alt1,alt2,alt3,alt4,alt5". The question is, who should use this information. Should be a dapp like Tally, correct? So what we set up as return value should be correctly interpreted (but I haven't found any api description of the format/options)

For the first question, thank you again, now is more clear. Due the contract have no gas, should I add ownership to the account will manage the governor, so the actions will be payble?