Skip to content

Commit 509e1b8

Browse files
committed
add natspec
1 parent 782c13e commit 509e1b8

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

src/improvements/tasks/MultisigTask.sol

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ abstract contract MultisigTask is Test, Script {
7373
bytes32 newValue;
7474
}
7575

76+
/// @notice Enum to determine the type of task
7677
enum TaskType {
7778
L2TaskBase,
7879
SimpleBase
@@ -128,7 +129,7 @@ abstract contract MultisigTask is Test, Script {
128129
// ==================================================
129130
// These are functions have no default implementation and MUST be implemented by the inheriting contract.
130131

131-
/// @notice Returns the type of task.
132+
/// @notice Returns the type of task. L2TaskBase or SimpleBase.
132133
function taskType() public pure virtual returns (TaskType);
133134

134135
/// @notice Specifies the safe address string to run the template from. This string refers
@@ -1062,10 +1063,15 @@ abstract contract L2TaskBase is MultisigTask {
10621063

10631064
SuperchainAddressRegistry public superchainAddrRegistry;
10641065

1066+
/// @notice Returns the type of task. L2TaskBase.
1067+
/// overrides the taskType function in the MultisigTask contract.
10651068
function taskType() public pure override returns (TaskType) {
10661069
return TaskType.L2TaskBase;
10671070
}
10681071

1072+
/// @notice Configures the task for L2TaskBase type tasks.
1073+
/// overrides the configureTask function in the MultisigTask contract.
1074+
/// for L2TaskBase, we need to configure the superchain address registry.
10691075
function _configureTask(string memory taskConfigFilePath)
10701076
internal
10711077
virtual
@@ -1094,8 +1100,6 @@ abstract contract L2TaskBase is MultisigTask {
10941100
);
10951101
}
10961102

1097-
console.log("Parent multisig: ", address(parentMultisig_));
1098-
10991103
// This loads the allowed storage write accesses to storage for this task.
11001104
// If this task changes storage slots outside of the allowed write accesses,
11011105
// then the task will fail at runtime and the task developer will need to
@@ -1112,14 +1116,19 @@ abstract contract L2TaskBase is MultisigTask {
11121116
}
11131117

11141118
abstract contract SimpleBase is MultisigTask {
1115-
function taskType() public pure override returns (TaskType) {
1116-
return TaskType.SimpleBase;
1117-
}
1118-
11191119
using EnumerableSet for EnumerableSet.AddressSet;
11201120

11211121
SimpleAddressRegistry public simpleAddrRegistry;
11221122

1123+
/// @notice Returns the type of task. SimpleBase.
1124+
/// overrides the taskType function in the MultisigTask contract.
1125+
function taskType() public pure override returns (TaskType) {
1126+
return TaskType.SimpleBase;
1127+
}
1128+
1129+
/// @notice Configures the task for SimpleBase type tasks.
1130+
/// overrides the configureTask function in the MultisigTask contract.
1131+
/// for SimpleBase, we need to configure the simple address registry.
11231132
function _configureTask(string memory taskConfigFilePath)
11241133
internal
11251134
virtual
@@ -1133,8 +1142,6 @@ abstract contract SimpleBase is MultisigTask {
11331142

11341143
parentMultisig_ = IGnosisSafe(simpleAddrRegistry.get(config.safeAddressString));
11351144

1136-
console.log("Parent multisig: ", address(parentMultisig_));
1137-
11381145
// This loads the allowed storage write accesses to storage for this task.
11391146
// If this task changes storage slots outside of the allowed write accesses,
11401147
// then the task will fail at runtime and the task developer will need to

0 commit comments

Comments
 (0)