@@ -80,17 +80,7 @@ abstract contract MultisigBuilder is MultisigBase {
80
80
function simulateSigned (bytes memory _signatures ) public returns (bool ) {
81
81
address _safe = _ownerSafe ();
82
82
IGnosisSafe safe = IGnosisSafe (payable (_safe));
83
-
84
- uint256 _nonce = safe.nonce ();
85
- console.log ("Safe current nonce: " , _nonce);
86
-
87
- // workaround to check if the SAFE_NONCE env var is present
88
- try vm.envUint ("SAFE_NONCE " ) {
89
- _nonce = vm.envUint ("SAFE_NONCE " );
90
- console.log ("Creating transaction with nonce: " , _nonce);
91
- }
92
- catch {}
93
-
83
+ uint256 _nonce = _getNonce (safe);
94
84
vm.store (_safe, bytes32 (uint256 (5 )), bytes32 (uint256 (_nonce)));
95
85
bool success = _executeTransaction (_safe, _buildCalls (), _signatures);
96
86
if (success) _postCheck ();
@@ -150,15 +140,7 @@ abstract contract MultisigBuilder is MultisigBase {
150
140
// default logic is vestigial for backwards compatibility.
151
141
function _addOverrides (address _safe ) internal virtual view returns (SimulationStateOverride memory ) {
152
142
IGnosisSafe safe = IGnosisSafe (payable (_safe));
153
- uint256 _nonce = safe.nonce ();
154
- console.log ("Safe current nonce: " , _nonce);
155
-
156
- // workaround to check if the SAFE_NONCE env var is present
157
- try vm.envUint ("SAFE_NONCE " ) {
158
- _nonce = vm.envUint ("SAFE_NONCE " );
159
- console.log ("Creating transaction with nonce: " , _nonce);
160
- }
161
- catch {}
143
+ uint256 _nonce = _getNonce (safe);
162
144
return overrideSafeThresholdAndNonce (_safe, _nonce);
163
145
}
164
146
}
0 commit comments