@@ -10,17 +10,23 @@ interface ISwapFacet {
1010 /**
1111 * @notice Emitted when swap parameters are set.
1212 * @param uniswapV3Router The Uniswap V3 router address.
13- * @param usdt0 USDT0 token address.
14- * @param wNatUsdt0PoolFeeTierPPM The WNAT/USDT0 pool fee tier (in PPM - supported values: 100, 500, 3000, 10000).
15- * @param usdt0FXrpPoolFeeTierPPM The USDT0/FXRP pool fee tier (in PPM - supported values: 100, 500, 3000, 10000).
13+ * @param stableCoin StableCoin (USDT0, USDX,...) token address.
14+ * @param wNatStableCoinPoolFeeTierPPM The WNAT/StableCoin pool fee tier
15+ (in PPM - supported values: 100, 500, 3000, 10000).
16+ * @param stableCoinFXrpPoolFeeTierPPM The StableCoin/FXRP pool fee tier
17+ (in PPM - supported values: 100, 500, 3000, 10000).
1618 * @param maxSlippagePPM The maximum slippage allowed for swaps (in PPM).
19+ * @param stableCoinUsdFeedId The StableCoin/USD feed ID as in FTSO.
20+ * @param wNatUsdFeedId The WNAT/USD feed ID as in FTSO.
1721 */
1822 event SwapParamsSet (
1923 address uniswapV3Router ,
20- address usdt0 ,
21- uint24 wNatUsdt0PoolFeeTierPPM ,
22- uint24 usdt0FXrpPoolFeeTierPPM ,
23- uint24 maxSlippagePPM
24+ address stableCoin ,
25+ uint24 wNatStableCoinPoolFeeTierPPM ,
26+ uint24 stableCoinFXrpPoolFeeTierPPM ,
27+ uint24 maxSlippagePPM ,
28+ bytes21 stableCoinUsdFeedId ,
29+ bytes21 wNatUsdFeedId
2430 );
2531
2632 /**
@@ -52,48 +58,59 @@ interface ISwapFacet {
5258 error InvalidPoolFeeTierPPM ();
5359
5460 /**
55- * @notice Reverts if the USDT0 token address is invalid.
61+ * @notice Reverts if the feed ID is invalid (cannot be zero) .
5662 */
57- error InvalidUsdt0 ();
63+ error InvalidFeedId ();
64+
65+ /**
66+ * @notice Reverts if the StableCoin (USDT0, USDX,...) token address is invalid.
67+ */
68+ error InvalidStableCoin ();
5869
5970 /**
6071 * @notice Reverts if the maximum slippage in PPM is invalid (must be less than or equal to 1e6).
6172 */
6273 error InvalidMaxSlippagePPM ();
6374
6475 /**
65- * @notice Swaps WNAT for USDT0 for the personal account associated with the given XRPL address.
76+ * @notice Swaps WNAT for StableCoin (USDT0, USDX,...) for the personal account
77+ associated with the given XRPL address.
6678 * @param _xrplAddress The XRPL address of the personal account.
6779 */
68- function swapWNatForUsdt0 (
80+ function swapWNatForStableCoin (
6981 string calldata _xrplAddress
7082 )
7183 external ;
7284
7385 /**
74- * @notice Swaps USDT0 for FAsset for the personal account associated with the given XRPL address.
86+ * @notice Swaps StableCoin (USDT0, USDX,...) for FAsset for the personal account
87+ associated with the given XRPL address.
7588 * @param _xrplAddress The XRPL address of the personal account.
7689 */
77- function swapUsdt0ForFAsset (
90+ function swapStableCoinForFAsset (
7891 string calldata _xrplAddress
7992 )
8093 external ;
8194
8295 /**
8396 * Returns the swap parameters.
8497 * @return _uniswapV3Router The Uniswap V3 router address.
85- * @return _usdt0 USDT0 token address.
86- * @return _wNatUsdt0PoolFeeTierPPM The WNAT/USDT0 pool fee tier (in PPM).
87- * @return _usdt0FXrpPoolFeeTierPPM The USDT0 /FXRP pool fee tier (in PPM).
98+ * @return _stableCoin StableCoin ( USDT0, USDX,...) token address.
99+ * @return _wNatStableCoinPoolFeeTierPPM The WNAT/StableCoin pool fee tier (in PPM).
100+ * @return _stableCoinFXrpPoolFeeTierPPM The StableCoin /FXRP pool fee tier (in PPM).
88101 * @return _maxSlippagePPM The maximum slippage allowed for swaps (in PPM).
102+ * @return _stableCoinUsdFeedId The StableCoin/USD feed ID as in FTSO.
103+ * @return _wNatUsdFeedId The WNAT/USD feed ID as in FTSO.
89104 */
90105 function getSwapParams ()
91106 external view
92107 returns (
93108 address _uniswapV3Router ,
94- address _usdt0 ,
95- uint24 _wNatUsdt0PoolFeeTierPPM ,
96- uint24 _usdt0FXrpPoolFeeTierPPM ,
97- uint24 _maxSlippagePPM
109+ address _stableCoin ,
110+ uint24 _wNatStableCoinPoolFeeTierPPM ,
111+ uint24 _stableCoinFXrpPoolFeeTierPPM ,
112+ uint24 _maxSlippagePPM ,
113+ bytes21 _stableCoinUsdFeedId ,
114+ bytes21 _wNatUsdFeedId
98115 );
99116}
0 commit comments