Skip to content

Instantly share code, notes, and snippets.

@vnavascues
Created March 10, 2026 16:16
Show Gist options
  • Select an option

  • Save vnavascues/57965958131af6d74d37cc7835972e0b to your computer and use it in GitHub Desktop.

Select an option

Save vnavascues/57965958131af6d74d37cc7835972e0b to your computer and use it in GitHub Desktop.

Flow 1

arb:pyusd -bridge-> eth:pyusd -swap-> eth:usds -swap-> eth:usdc -bridge-> arb:usdc

curl -X 'POST' \
'https://api.enso.finance/api/v1/shortcuts/bundle?chainId=42161&fromAddress=0xd8da6bf26964af9d7eed9e03e53415d37aa96045&referralCode=0123456789ABCDEF&routingStrategy=router&receiver=0xd8da6bf26964af9d7eed9e03e53415d37aa96045' \
-H 'accept: application/json' \
-H 'Authorization: Bearer 1e02632d-6feb-4a75-a157-documentation' \
-H 'Content-Type: application/json' \
-d '[
   {
      "protocol":"enso",
      "action":"route",
      "args":{
         "slippage":"1",
         "tokenIn":"0x46850ad61c2b7d64d08c9c754f45254596696984",
         "tokenOut":"0x6c3ea9036406852006290770bedfcaba0e23a0e8",
         "amountIn":"10000000000",
         "destinationChainId":1,
         "refundReceiver":"0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
      }
   },
   {
      "protocol":"enso",
      "action":"route",
      "args":{
         "slippage":"1",
         "tokenIn":"0x6c3ea9036406852006290770bedfcaba0e23a0e8",
         "tokenOut":"0xdC035D45d973E3EC169d2276DDab16f1e407384F",
         "amountIn":{
            "useOutputOfCallAt":0
         },
         "receiver":"0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
      }
   },
   {
      "protocol":"enso",
      "action":"route",
      "args":{
         "slippage":"1",
         "tokenIn":"0xdC035D45d973E3EC169d2276DDab16f1e407384F",
         "tokenOut":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
         "amountIn":{
            "useOutputOfCallAt":1
         },
         "receiver":"0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
      }
   },
   {
      "protocol":"stargate",
      "action":"bridge",
      "args":{
         "primaryAddress":"0xc026395860db2d07ee33e05fe50ed7bd583189c7",
         "destinationChainId":"42161",
         "tokenIn":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
         "amountIn":{
            "useOutputOfCallAt":2
         },
         "receiver":"0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
      }
   }
]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment