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 JSON-RPC method eth_getCode does not take into account the blockNumber when the address corresponds to an HTS token. It always returns the redirect bytecode, specified by HIP-719, regardless of the provided blockNumber.
This means that is the blockNumber provided is less than the block number where the HTS token was created, the returned bytecode is incorrect.
Steps to reproduce
We use USDC on mainnet as an example. It was created at block 22193323. Running the following command we get the right bytecode
Description
The JSON-RPC method
eth_getCode
does not take into account theblockNumber
when theaddress
corresponds to an HTS token. It always returns the redirect bytecode, specified by HIP-719, regardless of the providedblockNumber
.This means that is the
blockNumber
provided is less than the block number where the HTS token was created, the returned bytecode is incorrect.Steps to reproduce
We use USDC on
mainnet
as an example. It was created at block22193323
. Running the following command we get the right bytecodeHowever, when we specify
22193322 (0x152a4aa)
as theblockNumber
(the previous block where USDC was created), we still get the same bytecode as beforeHowever, the response in this case should have been
0x
, empty bytecode.Additional context
When querying the Mirror Node, it correctly uses the
timestamp
(determined by theblockNumber
).With block
22193323
(block where USDC Token was created).We get the
timestamp
for block22193323
and use it to query for the USDC Token at that timestamp
With block
22193322
(just before USDC Token was created).Hedera network
any
Version
v0.58.0
Operating system
macOS
The text was updated successfully, but these errors were encountered: