Skip to content
1 change: 1 addition & 0 deletions op-deployer/pkg/deployer/bootstrap/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ type ValidatorConfig struct {
type ValidatorInput struct {
Release string `json:"release"`
SuperchainConfig common.Address `json:"superchainConfig"`
Guardian common.Address `json:"guardian"`
L1PAOMultisig common.Address `json:"l1PAOMultisig"`
Challenger common.Address `json:"challenger"`
SuperchainConfigImpl common.Address `json:"superchainConfigImpl"`
Expand Down
1 change: 1 addition & 0 deletions op-deployer/pkg/deployer/bootstrap/validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func testValidator(t *testing.T, forkRPCURL string, loc *artifacts.Locator, rele
input := ValidatorInput{
Release: release,
SuperchainConfig: common.Address{'S'},
Guardian: common.Address{'G'},
L1PAOMultisig: common.Address{'M'},
Challenger: common.Address{'C'},
SuperchainConfigImpl: common.Address{'1'},
Expand Down
20 changes: 18 additions & 2 deletions packages/contracts-bedrock/interfaces/L1/IStandardValidator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ interface IStandardValidator {
uint256 l2ChainID;
}

struct ValidationOverrides {
address guardian;
address l1PAOMultisig;
address challenger;
}

function anchorStateRegistryImpl() external view returns (address);
function anchorStateRegistryVersion() external pure returns (string memory);
function challenger() external view returns (address);
Expand All @@ -38,6 +44,7 @@ interface IStandardValidator {
function l1CrossDomainMessengerVersion() external pure returns (string memory);
function l1ERC721BridgeImpl() external view returns (address);
function l1ERC721BridgeVersion() external pure returns (string memory);
function guardian() external view returns (address);
function l1PAOMultisig() external view returns (address);
function l1StandardBridgeImpl() external view returns (address);
function l1StandardBridgeVersion() external pure returns (string memory);
Expand All @@ -54,13 +61,22 @@ interface IStandardValidator {
function systemConfigVersion() external pure returns (string memory);
function withdrawalDelaySeconds() external view returns (uint256);

function validate(ValidationInput memory _input, bool _allowFailure) external view returns (string memory);
function validate(
ValidationInput memory _input,
bool _allowFailure,
ValidationOverrides memory _overrides
)
external
returns (string memory);
function validate(ValidationInput memory _input, bool _allowFailure) external returns (string memory);

function __constructor__(
IStandardValidator.Implementations memory _implementations,
ISuperchainConfig _superchainConfig,
address _guardian,
address _l1PAOMultisig,
address _challenger,
uint256 _withdrawalDelaySeconds
) external;
)
external;
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ contract DeployStandardValidatorInput is BaseDeployIO {

// Required inputs
ISuperchainConfig internal _superchainConfig;
address internal _guardian;
address internal _l1PAOMultisig;
address internal _mips;
address internal _challenger;
Expand All @@ -42,6 +43,9 @@ contract DeployStandardValidatorInput is BaseDeployIO {
if (_sel == this.superchainConfig.selector) {
require(_value != address(0), "DeployStandardValidator: superchainConfig cannot be empty");
_superchainConfig = ISuperchainConfig(_value);
} else if (_sel == this.guardian.selector) {
require(_value != address(0), "DeployStandardValidator: guardian cannot be empty");
_guardian = _value;
} else if (_sel == this.l1PAOMultisig.selector) {
require(_value != address(0), "DeployStandardValidator: l1PAOMultisig cannot be empty");
_l1PAOMultisig = _value;
Expand Down Expand Up @@ -116,6 +120,11 @@ contract DeployStandardValidatorInput is BaseDeployIO {
return _superchainConfig;
}

function guardian() public view returns (address) {
require(_guardian != address(0), "DeployStandardValidator: guardian not set");
return _guardian;
}

function l1PAOMultisig() public view returns (address) {
require(_l1PAOMultisig != address(0), "DeployStandardValidator: l1PAOMultisig not set");
return _l1PAOMultisig;
Expand Down Expand Up @@ -257,6 +266,7 @@ contract DeployStandardValidator is Script {
(
getImplementations(_si),
_si.superchainConfig(),
_si.guardian(),
_si.l1PAOMultisig(),
_si.challenger(),
_si.withdrawalDelaySeconds()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
"name": "_superchainConfig",
"type": "address"
},
{
"internalType": "address",
"name": "_guardian",
"type": "address"
},
{
"internalType": "address",
"name": "_l1PAOMultisig",
Expand Down Expand Up @@ -173,6 +178,19 @@
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "guardian",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "l1CrossDomainMessengerImpl",
Expand Down Expand Up @@ -450,7 +468,75 @@
"type": "string"
}
],
"stateMutability": "view",
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "contract IProxyAdmin",
"name": "proxyAdmin",
"type": "address"
},
{
"internalType": "contract ISystemConfig",
"name": "sysCfg",
"type": "address"
},
{
"internalType": "bytes32",
"name": "absolutePrestate",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "l2ChainID",
"type": "uint256"
}
],
"internalType": "struct StandardValidator.ValidationInput",
"name": "_input",
"type": "tuple"
},
{
"internalType": "bool",
"name": "_allowFailure",
"type": "bool"
},
{
"components": [
{
"internalType": "address",
"name": "guardian",
"type": "address"
},
{
"internalType": "address",
"name": "l1PAOMultisig",
"type": "address"
},
{
"internalType": "address",
"name": "challenger",
"type": "address"
}
],
"internalType": "struct StandardValidator.ValidationOverrides",
"name": "_overrides",
"type": "tuple"
}
],
"name": "validate",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,72 +29,79 @@
},
{
"bytes": "20",
"label": "l1ERC721BridgeImpl",
"label": "guardian",
"offset": 0,
"slot": "4",
"type": "address"
},
{
"bytes": "20",
"label": "optimismPortalImpl",
"label": "l1ERC721BridgeImpl",
"offset": 0,
"slot": "5",
"type": "address"
},
{
"bytes": "20",
"label": "systemConfigImpl",
"label": "optimismPortalImpl",
"offset": 0,
"slot": "6",
"type": "address"
},
{
"bytes": "20",
"label": "optimismMintableERC20FactoryImpl",
"label": "systemConfigImpl",
"offset": 0,
"slot": "7",
"type": "address"
},
{
"bytes": "20",
"label": "l1CrossDomainMessengerImpl",
"label": "optimismMintableERC20FactoryImpl",
"offset": 0,
"slot": "8",
"type": "address"
},
{
"bytes": "20",
"label": "l1StandardBridgeImpl",
"label": "l1CrossDomainMessengerImpl",
"offset": 0,
"slot": "9",
"type": "address"
},
{
"bytes": "20",
"label": "disputeGameFactoryImpl",
"label": "l1StandardBridgeImpl",
"offset": 0,
"slot": "10",
"type": "address"
},
{
"bytes": "20",
"label": "anchorStateRegistryImpl",
"label": "disputeGameFactoryImpl",
"offset": 0,
"slot": "11",
"type": "address"
},
{
"bytes": "20",
"label": "delayedWETHImpl",
"label": "anchorStateRegistryImpl",
"offset": 0,
"slot": "12",
"type": "address"
},
{
"bytes": "20",
"label": "mipsImpl",
"label": "delayedWETHImpl",
"offset": 0,
"slot": "13",
"type": "address"
},
{
"bytes": "20",
"label": "mipsImpl",
"offset": 0,
"slot": "14",
"type": "address"
}
]
Loading