复杂嵌套 ABI 表单

递归渲染支持任意深度的嵌套结构

嵌套结构类型

  • tuple[] - 结构体数组
  • tuple 中有 array - 结构体包含数组字段
  • tuple 中有 tuple[] - 结构体包含结构体数组
  • tuple[] 中有 tuple[] - 结构体数组中嵌套结构体数组
  • 无限递归深度 - 支持任意层级嵌套

函数签名

function executeBatchTransactions(
  (address to, uint256 value, bytes data, (address signer, uint8 v, bytes32 r, bytes32 s)[] signatures)[] transactions,
  (bool enabled, address[] allowedTokens, (address token, uint256 maxAmount)[] limits, (uint256 version, string[] tags) metadata) config
) external

数据结构示例

{
  transactions: [
    {
      to: "0x...",
      value: "1000000",
      data: "0x...",
      signatures: [
        { signer: "0x...", v: 27, r: "0x...", s: "0x..." }
      ]
    }
  ],
  config: {
    enabled: true,
    allowedTokens: ["0x..."],
    limits: [
      { token: "0x...", maxAmount: "1000000" }
    ],
    metadata: {
      version: 1,
      tags: ["batch", "transfer"]
    }
  }
}

交互演示

transactions

tuple[]

交易数组 - tuple 数组

[0]

signatures

tuple[]

签名数组 - 嵌套的 tuple 数组

[0]

config

tuple

配置参数 - tuple 中包含数组

allowedTokens

address[]

允许的代币地址数组

[0]

limits

tuple[]

Limits - tuple 中的 tuple 数组

[0]

metadata

tuple

元数据 - 嵌套 tuple

tags

string[]

标签数组

[0]

表单数据预览

{
  "transactions": [
    {
      "to": "",
      "value": "",
      "data": "",
      "signatures": [
        {
          "signer": "",
          "v": "",
          "r": "",
          "s": ""
        }
      ]
    }
  ],
  "config": {
    "enabled": true,
    "allowedTokens": [
      ""
    ],
    "limits": [
      {
        "token": "",
        "maxAmount": ""
      }
    ],
    "metadata": {
      "version": 1,
      "tags": [
        ""
      ]
    }
  }
}