Closed soloseng closed 4 months ago
Generated at commit: 044c620a98c3646444ed755a1819ee837c570862
🚨 Report Summary
Severity Level Results Contracts Critical High Medium Low Note Total 2 3 0 15 42 62 Dependencies Critical High Medium Low Note Total 0 0 0 0 0 0
For more details view the full report in OpenZeppelin Code Inspector
Description
Created a contract
MintGoldSchedule.sol
that calculates the amount of CELO to mint and distribute to the community fund and carbon offsetting fund address. This contract can be deployed on L1, but will only be activated on L2 by callingMintGoldSchedule.setDependencies()
.This schedule is based on the existing schedule previously defined by
EpochRewards
contract. In this new schedule, only the percentage of CELO allocated to community rewards and carbon offsetting fund is minted.As with the L1 minting schedule, the L2 minting schedule in only defined for the first 15 years after L1 genesis block. Future modification to the
MintGoldSchedule
contract will be required to define a schedule beyond the first 15 years. Additionally, setting the distribution fraction for any fund is prohibited once the first 15 years have elapsed.GoldToken.sol
was updated to only allow minting by the owner or theMintGoldSchedule
contract.Other changes
IGoldToken.sol
interface was added to allowMintGoldSchedule
to callGoldToken.mint()
.MockGovernance
contract, using pragma 0.8, was added to allow testing of theMintGoldSchedule
. UsingdeployCodeTo("Governance.sol", abi.encode(false), governanceAddress);
does not work, as the Governance contract bytecode has a placeholder for the libraries that it is using and Foundry does not provide a way to link the library during the compilation step of the tests.Tested
Related issues