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

feat: allowed eth_call to accept null/empty tx.to to simulate deploying smart contracts #2647

Merged

Conversation

quiet-node
Copy link
Member

Description:
Originally, the validation in the Relay object would stop the request if its calldata.to field was null or empty because the mirror-node didn't allow a nullable to field. However, after this PR, the mirror-node now allows a nullable to field. This update changes the validation so the Relay can accept requests with a to field that is null or empty.

Related issue(s):

Fixes #2334

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@quiet-node quiet-node added the enhancement New feature or request label Jul 1, 2024
@quiet-node quiet-node added this to the 0.52.0 milestone Jul 1, 2024
@quiet-node quiet-node self-assigned this Jul 1, 2024
@quiet-node quiet-node linked an issue Jul 1, 2024 that may be closed by this pull request
Copy link

github-actions bot commented Jul 1, 2024

Tests

    2 files  158 suites   11s ⏱️
857 tests 856 ✔️ 1 💤 0
870 runs  869 ✔️ 1 💤 0

Results for commit b8472bf.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jul 2, 2024

Acceptance Tests

  17 files  220 suites   29m 6s ⏱️
606 tests 601 ✔️ 4 💤 1
669 runs  664 ✔️ 4 💤 1

Results for commit b8472bf.

♻️ This comment has been updated with latest results.

ebadiere
ebadiere previously approved these changes Jul 2, 2024
Copy link
Collaborator

@ebadiere ebadiere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG.

Copy link
Collaborator

@Nana-EC Nana-EC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested improvement

packages/relay/src/lib/eth.ts Outdated Show resolved Hide resolved
…ng smart contracts

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
@quiet-node quiet-node force-pushed the 2334-eth_call-errors-out-when-transactionto-is-set-to-null branch 2 times, most recently from 22684c3 to 2c9aa3b Compare July 11, 2024 20:18
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
@quiet-node quiet-node force-pushed the 2334-eth_call-errors-out-when-transactionto-is-set-to-null branch from 2c9aa3b to 4b09dcb Compare July 11, 2024 20:39
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
@quiet-node quiet-node force-pushed the 2334-eth_call-errors-out-when-transactionto-is-set-to-null branch from 4b09dcb to b8472bf Compare July 11, 2024 21:58
Copy link

sonarcloud bot commented Jul 11, 2024

Copy link
Contributor

@acuarica acuarica left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@quiet-node quiet-node merged commit 88d1e80 into main Jul 15, 2024
33 checks passed
@quiet-node quiet-node deleted the 2334-eth_call-errors-out-when-transactionto-is-set-to-null branch July 15, 2024 13:46
ebadiere pushed a commit that referenced this pull request Aug 1, 2024
…ng smart contracts (#2647)

* feat: allowed eth_call to accept null/empty tx.to to simulate deploying smart contracts

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

* fix: added support for `to` being empty or undefined

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

* fix: removed unnecessary test cases

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

---------

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Signed-off-by: ebadiere <ebadiere@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

eth_call errors out when transaction.to is set to null
4 participants