Skip to content

feat(ts-sdk): waitlist deposit builders - #267

Merged
abresas merged 1 commit into
mainfrom
feat/ts-sdk-waitlist-deposit
Aug 6, 2026
Merged

feat(ts-sdk): waitlist deposit builders#267
abresas merged 1 commit into
mainfrom
feat/ts-sdk-waitlist-deposit

Conversation

@abresas

@abresas abresas commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

What

Two pure tx-request builders in /write for the canary waitlist deposit flow (real USDC on the source chain instead of the mint faucet):

  • buildApprove(token, spender, amount) — the ERC-20 approval, step 1
  • buildWaitlistDeposit({waitlist, token, amount, from, to?, callContract?, reserveBalance?, permit?}) — the waitlist deposit(...) call, step 2

Both return {to, data, value} for the consumer's wallet to sign and send on the source chain, matching the existing encode-only style (no wallet, no keys, no transport). Defaults: to = from, callContract = the CLOB (credit lands as trading balance), reserveBalance = 10000, permit = 0x.

Relayer tooling for the same contract is a follow-up: #268 (protocol/scripts/apply-deposit.sh).

Why

The trading app's canary environment replaces the Mint button with a Deposit flow (approve + deposit through the waitlist contract on Arbitrum One); per the repo split, everything that encodes protocol calls belongs here. Frontend PR: podnetwork/frontend#14 — it needs these released to npm and the @pod-network/trade-sdk version bumped.

Testing

  • npm run build clean; encoding verified against the deployed canary waitlist: replaying a pending deposit's decoded values reproduces its stored depositHashes entry exactly.

🤖 Generated with Claude Code

Canary environments fund accounts with a real USDC deposit on the source
chain instead of the mint faucet. Add the two pure encoders the flow needs,
matching the existing build-only style (no wallet, no keys):

- buildApprove(token, spender, amount) — the ERC-20 approval, step 1
- buildWaitlistDeposit({waitlist, token, amount, from, ...}) — the waitlist
  deposit(...) call, step 2; callContract defaults to the CLOB so the credit
  lands as trading balance, reserveBalance to 10000, permit to 0x

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@abresas
abresas merged commit 88056b5 into main Aug 6, 2026
10 checks passed
abresas added a commit that referenced this pull request Aug 6, 2026
Adds the waitlist deposit builders (buildApprove, buildWaitlistDeposit)
from #267.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
poszu added a commit that referenced this pull request Aug 10, 2026
`0.2.0` shipped from main while this was open (`fa7fbac`, carrying the waitlist deposit
builders from #267), so the version this branch had claimed is now published and cannot be
reused — a publish from here would 403. Rebased onto the release and bumped past it.

Minor rather than patch because this is breaking, which pre-1.0 is what a minor bump says:
`Order.amendRejected` is gone (the refusal moved to `OrderEvent.amendRejection`), and
`pod_orders` is gone from `Channel`. Anyone on `0.2.0` reading either needs to move.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants