executeBatch method
Executes a batch transaction on the network.
Implementation
Future<IUserOperationBuilder> executeBatch(
List<Call> calls,
) async {
final data = multisend.self.function('multiSend').encodeCall([
Uint8List.fromList(calls
.expand(
(e) => AbiUtil.solidityPack(
[
"uint8",
"address",
"uint256",
"uint256",
"bytes",
],
[
0,
e.to.addressBytes,
e.value,
e.data.length,
e.data,
],
),
)
.toList()),
]);
return setCallData(
bytesToHex(
proxy.self.function('execute').encodeCall(
[
multisend.self.address,
BigInt.zero,
data,
BigInt.one,
],
),
include0x: true,
),
);
}