feat(deposit-address): relay integratorId into v3 execute request#3498
Merged
Conversation
The indexer's /deposit-address-transfers endpoint now exposes integrator attribution on each item, and the quote-api v3 execute endpoint (POST /deposit-addresses/execute) now requires an integratorId (2-byte hex) that folds into the CREATE2 salt + on-chain integrator tag, so v3 addresses are derived per-integrator. Pull integrator.integratorId from the indexer message and relay it verbatim to the execute endpoint. When it's absent or malformed, skip + warn rather than call the API: no funded v3 addresses exist pre-integrator, so a missing id is a data anomaly, and sending one would only derive a different, unfunded address. - Add DepositAddressIntegrator type + optional integrator field on both v1 and v3 message interfaces. - Add required integratorId to DepositAddressExecuteRequest. - Guard initiateDepositV3 on a validated 2-byte-hex integratorId; relay it from _getExecuteTx. - Tests: extend the v3 fixture, assert integratorId in the request mapping, and cover the four skip cases. - Document the relay + guard in the deposit-address README. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
dijanin-brat
approved these changes
Jun 17, 2026
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.
Summary
The indexer now exposes integrator attribution on each
/deposit-address-transfersitem (across-protocol/indexer#1055), and the quote-api v3 execute endpointPOST /deposit-addresses/executenow takes a requiredintegratorId(2-byte hex,^0x[0-9a-fA-F]{4}$) that folds into the CREATE2 salt + on-chain integrator tag — so v3 deposit addresses are derived per-integrator (across-protocol/quote-api#2807).This PR pulls
integrator.integratorIdfrom the indexer message and relays it verbatim to the execute endpoint.Behavior
integratorId(not its own auth key — it sweeps addresses owned by many integrators).Changes
src/interfaces/DepositAddress.ts— newDepositAddressIntegratortype mirroring the indexer DTO; optionalintegratorfield on both v1 and v3 message interfaces (optional for rollout safety).src/clients/AcrossSwapApiClient.ts— requiredintegratorIdonDepositAddressExecuteRequest.src/deposit-address/DepositAddressHandler.ts—INTEGRATOR_ID_REGEXconstant; skip+warn guard ininitiateDepositV3; validatedintegratorIdrelayed from_getExecuteTx(with anassertsafety net so the required field narrows tostring).test/DepositAddressHandler.ts— extended the v3 fixture, assertedintegratorIdin the request-mapping test, and added 4 guard cases (integrator null, integratorId null, non-hex, wrong length).src/deposit-address/README.md— documented the relay + guard in the v3 execute flow.Testing
yarn build— clean.RELAYER_TEST=true yarn hardhat test test/DepositAddressHandler.ts— 20 passing, including the updated mapping test and the 4 new guard cases.🤖 Generated with Claude Code