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