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

Gradle Build: Solidity support #11657

Closed
Tracked by #11230
jjohannes opened this issue Feb 21, 2024 · 2 comments
Closed
Tracked by #11230

Gradle Build: Solidity support #11657

jjohannes opened this issue Feb 21, 2024 · 2 comments
Assignees

Comments

@jjohannes
Copy link
Collaborator

jjohannes commented Feb 21, 2024

Breakdown as discussed with @david-bakin-sl.

  1. Generate bin and json from sol in https://github.com/hashgraph/hedera-services/tree/develop/hedera-node/test-clients/src/main/resource/contract/contracts - bin and json are no longer checked in; sol do not need to be in resources (not needed at runtime); may use org.web3j.solidity Gradle plugin.
  2. Get System Contracts sol from from https://github.com/hashgraph/hedera-smart-contracts instead of maintaining a copy in hedera-services.
  3. Only System Contracts: generate Java code based on them in hedera-smart-contract-service-impl
@jjohannes jjohannes self-assigned this Feb 21, 2024
@jjohannes jjohannes changed the title Solidity support Gradle Build: Solidity support Feb 21, 2024
@jjohannes
Copy link
Collaborator Author

Additional Notes:

we need to run with different solitity compiler versions, and we need to be able to say, in the gradle build file, which compiler version we want (if not the most recent), for specific contracts. We also need to be able to override, in the build file, the EVM version to build for. (Needn't be in the build file if it was acceptable/preferable to have an additional file of these configurations sitting around, perhaps at the root of the directory tree of the contracts being built.)

Reason is - second first. Around the time of EVM changes (e.g., in April just before/after they released the Cancun version that had additional opcodes and changed some opcode behavior) we need to test before/after - that is, that contracts written for Cancun fail on the previous release, that contracts written for the previous release have changed behavior for the new release.

First reason: Solitity changes and (frequently, unfortunately) in not backward compatible ways. So you sometimes have contracts that used to work with a previous Solidity version that are compiled differently and incompatibly now. You need to compile them with a suitable compiler. Solidity even has a pragma that every source file must start with that gives the range of acceptable compiler versions.

But those two reasons are exceptions. Nearly all contracts you compile with the latest compiler and latest EVM version.

@jjohannes
Copy link
Collaborator Author

Duplicate of #7456

@jjohannes jjohannes marked this as a duplicate of #7456 Nov 14, 2024
@jjohannes jjohannes closed this as not planned Won't fix, can't repro, duplicate, stale Nov 14, 2024
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

1 participant