allo-protocol / allo-v2

Core Allo V2 Contracts
GNU Affero General Public License v3.0
86 stars 64 forks source link

Era Factory #567

Closed thelostone-mc closed 4 months ago

thelostone-mc commented 4 months ago

This PR introduces factory contracts for the DonationVotingMerkleDistributionDirectTransferStrategy and DirectGrantsLite strategies, specifically tailored for era.

On era, the bytecode of a contract to be cloned needs to be available at compile time. The current setup in Allo.sol does not support this, and we cannot always compile new strategies into the contract.

To address this limitation, we've introduced factory contracts. These factories know the code of the strategies at compile time and can create new strategies on-chain with a simple function call. This makes strategy deployment straightforward and efficient.