Skip to content

Commit 0abf961

Browse files
authored
docs: use new Address in favor of deprecated method (#3634)
1 parent ec84b8a commit 0abf961

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

.changeset/soft-poems-reflect.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
---
3+
4+
docs: use `new Address` in favor of deprecated method

apps/create-fuels-counter-guide/src/components/LocalFaucet.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default function LocalFaucet({ refetch, addressToFund }: Props) {
2525
wallet.provider,
2626
);
2727
const tx = await genesis.transfer(
28-
Address.fromB256(addressToFund || wallet.address.toB256()),
28+
new Address(addressToFund || wallet.address.toB256()),
2929
bn(5_000_000_000),
3030
);
3131
transactionSubmitNotification(tx.id);

apps/docs/src/guide/types/b256.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ To convert between a `B256` hexlified string and a `Uint8Array`, you can use the
1616

1717
## Support from `Address` Class
1818

19-
A `B256` value is also supported as part of the [`Address`](https://fuels-ts-docs-api.vercel.app/classes/_fuel_ts_address.Address.html) class, providing seamless integration with other components of your application. To create an [`Address`](https://fuels-ts-docs-api.vercel.app/classes/_fuel_ts_address.Address.html) instance from a b256 value, use the `Address.fromB256()` method:
19+
A `B256` value is also supported as part of the [`Address`](https://fuels-ts-docs-api.vercel.app/classes/_fuel_ts_address.Address.html) class, providing seamless integration with other components of your application. To create an [`Address`](https://fuels-ts-docs-api.vercel.app/classes/_fuel_ts_address.Address.html) instance from a b256 value, use the `new Address()` method:
2020

2121
<<< @./snippets/b256/support-from-address-class.ts#full{ts:line-numbers}

apps/docs/src/guide/wallets/wallet-transferring.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ When transferring assets to a deployed contract, we use the `transferToContract`
4242

4343
However, instead of supplying the target wallet's address, as done in `destination.address` for the transfer method, we need to provide an instance of [Address](../types/address.md) created from the deployed contract id.
4444

45-
If you have the [Contract](../contracts/) instance of the deployed contract, you can simply use its `id` property. However, if the contract was deployed with `forc deploy` or not by you, you will likely only have its ID in a hex string format. In such cases, you can create an [Address](../types/address.md) instance from the contract ID using `Address.fromAddressOrString('0x123...')`.
45+
If you have the [Contract](../contracts/) instance of the deployed contract, you can simply use its `id` property. However, if the contract was deployed with `forc deploy` or not by you, you will likely only have its ID in a hex string format. In such cases, you can create an [Address](../types/address.md) instance from the contract ID using `new Address('0x123...')`.
4646

4747
Here's an example demonstrating how to use `transferToContract`:
4848

0 commit comments

Comments
 (0)