Skip to content

Commit

Permalink
add some logging
Browse files Browse the repository at this point in the history
  • Loading branch information
geoknee committed Dec 18, 2024
1 parent 543cb38 commit df25012
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
6 changes: 6 additions & 0 deletions script/verification/SystemConfigUpgradeEcotoneScalars.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ contract SystemConfigUpgradeEcotoneScalars is SystemConfigUpgrade {
ISystemConfig sysCfg = ISystemConfig(proxies.SystemConfig);
uint256 reencodedScalar =
(uint256(0x01) << 248) | (uint256(sysCfg.blobbasefeeScalar()) << 32) | sysCfg.basefeeScalar();
console.log(
"confirmed baseFeeScalar and blobbaseFeeScalar reecode to scalar: ",
sysCfg.basefeeScalar(),
sysCfg.blobbasefeeScalar(),
reencodedScalar
);
require(reencodedScalar == previous.scalar, "scalar-100");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {SystemConfigUpgradeEcotoneScalars as SystemConfigUpgrade} from
contract NestedSignFromJson is OriginalNestedSignFromJson, CouncilFoundationNestedSign {
string constant l1ChainName = "sepolia";
string constant release = "v1.8.0-rc.4";
string[1] l2ChainIds = [
string[1] l2ChainNames = [
"op" // op
// "1740", // metal TODO
// "919", // mode TODO
Expand All @@ -24,8 +24,8 @@ contract NestedSignFromJson is OriginalNestedSignFromJson, CouncilFoundationNest
SystemConfigUpgrade[1] sysCfgUpgrades;

constructor() {
for (uint256 i = 0; i < l2ChainIds.length; i++) {
sysCfgUpgrades[i] = new SystemConfigUpgrade(l1ChainName, l2ChainIds[i], release);
for (uint256 i = 0; i < l2ChainNames.length; i++) {
sysCfgUpgrades[i] = new SystemConfigUpgrade(l1ChainName, l2ChainNames[i], release);
addAllowedStorageAccess(sysCfgUpgrades[i].systemConfigAddress());
address[] memory exceptions = sysCfgUpgrades[i].getCodeExceptions();
for (uint256 j = 0; j < exceptions.length; j++) {
Expand All @@ -37,7 +37,8 @@ contract NestedSignFromJson is OriginalNestedSignFromJson, CouncilFoundationNest
function _postCheck(Vm.AccountAccess[] memory accesses, Simulation.Payload memory) internal view override {
console.log("Running post-deploy assertions");
checkStateDiff(accesses);
for (uint256 i = 0; i < l2ChainIds.length; i++) {
for (uint256 i = 0; i < l2ChainNames.length; i++) {
console.log("Running post-deploy assertions for chain", l2ChainNames[i], "-", l1ChainName);
sysCfgUpgrades[i].checkSystemConfigUpgrade();
}
console.log("All assertions passed!");
Expand Down

0 comments on commit df25012

Please sign in to comment.