synapsecns/sanguine

View on GitHub
packages/synapse-interface/scripts/abi/SynapseCCTPRouter.json

Summary

Maintainability
Test Coverage
[
  {
    "inputs": [
      { "internalType": "address", "name": "_synapseCCTP", "type": "address" }
    ],
    "stateMutability": "nonpayable",
    "type": "constructor"
  },
  { "inputs": [], "name": "DeadlineExceeded", "type": "error" },
  { "inputs": [], "name": "InsufficientOutputAmount", "type": "error" },
  { "inputs": [], "name": "MsgValueIncorrect", "type": "error" },
  { "inputs": [], "name": "PoolNotFound", "type": "error" },
  { "inputs": [], "name": "TokenAddressMismatch", "type": "error" },
  { "inputs": [], "name": "TokenNotContract", "type": "error" },
  { "inputs": [], "name": "TokenNotETH", "type": "error" },
  { "inputs": [], "name": "TokensIdentical", "type": "error" },
  { "inputs": [], "name": "UnknownRequestAction", "type": "error" },
  {
    "inputs": [
      { "internalType": "address", "name": "recipient", "type": "address" },
      { "internalType": "address", "name": "tokenIn", "type": "address" },
      { "internalType": "uint256", "name": "amountIn", "type": "uint256" },
      { "internalType": "address", "name": "tokenOut", "type": "address" },
      { "internalType": "bytes", "name": "rawParams", "type": "bytes" }
    ],
    "name": "adapterSwap",
    "outputs": [
      { "internalType": "uint256", "name": "amountOut", "type": "uint256" }
    ],
    "stateMutability": "payable",
    "type": "function"
  },
  {
    "inputs": [
      { "internalType": "address", "name": "recipient", "type": "address" },
      { "internalType": "uint256", "name": "chainId", "type": "uint256" },
      { "internalType": "address", "name": "token", "type": "address" },
      { "internalType": "uint256", "name": "amount", "type": "uint256" },
      {
        "components": [
          {
            "internalType": "address",
            "name": "routerAdapter",
            "type": "address"
          },
          { "internalType": "address", "name": "tokenOut", "type": "address" },
          {
            "internalType": "uint256",
            "name": "minAmountOut",
            "type": "uint256"
          },
          { "internalType": "uint256", "name": "deadline", "type": "uint256" },
          { "internalType": "bytes", "name": "rawParams", "type": "bytes" }
        ],
        "internalType": "struct SwapQuery",
        "name": "originQuery",
        "type": "tuple"
      },
      {
        "components": [
          {
            "internalType": "address",
            "name": "routerAdapter",
            "type": "address"
          },
          { "internalType": "address", "name": "tokenOut", "type": "address" },
          {
            "internalType": "uint256",
            "name": "minAmountOut",
            "type": "uint256"
          },
          { "internalType": "uint256", "name": "deadline", "type": "uint256" },
          { "internalType": "bytes", "name": "rawParams", "type": "bytes" }
        ],
        "internalType": "struct SwapQuery",
        "name": "destQuery",
        "type": "tuple"
      }
    ],
    "name": "bridge",
    "outputs": [],
    "stateMutability": "payable",
    "type": "function"
  },
  {
    "inputs": [
      { "internalType": "address", "name": "token", "type": "address" },
      { "internalType": "uint256", "name": "amount", "type": "uint256" },
      { "internalType": "bool", "name": "isSwap", "type": "bool" }
    ],
    "name": "calculateFeeAmount",
    "outputs": [
      { "internalType": "uint256", "name": "fee", "type": "uint256" }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      { "internalType": "address", "name": "token", "type": "address" }
    ],
    "name": "feeStructures",
    "outputs": [
      { "internalType": "uint40", "name": "relayerFee", "type": "uint40" },
      { "internalType": "uint72", "name": "minBaseFee", "type": "uint72" },
      { "internalType": "uint72", "name": "minSwapFee", "type": "uint72" },
      { "internalType": "uint72", "name": "maxFee", "type": "uint72" }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      { "internalType": "address", "name": "tokenOut", "type": "address" }
    ],
    "name": "getConnectedBridgeTokens",
    "outputs": [
      {
        "components": [
          { "internalType": "string", "name": "symbol", "type": "string" },
          { "internalType": "address", "name": "token", "type": "address" }
        ],
        "internalType": "struct BridgeToken[]",
        "name": "tokens",
        "type": "tuple[]"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "components": [
          { "internalType": "string", "name": "symbol", "type": "string" },
          { "internalType": "uint256", "name": "amountIn", "type": "uint256" }
        ],
        "internalType": "struct DestRequest[]",
        "name": "requests",
        "type": "tuple[]"
      },
      { "internalType": "address", "name": "tokenOut", "type": "address" }
    ],
    "name": "getDestinationAmountOut",
    "outputs": [
      {
        "components": [
          {
            "internalType": "address",
            "name": "routerAdapter",
            "type": "address"
          },
          { "internalType": "address", "name": "tokenOut", "type": "address" },
          {
            "internalType": "uint256",
            "name": "minAmountOut",
            "type": "uint256"
          },
          { "internalType": "uint256", "name": "deadline", "type": "uint256" },
          { "internalType": "bytes", "name": "rawParams", "type": "bytes" }
        ],
        "internalType": "struct SwapQuery[]",
        "name": "destQueries",
        "type": "tuple[]"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      { "internalType": "address", "name": "tokenIn", "type": "address" },
      {
        "internalType": "string[]",
        "name": "tokenSymbols",
        "type": "string[]"
      },
      { "internalType": "uint256", "name": "amountIn", "type": "uint256" }
    ],
    "name": "getOriginAmountOut",
    "outputs": [
      {
        "components": [
          {
            "internalType": "address",
            "name": "routerAdapter",
            "type": "address"
          },
          { "internalType": "address", "name": "tokenOut", "type": "address" },
          {
            "internalType": "uint256",
            "name": "minAmountOut",
            "type": "uint256"
          },
          { "internalType": "uint256", "name": "deadline", "type": "uint256" },
          { "internalType": "bytes", "name": "rawParams", "type": "bytes" }
        ],
        "internalType": "struct SwapQuery[]",
        "name": "originQueries",
        "type": "tuple[]"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "synapseCCTP",
    "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
    "stateMutability": "view",
    "type": "function"
  },
  { "stateMutability": "payable", "type": "receive" }
]