You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following getter functions are marked as non-view in the IHederaTokenService interface.
function getApproved(addresstoken, uint256serialNumber) externalreturns (int64responseCode, addressapproved);
function isApprovedForAll(addresstoken, addressowner, addressoperator) externalreturns (int64responseCode, boolapproved);
function isFrozen(addresstoken, addressaccount) externalreturns (int64responseCode, boolfrozen);
function isKyc(addresstoken, addressaccount) externalreturns (int64responseCode, boolkycGranted);
function getTokenCustomFees(addresstoken) externalreturns (int64responseCode, FixedFee[] memoryfixedFees, FractionalFee[] memoryfractionalFees, RoyaltyFee[] memoryroyaltyFees);
function getTokenDefaultFreezeStatus(addresstoken) externalreturns (int64responseCode, booldefaultFreezeStatus);
function getTokenDefaultKycStatus(addresstoken) externalreturns (int64responseCode, booldefaultKycStatus);
function getTokenExpiryInfo(addresstoken) externalreturns (int64responseCode, Expiry memoryexpiry);
function getFungibleTokenInfo(addresstoken) externalreturns (int64responseCode, FungibleTokenInfo memoryfungibleTokenInfo);
function getTokenInfo(addresstoken) externalreturns (int64responseCode, TokenInfo memorytokenInfo);
function getTokenKey(addresstoken, uintkeyType) externalreturns (int64responseCode, KeyValue memorykey);
function getNonFungibleTokenInfo(addresstoken, int64serialNumber) externalreturns (int64responseCode, NonFungibleTokenInfo memorynonFungibleTokenInfo);
function isToken(addresstoken) externalreturns (int64responseCode, boolisToken);
function getTokenType(addresstoken) externalreturns (int64responseCode, int32tokenType);
However, because they are getters, they should not modify the token state, and hence they should be marked as view. This will improve usability because view functions are less restrictive, meaning they can be called from both view and non-view functions. Moreover, by making them view functions, they can be also called using eth_call RPC method to retrieve the corresponding value.
These methods should support being called as view. We need to ensure that no client code needs to be modified to ensure compatibility.
The text was updated successfully, but these errors were encountered:
The following getter functions are marked as non-
view
in theIHederaTokenService
interface.However, because they are getters, they should not modify the token state, and hence they should be marked as
view
. This will improve usability becauseview
functions are less restrictive, meaning they can be called from bothview
and non-view
functions. Moreover, by making themview
functions, they can be also called usingeth_call
RPC method to retrieve the corresponding value.These methods should support being called as
view
. We need to ensure that no client code needs to be modified to ensure compatibility.The text was updated successfully, but these errors were encountered: