-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore:
Address
constructor now accepts a range of inputs. (#3600)
* chore: nested address test * chore: refactored the `Address` DX * chore: update comment * chore: changeset * docs: update address docs * chore: update all `Address` factory methods * Update .changeset/chilly-buses-add.md Co-authored-by: Sérgio Torres <30977845+Torres-ssf@users.noreply.github.com> --------- Co-authored-by: Sérgio Torres <30977845+Torres-ssf@users.noreply.github.com>
- Loading branch information
1 parent
68e4b5a
commit 86b8e94
Showing
36 changed files
with
573 additions
and
384 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
"@internal/check-imports": patch | ||
"@fuel-ts/account": patch | ||
"@fuel-ts/address": patch | ||
"@fuel-ts/program": patch | ||
--- | ||
|
||
chore: `Address` constructor now accepts a range of inputs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
apps/docs/src/guide/types/snippets/address/from-an-evm-address.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// #region full | ||
import { Address } from 'fuels'; | ||
|
||
const evmAddress = '0x675b68aa4d9c2d3bb3f0397048e62e6b7192079c'; | ||
|
||
const address = new Address(evmAddress); | ||
// #endregion full | ||
|
||
console.log('address', address); |
9 changes: 9 additions & 0 deletions
9
apps/docs/src/guide/types/snippets/address/from-an-existing-address.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// #region full | ||
import { Address } from 'fuels'; | ||
|
||
const address = Address.fromRandom(); | ||
|
||
const addressClone = new Address(address); | ||
// #endregion full | ||
|
||
console.log('addressCloneFromB256', addressClone); |
9 changes: 0 additions & 9 deletions
9
apps/docs/src/guide/types/snippets/address/utilities-function-1.ts
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
apps/docs/src/guide/types/snippets/address/utilities-function-2.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
apps/docs/src/guide/types/snippets/address/utilities-function-to-checksum.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// #region full | ||
import { Address } from 'fuels'; | ||
|
||
const b256 = | ||
'0xbebd3baab326f895289ecbd4210cf886ce41952316441ae4cac35f00f0e882a6'; | ||
|
||
const address = new Address(b256); | ||
|
||
console.log('checksum', address.toChecksum()); | ||
// true | ||
// #endregion full |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.