-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/core-contracts/12' into feat/epoch-manager
- Loading branch information
Showing
7 changed files
with
120 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
pragma solidity >=0.8.7 <0.8.20; | ||
|
||
import { Script } from "forge-std-8/Script.sol"; | ||
import { MigrationsConstants } from "@migrations-sol/constants.sol"; | ||
|
||
import "@celo-contracts/common/FixidityLib.sol"; | ||
import "@celo-contracts-8/common/UsingRegistry.sol"; | ||
|
||
contract MigrationL2 is Script, MigrationsConstants, UsingRegistry { | ||
using FixidityLib for FixidityLib.Fraction; | ||
|
||
/** | ||
* Entry point of the script | ||
*/ | ||
function run() external { | ||
vm.startBroadcast(DEPLOYER_ACCOUNT); | ||
|
||
setupUsingRegistry(); | ||
activateCeloDistributionSchedule(); | ||
|
||
vm.stopBroadcast(); | ||
} | ||
|
||
function setupUsingRegistry() public { | ||
_transferOwnership(DEPLOYER_ACCOUNT); | ||
setRegistry(REGISTRY_ADDRESS); | ||
} | ||
|
||
function activateCeloDistributionSchedule() public { | ||
uint256 l2StartTime = 1721909903 - 5; // Arbitrarily 5 seconds before last black | ||
uint256 communityRewardFraction = getEpochRewards().getCommunityRewardFraction(); | ||
address carbonOffsettingPartner = 0x22579CA45eE22E2E16dDF72D955D6cf4c767B0eF; | ||
uint256 carbonOffsettingFraction = getEpochRewards().getCarbonOffsettingFraction(); | ||
|
||
getCeloDistributionSchedule().activate( | ||
l2StartTime, | ||
communityRewardFraction, | ||
carbonOffsettingPartner, | ||
carbonOffsettingFraction | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters