Skip to content

Commit d3c3f8d

Browse files
feat(docs): enrich state lookup script
1 parent 9957353 commit d3c3f8d

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

docs/smart-accounts/guides/typescript-viem/01-state-lookup.mdx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Agent vaults: [ { id: 1n, address: '0x55c815260cBE6c45Fe5bFe5FF32E3C7D746f14dC'
7272
</details>
7373
7474
Let us examine each of the helper functions in more detail.
75-
First of all, we need to define a Viem public client.
75+
First of all, we need to define a [Viem public client](https://viem.sh/docs/clients/public).
7676
Since the two Flare mainnets and the two testnets are already registered with Viem, we simply need to import them.
7777
Then, we create a basic public client with the HTTP transporter.
7878
@@ -94,8 +94,6 @@ All of them rely primarily on the `readContract` function of the Viem `publicCli
9494
{/* TODO:(Nik) update the sentence about in development */}
9595
The `getOperatorXrplAddresses` calls the `getXrplProviderWallets` function of the `MasterAccountController` contract.
9696
The function returns an array of XRPL addresses; these are all the registered operator XRPL addresses.
97-
Because the Flare smart accounts are still in development, the `MasterAccountController` contract has not yet been added to the `FlareContractRegistry` contract.
98-
That is the reason why the address of the `MasterAccountController` has been hardcoded in the example repository.
9997
10098
```typescript
10199
export async function getOperatorXrplAddresses() {
@@ -109,6 +107,14 @@ export async function getOperatorXrplAddresses() {
109107
}
110108
```
111109
110+
Because the Flare smart accounts are still in development, the `MasterAccountController` contract has not yet been added to the `FlareContractRegistry` contract.
111+
That is the reason why the address of the `MasterAccountController` has been hardcoded in the example repository.
112+
113+
```typescript
114+
export const MASTER_ACCOUNT_CONTROLLER_ADDRESS =
115+
"0x32F662C63c1E24bB59B908249962F00B61C6638f";
116+
```
117+
112118
## Personal account of an XRPL address
113119
114120
There are many situations when it is important or even necessary to know the address of the `PersonalAccount` of an XRPL address;

0 commit comments

Comments
 (0)