From 85e39a8d13ef3511bbbf7eac5a640afa148ae48b Mon Sep 17 00:00:00 2001 From: 0xneves Date: Sun, 16 Jun 2024 18:25:29 +0700 Subject: [PATCH] docs: adding natspec param for core functions --- contracts/interfaces/ISwaplace.sol | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/contracts/interfaces/ISwaplace.sol b/contracts/interfaces/ISwaplace.sol index bc6f217..131232d 100644 --- a/contracts/interfaces/ISwaplace.sol +++ b/contracts/interfaces/ISwaplace.sol @@ -40,6 +40,8 @@ interface ISwaplace { * - `biding` and `asking` must not be empty. * * Emits a {SwapCreated} event. + * + * @param Swap is the Swap struct to be created. */ function createSwap( ISwap.Swap calldata Swap @@ -60,6 +62,9 @@ interface ISwaplace { * * NOTE: The expiry is set to 0, because if the Swap is expired it * will revert, preventing reentrancy attacks. + * + * @param swapId is the ID of the Swap to be accepted. + * @param receiver is the address that will receive the trading assets. */ function acceptSwap( uint256 swapId, @@ -78,6 +83,8 @@ interface ISwaplace { * - `expiry` must be bigger than timestamp. * * Emits a {SwapCanceled} event. + * + * @param swapId is the ID of the Swap to be canceled. */ function cancelSwap(uint256 swapId) external; @@ -87,6 +94,8 @@ interface ISwaplace { * NOTE: If the Swaps doesn't exist, the values will be defaulted to 0. * You can check if a Swap exists by checking if the `owner` is the zero address. * If the `owner` is the zero address, then the Swap doesn't exist. + * + * @param swapId is the ID of the Swap to be retrieved. */ function getSwap(uint256 swapId) external view returns (ISwap.Swap memory); }