{
  "_format": "hh-sol-artifact-1",
  "contractName": "SwapHubBase",
  "sourceName": "contracts/cross-chain/swap-hub/SwapHubBase.sol",
  "abi": [
    {
      "inputs": [],
      "name": "InsufficientTokenReceived",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "InvalidNonce",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "InvalidSignature",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "MessageExpired",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "Unauthorized",
      "type": "error"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "owner",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint32",
          "name": "boxId",
          "type": "uint32"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "requestId",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "nonce",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "bridgeExtRouter",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "token",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amountBridge",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amountFee",
          "type": "uint256"
        }
      ],
      "name": "BridgeToken",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [],
      "name": "EIP712DomainChanged",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint8",
          "name": "version",
          "type": "uint8"
        }
      ],
      "name": "Initialized",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "previousOwner",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "newOwner",
          "type": "address"
        }
      ],
      "name": "OwnershipTransferred",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "executor",
          "type": "address"
        }
      ],
      "name": "SetExecutor",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "proposer",
          "type": "address"
        }
      ],
      "name": "SetProposer",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "owner",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint32",
          "name": "boxId",
          "type": "uint32"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "requestId",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "nonce",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "tokenSpent",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amountSpent",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "tokenReceived",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "netTokenReceived",
          "type": "uint256"
        }
      ],
      "name": "SwapToken",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "owner",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint32",
          "name": "boxId",
          "type": "uint32"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "requestId",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "nonce",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "token",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amountWithdraw",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amountFee",
          "type": "uint256"
        }
      ],
      "name": "WithdrawToken",
      "type": "event"
    },
    {
      "inputs": [],
      "name": "DEPOSIT_BOX_FACTORY",
      "outputs": [
        {
          "internalType": "contract IPDepositBoxFactory",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "TREASURY",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "components": [
            {
              "components": [
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "internalType": "uint32",
                  "name": "boxId",
                  "type": "uint32"
                },
                {
                  "internalType": "uint256",
                  "name": "expiry",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "requestId",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "nonce",
                  "type": "uint256"
                }
              ],
              "internalType": "struct IPCrossChainSwapHub.BoxPermit",
              "name": "permit",
              "type": "tuple"
            },
            {
              "internalType": "address",
              "name": "token",
              "type": "address"
            },
            {
              "internalType": "uint256",
              "name": "amountBridge",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "amountFee",
              "type": "uint256"
            },
            {
              "internalType": "address",
              "name": "bridgeExtRouter",
              "type": "address"
            },
            {
              "internalType": "address",
              "name": "bridgeApprove",
              "type": "address"
            },
            {
              "internalType": "bytes",
              "name": "bridgeCalldata",
              "type": "bytes"
            }
          ],
          "internalType": "struct IPCrossChainSwapHub.BridgeTokenMessage",
          "name": "message",
          "type": "tuple"
        },
        {
          "internalType": "bytes",
          "name": "signature",
          "type": "bytes"
        }
      ],
      "name": "bridgeToken",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "claimOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "eip712Domain",
      "outputs": [
        {
          "internalType": "bytes1",
          "name": "fields",
          "type": "bytes1"
        },
        {
          "internalType": "string",
          "name": "name",
          "type": "string"
        },
        {
          "internalType": "string",
          "name": "version",
          "type": "string"
        },
        {
          "internalType": "uint256",
          "name": "chainId",
          "type": "uint256"
        },
        {
          "internalType": "address",
          "name": "verifyingContract",
          "type": "address"
        },
        {
          "internalType": "bytes32",
          "name": "salt",
          "type": "bytes32"
        },
        {
          "internalType": "uint256[]",
          "name": "extensions",
          "type": "uint256[]"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "executor",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "components": [
            {
              "internalType": "address",
              "name": "owner",
              "type": "address"
            },
            {
              "internalType": "uint32",
              "name": "boxId",
              "type": "uint32"
            },
            {
              "internalType": "uint256",
              "name": "expiry",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "requestId",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "nonce",
              "type": "uint256"
            }
          ],
          "internalType": "struct IPCrossChainSwapHub.BoxPermit",
          "name": "permit",
          "type": "tuple"
        }
      ],
      "name": "hashBoxPermit",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "",
          "type": "bytes32"
        }
      ],
      "stateMutability": "pure",
      "type": "function"
    },
    {
      "inputs": [
        {
          "components": [
            {
              "components": [
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "internalType": "uint32",
                  "name": "boxId",
                  "type": "uint32"
                },
                {
                  "internalType": "uint256",
                  "name": "expiry",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "requestId",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "nonce",
                  "type": "uint256"
                }
              ],
              "internalType": "struct IPCrossChainSwapHub.BoxPermit",
              "name": "permit",
              "type": "tuple"
            },
            {
              "internalType": "address",
              "name": "tokenSpent",
              "type": "address"
            },
            {
              "internalType": "uint256",
              "name": "amountSpent",
              "type": "uint256"
            },
            {
              "internalType": "address",
              "name": "tokenReceived",
              "type": "address"
            },
            {
              "internalType": "uint256",
              "name": "minReceived",
              "type": "uint256"
            },
            {
              "internalType": "address",
              "name": "swapExtRouter",
              "type": "address"
            },
            {
              "internalType": "address",
              "name": "swapApprove",
              "type": "address"
            },
            {
              "internalType": "bytes",
              "name": "swapCalldata",
              "type": "bytes"
            }
          ],
          "internalType": "struct IPCrossChainSwapHub.SwapTokenMessage",
          "name": "ms",
          "type": "tuple"
        }
      ],
      "name": "hashTypedData",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "",
          "type": "bytes32"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "components": [
            {
              "components": [
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "internalType": "uint32",
                  "name": "boxId",
                  "type": "uint32"
                },
                {
                  "internalType": "uint256",
                  "name": "expiry",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "requestId",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "nonce",
                  "type": "uint256"
                }
              ],
              "internalType": "struct IPCrossChainSwapHub.BoxPermit",
              "name": "permit",
              "type": "tuple"
            },
            {
              "internalType": "address",
              "name": "token",
              "type": "address"
            },
            {
              "internalType": "uint256",
              "name": "amountWithdraw",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "amountFee",
              "type": "uint256"
            }
          ],
          "internalType": "struct IPCrossChainSwapHub.WithdrawTokenMessage",
          "name": "ms",
          "type": "tuple"
        }
      ],
      "name": "hashTypedData",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "",
          "type": "bytes32"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "components": [
            {
              "components": [
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "internalType": "uint32",
                  "name": "boxId",
                  "type": "uint32"
                },
                {
                  "internalType": "uint256",
                  "name": "expiry",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "requestId",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "nonce",
                  "type": "uint256"
                }
              ],
              "internalType": "struct IPCrossChainSwapHub.BoxPermit",
              "name": "permit",
              "type": "tuple"
            },
            {
              "internalType": "address",
              "name": "token",
              "type": "address"
            },
            {
              "internalType": "uint256",
              "name": "amountBridge",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "amountFee",
              "type": "uint256"
            },
            {
              "internalType": "address",
              "name": "bridgeExtRouter",
              "type": "address"
            },
            {
              "internalType": "address",
              "name": "bridgeApprove",
              "type": "address"
            },
            {
              "internalType": "bytes",
              "name": "bridgeCalldata",
              "type": "bytes"
            }
          ],
          "internalType": "struct IPCrossChainSwapHub.BridgeTokenMessage",
          "name": "ms",
          "type": "tuple"
        }
      ],
      "name": "hashTypedData",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "",
          "type": "bytes32"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "owner",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "pendingOwner",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "proposer",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "requestId",
          "type": "uint256"
        }
      ],
      "name": "requestNonce",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "nonce",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "executor_",
          "type": "address"
        }
      ],
      "name": "setExecutor",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "proposer_",
          "type": "address"
        }
      ],
      "name": "setProposer",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "components": [
            {
              "components": [
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "internalType": "uint32",
                  "name": "boxId",
                  "type": "uint32"
                },
                {
                  "internalType": "uint256",
                  "name": "expiry",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "requestId",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "nonce",
                  "type": "uint256"
                }
              ],
              "internalType": "struct IPCrossChainSwapHub.BoxPermit",
              "name": "permit",
              "type": "tuple"
            },
            {
              "internalType": "address",
              "name": "tokenSpent",
              "type": "address"
            },
            {
              "internalType": "uint256",
              "name": "amountSpent",
              "type": "uint256"
            },
            {
              "internalType": "address",
              "name": "tokenReceived",
              "type": "address"
            },
            {
              "internalType": "uint256",
              "name": "minReceived",
              "type": "uint256"
            },
            {
              "internalType": "address",
              "name": "swapExtRouter",
              "type": "address"
            },
            {
              "internalType": "address",
              "name": "swapApprove",
              "type": "address"
            },
            {
              "internalType": "bytes",
              "name": "swapCalldata",
              "type": "bytes"
            }
          ],
          "internalType": "struct IPCrossChainSwapHub.SwapTokenMessage",
          "name": "message",
          "type": "tuple"
        },
        {
          "internalType": "bytes",
          "name": "signature",
          "type": "bytes"
        }
      ],
      "name": "swapToken",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "newOwner",
          "type": "address"
        },
        {
          "internalType": "bool",
          "name": "direct",
          "type": "bool"
        },
        {
          "internalType": "bool",
          "name": "renounce",
          "type": "bool"
        }
      ],
      "name": "transferOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "components": [
            {
              "components": [
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "internalType": "uint32",
                  "name": "boxId",
                  "type": "uint32"
                },
                {
                  "internalType": "uint256",
                  "name": "expiry",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "requestId",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "nonce",
                  "type": "uint256"
                }
              ],
              "internalType": "struct IPCrossChainSwapHub.BoxPermit",
              "name": "permit",
              "type": "tuple"
            },
            {
              "internalType": "address",
              "name": "token",
              "type": "address"
            },
            {
              "internalType": "uint256",
              "name": "amountWithdraw",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "amountFee",
              "type": "uint256"
            }
          ],
          "internalType": "struct IPCrossChainSwapHub.WithdrawTokenMessage",
          "name": "message",
          "type": "tuple"
        },
        {
          "internalType": "bytes",
          "name": "signature",
          "type": "bytes"
        }
      ],
      "name": "withdrawToken",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }
  ],
  "bytecode": "0x",
  "deployedBytecode": "0x",
  "linkReferences": {},
  "deployedLinkReferences": {}
}
