Skip to content

Commit eb8fb14

Browse files
authored
ctb: Change Safe contract version to GnosisSafe v1.3.0 (ethereum-optimism#10515)
* ctb: Change Safe contract version to GnosisSafe v1.3.0 This aligns with what the Security Council is running * ctb: Update snapshots and semver-lock
1 parent 625054c commit eb8fb14

18 files changed

+34
-56
lines changed

packages/contracts-bedrock/scripts/Deploy.s.sol

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import { Script } from "forge-std/Script.sol";
77
import { console2 as console } from "forge-std/console2.sol";
88
import { stdJson } from "forge-std/StdJson.sol";
99

10-
import { Safe } from "safe-contracts/Safe.sol";
11-
import { SafeProxyFactory } from "safe-contracts/proxies/SafeProxyFactory.sol";
10+
import { GnosisSafe as Safe } from "safe-contracts/GnosisSafe.sol";
11+
import { GnosisSafeProxyFactory as SafeProxyFactory } from "safe-contracts/proxies/GnosisSafeProxyFactory.sol";
1212
import { Enum as SafeOps } from "safe-contracts/common/Enum.sol";
1313

1414
import { Deployer } from "scripts/Deployer.sol";

packages/contracts-bedrock/scripts/DeployOwnership.s.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pragma solidity ^0.8.0;
44
import { console2 as console } from "forge-std/console2.sol";
55
import { stdJson } from "forge-std/StdJson.sol";
66

7-
import { Safe } from "safe-contracts/Safe.sol";
7+
import { GnosisSafe as Safe } from "safe-contracts/GnosisSafe.sol";
88
import { OwnerManager } from "safe-contracts/base/OwnerManager.sol";
99
import { ModuleManager } from "safe-contracts/base/ModuleManager.sol";
1010
import { GuardManager } from "safe-contracts/base/GuardManager.sol";

packages/contracts-bedrock/semver-lock.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,15 @@
105105
},
106106
"src/Safe/DeputyGuardianModule.sol": {
107107
"initCodeHash": "0x433eb7488e613a51c7ff05a76bbecf47f5beac8b8614f5c50001f99e39ae7ed2",
108-
"sourceCodeHash": "0x2919835fc15c166a027b2ff1cf801c847f139948baf2df0db3d02ac3017c09d9"
108+
"sourceCodeHash": "0x5b415dc432a83fb1d5c41585539245997c62acb6bd77c489bf57e9b59be5f983"
109109
},
110110
"src/Safe/LivenessGuard.sol": {
111-
"initCodeHash": "0x16ec47f0888391638814047a1735dbac849b48e256b2e20182bbb3186d950a3c",
112-
"sourceCodeHash": "0x9633cea9b66077e222f470439fe3e9a31f3e33b4f7a5618374c44310fd234b24"
111+
"initCodeHash": "0xf54289de5cef7ba0044e0d63310937fa231d6528aac91e13e531c845af42afac",
112+
"sourceCodeHash": "0xea3872d8f196ae3c863363dfa4b57803cb2a24b0c100244d8f861891e901e03f"
113113
},
114114
"src/Safe/LivenessModule.sol": {
115115
"initCodeHash": "0xa8b233f0f26f8a73b997b12ba06d64cefa8ee98d523f68cd63320e9787468fae",
116-
"sourceCodeHash": "0x73aa5934e56ba2a45f368806c5db1d442bf5713d51b2184749f4638eaceb832e"
116+
"sourceCodeHash": "0x15dfd32e92577f4cb5ab05def834a5a1b183e30ca249184f282fca6441be8788"
117117
},
118118
"src/cannon/MIPS.sol": {
119119
"initCodeHash": "0xa5d36fc67170ad87322f358f612695f642757bbf5280800d5d878da21402579a",

packages/contracts-bedrock/snapshots/abi/DeputyGuardianModule.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"inputs": [
44
{
5-
"internalType": "contract Safe",
5+
"internalType": "contract GnosisSafe",
66
"name": "_safe",
77
"type": "address"
88
},
@@ -63,7 +63,7 @@
6363
"name": "safe",
6464
"outputs": [
6565
{
66-
"internalType": "contract Safe",
66+
"internalType": "contract GnosisSafe",
6767
"name": "safe_",
6868
"type": "address"
6969
}

packages/contracts-bedrock/snapshots/abi/LivenessGuard.json

+2-21
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"inputs": [
44
{
5-
"internalType": "contract Safe",
5+
"internalType": "contract GnosisSafe",
66
"name": "_safe",
77
"type": "address"
88
}
@@ -115,7 +115,7 @@
115115
"name": "safe",
116116
"outputs": [
117117
{
118-
"internalType": "contract Safe",
118+
"internalType": "contract GnosisSafe",
119119
"name": "safe_",
120120
"type": "address"
121121
}
@@ -130,25 +130,6 @@
130130
"stateMutability": "nonpayable",
131131
"type": "function"
132132
},
133-
{
134-
"inputs": [
135-
{
136-
"internalType": "bytes4",
137-
"name": "interfaceId",
138-
"type": "bytes4"
139-
}
140-
],
141-
"name": "supportsInterface",
142-
"outputs": [
143-
{
144-
"internalType": "bool",
145-
"name": "",
146-
"type": "bool"
147-
}
148-
],
149-
"stateMutability": "view",
150-
"type": "function"
151-
},
152133
{
153134
"inputs": [],
154135
"name": "version",

packages/contracts-bedrock/snapshots/abi/LivenessModule.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"inputs": [
44
{
5-
"internalType": "contract Safe",
5+
"internalType": "contract GnosisSafe",
66
"name": "_safe",
77
"type": "address"
88
},
@@ -148,7 +148,7 @@
148148
"name": "safe",
149149
"outputs": [
150150
{
151-
"internalType": "contract Safe",
151+
"internalType": "contract GnosisSafe",
152152
"name": "safe_",
153153
"type": "address"
154154
}

packages/contracts-bedrock/src/Safe/DeputyGuardianModule.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity 0.8.15;
33

4-
import { Safe } from "safe-contracts/Safe.sol";
4+
import { GnosisSafe as Safe } from "safe-contracts/GnosisSafe.sol";
55
import { Enum } from "safe-contracts/common/Enum.sol";
66

77
import { SuperchainConfig } from "src/L1/SuperchainConfig.sol";

packages/contracts-bedrock/src/Safe/LivenessGuard.sol

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity 0.8.15;
33

4-
import { Safe } from "safe-contracts/Safe.sol";
5-
import { BaseGuard, GuardManager } from "safe-contracts/base/GuardManager.sol";
6-
import { ModuleManager } from "safe-contracts/base/ModuleManager.sol";
4+
import { GnosisSafe as Safe } from "safe-contracts/GnosisSafe.sol";
5+
import { Guard as BaseGuard } from "safe-contracts/base/GuardManager.sol";
76
import { SafeSigners } from "src/Safe/SafeSigners.sol";
87
import { Enum } from "safe-contracts/common/Enum.sol";
98
import { ISemver } from "src/universal/ISemver.sol";

packages/contracts-bedrock/src/Safe/LivenessModule.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity 0.8.15;
33

4-
import { Safe, OwnerManager } from "safe-contracts/Safe.sol";
4+
import { GnosisSafe as Safe } from "safe-contracts/GnosisSafe.sol";
55
import { Enum } from "safe-contracts/common/Enum.sol";
66
import { OwnerManager } from "safe-contracts/base/OwnerManager.sol";
77
import { LivenessGuard } from "src/Safe/LivenessGuard.sol";

packages/contracts-bedrock/test/Safe/DeployOwnership.t.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
} from "scripts/DeployOwnership.s.sol";
1111
import { Test } from "forge-std/Test.sol";
1212

13-
import { Safe } from "safe-contracts/Safe.sol";
13+
import { GnosisSafe as Safe } from "safe-contracts/GnosisSafe.sol";
1414
import { ModuleManager } from "safe-contracts/base/ModuleManager.sol";
1515
import { GuardManager } from "safe-contracts/base/GuardManager.sol";
1616

packages/contracts-bedrock/test/Safe/DeputyGuardianModule.t.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ pragma solidity 0.8.15;
33

44
import { CommonTest } from "test/setup/CommonTest.sol";
55
import { ForgeArtifacts, Abi } from "scripts/ForgeArtifacts.sol";
6-
import { Safe } from "safe-contracts/Safe.sol";
6+
import { GnosisSafe as Safe } from "safe-contracts/GnosisSafe.sol";
77
import "test/safe-tools/SafeTestTools.sol";
88

99
import { IDisputeGame } from "src/dispute/interfaces/IDisputeGame.sol";

packages/contracts-bedrock/test/Safe/LivenessGuard.t.sol

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ pragma solidity 0.8.15;
44
import { Test } from "forge-std/Test.sol";
55
import { StdUtils } from "forge-std/StdUtils.sol";
66
import { StdCheats } from "forge-std/StdCheats.sol";
7-
import { Safe, OwnerManager } from "safe-contracts/Safe.sol";
8-
import { SafeProxyFactory } from "safe-contracts/proxies/SafeProxyFactory.sol";
9-
import { ModuleManager } from "safe-contracts/base/ModuleManager.sol";
7+
import { GnosisSafe as Safe } from "safe-contracts/GnosisSafe.sol";
8+
import { OwnerManager } from "safe-contracts/base/OwnerManager.sol";
109
import { Enum } from "safe-contracts/common/Enum.sol";
1110
import "test/safe-tools/SafeTestTools.sol";
1211
import { EnumerableSet } from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";

packages/contracts-bedrock/test/Safe/LivenessModule.t.sol

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity 0.8.15;
33

4-
import { Test, StdUtils } from "forge-std/Test.sol";
5-
import { Safe } from "safe-contracts/Safe.sol";
6-
import { SafeProxyFactory } from "safe-contracts/proxies/SafeProxyFactory.sol";
7-
import { ModuleManager } from "safe-contracts/base/ModuleManager.sol";
4+
import { Test } from "forge-std/Test.sol";
5+
import { GnosisSafe as Safe } from "safe-contracts/GnosisSafe.sol";
86
import { OwnerManager } from "safe-contracts/base/OwnerManager.sol";
97
import { Enum } from "safe-contracts/common/Enum.sol";
108
import "test/safe-tools/SafeTestTools.sol";

packages/contracts-bedrock/test/Safe/SafeSigners.t.sol

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
pragma solidity 0.8.15;
33

44
import { Test } from "forge-std/Test.sol";
5-
import { Safe } from "safe-contracts/Safe.sol";
5+
import { GnosisSafe as Safe } from "safe-contracts/GnosisSafe.sol";
66
import { SafeSigners } from "src/Safe/SafeSigners.sol";
77
import "test/safe-tools/SafeTestTools.sol";
88

9-
import { SignatureDecoder } from "safe-contracts/common/SignatureDecoder.sol";
10-
119
contract SafeSigners_Test is Test, SafeTestTools {
1210
bytes4 internal constant EIP1271_MAGIC_VALUE = 0x20c13b0b;
1311

packages/contracts-bedrock/test/kontrol/proofs/utils/DeploymentSummaryCode.sol

+2-2
Large diffs are not rendered by default.

packages/contracts-bedrock/test/safe-tools/CompatibilityFallbackHandler_1_3_0.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import "safe-contracts/interfaces/ERC721TokenReceiver.sol";
66
import "safe-contracts/interfaces/ERC777TokensRecipient.sol";
77
import "safe-contracts/interfaces/IERC165.sol";
88
import "safe-contracts/interfaces/ISignatureValidator.sol";
9-
import { Safe as GnosisSafe } from "safe-contracts/Safe.sol";
9+
import { GnosisSafe } from "safe-contracts/GnosisSafe.sol";
1010

1111
/// author: Colin Nielsen
1212
/// https://github.com/colinnielsen/safe-tools/blob/ce6c654a76d91b619ab7778c77d1a76b3ced6666/src/CompatibilityFallbackHandler_1_3_0.sol

packages/contracts-bedrock/test/safe-tools/SafeTestTools.sol

+6-3
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@ pragma solidity >=0.7.0 <0.9.0;
33

44
import "forge-std/Test.sol";
55
import { LibSort } from "@solady/utils/LibSort.sol";
6-
import { Safe as GnosisSafe, OwnerManager, ModuleManager, GuardManager } from "safe-contracts/Safe.sol";
7-
import { SafeProxyFactory as GnosisSafeProxyFactory } from "safe-contracts/proxies/SafeProxyFactory.sol";
6+
import { GnosisSafe } from "safe-contracts/GnosisSafe.sol";
7+
import { OwnerManager } from "safe-contracts/base/OwnerManager.sol";
8+
import { ModuleManager } from "safe-contracts/base/ModuleManager.sol";
9+
import { GuardManager } from "safe-contracts/base/GuardManager.sol";
10+
import { GnosisSafeProxyFactory } from "safe-contracts/proxies/GnosisSafeProxyFactory.sol";
811
import { Enum } from "safe-contracts/common/Enum.sol";
9-
import { SignMessageLib } from "safe-contracts/libraries/SignMessageLib.sol";
12+
import { SignMessageLib } from "safe-contracts/examples/libraries/SignMessage.sol";
1013
import "./CompatibilityFallbackHandler_1_3_0.sol";
1114

1215
// Tools to simplify testing Safe contracts

0 commit comments

Comments
 (0)