Skip to content

Migrate from Gelato to self-hosted transaction relayer - #1030

Merged
nkuba merged 1 commit into
mainfrom
replace-gelato-with-self-hosted-relayer
Apr 26, 2026
Merged

Migrate from Gelato to self-hosted transaction relayer#1030
nkuba merged 1 commit into
mainfrom
replace-gelato-with-self-hosted-relayer

Conversation

@nkuba

@nkuba nkuba commented Apr 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Replace GelatoGaslessTransactionSender (which called @gelatocloud/gasless) with AcreRelayerTransactionSender, a thin client that POSTs {chainId, to, data} to a self-hosted endpoint.
  • Drop @gelatocloud/gasless dependency and the gelatoApiKey argument from Acre.initialize — replaced by relayerUrl.
  • Add VITE_RELAYER_URL to dapp env files; expose it through env.RELAYER_URL and pass it into the SDK init.
  • Bundle a one-line .prettierignore tweak (excludes the local ledger/ Python venv) so the existing pre-commit lint hook passes.

Why

Migrating the dapp's withdrawal relay off Gelato. Biconomy was evaluated as a successor but its current product (AbstractJS / Nexus) requires either a new smart-account model or an EOA — neither matches OrangeKit's Gnosis-Safe-via-Bitcoin-signature setup, and migrating to Nexus would change every user's Ethereum address. A self-hosted relayer (modelled on Mezo's passport-relay) preserves Safe addresses and lets us own the cost / abuse story.

The companion server-side endpoint lives in acre-btc/backend PR — that one must deploy before this one is rolled out.

Notes

  • Frontend env var VITE_GELATO_RELAY_API_KEY is intentionally left in place; it's still consumed by the OrangeKit wagmi connector for connector-internal relay (separate path from the SDK relay we're replacing here). No OrangeKit changes were made.
  • For Netlify-deployed envs, set VITE_RELAYER_URL in the Netlify dashboard for production and staging deploys.

Test plan

  • pnpm --filter @acre-btc/sdk test passes (151 tests, includes 6 new for AcreRelayerTransactionSender).
  • pnpm --filter dapp build succeeds.
  • On Sepolia, with VITE_RELAYER_URL pointing at the deployed staging relayer: connect Bitcoin testnet wallet → deposit (existing path, untouched) → withdraw → confirm tx hash returned, explorer shows the relayer EOA paid gas, the user's Safe is the msg.sender to acreBTC.approveAndCall.
  • After staging soak, flip the production env var and verify mainnet withdrawals.

Replace GelatoGaslessTransactionSender with AcreRelayerTransactionSender
that POSTs {chainId, to, data} to the new acre-api endpoint at
/api/v2/relay/transactions. Drop @gelatocloud/gasless dependency and
the gelatoApiKey argument to Acre.initialize.
@netlify

netlify Bot commented Apr 26, 2026

Copy link
Copy Markdown

Deploy Preview for acre-dapp-v1 ready!

Name Link
🔨 Latest commit 7d6f464
🔍 Latest deploy log https://app.netlify.com/projects/acre-dapp-v1/deploys/69ee7da2490b5c000881015c
😎 Deploy Preview https://deploy-preview-1030--acre-dapp-v1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Apr 26, 2026

Copy link
Copy Markdown

Deploy Preview for acre-dapp-testnet ready!

Name Link
🔨 Latest commit 7d6f464
🔍 Latest deploy log https://app.netlify.com/projects/acre-dapp-testnet/deploys/69ee7da2bcc5df000877aff0
😎 Deploy Preview https://deploy-preview-1030--acre-dapp-testnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Apr 26, 2026

Copy link
Copy Markdown

Deploy Preview for acre-dapp ready!

Name Link
🔨 Latest commit 7d6f464
🔍 Latest deploy log https://app.netlify.com/projects/acre-dapp/deploys/69ee7da2b168d30008e15be1
😎 Deploy Preview https://deploy-preview-1030--acre-dapp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nkuba
nkuba merged commit 75bcd00 into main Apr 26, 2026
34 of 35 checks passed
@nkuba
nkuba deleted the replace-gelato-with-self-hosted-relayer branch April 26, 2026 21:58
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.

1 participant