{
  "_format": "hh-sol-artifact-1",
  "contractName": "IDCAHubCompanion",
  "sourceName": "contracts/interfaces/IDCAHubCompanion.sol",
  "abi": [
    {
      "inputs": [],
      "name": "UnauthorizedCaller",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "contract IDCAHub",
          "name": "hub",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "from",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        },
        {
          "internalType": "uint32",
          "name": "amountOfSwaps",
          "type": "uint32"
        },
        {
          "internalType": "uint32",
          "name": "swapInterval",
          "type": "uint32"
        },
        {
          "internalType": "address",
          "name": "owner",
          "type": "address"
        },
        {
          "components": [
            {
              "internalType": "address",
              "name": "operator",
              "type": "address"
            },
            {
              "internalType": "enum IDCAPermissionManager.Permission[]",
              "name": "permissions",
              "type": "uint8[]"
            }
          ],
          "internalType": "struct IDCAPermissionManager.PermissionSet[]",
          "name": "permissions",
          "type": "tuple[]"
        },
        {
          "internalType": "bytes",
          "name": "miscellaneous",
          "type": "bytes"
        }
      ],
      "name": "deposit",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "positionId",
          "type": "uint256"
        }
      ],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "contract IDCAHub",
          "name": "hub",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "from",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "internalType": "uint32",
          "name": "amountOfSwaps",
          "type": "uint32"
        },
        {
          "internalType": "uint32",
          "name": "swapInterval",
          "type": "uint32"
        },
        {
          "internalType": "address",
          "name": "owner",
          "type": "address"
        },
        {
          "components": [
            {
              "internalType": "address",
              "name": "operator",
              "type": "address"
            },
            {
              "internalType": "enum IDCAPermissionManager.Permission[]",
              "name": "permissions",
              "type": "uint8[]"
            }
          ],
          "internalType": "struct IDCAPermissionManager.PermissionSet[]",
          "name": "permissions",
          "type": "tuple[]"
        },
        {
          "internalType": "bytes",
          "name": "miscellaneous",
          "type": "bytes"
        }
      ],
      "name": "depositWithBalanceOnContract",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "positionId",
          "type": "uint256"
        }
      ],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "contract IDCAHub",
          "name": "hub",
          "type": "address"
        },
        {
          "components": [
            {
              "internalType": "address",
              "name": "tokenA",
              "type": "address"
            },
            {
              "internalType": "address",
              "name": "tokenB",
              "type": "address"
            }
          ],
          "internalType": "struct Pair[]",
          "name": "pairs",
          "type": "tuple[]"
        },
        {
          "internalType": "bool",
          "name": "calculatePrivilegedAvailability",
          "type": "bool"
        },
        {
          "internalType": "bytes",
          "name": "oracleData",
          "type": "bytes"
        }
      ],
      "name": "getNextSwapInfo",
      "outputs": [
        {
          "components": [
            {
              "components": [
                {
                  "internalType": "address",
                  "name": "token",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "reward",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "toProvide",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "platformFee",
                  "type": "uint256"
                }
              ],
              "internalType": "struct IDCAHubSwapHandler.TokenInSwap[]",
              "name": "tokens",
              "type": "tuple[]"
            },
            {
              "components": [
                {
                  "internalType": "address",
                  "name": "tokenA",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "tokenB",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "totalAmountToSwapTokenA",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "totalAmountToSwapTokenB",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "ratioAToB",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "ratioBToA",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes1",
                  "name": "intervalsInSwap",
                  "type": "bytes1"
                }
              ],
              "internalType": "struct IDCAHubSwapHandler.PairInSwap[]",
              "name": "pairs",
              "type": "tuple[]"
            }
          ],
          "internalType": "struct IDCAHubSwapHandler.SwapInfo",
          "name": "",
          "type": "tuple"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "contract IDCAHub",
          "name": "hub",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "positionId",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        },
        {
          "internalType": "uint32",
          "name": "newSwaps",
          "type": "uint32"
        }
      ],
      "name": "increasePosition",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "contract IDCAHub",
          "name": "hub",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "positionId",
          "type": "uint256"
        },
        {
          "internalType": "uint32",
          "name": "newSwaps",
          "type": "uint32"
        }
      ],
      "name": "increasePositionWithBalanceOnContract",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "contract ILegacyDCAHub",
          "name": "hub",
          "type": "address"
        },
        {
          "components": [
            {
              "internalType": "address",
              "name": "tokenA",
              "type": "address"
            },
            {
              "internalType": "address",
              "name": "tokenB",
              "type": "address"
            }
          ],
          "internalType": "struct Pair[]",
          "name": "pairs",
          "type": "tuple[]"
        }
      ],
      "name": "legacyGetNextSwapInfo",
      "outputs": [
        {
          "components": [
            {
              "components": [
                {
                  "internalType": "address",
                  "name": "token",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "reward",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "toProvide",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "platformFee",
                  "type": "uint256"
                }
              ],
              "internalType": "struct ILegacyDCAHub.TokenInSwap[]",
              "name": "tokens",
              "type": "tuple[]"
            },
            {
              "components": [
                {
                  "internalType": "address",
                  "name": "tokenA",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "tokenB",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "ratioAToB",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "ratioBToA",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes1",
                  "name": "intervalsInSwap",
                  "type": "bytes1"
                }
              ],
              "internalType": "struct ILegacyDCAHub.PairInSwap[]",
              "name": "pairs",
              "type": "tuple[]"
            }
          ],
          "internalType": "struct ILegacyDCAHub.SwapInfo",
          "name": "",
          "type": "tuple"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "contract IDCAPermissionManager",
          "name": "permissionManager",
          "type": "address"
        },
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "tokenId",
              "type": "uint256"
            },
            {
              "components": [
                {
                  "internalType": "address",
                  "name": "operator",
                  "type": "address"
                },
                {
                  "internalType": "enum IDCAPermissionManager.Permission[]",
                  "name": "permissions",
                  "type": "uint8[]"
                }
              ],
              "internalType": "struct IDCAPermissionManager.PermissionSet[]",
              "name": "permissionSets",
              "type": "tuple[]"
            }
          ],
          "internalType": "struct IDCAPermissionManager.PositionPermissions[]",
          "name": "permissions",
          "type": "tuple[]"
        },
        {
          "internalType": "uint256",
          "name": "deadline",
          "type": "uint256"
        },
        {
          "internalType": "uint8",
          "name": "v",
          "type": "uint8"
        },
        {
          "internalType": "bytes32",
          "name": "r",
          "type": "bytes32"
        },
        {
          "internalType": "bytes32",
          "name": "s",
          "type": "bytes32"
        }
      ],
      "name": "multiPermissionPermit",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "contract IDCAPermissionManager",
          "name": "permissionManager",
          "type": "address"
        },
        {
          "components": [
            {
              "internalType": "address",
              "name": "operator",
              "type": "address"
            },
            {
              "internalType": "enum IDCAPermissionManager.Permission[]",
              "name": "permissions",
              "type": "uint8[]"
            }
          ],
          "internalType": "struct IDCAPermissionManager.PermissionSet[]",
          "name": "permissions",
          "type": "tuple[]"
        },
        {
          "internalType": "uint256",
          "name": "tokenId",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "deadline",
          "type": "uint256"
        },
        {
          "internalType": "uint8",
          "name": "v",
          "type": "uint8"
        },
        {
          "internalType": "bytes32",
          "name": "r",
          "type": "bytes32"
        },
        {
          "internalType": "bytes32",
          "name": "s",
          "type": "bytes32"
        }
      ],
      "name": "permissionPermit",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "contract IDCAHub",
          "name": "hub",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "positionId",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        },
        {
          "internalType": "uint32",
          "name": "newSwaps",
          "type": "uint32"
        },
        {
          "internalType": "address",
          "name": "recipient",
          "type": "address"
        }
      ],
      "name": "reducePosition",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "contract IDCAHub",
          "name": "hub",
          "type": "address"
        },
        {
          "components": [
            {
              "internalType": "address",
              "name": "tokenA",
              "type": "address"
            },
            {
              "internalType": "address",
              "name": "tokenB",
              "type": "address"
            }
          ],
          "internalType": "struct Pair[]",
          "name": "pairs",
          "type": "tuple[]"
        },
        {
          "internalType": "bool",
          "name": "calculatePrivilegedAvailability",
          "type": "bool"
        }
      ],
      "name": "secondsUntilNextSwap",
      "outputs": [
        {
          "internalType": "uint256[]",
          "name": "",
          "type": "uint256[]"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "contract IDCAHub",
          "name": "hub",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "positionId",
          "type": "uint256"
        },
        {
          "internalType": "address",
          "name": "recipientUnswapped",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "recipientSwapped",
          "type": "address"
        }
      ],
      "name": "terminate",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "unswapped",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "swapped",
          "type": "uint256"
        }
      ],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "contract IDCAHub",
          "name": "hub",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "positionId",
          "type": "uint256"
        },
        {
          "internalType": "address",
          "name": "recipient",
          "type": "address"
        }
      ],
      "name": "withdrawSwapped",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "swapped",
          "type": "uint256"
        }
      ],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "contract IDCAHub",
          "name": "hub",
          "type": "address"
        },
        {
          "components": [
            {
              "internalType": "address",
              "name": "token",
              "type": "address"
            },
            {
              "internalType": "uint256[]",
              "name": "positionIds",
              "type": "uint256[]"
            }
          ],
          "internalType": "struct IDCAHubPositionHandler.PositionSet[]",
          "name": "positions",
          "type": "tuple[]"
        },
        {
          "internalType": "address",
          "name": "recipient",
          "type": "address"
        }
      ],
      "name": "withdrawSwappedMany",
      "outputs": [
        {
          "internalType": "uint256[]",
          "name": "withdrawn",
          "type": "uint256[]"
        }
      ],
      "stateMutability": "payable",
      "type": "function"
    }
  ],
  "bytecode": "0x",
  "deployedBytecode": "0x",
  "linkReferences": {},
  "deployedLinkReferences": {}
}
