thirdweb

Learn how to set up gasless transactions

Learn how to set up gasless transactions

Last updated:

November 4, 2021

Setup gas-less transactions with thirdweb.

Jake Loo

Learn more about Gassless User Experience here.

Gasless Transactions require a Relayer to forward the transactions to the blockchain and pay the gas costs.

Relayer can be self-managed or through various service providers:

Using OpenZeppelin Defender

To setup gasless transaction using OpenZeppelin Defender we would need to setup Autotask and Relay.

  1. Sign up for OpenZeppelin Defender
  2. Create a Relayer in the Dashboard under Relay.
    • Name: your desire name for the relayer
    • Network: the network that you want the relayer to operates in
  3. Deposit gas funds into the Relayer. Transferring ETH / MATIC into the Relayer address.
  4. Create an Autotask in the Dashboard under Autotask.
    • Name: your desire name for the autotask.
    • Trigger: set to Webhook
    • Connect to a relayer: Select the Relayer you just created.
    • Code: Copy the code from our GitHub and paste it in the Code box.
  5. Copy the Webhook URI from the Autotask dashboard.
  6. Paste the Webhook URI into the SDK constructor options. For example:
new ThirdwebSDK(signerOrProvider, { transactionRelayerUrl: "https://api.defender.openzeppelin.com/autotasks/...", });

Check the code on GitHub.


Ready to build your first web3 app? Get early access & add web3 features to your project today.

Jake Loo

Contents

Using OpenZeppelin Defender