Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong transaction receipt generated for a transfer transaction #1710

Open
stoqnkpL opened this issue Sep 4, 2023 · 2 comments · Fixed by #1726
Open

Wrong transaction receipt generated for a transfer transaction #1710

stoqnkpL opened this issue Sep 4, 2023 · 2 comments · Fixed by #1726
Assignees
Labels
bug Something isn't working
Milestone

Comments

@stoqnkpL
Copy link

stoqnkpL commented Sep 4, 2023

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:

  1. The from field in the receipt is populated with the long-zero address, should be the alias.
  2. The to field in both the transaction and the receipt is populated with the long-zero address, should be the alias.
  3. 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.
@stoqnkpL stoqnkpL added bug Something isn't working limechain labels Sep 4, 2023
@stoqnkpL stoqnkpL changed the title Wrong transaction receipt generated by the Relay Wrong transaction receipt generated by the Relay for a transfer transaction Sep 4, 2023
@stoqnkpL stoqnkpL changed the title Wrong transaction receipt generated by the Relay for a transfer transaction Wrong transaction receipt generated for a transfer transaction Sep 4, 2023
@Nana-EC Nana-EC moved this from Backlog to Sprint BackLog in Smart Contract Sprint Board Sep 4, 2023
@Nana-EC Nana-EC removed the limechain label Sep 4, 2023
@Nana-EC Nana-EC modified the milestones: 0.31.0, 0.32.0 Sep 4, 2023
@Ivo-Yankov Ivo-Yankov self-assigned this Sep 5, 2023
@bibitibooo1 bibitibooo1 moved this from Sprint BackLog to In Progress in Smart Contract Sprint Board Sep 7, 2023
@Nana-EC Nana-EC moved this from In Progress to In Review in Smart Contract Sprint Board Sep 8, 2023
@github-project-automation github-project-automation bot moved this from In Review to Done in Smart Contract Sprint Board Sep 13, 2023
@Ivo-Yankov Ivo-Yankov reopened this Oct 4, 2023
@Ivo-Yankov
Copy link
Collaborator

We need to double check if 3. is resolved

@Nana-EC
Copy link
Collaborator

Nana-EC commented Apr 17, 2024

@Ivo-Yankov were we able to double check?
If all is good let's close this ticket. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
5 participants