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

fix: let 0 value transactions pass #3304

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

simzzz
Copy link
Contributor

@simzzz simzzz commented Nov 28, 2024

Description:
This PR fixes the case where transactions with a value of 0 would not pass. This is needed because they would pass as valid transactions on the Ethereum network as 0 is a valid value there.

Related issue(s):

Fixes #3105

Notes for reviewer:

Checklist

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

Copy link

sonarcloud bot commented Nov 28, 2024

vyanev1

This comment was marked as duplicate.

Copy link
Contributor

@victor-yanev victor-yanev left a comment

Choose a reason for hiding this comment

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

LG, just once concern:

Comment on lines -63 to -67
value(tx: Transaction): void {
if (tx.data === EthImpl.emptyHex && tx.value < constants.TINYBAR_TO_WEIBAR_COEF) {
throw predefined.VALUE_TOO_LOW;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we still want to confirm that the value is not negative instead of completely removing the pre-check

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good point, the value shouldn't be below under 1 tinybar but 0 should be a valid value. I will push a new commit along with new tests for this

@nadezhdapopovaa nadezhdapopovaa added the enhancement New feature or request label Nov 28, 2024
@nadezhdapopovaa nadezhdapopovaa added this to the 0.62.0 milestone Nov 28, 2024
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
Status: Backlog
Development

Successfully merging this pull request may close these issues.

Let 0-value Ethereum transactions pass
4 participants