Skip to main content

Learn how to set up gasless transactions

· 2 min read
Nacho Iacovino

Learn how to setup gas-less transactions with thirdweb.

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, {
gasless: {
openzeppelin: {
relayerUrl: "https://api.defender.openzeppelin.com/autotasks/...",
},
},
});

Check the code on GitHub.