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!: remove ContractUtils namespaced export #3570

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

danielbate
Copy link
Member

@danielbate danielbate commented Jan 9, 2025

Release notes

  • Moved contract utilities (e.g. getContractId(), getContractRoot()) to be exported directly from fuels

Summary

Removes the ContractUtils namespaced export and better exposes in typedoc.

Breaking Changes

  • ContractUtils was removed and the underlying functions (getContractRoot(), getContractStorageRoot(), getContractId(), hexlifyWithPrefix() are now exported directly from fuels.
// before
import { ContractUtils } from 'fuels';
// after
import { getContractRoot, getContractStorageRoot, getContractId, hexlifyWithPrefix } from 'fuels';

Checklist

  • All changes are covered by tests (or not applicable)
  • All changes are documented (or not applicable)
  • I reviewed the entire PR myself (preferably, on GH UI)
  • I described all Breaking Changes (or there's none)

Copy link

vercel bot commented Jan 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fuels-template ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 9, 2025 11:39am
ts-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 9, 2025 11:39am
ts-docs-api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 9, 2025 11:39am

@github-actions github-actions bot added the chore Issue is a chore label Jan 9, 2025
@danielbate danielbate self-assigned this Jan 9, 2025
@danielbate danielbate changed the title chore!: remove namespaced export chore!: remove ContractUtils namespaced export Jan 9, 2025
Copy link
Contributor

github-actions bot commented Jan 9, 2025

Coverage Report:

Lines Branches Functions Statements
76.9%(-0.07%) 70.35%(-0.14%) 74.89%(-0.13%) 76.9%(-0.07%)
Changed Files:
Ok File (✨=New File) Lines Branches Functions Statements
🔴 packages/account/src/providers/provider.ts 68.69%
(-0.45%)
58.08%
(+0%)
70.21%
(-1.06%)
68.42%
(-0.43%)
🔴 packages/account/src/providers/generated/operations.ts 94.03%
(-0.67%)
100%
(+0%)
81.63%
(-2.04%)
94.51%
(-0.61%)
🔴 packages/account/src/providers/transaction-request/transaction-request.ts 88.57%
(+0%)
78.08%
(+1.37%)
84%
(+0%)
88.81%
(+0%)
🔴 packages/account/src/providers/transaction-response/transaction-response.ts 76.66%
(+0.26%)
64.4%
(-1.05%)
93.75%
(+0%)
76.66%
(+0.26%)
🔴 packages/account/src/providers/transaction-summary/assemble-transaction-summary.ts 100%
(+0%)
77.77%
(+6.35%)
100%
(+0%)
100%
(+0%)
🔴 packages/account/src/providers/transaction-summary/calculate-tx-fee-for-summary.ts 100%
(+0%)
90%
(-1.66%)
100%
(+0%)
100%
(+0%)
🔴 packages/account/src/providers/transaction-summary/status.ts 100%
(+0%)
93.33%
(+2.43%)
100%
(+0%)
100%
(+0%)
🔴 packages/address/src/address.ts 90.9%
(-0.17%)
86.66%
(+0%)
85.71%
(+0%)
91.07%
(-0.15%)
🔴 packages/address/src/utils.ts 69.23%
(-9.03%)
50%
(-21.42%)
77.77%
(-9.73%)
70.37%
(-8.79%)

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 this pull request may close these issues.

Improve contract utils export visibility
1 participant