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
Specifically, contract calls that interact with HTS ERC functions like name, decimals, or totalSupply (which take a token address as a parameter) fail with CONTRACT_REVERT_EXECUTED.
For example, in the following method:
function name(address token) public view returns (string memory) {
return IERC20Metadata(token).name();
}
When executing such calls, services tries to find the token in the method -> DispatchingEvmFrameState.getMutableAccount(Address address).
This method searches for the token address in two stages:
Account Lookup:
Calls nativeOperations.getAccount(accountID) which checks AccountReadableKVState.
If the account is found, it is returned.
Token Lookup (if the account isn’t found):
Calls nativeOperations.getToken(number) which checks TokenReadableKVState.
If the token is found, it is returned.
The issue arises because AccountReadableKVState does not filter by entity type. If the token address is mistakenly treated as an account and returned from the account state, execution fails.
Steps to reproduce
Explained in the description of the issue
Additional context
No response
Hedera network
other
Version
v0.118.0
Operating system
macOS
The text was updated successfully, but these errors were encountered:
Description
Specifically, contract calls that interact with HTS ERC functions like name, decimals, or totalSupply (which take a token address as a parameter) fail with CONTRACT_REVERT_EXECUTED.
For example, in the following method:
When executing such calls, services tries to find the token in the method ->
DispatchingEvmFrameState.getMutableAccount(Address address)
.This method searches for the token address in two stages:
Account Lookup:
Calls nativeOperations.getAccount(accountID) which checks AccountReadableKVState.
If the account is found, it is returned.
Token Lookup (if the account isn’t found):
Calls nativeOperations.getToken(number) which checks TokenReadableKVState.
If the token is found, it is returned.
The issue arises because AccountReadableKVState does not filter by entity type. If the token address is mistakenly treated as an account and returned from the account state, execution fails.
Steps to reproduce
Explained in the description of the issue
Additional context
No response
Hedera network
other
Version
v0.118.0
Operating system
macOS
The text was updated successfully, but these errors were encountered: