fix(sdks): include source content in sourcemaps #17
Workflow file for this run
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
| name: "Lock Bytecode Consistency" | |
| # CONSISTENCY GATE (Gap 1) — proves the committed lock-recipient creation bytecode in | |
| # sdks/liquidity-launcher-sdk actually matches a fresh build of the liquidity-launcher | |
| # contracts at the commit it claims to be pinned to. If someone edits the pin or the | |
| # bytecode and forgets to regenerate (or hand-edits the hex), this job fails the PR. | |
| # | |
| # It rebuilds the three periphery recipients from source and diffs the result against the | |
| # committed constants + keccak pins via `bun run check:lock-bytecode` (script's --check | |
| # mode). Nothing is written; the job only reports pass/fail. | |
| # | |
| # Runs only when the package changes (path filter) — this is not needed on unrelated PRs. | |
| on: | |
| pull_request: | |
| paths: | |
| - "sdks/liquidity-launcher-sdk/**" | |
| workflow_dispatch: {} | |
| permissions: | |
| contents: read | |
| jobs: | |
| check-lock-bytecode: | |
| name: Verify lock-recipient bytecode matches the pinned commit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: bullfrogsec/bullfrog@dcde5841b19b7ef693224207a7fdec67fce604db # v0.8.3 | |
| with: | |
| egress-policy: audit | |
| - name: ✅ Checkout sdks | |
| uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 | |
| with: | |
| persist-credentials: false | |
| - name: 💽 Setup Node | |
| uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 | |
| with: | |
| node-version: 24 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@ecf28ddc73e819eb6fa29df6b34ef8921c743461 # v2 | |
| with: | |
| bun-version: 1.3.10 | |
| - name: 📥 Install dependencies | |
| run: bun install --frozen-lockfile | |
| env: | |
| HUSKY: "0" | |
| - name: 🪨 Install Foundry | |
| uses: foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de # v1 | |
| with: | |
| version: nightly | |
| - name: 📌 Read the pinned launcher commit from the bytecode header | |
| id: pin | |
| run: | | |
| # Single source of truth: the "Pinned to liquidity-launcher commit <sha>" line | |
| # in the committed bytecode file. Keeps the pin human-readable and reviewable. | |
| sha=$(grep -oE 'Pinned to liquidity-launcher commit [0-9a-f]{40}' \ | |
| sdks/liquidity-launcher-sdk/src/lockRecipientBytecode.ts | grep -oE '[0-9a-f]{40}') | |
| if [ -z "$sha" ]; then echo "could not read pinned commit"; exit 1; fi | |
| echo "sha=$sha" >> "$GITHUB_OUTPUT" | |
| echo "Pinned launcher commit: $sha" | |
| - name: ⬇️ Clone liquidity-launcher (with public submodules over https) | |
| run: | | |
| # The launcher's OpenZeppelin (and other) submodules are declared with | |
| # git@github.com: SSH URLs. Rewrite them to https BEFORE any submodule init so | |
| # the runner (which has no SSH key) can fetch these public repos. The regenerate | |
| # script runs `git submodule update --init --recursive` for us. | |
| git config --global url."https://github.com/".insteadOf "git@github.com:" | |
| git clone https://github.com/Uniswap/liquidity-launcher.git "$RUNNER_TEMP/liquidity-launcher" | |
| - name: 🔎 Check committed bytecode against the pinned commit's build | |
| working-directory: sdks/liquidity-launcher-sdk | |
| env: | |
| LAUNCHER_REPO: ${{ runner.temp }}/liquidity-launcher | |
| LAUNCHER_COMMIT: ${{ steps.pin.outputs.sha }} | |
| # Pin solc to the version the committed bytecode was produced with. Without this | |
| # forge would auto-resolve the newest solc satisfying ^0.8.26, whose different | |
| # metadata hash would make the bytecode diff spuriously. forge's --use accepts a | |
| # bare version string and downloads it on demand (the script forwards SOLC_PATH | |
| # straight to `forge build --use`). | |
| SOLC_PATH: "0.8.35" | |
| run: bun run check:lock-bytecode |