Extending OpenZeppelin Governor contract to sponsor the gas fees of proposal votes
This governor extension introduces proposal vote sponsorship to DAO governance token holders. This makes it easier for protocol users to participate in governance, which in turn fosters equitability and diversity. It does so by adding ERC-4337 compliant paymaster functionality to the OpenZeppelin governor contract. And because it uses the OpenZeppelin governor, it's interoperable with a bunch of existing UIs and tooling. With this extension, governance token holders with 0 ETH in their wallet can cast votes on DAO proposals! Future work could include:
This project is a foundry project written in solidity that imports the @openzeppelin/contracts as well as the Ethereum Foundation's infinitism/account-abstraction contracts. It composes them in a new, original contract called GovernorSponsoredVoting.sol. Tests are written to prove that token holders with 0 ETH in their wallet can indeed cast their vote on a proposal, with gas paid entirely by the governor contract's new paymaster capabilities. However, there is 1 remaining block.number call (to fix) that prevents the UserOperation from getting included in a goerli bundle.
I cut a whole bunch of corners, for example:
execute