You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The [`awk`](https://www.tutorialspoint.com/awk/index.htm) command looks for the line that has `Deployed to:` and writes the third word in that line, which is the address.
175
+
The [`awk`](https://www.tutorialspoint.com/awk/index.htm) command looks for the line that has `Deployed to:` and writes the third word in that line, which is the address.
176
176
177
-
```sh
178
-
awk '/Deployed to:/ {print $3}'
179
-
```
177
+
```sh
178
+
awk '/Deployed to:/ {print $3}'
179
+
```
180
180
181
-
Finally, in UNIX (including Linux and macOS) the when the command line includes backticks (\`\`\`), the shell executes the code between the backticks and puts the output, in this case the contract address, in the command.
182
-
So we get.
181
+
Finally, in UNIX (including Linux and macOS) the when the command line includes backticks (\`\`\`), the shell executes the code between the backticks and puts the output, in this case the contract address, in the command.
182
+
So we get.
183
183
184
-
```sh
185
-
GREETER_B_ADDR=<the address>
186
-
```
187
-
</details>
184
+
```sh
185
+
GREETER_B_ADDR=<the address>
186
+
```
187
+
</details>
188
188
189
-
<details>
190
-
<summary>Sanity check</summary>
189
+
<details>
190
+
<summary>Sanity check</summary>
191
191
192
-
Run these commands to verify the contract works.
193
-
The first and third commands retrieve the current greeting, while the second command updates it.
192
+
Run these commands to verify the contract works.
193
+
The first and third commands retrieve the current greeting, while the second command updates it.
This function encodes a call to `setGreeting` and sends it to a contract on another chain.
232
-
`abi.encodeCall(Greeter.setGreeting, (greeting))` constructs the [calldata](https://docs.soliditylang.org/en/latest/internals/layout_in_calldata.html) by encoding the function selector and parameters.
233
-
The encoded message is then passed to `messenger.sendMessage`, which forwards it to the destination contract (`greeterAddress`) on the specified chain (`greeterChainId`).
231
+
This function encodes a call to `setGreeting` and sends it to a contract on another chain.
232
+
`abi.encodeCall(Greeter.setGreeting, (greeting))` constructs the [calldata](https://docs.soliditylang.org/en/latest/internals/layout_in_calldata.html) by encoding the function selector and parameters.
233
+
The encoded message is then passed to `messenger.sendMessage`, which forwards it to the destination contract (`greeterAddress`) on the specified chain (`greeterChainId`).
234
234
235
-
This ensures that `setGreeting` is executed remotely with the provided `greeting` value (as long as there is an executing message to relay it).
236
-
</details>
235
+
This ensures that `setGreeting` is executed remotely with the provided `greeting` value (as long as there is an executing message to relay it).
0 commit comments