-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gates contracts #377
base: develop
Are you sure you want to change the base?
Gates contracts #377
Changes from 3 commits
580c215
25fecb1
cfd8209
467c24a
bc5d50a
c471b8e
1b8b3d6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -12,15 +12,17 @@ import { CSAccounting } from "../src/CSAccounting.sol"; | |||||
import { CSFeeDistributor } from "../src/CSFeeDistributor.sol"; | ||||||
import { CSFeeOracle } from "../src/CSFeeOracle.sol"; | ||||||
import { CSVerifier } from "../src/CSVerifier.sol"; | ||||||
import { CSEarlyAdoption } from "../src/CSEarlyAdoption.sol"; | ||||||
import { PermissionlessGate } from "../src/PermissionlessGate.sol"; | ||||||
import { VettedGate } from "../src/VettedGate.sol"; | ||||||
import { ICSEarlyAdoption } from "../src/interfaces/ICSEarlyAdoption.sol"; | ||||||
|
||||||
import { JsonObj, Json } from "./utils/Json.sol"; | ||||||
import { GIndex } from "../src/lib/GIndex.sol"; | ||||||
import { Slot } from "../src/lib/Types.sol"; | ||||||
import { DeployBase } from "./DeployBase.s.sol"; | ||||||
|
||||||
abstract contract DeployImplementationsBase is DeployBase { | ||||||
address gateSeal; | ||||||
address earlyAdoption; | ||||||
dgusakov marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
||||||
function _deploy() internal { | ||||||
if (chainId != block.chainid) { | ||||||
|
@@ -54,6 +56,14 @@ abstract contract DeployImplementationsBase is DeployBase { | |||||
maxBondLockPeriod: config.maxBondLockPeriod | ||||||
}); | ||||||
|
||||||
permissionlessGate = new PermissionlessGate(address(csm)); | ||||||
vettedGate = new VettedGate({ | ||||||
_treeRoot: config.vettedGateTreeRoot, | ||||||
curveId: ICSEarlyAdoption(earlyAdoption).CURVE_ID(), | ||||||
csm: address(csm), | ||||||
admin: config.aragonAgent | ||||||
}); | ||||||
|
||||||
CSFeeOracle oracleImpl = new CSFeeOracle({ | ||||||
secondsPerSlot: config.secondsPerSlot, | ||||||
genesisTime: config.clGenesisTime | ||||||
|
@@ -84,12 +94,16 @@ abstract contract DeployImplementationsBase is DeployBase { | |||||
}); | ||||||
|
||||||
JsonObj memory deployJson = Json.newObj(); | ||||||
deployJson.set( | ||||||
"PermissionlessGateImpl", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is a typo indeed |
||||||
address(permissionlessGate) | ||||||
); | ||||||
deployJson.set("VettedGate", address(vettedGate)); | ||||||
dgusakov marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
deployJson.set("CSModuleImpl", address(csmImpl)); | ||||||
deployJson.set("CSAccountingImpl", address(accountingImpl)); | ||||||
deployJson.set("CSFeeOracleImpl", address(oracleImpl)); | ||||||
deployJson.set("CSFeeDistributorImpl", address(feeDistributorImpl)); | ||||||
deployJson.set("CSVerifier", address(verifier)); | ||||||
deployJson.set("CSEarlyAdoption", address(earlyAdoption)); | ||||||
deployJson.set("HashConsensus", address(hashConsensus)); | ||||||
deployJson.set("git-ref", gitRef); | ||||||
vm.writeJson( | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,13 +71,13 @@ contract DeployMainnet is DeployBase { | |
config.keyRemovalCharge = 0.05 ether; | ||
config | ||
.elRewardsStealingReporter = 0xC52fC3081123073078698F1EAc2f1Dc7Bd71880f; // CSM Committee MS | ||
// EarlyAdoption | ||
// VettedGate | ||
config | ||
.earlyAdoptionTreeRoot = 0x359e02c5c065c682839661c9bdfaf38db472629bf5f7a7e8f0261b31dc9332c2; // See the first value in artifacts/mainnet/early-adoption/merkle-tree.json | ||
config.earlyAdoptionBondCurve = new uint256[](2); | ||
.vettedGateTreeRoot = 0x359e02c5c065c682839661c9bdfaf38db472629bf5f7a7e8f0261b31dc9332c2; // See the first value in artifacts/mainnet/early-adoption/merkle-tree.json | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to update the root before deployment to avoid double claming There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nothing to do right now in the code here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a comment pls There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there is room for frontrunning anyway. if somebody decides to claim EA before CSM plug-in the gate for v2 |
||
config.vettedGateBondCurve = new uint256[](2); | ||
// 1.5 -> 1.3 | ||
config.earlyAdoptionBondCurve[0] = 1.5 ether; | ||
config.earlyAdoptionBondCurve[1] = 2.8 ether; | ||
config.vettedGateBondCurve[0] = 1.5 ether; | ||
config.vettedGateBondCurve[1] = 2.8 ether; | ||
|
||
// GateSeal | ||
config.gateSealFactory = 0x6C82877cAC5a7A739f16Ca0A89c0A328B8764A24; | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider renaming to the identifiedSolosCurve