-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Standard L2 Genesis #12057
Standard L2 Genesis #12057
Conversation
} | ||
|
||
/// @notice | ||
function encodeSetRemoteChainId(uint256 _chainId) internal pure returns (bytes memory) { |
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.
Named return arguments to functions must be appended with an underscore (_
)
} | ||
|
||
/// @notice | ||
function encodeSetAddress(address _address) internal pure returns (bytes memory) { |
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.
Named return arguments to functions must be appended with an underscore (_
)
@@ -57,4 +78,34 @@ library StaticConfig { | |||
function decodeRemoveDependency(bytes memory _data) internal pure returns (uint256) { | |||
return abi.decode(_data, (uint256)); | |||
} | |||
|
|||
/// @notice | |||
function encodeSetFeeVaultConfig(address _recipient, uint256 _min, FeeVault.WithdrawalNetwork _network) internal pure returns (bytes memory) { |
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.
Named return arguments to functions must be appended with an underscore (_
)
Semgrep found 1 Named return arguments to functions must be appended with an underscore ( |
73c3220
to
1eb9745
Compare
Semgrep found 2 No Semgrep found 6
Named return arguments to functions must be appended with an underscore ( Semgrep found 2 require() must include a reason string Ignore this finding from sol-style-require-reason.Semgrep found 12
_args parameter should be wrapped with DeployUtils.encodeConstructor Ignore this finding from sol-safety-deployutils-args. |
@@ -0,0 +1,9 @@ | |||
// SPDX-License-Identifier: MIT | |||
pragma solidity 0.8.15; | |||
|
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 refactoring the ProxyAdmin
to remove the L1 specific features and make a L1ProxyAdmin
// update the proxy to not be uninitialized (although not standard initialize pattern) | ||
vm.store(impl, _ownerSlot, bytes32(uint256(uint160(cfg.proxyAdminOwner())))); | ||
vm.store(impl, bytes32(0), bytes32(uint256(0xdead))); |
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.
todo: double check if this is necessary, this adds complexity to the genesis definition
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.
I can't think of why it would be necessary... is there something in storage at that slot on OP Mainnet?
Semgrep found 6
require() must include a reason string Ignore this finding from sol-style-require-reason. |
59db8a6
to
14d10ef
Compare
var defaultGovOwner common.Hash | ||
defaultGovOwner.SetBytes(common.HexToAddress("0xDeaDDEaDDeAdDeAdDEAdDEaddeAddEAdDEAdDEad").Bytes()) | ||
checkStorageSlot(t, alloc, predeploys.GovernanceTokenAddr, common.Hash{31: 0x0a}, defaultGovOwner) |
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.
Restore this check.
packages/contracts-bedrock/snapshots/storageLayout/L1CrossDomainMessenger.json
Show resolved
Hide resolved
packages/contracts-bedrock/snapshots/storageLayout/L1StandardBridge.json
Show resolved
Hide resolved
packages/contracts-bedrock/snapshots/storageLayout/L2CrossDomainMessenger.json
Show resolved
Hide resolved
packages/contracts-bedrock/snapshots/storageLayout/L2OptimismMintableERC20Factory.json
Show resolved
Hide resolved
packages/contracts-bedrock/snapshots/storageLayout/L2ProxyAdmin.json
Outdated
Show resolved
Hide resolved
packages/contracts-bedrock/snapshots/storageLayout/L2StandardBridge.json
Show resolved
Hide resolved
packages/contracts-bedrock/snapshots/storageLayout/L2StandardBridge.json
Show resolved
Hide resolved
packages/contracts-bedrock/snapshots/storageLayout/L2StandardBridge.json
Show resolved
Hide resolved
packages/contracts-bedrock/snapshots/storageLayout/L2StandardBridge.json
Show resolved
Hide resolved
packages/contracts-bedrock/snapshots/storageLayout/L2StandardBridgeInterop.json
Outdated
Show resolved
Hide resolved
Going to close this PR due to it being replaced by another |
Description
Moves network specific values into L1Block.sol.
Fixes: #12297, #12349, #12298, #12299, #12300, #12301, #12303, #12304, #12305, #12655
Open items:
test_upgrade_correctEvent_succeeds
feeAdmin
to op-deployerSystemConfig.Roles
struct should also contain theunsafeBlockSigner
Roles
struct inOPCM
. This is a bit confusing, can we disambiguate it?Cut from scope: