Skip to main content

yield_setup_relay

Free — No payment required.
Relay a client-signed EIP-7702 setup transaction to enable smart wallet delegation for yield operations. When yield_prepare returns needsSetup: true, the agent must sign a setup transaction and submit it through this tool. The server validates the setup ticket, broadcasts the signed transaction to a test RPC, waits for confirmation, and verifies that delegation and module initialization succeeded. Two setup types are supported:
  • full — First-time setup. Signs a Type-4 (EIP-7702) transaction with authorization_list to delegate the EOA to the Nexus smart account and initialize modules.
  • modules — Re-initialization only. Signs a Type-2 (EIP-1559) self-call when delegation already exists but modules need setup.

Parameters

setupTicket
object
required
Setup ticket returned by yield_prepare when needsSetup is true. Contains:
  • version — Always 1
  • walletAddress — Agent EOA address (0x...)
  • chainId — Target chain ID
  • implementation — Nexus smart account implementation address
  • initCalldataHashkeccak256 of the setup calldata
  • setupType"full" or "modules"
  • expiresAt — ISO 8601 expiry timestamp
signedRawTx
string
required
Signed raw transaction hex (0x...). Must be:
  • Type-4 with authorization_list for setupType: "full"
  • Type-2 or Type-4 for setupType: "modules"
  • A self-call (to == walletAddress)
  • Signed by the wallet specified in setupTicket.walletAddress
confirmations
number
Number of block confirmations to wait for (1–10, default: 2).

Response

{
  "txHash": "0x9c3ec6d6de7b3b4f0f6f19d9d8a73f0f9f77a17f5d5f3ea0c9f234569c0b8e72",
  "receiptStatus": "success",
  "blockNumber": "28430172",
  "relayMode": "fork-only",
  "setupType": "full",
  "delegationVerified": true,
  "modulesVerified": true,
  "verifiedImplementation": "0x000000004F43C49e93C970E84001853a70923B03",
  "setupRequired": "none",
  "verificationChecks": [
    "ticket-not-expired",
    "chain-active",
    "implementation-match",
    "tx-type-valid",
    "chain-id-match",
    "self-call",
    "calldata-hash-match",
    "auth-list-valid",
    "signer-match",
    "tx-broadcast",
    "receipt-success",
    "delegation-verified"
  ]
}
After a successful relay, call yield_prepare again to get the deposit/redeem/rebalance payload — setup is now complete.

Typical flow

  1. Call yield_prepare — receives needsSetup: true with setupTicket
  2. Sign the setup transaction locally (Type-4 for full, Type-2 for modules)
  3. Call yield_setup_relay with the ticket and signed transaction
  4. Call yield_prepare again — receives the execution payload with needsSetup: false