Commit 234d0971 authored by refcell's avatar refcell Committed by GitHub

feat(ctb): PermissionedDisputeGame Role Accessors (#10194)

* feat(ctb): permissioned dg accessors

* feat(ctb): permissioned dg accessors

* feat(ctb): permissioned dg accessors

* fix(ctb):formatting

* snapshot

---------
Co-authored-by: default avatarclabby <ben@clab.by>
parent 844cc200
......@@ -187,6 +187,8 @@ contract FPACOPS is Deploy, StdAssertions {
// Check the security override yoke configuration.
PermissionedDisputeGame soyGameImpl =
PermissionedDisputeGame(payable(address(dgfProxy.gameImpls(GameTypes.PERMISSIONED_CANNON))));
assertEq(soyGameImpl.proposer(), cfg.l2OutputOracleProposer());
assertEq(soyGameImpl.challenger(), cfg.l2OutputOracleChallenger());
assertEq(soyGameImpl.maxGameDepth(), cfg.faultGameMaxDepth());
assertEq(soyGameImpl.splitDepth(), cfg.faultGameSplitDepth());
assertEq(soyGameImpl.gameDuration().raw(), cfg.faultGameMaxDuration());
......
......@@ -122,6 +122,19 @@
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "challenger",
"outputs": [
{
"internalType": "address",
"name": "challenger_",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
......@@ -442,6 +455,19 @@
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "proposer",
"outputs": [
{
"internalType": "address",
"name": "proposer_",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "resolve",
......
......@@ -100,4 +100,18 @@ contract PermissionedDisputeGame is FaultDisputeGame {
// Fallthrough initialization.
super.initialize();
}
////////////////////////////////////////////////////////////////
// IMMUTABLE GETTERS //
////////////////////////////////////////////////////////////////
/// @notice Returns the proposer address.
function proposer() external view returns (address proposer_) {
proposer_ = PROPOSER;
}
/// @notice Returns the challenger address.
function challenger() external view returns (address challenger_) {
challenger_ = CHALLENGER;
}
}
......@@ -73,6 +73,8 @@ contract PermissionedDisputeGame_Init is DisputeGameFactory_Init {
PermissionedDisputeGame(payable(address(disputeGameFactory.create(GAME_TYPE, rootClaim, extraData))));
// Check immutables
assertEq(gameProxy.proposer(), PROPOSER);
assertEq(gameProxy.challenger(), CHALLENGER);
assertEq(gameProxy.gameType().raw(), GAME_TYPE.raw());
assertEq(gameProxy.absolutePrestate().raw(), absolutePrestate.raw());
assertEq(gameProxy.maxGameDepth(), 2 ** 3);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment