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 Bech32 address #3493

Merged
merged 9 commits into from
Jan 2, 2025
Merged

Conversation

petertonysmith94
Copy link
Contributor

@petertonysmith94 petertonysmith94 commented Dec 20, 2024

Release notes

In this release, we:

  • Removed all instances of Bech32 address format in favour of B256

Breaking Changes

  • We no longer support Bech32 addresses
// before
import { Address, Bech32Address } from "fuels";

const bech32Address: Bech32Address = "fuel1234";
const address = new Address(bech32Address);
// after
import { Address, B256Address } from "fuels";

const b256Address: B256Address = "0x1234";
const address = new Address(b256Address);
  • Removed INVALID_BECH32_ADDRESS error code.

  • Removed associated Bech32 helper functions.

    • normalizeBech32
    • isBech32
    • toB256
    • getBytesFromBech32
    • toBech32
    • clearFirst12BytesFromB256

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)

@petertonysmith94 petertonysmith94 added the chore Issue is a chore label Dec 20, 2024
@petertonysmith94 petertonysmith94 self-assigned this Dec 20, 2024
Copy link

vercel bot commented Dec 20, 2024

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 2, 2025 0:50am
ts-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 2, 2025 0:50am
ts-docs-api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 2, 2025 0:50am

arboleya
arboleya previously approved these changes Dec 31, 2024
@petertonysmith94 petertonysmith94 enabled auto-merge (squash) January 2, 2025 12:20
Copy link
Contributor

github-actions bot commented Jan 2, 2025

Coverage Report:

Lines Branches Functions Statements
77.78%(-0.05%) 70.52%(-0.03%) 75.42%(-0.08%) 77.74%(-0.05%)
Changed Files:
Ok File (✨=New File) Lines Branches Functions Statements
🔴 packages/address/src/address.ts 91.07%
(+0.91%)
86.66%
(+6.11%)
85.71%
(+0%)
91.22%
(+0.9%)
🔴 packages/address/src/utils.ts 78.26%
(-6.11%)
71.42%
(-7.52%)
87.5%
(-4.8%)
79.16%
(-5.68%)
🔴 packages/logger/src/index.ts 82.85%
(-0.93%)
76.92%
(-3.08%)
50%
(-2.38%)
77.5%
(-1.07%)

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.

console.logging an Address should output it as B256 Remove bech32 address format
5 participants