-
Notifications
You must be signed in to change notification settings - Fork 1.4k
chore: Address
constructor now accepts a range of inputs.
#3600
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
d9430bf
chore: nested address test
petertonysmith94 5eaa452
chore: refactored the `Address` DX
petertonysmith94 7bf0966
chore: update comment
petertonysmith94 4f2e577
chore: changeset
petertonysmith94 2210ef4
Merge branch 'master' into ps/chore/improve-address-dx
petertonysmith94 7ffea72
Merge branch 'master' into ps/chore/improve-address-dx
Torres-ssf f3010f9
docs: update address docs
petertonysmith94 86eb103
chore: update all `Address` factory methods
petertonysmith94 f68dfc1
Merge branch 'master' into ps/chore/improve-address-dx
Torres-ssf c33ffe7
Update .changeset/chilly-buses-add.md
petertonysmith94 a31b9c5
Merge branch 'master' into ps/chore/improve-address-dx
petertonysmith94 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.