[{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"manager","type":"address"},{"internalType":"address","name":"staff","type":"address"},{"internalType":"address","name":"worker","type":"address"},{"internalType":"address","name":"_supervisor","type":"address"},{"internalType":"uint32","name":"_chainId","type":"uint32"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_aggregator","type":"address"}],"name":"AggregatorSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"enum XSwapper.CloseSwapResult","name":"_swapResult","type":"uint8"},{"indexed":false,"internalType":"uint32","name":"_fromChainId","type":"uint32"},{"indexed":false,"internalType":"uint256","name":"_fromSwapId","type":"uint256"}],"name":"CloseSwapCompleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"_toChainId","type":"uint32"},{"indexed":false,"internalType":"address","name":"_YPoolToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"_gas","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_min","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_max","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_rate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_decimals","type":"uint256"}],"name":"FeeStructureSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"enum XSwapper.CompleteSwapType","name":"_closeType","type":"uint8"},{"components":[{"internalType":"uint32","name":"toChainId","type":"uint32"},{"internalType":"uint256","name":"swapId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"YPoolTokenAmount","type":"uint256"},{"internalType":"uint256","name":"xyFee","type":"uint256"},{"internalType":"uint256","name":"gasFee","type":"uint256"},{"internalType":"contract IERC20","name":"YPoolToken","type":"address"},{"internalType":"enum XSwapper.RequestStatus","name":"status","type":"uint8"}],"indexed":false,"internalType":"struct XSwapper.SwapRequest","name":"_swapRequest","type":"tuple"}],"name":"SwapCompleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_swapId","type":"uint256"},{"components":[{"internalType":"uint32","name":"toChainId","type":"uint32"},{"internalType":"contract IERC20","name":"toChainToken","type":"address"},{"internalType":"uint256","name":"expectedToChainTokenAmount","type":"uint256"},{"internalType":"uint32","name":"slippage","type":"uint32"}],"indexed":false,"internalType":"struct XSwapper.ToChainDescription","name":"_toChainDesc","type":"tuple"},{"indexed":false,"internalType":"contract IERC20","name":"_fromToken","type":"address"},{"indexed":false,"internalType":"contract IERC20","name":"_YPoolToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"_YPoolTokenAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"_receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"_xyFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_gasFee","type":"uint256"}],"name":"SwapRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_swapValidatorXYChain","type":"address"}],"name":"SwapValidatorXYChainSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IERC20","name":"_fromToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"_fromTokenAmount","type":"uint256"},{"indexed":false,"internalType":"contract IERC20","name":"_toToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"_toTokenAmountOut","type":"uint256"},{"indexed":false,"internalType":"address","name":"_receiver","type":"address"}],"name":"SwappedForUser","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_supportedToken","type":"address"},{"indexed":false,"internalType":"address","name":"_vault","type":"address"},{"indexed":false,"internalType":"bool","name":"_isSet","type":"bool"}],"name":"YPoolVaultSet","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ETHER_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROLE_MANAGER","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROLE_OWNER","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROLE_STAFF","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROLE_YPOOL_WORKER","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"YPoolSupportedToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"YPoolVaults","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"aggregator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_swapIds","type":"uint256[]"},{"internalType":"address","name":"_YPoolToken","type":"address"},{"internalType":"bytes[]","name":"signatures","type":"bytes[]"}],"name":"batchClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"chainId","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_swapId","type":"uint256"},{"internalType":"bytes[]","name":"signatures","type":"bytes[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"contract IERC20","name":"fromToken","type":"address"},{"internalType":"contract IERC20","name":"toToken","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"minReturnAmount","type":"uint256"}],"internalType":"struct IAggregator.SwapDescription","name":"swapDesc","type":"tuple"},{"internalType":"bytes","name":"aggregatorData","type":"bytes"},{"internalType":"uint32","name":"fromChainId","type":"uint32"},{"internalType":"uint256","name":"fromSwapId","type":"uint256"}],"name":"closeSwap","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"feeStructures","outputs":[{"internalType":"bool","name":"isSet","type":"bool"},{"internalType":"uint256","name":"gas","type":"uint256"},{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"},{"internalType":"uint256","name":"rate","type":"uint256"},{"internalType":"uint256","name":"decimals","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_chainId","type":"uint32"},{"internalType":"uint256","name":"_swapId","type":"uint256"}],"name":"getEverClosed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_chainId","type":"uint32"},{"internalType":"address","name":"_token","type":"address"}],"name":"getFeeStructure","outputs":[{"components":[{"internalType":"bool","name":"isSet","type":"bool"},{"internalType":"uint256","name":"gas","type":"uint256"},{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"},{"internalType":"uint256","name":"rate","type":"uint256"},{"internalType":"uint256","name":"decimals","type":"uint256"}],"internalType":"struct XSwapper.FeeStructure","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_swapId","type":"uint256"}],"name":"getSwapRequest","outputs":[{"components":[{"internalType":"uint32","name":"toChainId","type":"uint32"},{"internalType":"uint256","name":"swapId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"YPoolTokenAmount","type":"uint256"},{"internalType":"uint256","name":"xyFee","type":"uint256"},{"internalType":"uint256","name":"gasFee","type":"uint256"},{"internalType":"contract IERC20","name":"YPoolToken","type":"address"},{"internalType":"enum XSwapper.RequestStatus","name":"status","type":"uint8"}],"internalType":"struct XSwapper.SwapRequest","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"fromChainId","type":"uint32"},{"internalType":"uint256","name":"fromSwapId","type":"uint256"},{"internalType":"bytes[]","name":"signatures","type":"bytes[]"}],"name":"lockCloseSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"maxYPoolTokenSwapAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_swapId","type":"uint256"},{"internalType":"address","name":"gasFeeReceiver","type":"address"},{"internalType":"bytes[]","name":"signatures","type":"bytes[]"}],"name":"refund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20[]","name":"tokens","type":"address[]"}],"name":"rescue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_aggregator","type":"address"}],"name":"setAggregator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_toChainId","type":"uint32"},{"internalType":"address","name":"_supportedToken","type":"address"},{"internalType":"uint256","name":"_gas","type":"uint256"},{"internalType":"uint256","name":"_min","type":"uint256"},{"internalType":"uint256","name":"_max","type":"uint256"},{"internalType":"uint256","name":"rate","type":"uint256"},{"internalType":"uint256","name":"decimals","type":"uint256"}],"name":"setFeeStructure","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_supportedToken","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setMaxYPoolTokenSwapAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_swapValidatorXYChain","type":"address"}],"name":"setSwapValidatorXYChain","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_supportedToken","type":"address"},{"internalType":"address","name":"_vault","type":"address"},{"internalType":"bool","name":"_isSet","type":"bool"}],"name":"setYPoolVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"supervisor","outputs":[{"internalType":"contract Supervisor","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"contract IERC20","name":"fromToken","type":"address"},{"internalType":"contract IERC20","name":"toToken","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"minReturnAmount","type":"uint256"}],"internalType":"struct IAggregator.SwapDescription","name":"swapDesc","type":"tuple"},{"internalType":"bytes","name":"aggregatorData","type":"bytes"},{"components":[{"internalType":"uint32","name":"toChainId","type":"uint32"},{"internalType":"contract IERC20","name":"toChainToken","type":"address"},{"internalType":"uint256","name":"expectedToChainTokenAmount","type":"uint256"},{"internalType":"uint32","name":"slippage","type":"uint32"}],"internalType":"struct XSwapper.ToChainDescription","name":"toChainDesc","type":"tuple"}],"name":"swap","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"swapId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"swapRequests","outputs":[{"internalType":"uint32","name":"toChainId","type":"uint32"},{"internalType":"uint256","name":"swapId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"YPoolTokenAmount","type":"uint256"},{"internalType":"uint256","name":"xyFee","type":"uint256"},{"internalType":"uint256","name":"gasFee","type":"uint256"},{"internalType":"contract IERC20","name":"YPoolToken","type":"address"},{"internalType":"enum XSwapper.RequestStatus","name":"status","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapValidatorXYChain","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]