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

Support direct import of contracts compiled with Truffle #226

Closed
eepstein opened this issue Nov 9, 2017 · 3 comments
Closed

Support direct import of contracts compiled with Truffle #226

eepstein opened this issue Nov 9, 2017 · 3 comments

Comments

@eepstein
Copy link
Contributor

eepstein commented Nov 9, 2017

Better support for a hybrid dev env in which Truffle is used for the Solidity code including testing and deployment.

This would allow, for example, access to the deployed addresses without manual intervention.

It would also mean that the .abi and .bin inputs would be precisely those generated and used by Truffle.

As a side-effect, keeping track of addresses would allow support for looking up contract addresses on the generated instance - though integration with web3j's deploy mechanism means those values would not survive restart but would revert to the values in the generated code.

@eepstein
Copy link
Contributor Author

eepstein commented Nov 9, 2017

I'm implemented this in a fork, along with tests.
My build is failing in :codegen:checkstyleMain
I've got the google style xml installed and ran a full reformat for the changed and new files.
bubkis.
Is there a formal .xml file for us?
...
Found the plugin: https://plugins.jetbrains.com/plugin/1065-checkstyle-idea (at least I think that's the one). Ironic thing is, the tools claims to implement the google style rules, but it doesn't actually adhere to them .
...
[ant:checkstyle] [ERROR] /Users/ezra/Developer/web3j/codegen/src/test/java/org/web3j/codegen/ContractJsonParseTest.java:5: 'org.junit.Before' should be separated from previous import group by one line. [CustomImportOrder]
Wow. So Much Love.

@eepstein
Copy link
Contributor Author

eepstein commented Nov 9, 2017

Hmm. Seems there's a requirement that AbiDefinition's equal and hashCode methods include all the ivars. But, given that Solidity functions have flags that don't factor into the uniqueness requirements of the function (e.g., you can add "pure" to a function but that doesn't change the function's uniqueness, which is determined solely by name + argument types, except for constructors where the uniqueness is by name). so, enforcing this in Java seems not to line up with the thing being modeled.

@conor10
Copy link
Contributor

conor10 commented Nov 13, 2017

Implemented in #228.

@conor10 conor10 closed this as completed Nov 13, 2017
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

No branches or pull requests

2 participants