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

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

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 Dec 20, 2024 6:56pm
ts-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 20, 2024 6:56pm
ts-docs-api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 20, 2024 6:56pm

Copy link
Contributor

Coverage Report:

Lines Branches Functions Statements
76.29%(-0.04%) 69.8%(-0.04%) 74.12%(-0.08%) 76.3%(-0.04%)
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 the address in B256 format Remove bech32 address format
1 participant