Skip to content

Commit 9eede4e

Browse files
fix(docs): grammar
1 parent c104eda commit 9eede4e

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

docs/smart-accounts/1-overview.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import ThemedImage from "@theme/ThemedImage";
2121
import useBaseUrl from "@docusaurus/useBaseUrl";
2222

2323
The Flare Smart Accounts is an account abstraction that allows XRPL users to perform actions on the Flare chain without owning any FLR token.
24-
Each XRPL address is assigned a unique **smart account** on the Flare chain, that only they can control.
24+
Each XRPL address is assigned a unique **smart account** on the Flare chain, which only it can control.
2525
They do so through `Payment` transactions on the XRPL.
2626
The Flare Smart Accounts are especially useful as a way of interacting with the FAssets workflow.
2727

@@ -36,12 +36,12 @@ The workflow for Flare Smart Accounts is comprised of the following steps.
3636

3737
## 1. Instructions on XRPL
3838

39-
The Flare Smart Accounts allows XRPL users to perform actions on the Flare chain through instructions on the XRPL.
39+
The Flare Smart Accounts allow XRPL users to perform actions on the Flare chain through instructions on the XRPL.
4040
This is done through a `Payment` to an XRPL address, designated by the operator - a backend monitoring incoming transactions and interacting with the Flare chain.
4141
The payment must transfer sufficient funds, as specified by the operator, and must include the proper payment receipt in the memo field.
4242

4343
The payment receipt is a `bytes32` value.
44-
The first byte is reserved for the instructions code, a byte-representation of a two-digit number.
44+
The first byte is reserved for the instruction code, a byte representation of a two-digit number.
4545
The remaining 31 bytes are the parameters for the chosen instruction.
4646

4747
In practice, the payment receipt should be prepared by a backend, through a web form.

docs/smart-accounts/2-fasset-instructions.mdx

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

23-
In this guide we will take a closer look at the Flare Smart Accounts instructions related to FAssets.
23+
In this guide, we will take a closer look at the Flare Smart Accounts instructions related to FAssets.
2424
FAsset is a trustless, over-collateralized bridge between XRPL and the Flare chain.
2525
The FXRP is a token representation of XRP on the Flare chain.
2626
FAssets allow XRPL users to partake in Flare's DeFi ecosystem using their XRP assets, without exchanging them for the FLR token.
2727

28-
Several steps of the FAsset process are performed as transactions on the Flare chain, which requires users to hold FLR token for paying gas fees.
28+
Several steps of the FAsset process are performed as transactions on the Flare chain, which requires users to hold FLR tokens for paying gas fees.
2929
The Flare Smart Accounts sidestep this by allowing XRPL users to trigger these actions through `Payment` transactions on XRPL.
3030
Thus, they eradicate completely the need for XRPL users to hold any non-XRPL assets.
3131

3232
You can learn more about the FAssets in the [dedicated section](/fassets/overview/).
3333

3434
## `01` Deposit
3535

36-
Deposit an `amount` of FXRP from you account into the Firelight vault `depositVault`.
36+
Deposit an `amount` of FXRP from your account into the Firelight vault `depositVault`.
3737
The address `depositVault` is designated by the `MasterAccountController` contract, and the `amount` is read from the last 31 bytes of the payment reference.
3838

39-
A deposit payment reference is the 32 byte value:
39+
A deposit payment reference is the 32-byte value:
4040

4141
- byte representation of `02` on the first byte,
4242
- byte representation of the `amount` number on the other 31 bytes.
@@ -66,7 +66,7 @@ The first part of the withdrawal process from a Firelight vault.
6666
Initiate a withdrawal request of an `amount` of FXRP from the Firelight vault `depositVault`.
6767
The address `depositVault` is designated by the `MasterAccountController` contract, and the `amount` is read from the last 31 bytes of the payment reference.
6868

69-
A withdraw payment reference is the 32 byte value:
69+
A withdraw payment reference is the 32-byte value:
7070

7171
- byte representation of `02` on the first byte,
7272
- byte representation of the `amount` number on the other 31 bytes.
@@ -91,12 +91,12 @@ A withdraw payment reference is the 32 byte value:
9191

9292
## `03` Approve (deprecated)
9393

94-
_Approval has been made part of the deposit actions and is now deprecated._
94+
_Approval has been integrated into the deposit action and is now deprecated._
9595

9696
Approve the `depositVault` address to withdraw an `amount` of FXRP from your smart account.
9797
The address `depositVault` is designated by the `MasterAccountController` contract, and the `amount` is read from the last 31 bytes of the payment reference.
9898

99-
A withdraw payment reference is the 32 byte value:
99+
A withdraw payment reference is the 32-byte value:
100100

101101
- byte representation of `03` on the first byte,
102102
- byte representation of the `amount` number on the other 31 bytes.
@@ -122,13 +122,13 @@ A withdraw payment reference is the 32 byte value:
122122
## `04` Redeem
123123

124124
Redemption is the process of converting FXRP back to XRP.
125-
A number of `lots` of FXRP are burned, and the same number of `lots` of XRP in returned to the user's XRPL account.
125+
A number of `lots` of FXRP are burned, and the same number of `lots` of XRP is returned to the user's XRPL account.
126126

127127
The process is performed by an `executor` with `executorFee` (explained in the [minting guide](/fassets/minting#executor-role));
128128
both of these are defined by the `MasterAccountController` contract.
129129
The `lots` and `agentVault` values are both read from the payment reference.
130130

131-
A redeem payment reference is the 32 byte value:
131+
A redeem payment reference is the 32-byte value:
132132

133133
- byte representation of `04` on the first byte,
134134
- 19 empty bytes,
@@ -155,15 +155,15 @@ A redeem payment reference is the 32 byte value:
155155
## `05` Reserve collateral
156156

157157
Collateral reservation is the first step in the FAssets minting process.
158-
In anticipation of transfer of XRP to the agent's underlying address on XRPL a portion of its collateral is locked to prevent accidental under-collateralization.
158+
In anticipation of the transfer of XRP to the agent's underlying address on XRPL, a portion of its collateral is locked to prevent accidental under-collateralization.
159159
Since this action happens on the Flare chain, the gas fees need to be paid in the native FLR token.
160160

161161
The reserveCollateral action reserves a number of `lots` of collateral of the `agentVault`.
162162
The process is performed by an `executor` with `executorFee` (explained in the [minting guide](/fassets/minting#executor-role));
163163
both of these are defined by the `MasterAccountController` contract.
164164
The `lots` and `agentVault` values are both read from the payment reference.
165165

166-
A reserveCollateral payment reference is a 32 byte value:
166+
A reserveCollateral payment reference is a 32-byte value:
167167

168168
- byte representation of `05` on the first byte,
169169
- `agentVault` address on the next 20 bytes,
@@ -194,7 +194,7 @@ Claim the pending withdrawal from the Firelight `depositVault`, specified by the
194194
The assets are transferred to the user's smart account.
195195
The action can only be performed after one full period has passed.
196196

197-
A reserveCollateral payment reference is a 32 byte value:
197+
A reserveCollateral payment reference is a 32-byte value:
198198

199199
- byte representation of `06` on the first byte,
200200
- 31 empty bytes.

docs/smart-accounts/3-custom-instruction.mdx

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

23-
Flare Smart Accounts allow users to execute custom function calls on the Flare chain, through instructions on XRPL.
23+
Flare Smart Accounts allow users to execute custom function calls on the Flare chain through instructions on XRPL.
2424
The process expands on the workflow for other actions by including an additional step at the beginning.
2525

2626
In order for the `MasterAccountController` contract to be able to give a custom instruction to a personal account, the custom action must first be registered with the said contract.
27-
The custom instruction is stored in a mapper, with its 31 byte hash as a key.
28-
That hash is then sent as payment reference, along with the byte representation of the number 99 in the first byte.
27+
The custom instruction is stored in a mapper, with its 31-byte hash as a key.
28+
That hash is then sent as the payment reference, along with the byte representation of the number 99 in the first byte.
2929

3030
<div
3131
style={{
@@ -74,7 +74,7 @@ In Solidity, we can obtain the calldata by doing the following:
7474
abi.encodeWithSignature("<functionName>(<type1>,<type2>,...,<typeN>)", [<value1>, <value2>, ..., <valueN>]);
7575
```
7676

77-
where `<functionName>` is the name of the function that we want to call, `<type1>`,`<type2>`, . . . ,`<typeN>` are its argument types, and `<value1>`, `<value2>`, . . . , `<valueN>` their values.
77+
where `<functionName>` is the name of the function that we want to call, `<type1>`, `<type2>`, . . . , `<typeN>` are its argument types, and `<value1>`, `<value2>`, . . . , `<valueN>` their values.
7878

7979
Only function calls with specific parameter values included can be registered.
8080
That means that a new custom instruction needs to be registered for each unique action (though this can be done just seconds in advance).
@@ -84,10 +84,10 @@ It is also the reason why special FAsset actions have their own IDs, instead of
8484

8585
To produce the custom instructions calldata, we first ABI encode the array of the `IMasterAccountController.CustomInstruction` struct.
8686
We then take the `keccak256` hash of that value, and drop the last byte.
87-
That is the call hash that that is provided as the payment reference for the custom action, and the ID under which the custom instructions are stored in the `MasterAccountController` contract.
87+
That is the call hash that is provided as the payment reference for the custom action, and the ID under which the custom instructions are stored in the `MasterAccountController` contract.
8888

8989
## 0. Register custom instructions
9090

9191
We register a custom instruction by calling the `registerCustomInstruction` function on the `MasterAccountController` contract.
9292
The `IMasterAccountController.CustomInstruction` array is provided as an argument.
93-
It is encoded as described above, and stored to a `CustomInstructions` mapping.
93+
It is encoded as described above and stored in a `CustomInstructions` mapping.

0 commit comments

Comments
 (0)