Enable Relaying Using EIP-7702

To batch transactions and use gas‑sponsored UserOperations with Zircuit you must first delegate your account to the Zircuit Relayer Account via an EIP‑7702 SetCode transaction. The guide below shows how to do this securely with Foundry’s cast CLI—without ever pasting your private key into the browser.

Why Delegation Is Required

EIP‑7702 lets you temporarily replace your externally‑owned account’s code for a single transaction batch—perfect for ERC‑4337 wallets. Until mainstream wallets such as MetaMask or Rabby add native support for sending a SetCode transaction to arbitrary addresses, you have to perform the delegation yourself.

Security Principles

  • Never paste your private key into any website form or browser console.

  • Export the key only in a hardened, preferably offline shell session.

  • Once delegation is confirmed, remove the key from your environment.

Prerequisites

Foundry must be installed as described in the official installation guide here.

1

Export your private key in a local terminal

export PRIVATE_KEY=0xYOUR_PRIVATE_KEY
2

Send the SetCode transaction to delegate to ZircuitRelayerAccount

cast send $(cast az) --auth <ZIRCUIT_RELAYER_ADDRESS> --private-key $PRIVATE_KEY --rpc-url https://mainnet.zircuit.com
3

Verify the delegation on https://explorer.zircuit.com, verifying your address has been successfully delegated

Next Steps

Contract Details

Zircuit Relayer Account address:

Garfield Testnet: 0xD4f99Ef25e5aAB3A0575D9C2dB2E4f09f18442D8

Last updated

Was this helpful?