const bundle = await client.getBundleData(
{
chainId: 1,
fromAddress: "0x93621DCA56fE26Cdee86e4F6B18E116e9758Ff11",
spender: "0x93621DCA56fE26Cdee86e4F6B18E116e9758Ff11",
routingStrategy: "router",
},
[
{
protocol: "enso",
action: "route",
args: {
tokenIn: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", // USDC on mainnet
amountIn: "1000000000", // 1000 USDC
tokenOut: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", // ETH
},
},
{
protocol: "enso",
action: "fee",
args: {
token: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
amount: { useOutputOfCallAt: 0 },
bps: 25,
receiver: "0x93621DCA56fE26Cdee86e4F6B18E116e9758Ff11", // Fee receiver
},
},
{
protocol: "stargate",
action: "bridge",
args: {
primaryAddress: "0x77b2043768d28e9c9ab44e1abfc95944bce57931",
destinationChainId: 8453,
tokenIn: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
amountIn: { useOutputOfCallAt: 1 },
receiver: "0x93621DCA56fE26Cdee86e4F6B18E116e9758Ff11",
callback: [
{
protocol: "enso",
action: "balance",
args: {
token: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
},
},
{
protocol: "enso",
action: "split",
args: {
tokenIn: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
tokenOut: [
"0x50c5725949a6f0c72e6c4a641f24049a917db0cb",
"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
],
amountIn: { useOutputOfCallAt: 0 },
},
},
{
protocol: "enso",
action: "slippage",
args: {
amountOut: { useOutputOfCallAt: 1, index: 0 },
bps: 50,
},
},
{
protocol: "enso",
action: "slippage",
args: {
amountOut: { useOutputOfCallAt: 1, index: 1 },
bps: 50,
},
},
{
protocol: "uniswap-v4",
action: "depositclmm",
args: {
tokenOut: "0x7c5f5a4bbd8fd63184577525326123b519429bdc",
ticks: [-276842, -275842],
tokenIn: [
"0x50c5725949a6f0c72e6c4a641f24049a917db0cb",
"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
],
poolFee: "100",
amountIn: [
{ useOutputOfCallAt: 1, index: 0 },
{ useOutputOfCallAt: 1, index: 1 },
],
},
},
{
protocol: "enso",
action: "slippage",
args: {
amountOut: { useOutputOfCallAt: 4 },
bps: 200,
},
},
],
},
},
],
);