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

Field "to" not present in transaction receipt for contract creating transactions #1874

Closed
2 tasks done
fala13 opened this issue Jun 8, 2022 · 4 comments
Closed
2 tasks done
Labels
T-bug Type: bug

Comments

@fala13
Copy link

fala13 commented Jun 8, 2022

Component

Anvil

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (2d22d51 2022-06-08T00:06:46.392116828Z

What command(s) is the bug in?

anvil

Operating System

Linux

Describe the bug

Link to issue on brownie tracker: eth-brownie/brownie#1549

Deploying contracts via brownie using anvil currently fails due to field "to" not being present in transaction receipt received from anvil.

Field "to" should be present in transaction receipt, set to null when it's a contract creation transaction.

@fala13 fala13 added the T-bug Type: bug label Jun 8, 2022
@fala13 fala13 changed the title anvil doesn't return anything for "to" when deploying contracts Field "to" not present in transaction receipt for contract creating transactions Jun 8, 2022
@gakonst
Copy link
Member

gakonst commented Jun 8, 2022

@mattsse
Copy link
Member

mattsse commented Jun 8, 2022

ah I misread it, #1876

it's missing completely, so yeah we need to fix upstream ethers, on it.

@mattsse
Copy link
Member

mattsse commented Jun 8, 2022

after having another look at the ethers code, I was wondering why it's not included because by default serde deserializes None as null

checked against anvil test in #1876

curl -X POST --header 'content-type: application/json' --data '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0x2aa3a1aefa199c991a4544e7319b360af2d4f346db71e4c0af26e0047b595887"],"id":1}' --url http://localhost:8546/
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "blockHash": "0x08a54bb05bef8c24406f00898e4d1ea27c834b265b0dbce21d2718043884a4b9",
    "blockNumber": "0x2",
    "contractAddress": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
    "cumulativeGasUsed": "0x0",
    "effectiveGasPrice": "0xee6b2800",
    "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
    "gasUsed": "0x3c5d3",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "root": null,
    "status": "0x1",
    "to": null,
    "transactionHash": "0x2aa3a1aefa199c991a4544e7319b360af2d4f346db71e4c0af26e0047b595887",
    "transactionIndex": "0x0"
  }
}

and to is null here, so not sure what we're missing

@gakonst
Copy link
Member

gakonst commented Jun 8, 2022

it seems like this is not an issue based on our 2 tests, closing and please re-open if you think we misunderstood

@gakonst gakonst closed this as completed Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bug Type: bug
Projects
No open projects
Archived in project
Development

No branches or pull requests

3 participants