Skip to content

feat: support nonce overrides for nested safes#84

Merged
stevieraykatz merged 1 commit intobase:mainfrom
mds1:nested-safe-nonce-overrides
Jun 3, 2024
Merged

feat: support nonce overrides for nested safes#84
stevieraykatz merged 1 commit intobase:mainfrom
mds1:nested-safe-nonce-overrides

Conversation

@mds1
Copy link
Contributor

@mds1 mds1 commented May 31, 2024

Problem: In the nested Safe case, we want to sign multiple transactions up-front, then execute them one after another. This requires overriding the safe nonce in advance. However, this is not currently supported for the nested Safe case.

Solution: In NestedMultisigBuilder, override the _getNonce method to change how we look for nonce overrides, and apply these overrides in _simulateForSigner. We cannot use the existing SAFE_NONCE env var since that is ambiguous in the nested context. Therefore the nested case now looks for env vars of the name SAFE_NONCE_{UPPERCASE_SAFE_ADDRESS} (example: SAFE_NONCE_0X6DF4742A3C28790E63FE933F7D108FE9FCE51EA4). While an uppercased address looks a little funny and isn't conventional, this preserves the UPPERCASE env var naming convention and sidesteps and issues around checksummed addresses.

I am open to alternative solutions, but this felt like the simplest and most generic approach.

@stevieraykatz stevieraykatz merged commit 775f367 into base:main Jun 3, 2024
mds1 added a commit to ethereum-optimism/superchain-ops that referenced this pull request Jun 3, 2024
github-merge-queue bot pushed a commit to ethereum-optimism/superchain-ops that referenced this pull request Jun 5, 2024
* init task

- env, readme, and input.json should be correct
- CI should be correct also, but will currently fail
- validation and the solidity script are a WIP
- currently blocked by needing proper nonce handling

* build: change base-contracts version to https://github.com/mds1/base-contracts/tree/nested-safe-nonce-overrides and add env vars

* finish 010-1 task

* fix: network references

* doc: add proposal info

* add 010-2

* 010-1: sync input.json timestamps and fix comment

* ci: add 010-2-sc-changes to ci

* doc: all Safe links point to v1.3.0

* doc: fixes

* chore: remove unnecessary code exceptions

* build: bump base-contracts version now that base/contracts#84 was merged

* Update tasks/eth/010-1-guardian-upgrade/VALIDATION.md

* additional sanity check on number of owners
joshH94 added a commit to joshH94/superchain-ops that referenced this pull request Sep 22, 2025
* init task

- env, readme, and input.json should be correct
- CI should be correct also, but will currently fail
- validation and the solidity script are a WIP
- currently blocked by needing proper nonce handling

* build: change base-contracts version to https://github.com/mds1/base-contracts/tree/nested-safe-nonce-overrides and add env vars

* finish 010-1 task

* fix: network references

* doc: add proposal info

* add 010-2

* 010-1: sync input.json timestamps and fix comment

* ci: add 010-2-sc-changes to ci

* doc: all Safe links point to v1.3.0

* doc: fixes

* chore: remove unnecessary code exceptions

* build: bump base-contracts version now that base/contracts#84 was merged

* Update tasks/eth/010-1-guardian-upgrade/VALIDATION.md

* additional sanity check on number of owners
radiant-lab7098 added a commit to radiant-lab7098/superchain-ops that referenced this pull request Sep 29, 2025
* init task

- env, readme, and input.json should be correct
- CI should be correct also, but will currently fail
- validation and the solidity script are a WIP
- currently blocked by needing proper nonce handling

* build: change base-contracts version to https://github.com/mds1/base-contracts/tree/nested-safe-nonce-overrides and add env vars

* finish 010-1 task

* fix: network references

* doc: add proposal info

* add 010-2

* 010-1: sync input.json timestamps and fix comment

* ci: add 010-2-sc-changes to ci

* doc: all Safe links point to v1.3.0

* doc: fixes

* chore: remove unnecessary code exceptions

* build: bump base-contracts version now that base/contracts#84 was merged

* Update tasks/eth/010-1-guardian-upgrade/VALIDATION.md

* additional sanity check on number of owners
async-druidxbh6 added a commit to async-druidxbh6/superchain-ops that referenced this pull request Nov 13, 2025
* init task

- env, readme, and input.json should be correct
- CI should be correct also, but will currently fail
- validation and the solidity script are a WIP
- currently blocked by needing proper nonce handling

* build: change base-contracts version to https://github.com/mds1/base-contracts/tree/nested-safe-nonce-overrides and add env vars

* finish 010-1 task

* fix: network references

* doc: add proposal info

* add 010-2

* 010-1: sync input.json timestamps and fix comment

* ci: add 010-2-sc-changes to ci

* doc: all Safe links point to v1.3.0

* doc: fixes

* chore: remove unnecessary code exceptions

* build: bump base-contracts version now that base/contracts#84 was merged

* Update tasks/eth/010-1-guardian-upgrade/VALIDATION.md

* additional sanity check on number of owners
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants