Repository navigation
Conversation
Stablecoin sends (including Moonpay sells) now use the GaslessTransfer contract and Nimiq relay of NimiqToolbox/gas-abstraction instead of OpenGSN: the relay quotes the fee, the Keyguard signs the transfer intent and a permit via the Hub, and the relay submits it and pays the POL gas. - lib/usdc/Gasless.ts: pins, relay client (@nimiq/gasless-sdk), fee quotes, permit nonce and token domain check, submission with reposts, and corrections that keep a failed payment's nonce. - lib/usdc/GaslessOutcome.ts: ethers v5 port of the SDK's on-chain outcome check (confirmOnChain, waitForTransferOutcome). - stores/GaslessPayments.ts: records each payment's latest signed version before submitting it, until its outcome is final at the finalized block, so that the user never pays twice; resumed on startup. - History: recognize the relay fee of gasless transfers; OpenGSN fee detection is kept for past transactions. - Remove OpenGSN relay selection, fee calculation and relaying, and with it USDC/USDT swaps, HTLC refunds and the USDC.e conversion, which have no gasless replacement yet. Historic swaps are still displayed. - Rename isGasAbstractionUnderMaintenance to isGaslessTransferUnderMaintenance; mainnet stays in maintenance until the relay address and URL are configured. - The local config targets the gas-abstraction Anvil stack. @nimiq/gasless-sdk is referenced as a local file dependency until it is published. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKgXoeSB62akioiTzYya6C
- A send of the same token to the same recipient as a payment that failed (as far as the user was told) is a correction of it, also after a reload or from another flow such as Moonpay, so that at most one executes. - Keep a failed payment for the retry if the user cancels signing, and report an earlier version that executed after all instead of sending again. - Skip the legacy allowance reads of unconfigured OpenGSN contracts, which broke the history sync on local and testnet. - Catch fee quote errors in the network overview. - Moonpay USDC sells used the USDT token contract. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKgXoeSB62akioiTzYya6C
Swaps will move to the new gas abstraction separately, so restore the OpenGSN-based swap, HTLC refund and USDC.e conversion code, their config and the @opengsn/common dependency. Only plain transfers use the gasless relay: - Remove only createTransactionRequest, the OpenGSN transfer request. - isGasAbstractionUnderMaintenance keeps controlling stablecoin swaps; sending is controlled by isGaslessTransferUnderMaintenance. - History sync skips OpenGSN contracts that are not configured, as on the local Anvil stack. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKgXoeSB62akioiTzYya6C
This was referenced Sep 30, 2026
This branch has not been deployed
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.
Stablecoin sends (the send modal and Moonpay sells) now use gasless USDC/USDT0 transfers through the
GaslessTransfercontract and Nimiq relay of NimiqToolbox/gas-abstraction (private) instead of OpenGSN. Mainnet has been in gas abstraction maintenance mode since 2026-09-18. Swaps, HTLC refunds and the USDC.e conversion are unchanged and still use OpenGSN; they move to the new gas abstraction in a follow-up.Part of a coordinated change
@nimiq/hub-apitypes)Release order: Keyguard, then Hub, then Wallet.
Flow
GET /v1/fee, permit mode). The Wallet refuses quotes abovemaxAcceptableFee(0.50); the Keyguard applies the same limit.DOMAIN_SEPARATOR()against the pins.signPolygonTransactionwith aSignPolygonGaslessTransferRequest).POST /v1/transfer), re-posting after unclear answers. It waits until the transfer is mined and parses the receipt'sTransferRelayedevent.Never paying twice
Every version of a payment keeps its intent nonce, so at most one executes (see the SDK's "Failures, retries and replacements").
stores/GaslessPayments.tsrecords each payment's latest signed version before it is submitted, until its outcome is final at the finalized block. It keeps no signatures. It is persisted, and on startup the outcome checks resume.lib/usdc/GaslessOutcome.tsis an ethers v5 port of the SDK'sconfirmOnChain/waitForTransferOutcome. The Wallet doesn't use viem.Other changes
polygon.gasless(relay URL, contract, relay addresses, deploy block, fee limits). Sending is controlled by the newisGaslessTransferUnderMaintenance;isGasAbstractionUnderMaintenancestill controls swaps. The local config targets the gas-abstraction Anvil stack.createTransactionRequest, the OpenGSN transfer request.Before merging
polygon.gasless.relayUrlandrelaysinconfig.mainnet.ts(TODOs), then setisGaslessTransferUnderMaintenance: false."@nimiq/gasless-sdk": "file:../gas-abstraction/sdk"with the published package. A clean install fails without the sibling checkout.@nimiq/hub-apito the version released from Gasless USDC/USDT0 transfers (replaces OpenGSN for transfers) hub#592. Locally, this was tested withyarn link.fee_too_lowandsender_busycorrections, relay restart, reload during a pending payment), then a mainnet canary from team accounts.Open points
balance − feeif needed, as before. A Moonpay deposit would then arrive short; refusing may be better.waitForTransferOutcomehas no per-request time budget like the SDK, so a hung RPC can stall that background check.Testing
tsc(the onlysrc/errors are the two inrouter.tsthat also exist onmaster),yarn lint, testnet build.🤖 Generated with Claude Code
https://claude.ai/code/session_01AKgXoeSB62akioiTzYya6C