# Batch Transactions

You can also do batch transactions through the Bastion SDK.

Some great use cases for batch transactions are airdrops, transferring tokens to multiple addresses, 'approve and transferFrom' in the same transaction.

```typescript
const bastion = new Bastion();
const bastionConnect = await bastion.bastionConnect;

const CONFIG = {
	chainId: <chain_id>, // optional
	privateKey: <your_private_key>, //optional
	rpcUrl: <RPC_URL>, //optional
	apiKey: <your_api_key> //required
};			
bastionConnect.init(<your_web3Provider>, CONFIG);

// ... Other Transaction and contract details

const transfer1 = {
	to: contractAddress,
	value: 0,
	data: erc721Contract.interface.encodeFunctionData("transferFrom", [fromAddress, toAddress, 46]),
};

const transfer2 = {
	to: contractAddress,
	value: 0,
	data: erc721Contract.interface.encodeFunctionData("transferFrom", [fromAddress, toAddress, 47]),
};

const transactionArray = [transfer1, transfer2];
const res = await bastionConnect.executeBatch(transactionArray);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bastionwallet.io/bastion-sdk/guides/batch-transactions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
