From 19bc5a4f6443d19bbf219ca9a6c676e4b000c000 Mon Sep 17 00:00:00 2001 From: nikolay Date: Mon, 7 Aug 2023 18:45:23 +0300 Subject: [PATCH] Add comments Signed-off-by: nikolay --- contracts/hts-precompile/HederaTokenService.sol | 2 ++ contracts/hts-precompile/IHederaTokenService.sol | 3 +++ 2 files changed, 5 insertions(+) diff --git a/contracts/hts-precompile/HederaTokenService.sol b/contracts/hts-precompile/HederaTokenService.sol index 8c1765a7a..ecc89d7ce 100644 --- a/contracts/hts-precompile/HederaTokenService.sol +++ b/contracts/hts-precompile/HederaTokenService.sol @@ -660,6 +660,8 @@ abstract contract HederaTokenService { /// Redirect for token /// @param token The token address /// @param encodedFunctionSelector The function selector from the ERC20 interface + the bytes input for the function called + /// @return responseCode The response code for the status of the request. SUCCESS is 22. + /// @return response The result of the call that had been encoded and sent for execution. function redirectForToken(address token, bytes memory encodedFunctionSelector) external returns (int responseCode, bytes memory response) { (bool success, bytes memory result) = precompileAddress.call( abi.encodeWithSelector(IHederaTokenService.redirectForToken.selector, token, encodedFunctionSelector) diff --git a/contracts/hts-precompile/IHederaTokenService.sol b/contracts/hts-precompile/IHederaTokenService.sol index ff334cd7f..951cfe0ec 100644 --- a/contracts/hts-precompile/IHederaTokenService.sol +++ b/contracts/hts-precompile/IHederaTokenService.sol @@ -796,6 +796,9 @@ interface IHederaTokenService { (int64 responseCode, int32 tokenType); /// Initiates a Redirect For Token + /// @param token The token address /// @param encodedFunctionSelector The function selector from the ERC20 interface + the bytes input for the function called + /// @return responseCode The response code for the status of the request. SUCCESS is 22. + /// @return response The result of the call that had been encoded and sent for execution. function redirectForToken(address token, bytes memory encodedFunctionSelector) external returns (int64 responseCode, bytes memory response); }