Skip to content

Commit 590f7f6

Browse files
fix(docs): grammar
1 parent b8c76d9 commit 590f7f6

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

docs/smart-accounts/guides/02-custom-instructions.mdx

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ keywords:
1717
unlisted: false
1818
---
1919

20-
{/* NOTE:(Nik) This article has been placed right after the introduction into Flare Smart Accounts instead of at the end, so that readers don't get bored of reading before they reach it. */}
20+
{/* NOTE:(Nik) This article has been placed right after the introduction into Flare Smart Accounts instead of at the end, so that readers don't get bored with reading before they reach it. */}
2121

2222
import ThemedImage from "@theme/ThemedImage";
2323
import useBaseUrl from "@docusaurus/useBaseUrl";
2424

2525
The Flare Smart Accounts allow XRPL users to make custom function calls on Flare through instructions sent on XRPL.
26-
In this guide we will look at how the custom instructions can be developed using a mock version of the `MasterAccountController` contract.
26+
In this guide, we will look at how the custom instructions can be developed using a mock version of the `MasterAccountController` contract.
2727

28-
In a typical workflow the users sends instructions as memo data on XRPL.
28+
In a typical workflow, the user sends instructions as memo data on XRPL.
2929
Those then have to be verified by the FDC on the Flare chain.
3030
That process requires waiting, which is less than ideal in a development environment.
3131

@@ -36,22 +36,22 @@ It implements two additional functions:
3636
- `executeCustomInstructionDevelopment`
3737

3838
The `createFundPersonalAccount` function creates a new `PersonalAccount` for the user.
39-
It accepts as its argument a string `_xrplAddress`, which represents and address on XRPL.
39+
It accepts as its argument a string `_xrplAddress`, which represents an address on XRPL.
4040
The string is then concatenated with the `msg.sender` value;
4141
the `PersonalAccount` is created for this address.
4242

4343
Thus, a developer can create multiple XRPL "addresses".
4444
This allows them to more easily test the interactions between different personal accounts.
45-
The "address" is combined with their Flare address, so that they can give meaningful names to their "addresses" without a danger of multiple developers' addresses crashing.
45+
The "address" is combined with their Flare address, so that they can give meaningful names to their "addresses" without the danger of multiple developers' addresses crashing.
4646

4747
The `createFundPersonalAccount` function is a payable function.
48-
And funds sent with the transaction are deposited to the newly created personal account.
48+
And funds sent with the transaction are deposited into the newly created personal account.
4949
That way, the personal account can interact with payable functions from the get-go.
5050

5151
The `executeCustomInstructionDevelopment` function sidesteps the XRP transaction and the FDC `Payment` verification process.
5252
It allows developers to send an array of custom instructions to the `MasterAccountController` contract directly.
5353

54-
The two parameters this function takes are the `_xrplAddress` string, and an array of `IMasterAccountController.CustomInstruction` structs.
54+
The two parameters this function takes are the `_xrplAddress` string and an array of `IMasterAccountController.CustomInstruction` structs.
5555
It first concatenates the input string with the `msg.sender` value, the same way the `createFundPersonalAccount` function does.
5656
Then, it retrieves the `PersonalAccount` representing that address, and calls its `custom` function with the array of custom instructions it received as input.
5757

@@ -61,37 +61,37 @@ Then, it retrieves the `PersonalAccount` representing that address, and calls it
6161

6262
We will now use the Flare Smart Accounts CLI to interact with a simple contract.
6363
The contract `Foo` has a single payable function `bar`.
64-
The `bar` function accepts a `uint256` value as input, and add the fee paid with the transaction to a mapping.
64+
The `bar` function accepts a `uint256` value as input, and adds the fee paid with the transaction to a mapping.
6565

6666
```Solidity
6767
// SPDX-License-Identifier: MIT
6868
pragma solidity ^0.8.25;
6969
7070
contract Foo {
71-
mapping(uint256 => uint256) public map;
71+
mapping(uint256 => uint256) public map;
7272
73-
function bar(uint256 a) public payable {
74-
map[a] = map[a] + msg.value;
75-
}
73+
function bar(uint256 a) public payable {
74+
map[a] = map[a] + msg.value;
75+
}
7676
}
7777
```
7878

79-
We want to send `1 FLR` to the contract, and save it under number `42`.
79+
We want to send `1 FLR` to the contract, and save it under the number `42`.
8080
The address of the `Foo` contract is `0x296432C15504Ed465fAce11E54Ce4aac50cCd8A3`.
81-
Using an online ABI-encoding tool, we get that the following hash for the `bar` function, with `42` as input: `0x0423a132000000000000000000000000000000000000000000000000000000000000002a`.
81+
Using an online ABI-encoding tool, we get the following hash for the `bar` function, with `42` as input: `0x0423a132000000000000000000000000000000000000000000000000000000000000002a`.
8282

8383
:::warning
84-
Encoding calldata by hand is error prone.
84+
Encoding calldata by hand is error-prone.
8585
It is recommended to use established libraries, or an [online tool](https://abi.hashex.org/) (if you want to quickly check something).
8686
:::
8787

8888
There are two ways we can go about developing the custom instructions.
89-
We will start with an approach, which is what the production code would take.
90-
Afterwards, we will use the the mock functions to speed up the development.
89+
We will start with an approach that is what the production code would take.
90+
Afterwards, we will use the mock functions to speed up the development.
9191

9292
### Normal approach
9393

94-
Before we can execute the above instructions we need to top up the smart account that will perform the function call.
94+
Before we can execute the above instructions, we need to top up the smart account that will perform the function call.
9595
We run the following command, which fails because our account lacks funds on Flare.
9696
It is necessary to send some instructions, because that is what creates an account for us in the first place.
9797

@@ -129,7 +129,7 @@ This will only work if our Flare address has sufficient funds.
129129
./smart_accounts.py debug mock-create-fund --seed "mockAccount" --value 1
130130
```
131131

132-
Here we arbitrarily chose the name `mockAccount` as the account address.
132+
Here, we arbitrarily chose the name `mockAccount` as the account address.
133133
Behind the scenes, the string `mockAccount` will be concatenated with our Flare address.
134134

135135
You can check the associated account with the command:

docs/smart-accounts/guides/03-fassets-cycle.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ unlisted: false
2020
import ThemedImage from "@theme/ThemedImage";
2121
import useBaseUrl from "@docusaurus/useBaseUrl";
2222

23-
In this guide we will walk you through all aspects of the [FAssets](/fassets/overview) process.
24-
We will start with an account on XRPL, we will send its assets to Flare, and then return them back to XRPL.
23+
In this guide, we will walk you through all aspects of the [FAssets](/fassets/overview) process.
24+
We will start with an account on XRPL, we will send its assets to Flare, and then return them to XRPL.
2525
The steps we will take will be as follows:
2626

2727
1. `mint`: convert XRP to FXRP
@@ -63,7 +63,7 @@ The command is:
6363
We withdraw the same number of tokens that we have just deposited from the Firelight vault.
6464
The process involves two steps.
6565
The CLI first sends the `withdraw` instruction, and afterwards, the `claimWithdraw`.
66-
The first instructions starts the withdrawal process, and the second claims the FXRP once it is released.
66+
The first instruction starts the withdrawal process, and the second claims the FXRP once it is released.
6767

6868
We use the command:
6969

0 commit comments

Comments
 (0)