import { ERC20ABI as e } from "../../../externalABIs/index.mjs";
import { getContractAddress as t } from "../../utils/getContractAddress.mjs";
import { ethers as n } from "ethers";
//#region libs/shared/common/src/functions/web3/functionCalls/constructBatchCall.ts
var r = (t, r) => new n.Interface(e).encodeFunctionData("approve", [t, r]), i = (e, t, n, r) => r.encodeFunctionData("transact", [
	e[0],
	e[1],
	e[2],
	t,
	n
]), a = (e, t, n, r, i) => i.encodeFunctionData("prooflessDeposit", [
	e,
	t,
	n,
	r
]), o = (e, t, i, a, o, s) => {
	let c = [];
	for (let a = 0; a < e.length; a += 1) {
		let o = e[a], s = t[a];
		o !== n.ZeroAddress && s > 0n && c.push({
			to: o,
			value: "0x0",
			data: r(i, s)
		});
	}
	return c.push({
		to: a,
		value: s > 0n ? `0x${s.toString(16)}` : "0x0",
		data: o
	}), c;
}, s = (e, a, o, s, c, l, u, d) => {
	let f = [];
	for (let t = 0; t < e.length; t += 1) {
		let i = e[t], s = a[t];
		i !== n.ZeroAddress && s > 0n && f.push({
			to: i,
			value: "0x0",
			data: r(o, s)
		});
	}
	return f.push({
		to: t(s),
		value: d > 0n ? `0x${d.toString(16)}` : "0x0",
		data: i(c, l, u, s.interface)
	}), f;
}, c = (e, t, n, r, i, a, o, s) => e.encodeFunctionData("prooflessDeposit", [
	t,
	n,
	r,
	i,
	a,
	o,
	s
]), l = (e, t, n, r, i, a, s, l, u, d, f, p) => o(e, t, n, n, c(r, i, a, s, l, u, d, f), p), u = (e, n, r, i, s, c, l, u, d) => {
	let f = a(s, c, l, u, i.interface);
	return o(e, n, r, t(i), f, d);
};
//#endregion
export { l as buildApproveAndDepositWrapperCalls, u as buildApproveAndProoflessDepositCalls, s as buildApproveAndTransactCalls };
