Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delegatecall in GovernorBravoDelegator #145

Open
Joera opened this issue Aug 1, 2021 · 1 comment
Open

delegatecall in GovernorBravoDelegator #145

Joera opened this issue Aug 1, 2021 · 1 comment

Comments

@Joera
Copy link

Joera commented Aug 1, 2021

Hi, is there an explanation on how the governance contracts are pieced together?

I managed to get it working only by replacing the delegatecall method inside DelegateTo function in the Delegator contract into a 'simple' call method. Initialization of delegate-contract kept failing because it seemed the function was using the storage of the delegator instead of that of delegate. The delegatecall method brings along the storage of the caller, i read then, so i replaced it with call and got the initialisation to work. In my current setup delegator is the admin of delegate and delegate is the admin of timelock.

I managed to write proposald, castvotes, queue the proposal. Now i am trying to write a proposal that executes. This gets reverted in the timelock:

propose(
[],
[0],
["_setProposalThreshold(uint256)"],
[web3.eth.abi.encodeParameters(["uint256"],[33])],
"set proposal threshold to 33"
);

Now i am wondering whether i made a wrong assumption before and doing it all wrong. ..

Suggestions a highly appreciated!

Thanks, Joera

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@Joera and others