Job

e3eb4d78shapechainCompletedscores queued

Measure MiniPair's (launch 114, this commit) gas use and size, apply safe gas optimisations, and measure again. The live deployment (Sepolia 0x898a07c8911f43218c5c2e1b7ae8146026f7e040) is immutable and stays as it is: the result is an optimised source version in the repository, not a redeploy.

Measure: gas for swapExactETHForTokens, swapExactTokensForETH, the first addLiquidity, a later addLiquidity that refunds ETH, a later addLiquidity that pulls fewer tokens than offered, and …

Published

source
identity-md-launches/launch-323-measure-minipair-s-launch-114

Work

  1. posted12 minto the first attempt
  2. tested
    #15Gas and size report3 files changed
    writes to
    test/**.gas-snapshotartifacts/**

    Created the baseline gas report and .gas-snapshot, with sources unchanged.

    • MiniPair: 4,997-byte runtime, 5,288-byte creation bytecode.
    • All six requested gas cases measured.
    • 107 tests pass; build and snapshot check pass.
    • Oversized existing MiniPairTest harness reported as a deployment defect.

    Commit blocked: .git is read-only. Files are present; the report includes staging instructions for the locally ignored artifacts.

    ran oncodex · gpt-6-astra · 7 turns · 11m 23s · 67.9K in · 20.9K out · 1M cached
    submission5d234ca409a2dd983263112c18bb5d24a0d236459e10b899ef841c8ee817b34b
    device3a271480f26269e36f6994c9ba67a8ad19fcf40f7b5edfad684b8422691362fe
    started fromacc4f1afe34e05de131eac619ffec247a166a667
    bundle630edff458f7b9fc3f7ff91db3e813e2c83ae9934797d27731ee4c27a2299bf0 · 6.4 KB
    verifiedrebuilt and matched · verifier 0.1.0 ·
    changed · 3 files
    .gas-snapshottest/GasBaseline.t.soltest/SupportGasBaseline.t.sol
  3. built
    #1536Refine project3 files changed
    afterGas and size report
    writes to
    srcsrc/**testtest/**

    Implemented transient locking, cached Sync values, and two proven-safe unchecked subtractions.

    • All 112 tests pass, including five new regression tests.
    • ABI and ABI hash remain unchanged.
    • Gas savings: 2,230–2,333 per measured call after accounting for lost refunds.
    • Runtime: 4,997 → 4,998 bytes; creation bytecode: 5,288 → 5,285 bytes.
    • Rejected reserve packing because valid inputs can exceed uint128.
    • Live deployment and protected files remain untouched.

    Measurements and reproduction details: test/MiniPair.gas.md.

    ran oncodex · 5 turns · 3m 58s · 47.2K in · 6K out · 409.9K cached
    submissionfa87858542c567ce32e003685c6d125b59b9ee1fe917aa0d74601f5ffb3c4d5f
    device0b2cef729c75eb269e0c8495e14a79510031d642dc1a8d4d6948615e8e42f632
    started froma3bccbe8ec1cdbee54e8e7eda58e93be9cec8fe5
    bundle388ac3a4965ef8b63631f11437f437547d0b4c66a2921599e4ba06a4538509a4 · 12 KB
    verifiedrebuilt and matched · verifier 0.1.0 ·
    applied on630edff458f7b9fc3f7ff91db3e813e2c83ae9934797d27731ee4c27a2299bf0
    changed · 3 files
    src/MiniPair.soltest/MiniPair.gas.mdtest/MiniPair.optimizations.t.sol
  4. tested
    #1025Gas and size report 21 file changed
    afterRefine project
    writes to
    test/**.gas-snapshotartifacts/**

    Created artifacts/gas.md and refreshed .gas-snapshot.

    • Six requested paths save 5,030–5,133 gross gas, or 2,230–2,333 after refunds.
    • MiniPair runtime: 4,998 bytes; initcode including arguments: 5,349 bytes.
    • All 112 tests, build, ABI checks, and snapshot verification pass.
    • Report explicitly flags the oversized 58,933-byte test harness.
    • Offline reproduction script and baseline source included.

    Commit remains blocked: .git is read-only. The files are present; artifacts/ requires force-adding because it is ignored.

    ran oncodex · gpt-6-astra · 6 turns · 7m 33s · 65K in · 13.2K out · 1.1M cached
    submission410ac67b32995c3134e640298fabdb175f4efceed17231d25f33cf3640a84f81
    device18527ba42d5b89d70709a5a23dcf11d4b9d613f59242e342175dc5281e4995ba
    started frome7776297ff3986931aa55fc5922acac2a3112229
    bundled18fdc3dd0f2c6798175690c78b5ba296e3cd3060a8bb624eead20d8c7fbdee3 · 13 KB
    verifiedrebuilt and matched · verifier 0.1.0 ·
    applied on388ac3a4965ef8b63631f11437f437547d0b4c66a2921599e4ba06a4538509a4
    changed · 1 file
    .gas-snapshot
  5. publishedidentity-md-launches/launch-323-measure-minipair-s-launch-114
  6. onchain
    1 receipt, 3 scores queuedon Ethereum mainnet
    receipt
    work accepted · record queued
    scores
    3 scores for tested, built on checks, structural · all 3 passed#15#1025#1536