Skip to content

Commit

Permalink
Add safety checks to Atlas deploy script addrs
Browse files Browse the repository at this point in the history
  • Loading branch information
BenSparksCode committed Nov 10, 2023
1 parent 30c6cf4 commit 1c4239a
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion script/deploy-atlas.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,21 @@ contract DeployAtlasScript is DeployBaseScript {

vm.stopBroadcast();

// TODO add address checks with alert logs if wrong
if(address(atlasFactory) != expectedAtlasFactoryAddr) {
console.log("ERROR: AtlasFactory address does not match expected address");
}
if(address(atlasVerification) != expectedAtlasVerificationAddr) {
console.log("ERROR: AtlasVerification address does not match expected address");
}
if(address(gasAccountingLib) != expectedGasAccountingLibAddr) {
console.log("ERROR: GasAccountingLib address does not match expected address");
}
if(address(safetyLocksLib) != expectedSafetyLocksLibAddr) {
console.log("ERROR: SafetyLocksLib address does not match expected address");
}
if(address(simulator) != expectedSimulatorAddr) {
console.log("ERROR: Simulator address does not match expected address");
}

_writeAddressToDeploymentsJson("ATLAS", address(atlas));
_writeAddressToDeploymentsJson("ATLAS_FACTORY", address(atlasFactory));
Expand Down

0 comments on commit 1c4239a

Please sign in to comment.