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

Optional SAFE_NONCE variable fix #56

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
6 changes: 2 additions & 4 deletions script/universal/MultisigBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@ abstract contract MultisigBase is Simulator {
uint256 nonce = safe.nonce();
console.log("Safe current nonce:", nonce);

if (bytes(vm.envOr("SAFE_NONCE", "")).length > 0) {
nonce = vm.envUint("SAFE_NONCE");
console.log("Creating transaction with nonce:", nonce);
}
nonce = vm.envOr("SAFE_NONCE", nonce); // allow overriding the nonce for testing
console.log("Creating transaction with nonce:", nonce);

return safe.encodeTransactionData({
to: address(multicall),
Expand Down
4 changes: 2 additions & 2 deletions script/universal/MultisigBuilder.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ abstract contract MultisigBuilder is MultisigBase {
/**
* @notice Creates the calldata
*/
function _buildCalls() internal virtual view returns (IMulticall3.Call3[] memory);
function _buildCalls() internal virtual pure returns (IMulticall3.Call3[] memory);

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

/**
* -----------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions script/universal/NestedMultisigBuilder.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ abstract contract NestedMultisigBuilder is MultisigBase {
/**
* @notice Creates the calldata
*/
function _buildCalls() internal virtual view returns (IMulticall3.Call3[] memory);
function _buildCalls() internal virtual pure returns (IMulticall3.Call3[] memory);

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

/**
* -----------------------------------------------------------
Expand Down