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

chore: contract resources for tests can't be compiled in-situ because of dependences on system contract headers #17432

Open
15 tasks
david-bakin-sl opened this issue Jan 17, 2025 · 0 comments
Labels
Good First Issue Either a small change or a medium change concentrated in a single component. Hedera Smart Contract Service Issues related to the Hedera Smart Contract Service.

Comments

@david-bakin-sl
Copy link
Member

Background

Some (many?) of the contracts used for tests (find them in hedera-node/test-clients/src/main/resources/contract/contracts) can't be compiled where they sit because they refer to imports - interfaces or abstract contracts - for system contracts or common types. (E.g., IHederaTokenService.sol or HederaResponseCodes.sol.)

There has been some attempt to deal with this by duplicating those dependencies into the various contract directories but that's a bad idea for obvious reasons.

These imported dependencies should each live in one place in the test-clients/main/resources/... tree (not necessarily the same place, though it could be). And the instructions at how-to-compile-contracts.txt should be updated to have the proper --include-path argument(s) so that these contracts can reliably be compiled in place. (In fact, how-to-compile-contracts.txt should be changed to be a shell script.)

Acceptance Criteria

  1. You can go into any of the test resource contract directories and be able to compile them using the instructions in how-to-compile-contracts.txt, and
  2. This happens with none of the dependencies (contract interfaces or abstract contracts) being duplicated in the test-clients/src/main/resources tree

Dependencies

No response

Definition of Ready (DoR) Checklist

  • Clear acceptance criteria
  • Clear and detailed description
  • Dependencies identified
  • Links to documentation
  • Should be completable in 2-3 Days
  • Initial draft of Low-level design document
  • At least high level test plan
  • Groomed/Estimated

Definition of Done (DoD) Checklist

  • Acceptance Criteria complete
  • No Codacy issues greater than minor (in new code)
  • JavaDocs updated/created
  • Code commented
  • Unit tests created/updated
  • 80% test code coverage (in new code)
  • Happy Path and major negative cases in HAPI tests as applicable
@david-bakin-sl david-bakin-sl added Good First Issue Either a small change or a medium change concentrated in a single component. Hedera Smart Contract Service Issues related to the Hedera Smart Contract Service. labels Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Either a small change or a medium change concentrated in a single component. Hedera Smart Contract Service Issues related to the Hedera Smart Contract Service.
Projects
Status: Backlog
Development

No branches or pull requests

1 participant