-
Notifications
You must be signed in to change notification settings - Fork 0
feat(deploy): V4 authoriser clone-deploy + grants-mirror script #209
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
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
073da89
feat(deploy): V4 authoriser clone-deploy + grants-mirror script
ee1237c
test(deploy): V4 authoriser clone-mirror via lib-pin + subclass-override
2b786b8
Merge remote-tracking branch 'origin/main' into feat/rai-793-deploy-v…
thedavidmeister 912703a
chore(deps): point V4 authoriser clone test at rain-deploy 0.1.4
thedavidmeister a26a66e
test(deploy): exhaustively cover V4 authoriser clone reject paths
thedavidmeister 2df71b2
test(deploy): cover NewClone-extraction reverts + DRY EIP-1167 bytes …
thedavidmeister 02bb9d4
fix(deploy): mirror grant-state pre-flight in verify(); verify agains…
thedavidmeister ff1b6b5
ci: pin run-script.yaml external actions to SHA; note verify() is loc…
thedavidmeister 7a3cc1c
ci: pin git-clean + multisig-artifact external actions to SHA
thedavidmeister a6f9ba3
fix(deploy): reject non-CALL ops in Tx Builder JSON; correct grants d…
thedavidmeister c9a10af
test(deploy): add failing repro for the grants-bundle SafeTxHash model
thedavidmeister 9638dd4
ci: disable credential persistence on read-only checkout steps
thedavidmeister 0c00b17
test(deploy): name grants-bundle SafeTxHash tests for behaviour
thedavidmeister 62bccb2
test(safe-ops): cover multi-transaction Tx Builder emit/parse
thedavidmeister 626746b
fix(deploy): bind the grants-bundle SafeTxHash to its MultiSend execu…
thedavidmeister efd42fb
test(deploy): cover that the authoriser clone actually authorizes its…
thedavidmeister 280c299
test(deploy): add signed end-to-end deploy + grants coverage
thedavidmeister c9265bc
fix(safe-ops): reject non-CALL ops in encodeMultiSend, not just at emit
thedavidmeister d5b5ad6
feat(guards): enforce the NatSpec-claimed invariants with fail-fast g…
thedavidmeister 741b8a2
ci(run-script): job name + concurrency, env-var input hardening, fix …
thedavidmeister 0e1d85b
refactor(safe-ops): extract shared CALL-only guard helper
thedavidmeister 977de71
ci: retrigger checks
thedavidmeister e056860
ci: retrigger checks after billing unlock
thedavidmeister File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| name: run-script | ||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| script: | ||
| description: 'Operational script to dispatch' | ||
| required: true | ||
| type: choice | ||
| options: | ||
| # Append-only registry: add new entries at the bottom; never reorder | ||
| # or delete. Re-dispatching a historical (executed) script must | ||
| # remain possible — a signer/auditor may want to re-derive its | ||
| # bundle to verify what landed on-chain. | ||
| # | ||
| # Each entry is the date-prefixed filename (without `.s.sol`) of a | ||
| # script under `script/`. Convention: `YYYYMMDD-<kebab-name>`, | ||
| # where the date is the day the script was added to this dropdown. | ||
| # Execution status (PENDING / EXECUTED + SafeTxHash) lives in the | ||
| # script's file-level NatSpec — this dropdown is a registry of | ||
| # *which* scripts exist, not *whether* they've run. | ||
| - 20260619-deploy-v4-authoriser-clone | ||
| sig: | ||
| description: 'Entrypoint to dispatch (default: run())' | ||
| required: true | ||
| type: choice | ||
| default: 'run()' | ||
| options: | ||
| # Append-only registry of entrypoint signatures. The dispatcher does | ||
| # not validate that the selected script implements the selected | ||
| # signature — `forge script` will surface a clear revert if not. | ||
| # | ||
| # `verify(string)` is intentionally NOT listed: it is always a local | ||
| # signer-side check run against a downloaded artifact — it takes a | ||
| # JSON path argument this dispatcher can't supply and runs off-chain | ||
| # on the signer's machine, not in CI. | ||
| - 'run()' | ||
| - 'mirrorGrants()' | ||
| # Manually dispatches an operational script from `script/` and uploads any | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| # JSON it writes to `out/` as a build artifact. | ||
| # | ||
| # Operational scripts produce off-chain artifacts (Safe Tx Builder JSON, | ||
| # signer briefs) under `out/`. They run a full on-chain pre-flight, simulate | ||
| # the post-state, emit the artifact, and log the canonical hash that signers | ||
| # must verify. The dry-run uses an unpinned Base head fork so any drift in | ||
| # the underlying contracts trips the pre-flight here before a signer ever | ||
| # sees the bundle. | ||
| # | ||
| # Why a single dispatcher rather than one workflow per script: | ||
| # - The Actions sidebar stays tight as more scripts accumulate. | ||
| # - Boilerplate (nix install, soldeer install, artifact upload) lives in | ||
| # one place. | ||
| # - Adding a new script is a single yaml entry + a new file under | ||
| # `script/`, no new workflow file. | ||
| # | ||
| # The `sig` input lets a single script expose multiple entrypoints (e.g. | ||
| # `run()` and `mirrorGrants()` on the V4 authoriser deploy) without | ||
| # splitting them into separate dispatcher entries. `forge --sig` is the | ||
| # canonical way to pick which function `forge script` calls. | ||
| jobs: | ||
| run: | ||
| name: Run operational script | ||
| runs-on: ubuntu-latest | ||
|
thedavidmeister marked this conversation as resolved.
|
||
| # Serialise dispatches of the same script+sig so overlapping runs don't | ||
| # race on the shared out/ artifacts; distinct entrypoints run in parallel. | ||
| concurrency: | ||
| group: run-script-${{ inputs.script }}-${{ inputs.sig }} | ||
| cancel-in-progress: false | ||
| steps: | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: DeterminateSystems/nix-installer-action@21a544727d0c62386e78b4befe52d19ad12692e3 # v17 | ||
| - name: Install Soldeer dependencies | ||
| run: nix develop --command forge soldeer install | ||
| - name: Run script | ||
| env: | ||
| BASE_RPC_URL: ${{ secrets.RPC_URL_BASE_FORK }} | ||
| # Pass the choice inputs via env rather than template-expanding them | ||
| # into the command, so a dispatch (even one crafted via the API) is | ||
| # used as a literal argument and cannot inject shell. | ||
| SCRIPT: ${{ inputs.script }} | ||
| SIG: ${{ inputs.sig }} | ||
| run: | | ||
| nix develop --command forge script "script/${SCRIPT}.s.sol" \ | ||
| --sig "${SIG}" \ | ||
| --rpc-url base \ | ||
| --no-storage-caching | ||
| - name: Upload script output | ||
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | ||
| with: | ||
| # Artifact name encodes both script + sig so the run() and | ||
| # mirrorGrants() outputs of the same script don't clobber each other | ||
| # if both are dispatched in the same operational window. The sig is | ||
| # used verbatim, parentheses included — GitHub artifact names permit | ||
| # them. | ||
| name: ${{ inputs.script }}-${{ inputs.sig }}-out | ||
| path: out/*.json | ||
| # `warn` instead of `error`: some operational scripts may not | ||
| # produce a JSON artifact (e.g. a pure verifier or a status | ||
| # printer). Falling back to a warning keeps the dispatcher generic. | ||
| if-no-files-found: warn | ||
|
thedavidmeister marked this conversation as resolved.
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.