chore(web-client): v12 tutorials clean up#145
Conversation
| ### Authentication Component | ||
|
|
||
| If the `increment_count` procedure did not call the `account::incr_nonce` procedure during its execution, only the deployer of the counter contract would be able to increment the count of the smart contract (if the RpoFalcon512 component was added to the account, in this case we didn't add it). | ||
| **Important**: Starting with Miden Client 0.10.0, all accounts must have an authentication component. For smart contracts that don't require authentication (like our counter contract), we use a `NoAuth` component. |
There was a problem hiding this comment.
Let's remove the reference to 0.10.0. Let's just say:
| **Important**: Starting with Miden Client 0.10.0, all accounts must have an authentication component. For smart contracts that don't require authentication (like our counter contract), we use a `NoAuth` component. | |
| **Important**: All accounts must have an authentication component. For smart contracts that do not require authentication (like our counter contract), we use a `NoAuth` component. |
Nit: lets stick to avoiding contractions in our docs. Other projects follow this standard in technical writing. For example: https://docs.soliditylang.org/en/latest/contributing.html#expand-contractions
| **Important**: Starting with Miden Client 0.10.0, all accounts must have an authentication component. For smart contracts that don't require authentication (like our counter contract), we use a `NoAuth` component. | ||
|
|
||
| In essence, if a procedure performs a state change in the Miden smart contract, and does not call `account::incr_nonce` at some point during its execution, this function can be equated to having an `onlyOwner` Solidity modifer, meaning only the user with knowledge of the private key of the account can execute transactions that result in a state change. | ||
| This `NoAuth` component allows any user to interact with the smart contract without requiring signature verification.ivate key of the account can execute transactions that result in a state change. |
| # Creating Multiple Notes in a Single Transaction | ||
|
|
There was a problem hiding this comment.
Did you mean to remove the heading?
There was a problem hiding this comment.
Yes, I removed it as docusaurus md files should not have a dedicated heading (linter warning) if the heading is already specified as a "title" property at the start of the file.
| "0x67dc56bd0cbe629000006f36d81029", | ||
| '0xbf1db1694c83841000008cefd4fce0', | ||
| '0xee1a75244282c32000010a29bed5f4', | ||
| '0x67dc56bd0cbe629000006f36d81029', |
There was a problem hiding this comment.
Nit: update to use bech32 format
| "0x67dc56bd0cbe629000006f36d81029", | ||
| '0xbf1db1694c83841000008cefd4fce0', | ||
| '0xee1a75244282c32000010a29bed5f4', | ||
| '0x67dc56bd0cbe629000006f36d81029', |
There was a problem hiding this comment.
Nit: same thing here
| # How to Use Unauthenticated Notes | ||
|
|
There was a problem hiding this comment.
Same as other comment, did you mean to remove this title?
There was a problem hiding this comment.
Yes, I removed it as docusaurus md files should not have a dedicated heading (linter warning) if the heading is already specified as a "title" property at the start of the file.
| ); | ||
|
|
||
| const nodeEndpoint = "https://rpc.testnet.miden.io:443"; | ||
| const nodeEndpoint = 'https://rpc.testnet.miden.io:443'; |
There was a problem hiding this comment.
Not sure we need the port number 443 anymore. Could you check?
There was a problem hiding this comment.
Just checked, runs fine without the port, will remove!
|
|
||
| // 7. Send tokens to Bob | ||
| const bobAccountId = "0x599a54603f0cf9000000ed7a11e379"; | ||
| const bobAccountId = '0x599a54603f0cf9000000ed7a11e379'; |
There was a problem hiding this comment.
Same as other comment, but most likely for separate PR, we should use bech32 now.
|
|
||
| const client = await WebClient.createClient( | ||
| "https://rpc.testnet.miden.io:443", | ||
| 'https://rpc.testnet.miden.io:443', |
There was a problem hiding this comment.
Same as other comment, can we remove the port number now?
| "0xbf1db1694c83841000008cefd4fce0", | ||
| "0xee1a75244282c32000010a29bed5f4", | ||
| "0x67dc56bd0cbe629000006f36d81029", | ||
| '0xbf1db1694c83841000008cefd4fce0', |
|
FYI, I will open a subsequent PR to bring back the bech32 format for the web-client tutorials. Created an issue to track this here: #146 |
This PR brings the following changes: