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

Improve contract utils export visibility #3569

Open
danielbate opened this issue Jan 9, 2025 · 3 comments · May be fixed by #3570
Open

Improve contract utils export visibility #3569

danielbate opened this issue Jan 9, 2025 · 3 comments · May be fixed by #3570
Assignees
Labels
chore Issue is a chore

Comments

@danielbate
Copy link
Member

danielbate commented Jan 9, 2025

We export contract utilities under a single ContractUtils namespace.

export * as ContractUtils from './util';

This makes them tricky to find (as well as being hidden by TS DOC) and is bad for tree shakeability. Additionally we expose no other functionality in this way. There's some useful functions in here that I think we should better expose.

@danielbate danielbate added the chore Issue is a chore label Jan 9, 2025
@danielbate danielbate self-assigned this Jan 9, 2025
@danielbate danielbate changed the title Improve contract utils visibility Improve contract utils export visibility Jan 9, 2025
@arboleya
Copy link
Member

arboleya commented Jan 9, 2025

What are the utilities you're talking about?

I'm only afraid this isn't a priority amongst the other things we have going.

Unless it's a very quick thing that you're about to push.

@danielbate
Copy link
Member Author

getContractRoot, getContractStorageRoot, getContractId, hexlifyWithPrefix - it's about 5 lines of code, just doing in between builds tbh.

@danielbate danielbate linked a pull request Jan 9, 2025 that will close this issue
4 tasks
@arboleya
Copy link
Member

arboleya commented Jan 9, 2025

Good use of build time, I'd say. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Issue is a chore
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants