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

Make getABI_* calls in wrapper should be static #2079

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

tonykwok1992
Copy link
Contributor

@tonykwok1992 tonykwok1992 commented Jul 16, 2024

What does this PR do?

getABI_* call in wrapper should be static method. we do not need an instance of wrapper to encode function

Where should the reviewer start?

All files

Why is it needed?

we do not need an instance of wrapper to encode function

Checklist

  • I've read the contribution guidelines.
  • I've added tests (if applicable).
  • I've added a changelog entry if necessary.

Signed-off-by: tonykwok1992 <[email protected]>
@tonykwok1992 tonykwok1992 changed the title Make getABI_* calls in wrapper static Make getABI_* calls in wrapper should be static Jul 16, 2024
Copy link
Contributor

@NickSneo NickSneo left a comment

Choose a reason for hiding this comment

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

Instead of adding a new empty solidity file for testing, lets reuse any existing .sol file

contract AbiFuncs {


function hi(uint256 x) public {
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems like an empty solidity file, can't we reuse any pre-existing .sol file for the test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I also want to test java file output matches, if I use any existing file, I will have to modify those java files to add getABI* calls, but that will actually invalidate the test case with abiFunc=false

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay got it

@@ -0,0 +1 @@
[{"inputs":[{"internalType":"uint256","name":"x","type":"uint256"}],"name":"hi","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Copy link
Contributor

Choose a reason for hiding this comment

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

Same lets use any existing solidity and compile .abi and .bin files

Copy link
Contributor

@NickSneo NickSneo left a comment

Choose a reason for hiding this comment

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

LGTM

@NickSneo NickSneo merged commit 8d9e8ee into hyperledger-web3j:main Jul 22, 2024
5 checks passed
Julius278 pushed a commit to Julius278/web3j that referenced this pull request Jul 30, 2024
Signed-off-by: tonykwok1992 <[email protected]>
Signed-off-by: Julius Lauterbach <[email protected]>
Julius278 pushed a commit to Julius278/web3j that referenced this pull request Jul 30, 2024
Signed-off-by: tonykwok1992 <[email protected]>
Signed-off-by: Julius Lauterbach <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants