Skip to content

Commit

Permalink
Change getTokenInfo to view
Browse files Browse the repository at this point in the history
Signed-off-by: Luis Mastrangelo <[email protected]>
  • Loading branch information
acuarica committed Dec 20, 2024
1 parent ae65209 commit 80e83f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ abstract contract HederaTokenService {
/// @param token The ID of the token as a solidity address
/// @dev This function reverts if the call is not successful
function getTokenInfo(address token) internal returns (int responseCode, IHederaTokenService.TokenInfo memory tokenInfo) {
(bool success, bytes memory result) = precompileAddress.call(
(bool success, bytes memory result) = precompileAddress.staticcall(
abi.encodeWithSelector(IHederaTokenService.getTokenInfo.selector, token));
IHederaTokenService.TokenInfo memory defaultTokenInfo;
(responseCode, tokenInfo) = success ? abi.decode(result, (int32, IHederaTokenService.TokenInfo)) : (HederaResponseCodes.UNKNOWN, defaultTokenInfo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ interface IHederaTokenService {
/// @return responseCode The response code for the status of the request. SUCCESS is 22.
/// @return tokenInfo TokenInfo info for `token`
function getTokenInfo(address token)
external
external view
returns (int64 responseCode, TokenInfo memory tokenInfo);

/// Query token KeyValue
Expand Down

0 comments on commit 80e83f3

Please sign in to comment.