Skip to content

Commit

Permalink
feat: move _ownerSafe() to MultisigBase
Browse files Browse the repository at this point in the history
  • Loading branch information
maurelian committed Feb 11, 2025
1 parent 6806250 commit 9f453b4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
4 changes: 3 additions & 1 deletion script/universal/MultisigBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ abstract contract MultisigBase is CommonBase {

event DataToSign(bytes);

function _ownerSafe() internal view virtual returns (address);

function _target(address _safe) internal view returns (address) {
// Always parse the env var as a string to avoid issues with boolean values. This lets
// us use "true" or "1" as the value to enable the multi-delegatecall.
bool useMultiDelegatecall = (vm.envOr("USE_MULTI_DELEGATECALL", false) || vm.envOr("USE_MULTI_DELEGATECALL", uint256(0)) == 1);
if (_safe == 0x1Eb2fFc903729a0F03966B917003800b145F56E2 && useMultiDelegatecall) {
if (_safe == _ownerSafe() && useMultiDelegatecall) {
return MULTI_DELEGATECALL_ADDRESS;
}
return MULTICALL3_ADDRESS;
Expand Down
5 changes: 0 additions & 5 deletions script/universal/MultisigBuilder.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ abstract contract MultisigBuilder is MultisigBase {
* -----------------------------------------------------------
*/

/**
* @notice Returns the safe address to execute the transaction from
*/
function _ownerSafe() internal view virtual returns (address);

/**
* @notice Creates the calldata for both signatures (`sign`) and execution (`run`)
*/
Expand Down
5 changes: 0 additions & 5 deletions script/universal/NestedMultisigBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ abstract contract NestedMultisigBase is MultisigBase {
* -----------------------------------------------------------
*/

/**
* @notice Returns the nested safe address to execute the final transaction from
*/
function _ownerSafe() internal view virtual returns (address);

/**
* @notice Creates the calldata for both signatures (`sign`) and execution (`run`)
*/
Expand Down

0 comments on commit 9f453b4

Please sign in to comment.