POST
/
api
/
v1
/
account
/
batchCalls
curl --location --request POST 'https://groupos.xyz/api/v1/account/batchCalls' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
    "chainId": 5
    "accountAddress": "0x67F4732266C7300cca593C814d46bee72e40659F",
    "calls": [
      {
        "toAddress": "0xc517c83f417b73dA98647dad0FCB80af9f3b9531",
        "value": "420",
      },
      {
        "toAddress": "0xc517c83f417b73dA98647dad0FCB80af9f3b9531",
        "data": "0xf26152fc2b7d18cbec5134bf34da6d94c34456114a1c07b1ee8ba95e1cd78bef",
      },
    ]
}'
{
  "success": true,
  "transactionHash": "0x58c789b7a59312ec0a659e165700db54af896d3e8b46e4aeecb33b32b88157c9",
  "transactionUrl": "https://goerli.etherscan.io/tx/0xef737091d8c3451b42659688abd86b51516a6b43ee7dbdbda53c9005d86167db"
}

How to batch-execute calls from an Account

Once you have an Account smart contract, you can execute any arbitrary batch of calls atomically. Batching calls is helpful for making multiple state changes in one transaction for cost savings and guarantees that either all calls will successfully complete, or none of them will. A call is defined by three parameters, the address you are calling, how much network token (e.g. ETH) to send, and the data that is an ABI-encoded function and arguments.

Transactions are submitted through our ERC-4337 bundler system which abstracts away the need for your accounts or your users to provide gas. Depending on your billing settings, the cost will be rolled up monthly to your developer account.

Body

chainId
number
required

The id of the chain supporting the NFT. This cannot be changed after creation.

accountAddress
string
required

The Account smart contract address to mint with.

calls
Call[]
required

The calls to execute.

Response

success
boolean

Indicates whether the call was successful.

transactionHash
string

Transaction hash for the newly created token.

transactionUrl
string

Wraps transactionHash with the appropriate network-specific URL for convenience.