hedera-json-rpc-relay
hedera-json-rpc-relay copied to clipboard
Wrong transaction receipt generated for a transfer transaction
I'm sending a transfer to an existing account with an EVM address alias. I'm using the following code snippet:
const [owner, operator] = await ethers.getSigners();
const tx = await owner.sendTransaction({
to: operator.address,
value: ethers.parseEther("10")
});
I then get the transaction and transaction receipt through the JSON-RPC API endpoints eth_getTransactionByHash
and eth_getTransactionReceipt
:
"result": {
"blockHash": "0x9e064666e21178c827cecd24d19d9034fb3b41d812a1eb95814b8099e559ba2c",
"blockNumber": "0x3fcf",
"chainId": "0x12a",
"from": "0x67d8d32e9bf1a9968a5ff53b87d777aa8ebbee69",
"gas": "0x5208",
"gasPrice": null,
"hash": "0x0515a66e94199f96dda1ca2f113af3dcd44d6d14554222dc37b20a82ae08a169",
"input": "0x",
"maxPriorityFeePerGas": null,
"maxFeePerGas": "0x59",
"nonce": "0xc",
"r": "0x5ff8a4be921664cae89d1b5e4ba589210ef410762d4d055f6575a2f0f8ade105",
"s": "0x1eb737f9c5b6596de797f41c88ef07b881a2619f1d2e4c73886d8b8dc9e94415",
"to": "0x00000000000000000000000000000000000003f5",
"transactionIndex": "0x9",
"type": "0x2",
"v": "0x0",
"value": "0x3b9aca00"
},
"result": {
"blockHash": "0x9e064666e21178c827cecd24d19d9034fb3b41d812a1eb95814b8099e559ba2c",
"blockNumber": "0x3fcf",
"from": "0x00000000000000000000000000000000000003f4",
"to": "0x00000000000000000000000000000000000003f5",
"cumulativeGasUsed": "0x5208",
"gasUsed": "0x5208",
"contractAddress": "0x05fba803be258049a27b820088bab1cad2058871",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"transactionHash": "0x0515a66e94199f96dda1ca2f113af3dcd44d6d14554222dc37b20a82ae08a169",
"transactionIndex": "0x9",
"effectiveGasPrice": "0xcf38224400",
"status": "0x1"
},
There are several problems with the transaction and transaction receipt results:
- The
from
field in the receipt is populated with the long-zero address, should be the alias. - The
to
field in both the transaction and the receipt is populated with the long-zero address, should be the alias. - The
contractAddress
field is populated with the alias of the transfer receiver account. This is wrong, this field should only be populated if the top-level call was a contract creation and should be populated with the address of the deployed contract.
We need to double check if 3.
is resolved
@Ivo-Yankov were we able to double check? If all is good let's close this ticket. Thanks