Hi! Im creating a Governor in our system based on the OZ contracts, and I'm trying to find how to implement a cancel
(public/external) by restricting to the proposer.
Unfortunately I noticed the proposer
is never stored on chain so how can I implement a Cancelation with the current set of contracts?
I noticed GovernorBravo
allows this because everything is stored onchain.
Any help or guidance would be appreciated.
Thanks!
Julian
1 Like
GovernorCompatibilityBravo
implements cancel
in the same way as GovernorBravo
.
If you don't want the full compatibility module, you could extend the Governor so that only the proposer is stored and then more or less copy GovernorCompatibilityBravo.cancel
.
Can you open an issue about this? We realize that this is something we should have by default.
Thanks Fran. Unfortunately doing this seems a bit more complex, because we are not sure Tally supports this cancel
signature. The only accepted signature from Tally is cancel(proposalId)
. And we cannot achieve that unless we store not only the proposer but also all the proposal details (because we need to call _cancel
with all the specifics)
Writing the cancellation for the OZ Governor would required to pass all 4 components (targets, calldatas, etc) but that would break compatibility with existing UIs from what I see. Check no available cancel
for OZ: https://docs.tally.xyz/user-guides-1/supported-dao-frameworks/openzeppelin-style
Also confirmed with Tally they only support the cancel(proposalId)
signature.
Sorry I don't understand why wouldn't you/we be able to implement cancel(proposalId)
with the same signature as supported by Tally? I realize it would be necessary to keep a mapping proposalId -> proposer
in storage, but with that it should be enough to implement cancel(proposalId)
as far as I can tell.
1 Like
Hi.. I thought the same but mapping(uint256 => ProposalCore) private _proposals;
is private so I cannot update it unless I use the _cancel
in the Governor that Im inheriting from. And that requires all the details of the proposal, not just the Id. The only option I have available is the _cancel(targets, calldata, )
function.
Do you see a workaround? Thanks!