Skip to content

Commit 0d27f8b

Browse files
fix(docs): Implement Kristap's comments
1 parent bce8399 commit 0d27f8b

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ We expand the workflow described in the [Flare Smart Accounts overview](/smart-a
6464
Custom instructions are an array of the `CustomInstructions.CustomCall` Solidity struct.
6565
The struct contains three fields:
6666

67-
- **targetContract**: the address of the smart contract that will execute the custom function
68-
- **value**: the amount of FLR paid to the contract
69-
- **data**: transaction calldata, which includes a function selector and values of the function's arguments
67+
- `targetContract`: the address of the smart contract that will execute the custom function
68+
- `value`: the amount of FLR paid to the contract
69+
- `data`: transaction calldata, which includes a function selector and values of the function's arguments
7070

7171
Each of the custom instructions in the array will be performed in order.
7272
A call to the `targetContract` address is made, with the specified `value` and the calldata `data`.
@@ -108,7 +108,7 @@ function encodeCustomInstruction(
108108
}
109109
```
110110

111-
Behind the scenes, the `MasterAccountController` contract calls the `encodeCustomInstruction` function of the `CustomInstructions` library..
111+
Behind the scenes, the `MasterAccountController` contract calls the `encodeCustomInstruction` function of the `CustomInstructions` library.
112112

113113
```Solidity
114114
function encodeCustomInstruction(
@@ -128,6 +128,7 @@ We register a custom instruction by calling the `registerCustomInstruction` func
128128
The `CustomInstructions.CustomCall` array is provided as an argument.
129129
It is encoded as described above and stored in a `CustomInstructions` mapping.
130130

131-
To obtain the instruction that can be sent as the memo of an XRPL Payment transaction, we do the following.
132-
We take the call hash, produced by the `encodeCustomInstruction` function, remove the first two bytes, and prepend to it the hexadecimal value `ff` and the `walletId`.
131+
To obtain the instruction that can be sent as the memo of an XRPL Payment transaction, we take the call hash produced by the `encodeCustomInstruction` function and modify it the following way.
132+
First, we remove the initial two bytes from this hash.
133+
Next, we prepend the hexadecimal value `ff` followed by the `walletId`.
133134
This is the encoded custom instruction.

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ keywords:
1414
flare-network,
1515
account-abstraction,
1616
]
17-
unlisted: false
1817
---
1918

2019
import CodeBlock from "@theme/CodeBlock";

docs/smart-accounts/guides/typescript-viem/03-custom-instruction.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ contract NoticeBoard {
109109
function pinNotice(string memory message) public payable {
110110
require(msg.value > 0);
111111
112-
// NOTE:(Nik) The subscription is 1 FLR per month.
113112
uint256 duration = THIRTY_DAYS * (msg.value / 1 ether);
114113
uint256 expirationTimestamp = block.timestamp + duration;
115114
@@ -428,7 +427,7 @@ async function waitForCustomInstructionExecutedEvent({
428427
}
429428
```
430429

431-
The vehicle for bridging the instruction is FDC, which puts a maximum cap of 180 seconds on the process duration.
430+
The vehicle for bridging the instruction is the [Flare Data Connector](/fdc/overivew), which puts a maximum cap of 180 seconds on the process duration.
432431

433432
## Full script
434433

@@ -525,3 +524,4 @@ CustomInstructionExecuted event: {
525524
blockTimestamp: undefined
526525
}
527526
```
527+

0 commit comments

Comments
 (0)