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

Evaluate whether to include the hedera-smart-contracts repo as a dependency #140

Open
acuarica opened this issue Nov 22, 2024 · 0 comments
Labels
dependencies Add, update or remove dependency packages or files

Comments

@acuarica
Copy link
Contributor

acuarica commented Nov 22, 2024

As we are starting to include more and more HTS functionality, we need more type and interface definitions. See for example,

Most of these definitions are already present in the hedera-smart-contracts repo. We should evaluate whether to include this repo as a dependency. One minor drawback is the import paths are quite long, for example

import {IHRC719} from "hedera-smart-contracts/system-contracts/hedera-token-service/IHRC719.sol";

This could be changed locally by adding a remapping to remappings.txt like

hedera/system/hts/=lib/hedera-smart-contracts/contracts/system-contracts/hedera-token-service/

so the above import looks like

import {IHRC719} from "hedera/system/hts/IHRC719.sol";

Note

If we adopt this solution, we need to exclude the lib/ folder from tsconfig.json to avoid unrelated type-checking issues.

Related issues to consume the smart contracts repo from an npm package

@acuarica acuarica added the dependencies Add, update or remove dependency packages or files label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Add, update or remove dependency packages or files
Projects
Status: Backlog
Development

No branches or pull requests

1 participant