Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix simulation internal function for unpausing #142

Merged
merged 2 commits into from
Mar 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,16 @@ contract UnpausePortal is MultisigBuilder {
return GUARDIAN;
}

function _addOverrides(address _safe) internal override pure returns (SimulationStateOverride memory) {
return overrideSafeThresholdAndOwner(_safe, DEFAULT_SENDER);
function _addOverrides(address _safe) internal override view returns (SimulationStateOverride memory) {
IGnosisSafe safe = IGnosisSafe(payable(_safe));
uint256 _nonce = _getNonce(safe);
return overrideSafeThresholdOwnerAndNonce(_safe, DEFAULT_SENDER, _nonce);
}

function _getNonce(IGnosisSafe safe) internal override view returns (uint256 nonce) {
uint256 _nonce = safe.nonce();
console.log("Safe current nonce:", _nonce);
console.log("Incrememnting by 1 to account for planned `Update` tx");
console.log("Incrementing by 1 to account for planned `Pause` tx");
return _nonce+1;
}
}