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

contracts/call errors out when transaction.to is set to null #8072

Closed
quiet-node opened this issue Apr 11, 2024 · 0 comments · Fixed by #8100
Closed

contracts/call errors out when transaction.to is set to null #8072

quiet-node opened this issue Apr 11, 2024 · 0 comments · Fixed by #8100
Assignees
Labels
bug Type: Something isn't working limechain Work planned for the LimeChain team web3 Area: Web3 API
Milestone

Comments

@quiet-node
Copy link

Description

Currently, when a request with transaction.to=null is sent to contracts/call endpoint, mirror-node throws an error with message to field must not be empty. transaction.to is set to null in the case of deploying a contract, and contracts/call should accept a transaction object with nullable to field.

Steps to reproduce

  1. Run below cURL request
curl -X 'POST' \
  'https://testnet.mirrornode.hedera.com/api/v1/contracts/call' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "block": "latest",
  "data": "0x6080604052...",
  "estimate": false,
  "from": "0x9de0881b3110aA8cAD1dF3182B1eB6F14d1608a2",
  "gas": 15000000,
  "gasPrice": 100000000,
  "to": null,
  "value": 0
}'
  1. Observe the output to see the error message like below
{"_status":{"messages":[{"message":"to field must not be empty","detail":"","data":""}]}}

Additional context

No response

Hedera network

mainnet, testnet, previewnet, other

Version

latest

Operating system

None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Type: Something isn't working limechain Work planned for the LimeChain team web3 Area: Web3 API
Projects
Status: Done
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants