IMirrorgateRouter.sol 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. // SPDX-License-Identifier: BUSL-1.1
  2. pragma solidity 0.7.6;
  3. pragma abicoder v2;
  4. interface IMirrorgateRouter {
  5. struct lzTxObj {
  6. uint256 dstGasForCall;
  7. uint256 dstNativeAmount;
  8. bytes dstNativeAddr;
  9. }
  10. function addLiquidity(
  11. uint256 _poolId,
  12. uint256 _amountLD,
  13. address _to
  14. ) external;
  15. function swap(
  16. uint16 _dstChainId,
  17. uint256 _srcPoolId,
  18. uint256 _dstPoolId,
  19. address payable _refundAddress,
  20. uint256 _amountLD,
  21. uint256 _minAmountLD,
  22. lzTxObj memory _lzTxParams,
  23. bytes calldata _to,
  24. bytes calldata _payload
  25. ) external payable;
  26. function redeemRemote(
  27. uint16 _dstChainId,
  28. uint256 _srcPoolId,
  29. uint256 _dstPoolId,
  30. address payable _refundAddress,
  31. uint256 _amountLP,
  32. uint256 _minAmountLD,
  33. bytes calldata _to,
  34. lzTxObj memory _lzTxParams
  35. ) external payable;
  36. function instantRedeemLocal(
  37. uint16 _srcPoolId,
  38. uint256 _amountLP,
  39. address _to
  40. ) external returns (uint256);
  41. function redeemLocal(
  42. uint16 _dstChainId,
  43. uint256 _srcPoolId,
  44. uint256 _dstPoolId,
  45. address payable _refundAddress,
  46. uint256 _amountLP,
  47. bytes calldata _to,
  48. lzTxObj memory _lzTxParams
  49. ) external payable;
  50. function sendCredits(
  51. uint16 _dstChainId,
  52. uint256 _srcPoolId,
  53. uint256 _dstPoolId,
  54. address payable _refundAddress
  55. ) external payable;
  56. function quoteLayerZeroFee(
  57. uint16 _dstChainId,
  58. uint8 _functionType,
  59. bytes calldata _toAddress,
  60. bytes calldata _transferAndCallPayload,
  61. lzTxObj memory _lzTxParams
  62. ) external view returns (uint256, uint256);
  63. }