-
Notifications
You must be signed in to change notification settings - Fork 18
Add the Manual sol verify caller workflow #2846
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| name: Manual sol verify | ||
| # Explorer source verification for a suite that is ALREADY on chain, run by | ||
| # hand. | ||
| # | ||
| # `manual-sol-artifacts.yaml` submits source only for what its own run | ||
| # broadcast, and the broadcast is idempotent: a rerun against networks that | ||
| # already hold the code broadcasts nothing, so there is nothing for `--verify` | ||
| # to submit and the run is green having verified nothing. A deploy that landed | ||
| # and then went unverified — a bad explorer key, a rate limit, an explorer that | ||
| # was down, or `verify: false` because the retry loop would have outlasted the | ||
| # deploy — is repaired here rather than by re-dispatching the deploy. | ||
| # | ||
| # Deliberately `workflow_dispatch` only, like the deploy. Unlike the deploy this | ||
| # never broadcasts and never reads `DEPLOYMENT_KEY`: `forge verify-contract` | ||
| # talks to the explorer API and nothing else, so it is safe to re-run and is | ||
| # already a no-op ("already verified") against an explorer that has the source. | ||
| # | ||
| # Five of this repo's six suites can be dispatched here. `route-processor` | ||
| # cannot: its `artifactPath` is the bare name `RouteProcessor4`, and this repo | ||
| # holds no Solidity source for it — only the pinned | ||
| # `ROUTE_PROCESSOR_4_CREATION_CODE` bytes taken from sushiswap — so `forge | ||
| # build` emits no artifact under that name and `forge verify-contract` has | ||
| # nothing to submit. Recorded here so the next person does not spend a run | ||
| # finding out. | ||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| contract: | ||
| type: string | ||
| required: true | ||
| description: | | ||
| Artifact path of the contract to submit, `path:Contract`. Paired with | ||
| `address` on the `manual verification command:` line | ||
| `script/Deploy.sol` prints for every network, whether it deployed | ||
| there or skipped it, so a run of the deploy is where both values come | ||
| from. They are also the `artifactPath` and the generated | ||
| `DEPLOYED_ADDRESS` of the suites in | ||
| `src/abstract/RaindexDeploySuites.sol`. | ||
| address: | ||
| type: string | ||
| required: true | ||
| description: | | ||
| The deployed address. One value for every network, because the Zoltu | ||
| factory derives one address from the creation code. | ||
| networks: | ||
| type: string | ||
| required: true | ||
| default: arbitrum base base-sepolia mainnet flare hyperliquid polygon | ||
| description: | | ||
| Which explorers to submit to. FOUNDRY's chain names, not the | ||
| `[rpc_endpoints]` aliases, and the two differ on three of the seven: | ||
| the aliases `base_sepolia`, `ethereum` and `hyperevm` are rejected | ||
| outright, and the chain names are `base-sepolia`, `mainnet` and | ||
| `hyperliquid`. The `manual verification command:` line is NOT a source | ||
| for this field — it prints `--chain` with the alias it broadcast | ||
| under, which is the spelling that gets rejected here. The default is | ||
| `LibRainDeploy.supportedNetworks()` spelled the working way, i.e. | ||
| every network `script/Deploy.sol` broadcasts to, so it has to move | ||
| when that does. | ||
| jobs: | ||
| verify: | ||
| uses: rainlanguage/rainix/.github/workflows/rainix-manual-sol-verify.yaml@main | ||
|
Comment on lines
+59
to
+61
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- workflow ---'
cat -n .github/workflows/manual-sol-verify.yaml
printf '%s\n' '--- related workflow references ---'
rg -n --hidden --glob '!node_modules' --glob '!dist' 'rainix-manual-sol-verify|permissions:|GITHUB_TOKEN|github.token' .github README.md 2>/dev/null || true
printf '%s\n' '--- repository metadata ---'
if [ -f .github/dependabot.yml ]; then cat -n .github/dependabot.yml; fiRepository: rainlanguage/raindex Length of output: 4955 🏁 Script executed: #!/bin/bash
set -eu
url='https://raw.githubusercontent.com/rainlanguage/rainix/main/.github/workflows/rainix-manual-sol-verify.yaml'
printf '%s\n' '--- reusable workflow at main ---'
curl -fsSL "$url" | cat -n
printf '%s\n' '--- workflow call contract documentation excerpt ---'
curl -fsSL 'https://docs.github.com/en/actions/reference/workflows-and-actions/reusing-workflow-configurations' |
sed -n '/permissions/,+12p' | head -80 || trueRepository: rainlanguage/raindex Length of output: 50377 🏁 Script executed: #!/bin/bash
set -eu
for path in \
'.github/actions/nix-cachix-setup/action.yaml' \
'.github/actions/nix-cachix-setup/action.yml'
do
url="https://raw.githubusercontent.com/rainlanguage/rainix/main/$path"
body="$(curl -fsSL "$url" 2>/dev/null || true)"
if [ -n "$body" ]; then
printf '%s\n' "--- $path ---"
printf '%s\n' "$body" | nl -ba
fi
doneRepository: rainlanguage/raindex Length of output: 251 🏁 Script executed: #!/bin/bash
set -eu
url='https://raw.githubusercontent.com/rainlanguage/rainix/main/.github/actions/nix-cachix-setup/action.yml'
printf '%s\n' '--- setup composite action ---'
curl -fsSL "$url" | cat -nRepository: rainlanguage/raindex Length of output: 5154 🏁 Script executed: #!/bin/bash
set -eu
url='https://raw.githubusercontent.com/rainlanguage/rainix/main/.github/actions/checkout/action.yml'
printf '%s\n' '--- checkout composite action ---'
curl -fsSL "$url" | cat -nRepository: rainlanguage/raindex Length of output: 1704 Declare least-privilege token permissions. Add 🧰 Tools🪛 zizmor (1.29.0)[warning] 60-67: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block (excessive-permissions) [warning] 61-61: secrets unconditionally inherited by called workflow (secrets-inherit): this reusable workflow (secrets-inherit) 🤖 Prompt for AI AgentsSources: MCP tools, Linters/SAST tools
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Checked rather than assumed: Not taking it in this PR, and not because it is wrong. The cap belongs in Flagged for upstream rather than dropped.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This pull request remains write-scoped until the upstream workflow adds its 🐇🔒 You are interacting with an AI system.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Filed as rainlanguage/rainix#361 — in rainix rather than here, since that is where the fix lands and where it covers Two things surfaced while writing it up that make the finding stronger than the version above:
Keeping the thread open here is the right call — this caller is write-scoped until that lands.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This caller remains write-scoped until that upstream workflow change lands. Keeping this thread open is correct. 🧠 Learnings usedYou are interacting with an AI system. |
||
| with: | ||
| contract: ${{ inputs.contract }} | ||
| address: ${{ inputs.address }} | ||
| networks: ${{ inputs.networks }} | ||
| secrets: inherit | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
Uh oh!
There was an error while loading. Please reload this page.