Unable to change VotingPeriod of Governor in Defender

Hi - I've got a Governor running on rinkeby and I wanted to change the VotingPeriod. I've run thru the entire setup, giving permissions, etc and was able to mint thru proposing & voting (Tally is my UX) using the whole Governor + Timelock setup. But today, I wanted to modify the VotingPeriod of the Gov itself. I'm wondering if I'm missing a permission. ?? I tried to do this thru Tally and it just hangs when I submit it. So I came back to Defender. Here, I Chose the Governor as the contract, then setVotingPeriod and gave it a new value. As my Execution strategy, I chose Governor. It noticed the timelock, so everything looks good, but I get the "Transaction validation failed" message.

Am I missing something? What accounts need what permissions to be able to change something in the governor? Note I also tried it using EOA and it errored too - it told me this was "OnlyGovernor". I'm really stuck - thanks in advance for your help
Chris

Hi @chrisb, thanks for reporting.

Before taking this as an issue for us, I'd just like to validate if it's a bug or not, can you provide me the addresses for your contracts (both governor and timelock), so I can try to replicate or look what's blocking the execution for you.

Also, if you have code examples or a repo to take a look at, that'd be great to see what the permissions mechanisms are in you smart contract.

Best

Governor: 0x893419a6b03f73a9c59c89cba2412ecd1e7aaf78
TimeLock: 0x0e36eF95C61632d1acBb86A6DE88d031361d6ef3
ERC20: 0x87B4d889cDac95E645f466315Ba75AFFbB0b8287

I don't have a script that set up permissions. I was following a youtube video that walked me thru the entire thing, including the mint from Tally that I was able to do. The mint however, talks to the ERC20 not to the Governor. Here's the permissions I added:

After deploying the Governor:
granted Governor proposer role in Timelock
granted Governor executor role in Timelock
I left the deployer addr as executor & proposer just as a backup for testing
granted Timelock Minter role in ERC20 token
granted Governor Minter role in ERC20 token
granted myself (deployer addr) PAUSER role in Governor
delegated my votes to myself

Got it,

The setVotingPeriod can't be added as an Admin Action through defender since it requires to pass through the governance protocol. When you create a proposal it has to be executed using your EOA, which is detected as not the Governor itself when validating the transaction.

You need to:

  1. Create a proposal with a propose call to the Governor
  2. Add the Governor itself as a target
  3. Add 0 in value
  4. Add the function signature for setVotingPeriod(uint256) followed by the new voting period (eg. 0xea0217cf000000000000000000000000000000000000000000000000000000000000b2fb) in the calldatas field
  5. Send the proposal through the Defender Admin UI
  6. Vote the proposal in Tally or any other UI, so you can execute the proposal once the previous voting period has passed

Hope this helps!