fix(intuition): read mainnet Safe messages so mainnet delegations publish - #16
Open
jeremie-olivier wants to merge 1 commit into
Open
fix(intuition): read mainnet Safe messages so mainnet delegations publish#16jeremie-olivier wants to merge 1 commit into
jeremie-olivier wants to merge 1 commit into
Conversation
…lish TX_SERVICE_URL had no entry for chain 1, so txServiceUrl(1) returned null and getSafeMessage bailed before any request. The publisher then rejected a perfectly valid mainnet delegation with "message not found on the Safe Transaction Service" — a misleading error, since the message exists and is finalized; we simply never looked for it. Ethereum is in SUPPORTED_CHAINS and SELECTABLE_CHAINS, so every mainnet delegation hits this, not just the one that surfaced it. The legacy per-chain host is used to match the existing entries; it 308-redirects to api.safe.global/tx-service/eth and fetch follows that with no API key. Verified against a real finalized mainnet delegation (Safe 0x39d84e41EAc6F94709d3715fe5E367F4e6B83f80, message 0x82009c44ad31833c6eb904c6e808c4b4543ebf18bd51097e33c46517584b7131) by running the publisher pipeline short of the mint: message fetched, struct reconstructed with the salt and aggregated signature intact, EIP-1271 returned 0x1626ba7e against the Safe on mainnet, token resolved to USDC, and the DelegationJson document built. Verified: tsc -b clean, bun run build, lint clean on the changed file. The one failing unit test (stream-amounts) is pre-existing on main. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
The preview deployment for Hourglass is ready. 🟢 Open Preview | Open Build Logs | Open Application Logs Last updated at: 2026-07-25 16:46:21 CET |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
POST /intuition/publishrejects every Ethereum mainnet delegation with:The message is there and finalized — we just never look for it.
TX_SERVICE_URL(src/lib/safe-messages.ts) maps Base Sepolia, Sepolia and Base but not chain 1, sotxServiceUrl(1)returnsnullandgetSafeMessagebails before issuing a request. The publisher surfaces that as "not found", which points the reader at the tx-service rather than at our map.Ethereum is in both
SUPPORTED_CHAINSandSELECTABLE_CHAINS, so this affects every mainnet delegation, not just the one that surfaced it.Change
One entry:
Legacy per-chain host, to match the existing entries. It 308-redirects to
api.safe.global/tx-service/eth,fetchfollows it transparently, and no API key is required (verified). The comment above the map now states the invariant — it must cover every signable chain inSUPPORTED_CHAINS— so the next chain added doesn't repeat this.Verification
Ran the publisher's pipeline locally against a real finalized mainnet delegation, stopping short of the mint (Safe
0x39d84e41EAc6F94709d3715fe5E367F4e6B83f80, message0x82009c44ad31833c6eb904c6e808c4b4543ebf18bd51097e33c46517584b7131):DelegationStruct0x1626ba7e— passstream / 3001.536 USDC / monthDelegationJsonEverything downstream of the map already worked; this was the only blocker.
Checks:
tsc -bclean,bun run buildok, lint clean on the changed file.bun run test:unitshows 138 pass / 1 fail — the failure (test/unit/stream-amounts.test.ts:109,streamedAvailable) is pre-existing onmain, reproduces with this change stashed, and is untouched here.Deploy note
The fix only takes effect on https://hourglass.box after a redeploy. Worth flagging before anyone re-pokes:
/intuition/healthreports"network":"mainnet", so a publish spends real $TRUST, not testnet tTRUST —server/README.mdframes the accepted abuse risk (ADR 0005) on the assumption of a testnet-only attestor. That assumption is now stale and probably deserves its own look.🤖 Generated with Claude Code