diff --git a/README.md b/README.md index 131c534..f4542c1 100644 --- a/README.md +++ b/README.md @@ -27,18 +27,25 @@ Run the following commands to check that the CreateX factory has the correct cod [[ $(cast keccak $(cast code 0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed --rpc-url {RPC_URL})) == "0xbd8a7ea8cfca7b4e5f5041d7d4b17bc317c5ce42cfbc42066a00cf26b43eb53f" ]] && echo "Hash Matches" || echo "Hash Does Not Match" ``` -Sample scripting commands, using optimism as an example. We assume blockscout is the default verifier: +Deploy Root contracts first: ``` -forge script script/deployParameters/optimism/DeployBase.s.sol:DeployBase --slow --rpc-url optimism -vvvv -forge script script/deployParameters/optimism/DeployStaking.s.sol:DeployStaking --slow --rpc-url optimism -vvvv +forge script script/deployParameters/optimism/DeployRootBase.s.sol:DeployRootBase --slow --rpc-url optimism -vvvv +forge script script/deployParameters/optimism/DeployRootBase.s.sol:DeployRootBase --slow --rpc-url optimism --broadcast --verify -vvvv ``` -With broadcast: +Deploy Leaf contracts next: ``` -forge script script/deployParameters/optimism/DeployBase.s.sol:DeployBase --slow --rpc-url optimism --broadcast --verify --verifier blockscout --verifier-url https://optimism.blockscout.com/api\? -vvvv -forge script script/deployParameters/optimism/DeployStaking.s.sol:DeployStaking --slow --rpc-url optimism --broadcast --verify --verifier blockscout --verifier-url https://optimism.blockscout.com/api\? -vvvv +forge script script/deployPartial/deployParameters/mode/DeployPartialBase.s.sol:DeployPartialBase --slow --rpc-url mode -vvvv +forge script script/deployPartial/deployParameters/mode/DeployPartialBase.s.sol:DeployPartialBase --slow --rpc-url mode --broadcast --verify --verifier blockscout --verifier-url https://explorer.mode.network/api\? -vvvv +``` + +Run the bash scripts (after updating them) to verify contracts. + +``` +bash script/verifyRoot.sh +bash script/verifyLeaf.sh ``` If there is a verification failure, simply remove `--broadcast` and add `--resume`. diff --git a/deployment-addresses/deployPartial/mode.json b/deployment-addresses/deployPartial/mode.json index 0967ef4..753bf6e 100644 --- a/deployment-addresses/deployPartial/mode.json +++ b/deployment-addresses/deployPartial/mode.json @@ -1 +1,14 @@ -{} +{ + "ism: ": "0x0000000000000000000000000000000000000000", + "leafGaugeFactory: ": "0x42e403b73898320f23109708b0ba1Ae85838C445", + "leafMessageBridge: ": "0xF278761576f45472bdD721EACA19317cE159c011", + "leafMessageModule: ": "0xF385603a12Be8b7B885222329c581FDD1C30071D", + "leafPoolFactory": "0x31832f2a97Fd20664D76Cc421207669b55CE4BC0", + "leafPoolImplementation": "0x10499d88Bd32AF443Fc936F67DE32bE1c8Bb374C", + "leafRouter: ": "0x3a63171DD9BebF4D07BC782FECC7eb0b890C2A45", + "leafTokenBridge: ": "0xA7287a56C01ac8Baaf8e7B662bDB41b10889C7A6", + "leafVoter: ": "0x97cDBCe21B6fd0585d29E539B1B99dAd328a1123", + "leafVotingRewardsFactory: ": "0x7dc9fd82f91B36F416A89f5478375e4a79f4Fb2F", + "leafXFactory: ": "0x73CaE4450f11f4A33a49C880CE3E8E56a9294B31", + "leafXVelo: ": "0x7f9AdFbd38b669F03d1d11000Bc76b9AaEA28A81" +} \ No newline at end of file diff --git a/deployment-addresses/optimism.json b/deployment-addresses/optimism.json new file mode 100644 index 0000000..d1e517c --- /dev/null +++ b/deployment-addresses/optimism.json @@ -0,0 +1,14 @@ +{ + "emergencyCouncil: ": "0xf7a15F27533c2Db26341220C1e0B939B56dEfeda", + "ism: ": "0x0000000000000000000000000000000000000000", + "rootGaugeFactory: ": "0x42e403b73898320f23109708b0ba1Ae85838C445", + "rootLockbox: ": "0x12B64dF29590b4F0934070faC96e82e580D60232", + "rootMessageBridge: ": "0xF278761576f45472bdD721EACA19317cE159c011", + "rootMessageModule: ": "0xF385603a12Be8b7B885222329c581FDD1C30071D", + "rootPoolFactory: ": "0x31832f2a97Fd20664D76Cc421207669b55CE4BC0", + "rootPoolImplementation: ": "0x10499d88Bd32AF443Fc936F67DE32bE1c8Bb374C", + "rootTokenBridge: ": "0xA7287a56C01ac8Baaf8e7B662bDB41b10889C7A6", + "rootVotingRewardsFactory: ": "0x7dc9fd82f91B36F416A89f5478375e4a79f4Fb2F", + "rootXFactory: ": "0x73CaE4450f11f4A33a49C880CE3E8E56a9294B31", + "rootXVelo: ": "0x7f9AdFbd38b669F03d1d11000Bc76b9AaEA28A81" +} \ No newline at end of file diff --git a/script/deployParameters/mode/DeployBase.s.sol b/script/deployParameters/mode/DeployBase.s.sol index 058522c..d7a6c6f 100644 --- a/script/deployParameters/mode/DeployBase.s.sol +++ b/script/deployParameters/mode/DeployBase.s.sol @@ -23,12 +23,12 @@ contract DeployBase is DeployBaseFixture { function setUp() public override { _params = DeployBaseFixture.DeploymentParameters({ weth: 0x4200000000000000000000000000000000000006, - poolAdmin: 0xA6074AcC04DeAb343881882c896555A1Ba2E9d46, - pauser: 0xA6074AcC04DeAb343881882c896555A1Ba2E9d46, - feeManager: 0xA6074AcC04DeAb343881882c896555A1Ba2E9d46, - tokenAdmin: 0x0000000000000000000000000000000000000001, - bridgeOwner: 0x0000000000000000000000000000000000000001, - moduleOwner: 0x0000000000000000000000000000000000000001, + poolAdmin: 0xe915AEf46E1bd9b9eD2D9FE571AE9b5afbDE571b, + pauser: 0xe915AEf46E1bd9b9eD2D9FE571AE9b5afbDE571b, + feeManager: 0xe915AEf46E1bd9b9eD2D9FE571AE9b5afbDE571b, + tokenAdmin: 0xe915AEf46E1bd9b9eD2D9FE571AE9b5afbDE571b, + bridgeOwner: 0xe915AEf46E1bd9b9eD2D9FE571AE9b5afbDE571b, + moduleOwner: 0xe915AEf46E1bd9b9eD2D9FE571AE9b5afbDE571b, mailbox: 0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7, outputFilename: "mode.json" }); diff --git a/script/deployParameters/optimism/DeployRootBase.s.sol b/script/deployParameters/optimism/DeployRootBase.s.sol index 05636a5..70b7117 100644 --- a/script/deployParameters/optimism/DeployRootBase.s.sol +++ b/script/deployParameters/optimism/DeployRootBase.s.sol @@ -9,12 +9,12 @@ contract DeployRootBase is DeployRootBaseFixture { weth: 0x4200000000000000000000000000000000000006, voter: 0x41C914ee0c7E1A5edCD0295623e6dC557B5aBf3C, velo: 0x9560e827aF36c94D2Ac33a39bCE1Fe78631088Db, - tokenAdmin: 0x0000000000000000000000000000000000000001, - bridgeOwner: 0x0000000000000000000000000000000000000001, - emergencyCouncilOwner: 0x0000000000000000000000000000000000000001, - notifyAdmin: 0x0000000000000000000000000000000000000001, - emissionAdmin: 0x0000000000000000000000000000000000000001, - defaultCap: 100, + tokenAdmin: 0xBA4BB89f4d1E66AA86B60696534892aE0cCf91F5, + bridgeOwner: 0xBA4BB89f4d1E66AA86B60696534892aE0cCf91F5, + emergencyCouncilOwner: 0x838352F4E3992187a33a04826273dB3992Ee2b3f, + notifyAdmin: 0xBA4BB89f4d1E66AA86B60696534892aE0cCf91F5, + emissionAdmin: 0xBA4BB89f4d1E66AA86B60696534892aE0cCf91F5, + defaultCap: 150, mailbox: 0xd4C1905BB1D26BC93DAC913e13CaCC278CdCC80D, outputFilename: "optimism.json" }); diff --git a/script/deployPartial/deployParameters/mode/DeployPartialBase.sol b/script/deployPartial/deployParameters/mode/DeployPartialBase.s.sol similarity index 96% rename from script/deployPartial/deployParameters/mode/DeployPartialBase.sol rename to script/deployPartial/deployParameters/mode/DeployPartialBase.s.sol index 538b31f..ff1044e 100644 --- a/script/deployPartial/deployParameters/mode/DeployPartialBase.sol +++ b/script/deployPartial/deployParameters/mode/DeployPartialBase.s.sol @@ -22,9 +22,9 @@ contract DeployPartialBase is DeployPartialBaseFixture { function setUp() public override { _params = DeployPartialBaseFixture.DeploymentParameters({ - tokenAdmin: 0x0000000000000000000000000000000000000001, - bridgeOwner: 0x0000000000000000000000000000000000000001, - moduleOwner: 0x0000000000000000000000000000000000000001, + tokenAdmin: 0xe915AEf46E1bd9b9eD2D9FE571AE9b5afbDE571b, + bridgeOwner: 0xe915AEf46E1bd9b9eD2D9FE571AE9b5afbDE571b, + moduleOwner: 0xe915AEf46E1bd9b9eD2D9FE571AE9b5afbDE571b, mailbox: 0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7, inputFilename: "mode.json", outputFilename: "mode.json" diff --git a/test/unit/concrete/deploy/deployPartial/mode/deployPartialBase.t.sol b/test/unit/concrete/deploy/deployPartial/mode/deployPartialBase.t.sol index 4ed4170..83a07d8 100644 --- a/test/unit/concrete/deploy/deployPartial/mode/deployPartialBase.t.sol +++ b/test/unit/concrete/deploy/deployPartial/mode/deployPartialBase.t.sol @@ -2,7 +2,7 @@ pragma solidity >=0.8.19 <0.9.0; import "test/BaseFixture.sol"; -import {DeployPartialBase} from "script/deployPartial/deployParameters/mode/DeployPartialBase.sol"; +import {DeployPartialBase} from "script/deployPartial/deployParameters/mode/DeployPartialBase.s.sol"; import {ModeFeeSharing} from "src/extensions/ModeFeeSharing.sol";