Skip to content

Md syntax fixes #14972

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,18 @@ module.exports = (phase, { defaultConfig }) => {
"node_modules/@swc/core-linux-x64-gnu",
"node_modules/@swc/core-linux-x64-musl",
"node_modules/@esbuild/linux-x64",
"src/data",
"public/**/*.jpg",
"public/**/*.png",
"public/**/*.webp",
"public/**/*.svg",
"public/**/*.gif",
"src/data",
"public/**/*.json",
"public/**/*.txt",
"public/**/*.xml",
"public/**/*.pdf",
"public/fonts",
"public/images",
],
},
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
},
"devDependencies": {
"@chromatic-com/storybook": "1.5.0",
"@netlify/plugin-nextjs": "^5.8.0",
"@netlify/plugin-nextjs": "^5.10.0",
"@storybook/addon-essentials": "8.1.10",
"@storybook/addon-interactions": "8.1.10",
"@storybook/addon-links": "8.1.10",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ The best way to handle links is to copy them directly from the source, either by

![Example of link.png](./example-of-link.png)

Links also appear in the source text in the form of tags (i.e. <0> </0>). If you hover over the tag, the editor will show its full content - sometimes these tags will represent links.
Links also appear in the source text in the form of tags (i.e. \<0> \</0>). If you hover over the tag, the editor will show its full content - sometimes these tags will represent links.

It is very important to copy the links from the source and not change their order.

Expand Down Expand Up @@ -160,7 +160,7 @@ nonce - _Non-translatable text_

The source text also contains shortened tags, which only contain numbers, meaning that their function is not immediately obvious. You can hover over these tags to see exactly which function they serve.

In the example below, you can see that hovering over the <0> tag shows that it represents `<code>` and contains a code snippet, therefore the content inside these tags should not be translated.
In the example below, you can see that hovering over the \<0> tag shows that it represents `<code>` and contains a code snippet, therefore the content inside these tags should not be translated.

![Example of ambiguous tags.png](./example-of-ambiguous-tags.png)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ The benefits of this network design are:
- reduce dependence on centralized providers
- Reduce Internet bandwidth usage
- Minimized or zero syncing
- Accessible to resource-constrained devices (<1 GB RAM, <100 MB disk space, 1 CPU)
- Accessible to resource-constrained devices (\<1 GB RAM, \<100 MB disk space, 1 CPU)

The diagram below shows the functions of existing clients that can be delivered by the Portal Network, enabling users to access these functions on very low-resource devices.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Low-level formal specifications can be given as either Hoare-style properties or

### Hoare-style properties {#hoare-style-properties}

[Hoare Logic](https://en.wikipedia.org/wiki/Hoare_logic) provides a set of formal rules for reasoning about the correctness of programs, including smart contracts. A Hoare-style property is represented by a Hoare triple {_P_}_c_{_Q_}, where _c_ is a program and _P_ and _Q_ are predicates on the state of the _c_ (i.e., the program), formally described as _preconditions_ and _postconditions_, respectively.
[Hoare Logic](https://en.wikipedia.org/wiki/Hoare_logic) provides a set of formal rules for reasoning about the correctness of programs, including smart contracts. A Hoare-style property is represented by a Hoare triple \{_P_}_c_\{_Q_}, where _c_ is a program and _P_ and _Q_ are predicates on the state of the _c_ (i.e., the program), formally described as _preconditions_ and _postconditions_, respectively.

A precondition is a predicate describing the conditions required for the correct execution of a function; users calling into the contract must satisfy this requirement. A postcondition is a predicate describing the condition that a function establishes if correctly executed; users can expect this condition to be true after calling into the function. An _invariant_ in Hoare logic is a predicate that is preserved by execution of a function (i.e., it doesn't change).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ These days there are a lot of [L2 scaling solution](https://ethereum.org/en/laye
}
```

# Conclusion {#conclusion}
## Conclusion {#conclusion}

Of course, you don't really care about providing a user interface for `Greeter`. You want to create a user interface for your own contracts. To create your own application, run these steps:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ code clearer and therefore easier to secure. So to create your own Vyper ERC-721
contract](https://github.com/vyperlang/vyper/blob/master/examples/tokens/ERC721.vy) and modify it
to implement the business logic you want.

# Conclusion {#conclusion}
## Conclusion {#conclusion}

For review, here are some of the most important ideas in this contract:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ the way normal addition does.

These are the four functions that do the actual work: `_transfer`, `_mint`, `_burn`, and `_approve`.

#### The \_transfer function {#\_transfer}
#### The _transfer function {#_transfer}

```solidity
/**
Expand Down Expand Up @@ -757,7 +757,7 @@ is atomic, nothing can happen in the middle of it.
Finally, emit a `Transfer` event. Events are not accessible to smart contracts, but code running outside the blockchain
can listen for events and react to them. For example, a wallet can keep track of when the owner gets more tokens.

#### The \_mint and \_burn functions {#\_mint-and-\_burn}
#### The _mint and _burn functions {#_mint-and-_burn}

These two functions (`_mint` and `_burn`) modify the total supply of tokens.
They are internal and there is no function that calls them in this contract,
Expand Down Expand Up @@ -819,7 +819,7 @@ Make sure to update `_totalSupply` when the total number of tokens changes.

The `_burn` function is almost identical to `_mint`, except it goes in the other direction.

#### The \_approve function {#\_approve}
#### The _approve function {#_approve}

This is the function that actually specifies allowances. Note that it allows an owner to specify
an allowance that is higher than the owner's current balance. This is OK because the balance is
Expand Down Expand Up @@ -904,7 +904,7 @@ are not designed to handle it.
This is the hook function to be called during transfers. It is empty here, but if you need
it to do something you just override it.

# Conclusion {#conclusion}
## Conclusion {#conclusion}

For review, here are some of the most important ideas in this contract (in my opinion, yours is likely to vary):

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ In your project directory type:
npm install --save-dev @nomiclabs/hardhat-ethers "ethers@^5.0.0"
```

### Step 13: Update hardhat.config.js {#step-13-update-hardhat.configjs}
### Step 13: Update hardhat.config.js {#step-13-update-hardhat-configjs}

We’ve added several dependencies and plugins so far, now we need to update `hardhat.config.js` so that our project knows about all of them.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ published: 2021-04-22
[3LAU](https://www.forbes.com/sites/abrambrown/2021/03/03/3lau-nft-nonfungible-tokens-justin-blau/?sh=5f72ef64643b): $11 Million
[Grimes](https://www.theguardian.com/music/2021/mar/02/grimes-sells-digital-art-collection-non-fungible-tokens): $6 Million

All of them minted their NFTs using Alchemy’s powerful API. In this tutorial, we’ll teach you how to do the same in <10 minutes.
All of them minted their NFTs using Alchemy’s powerful API. In this tutorial, we’ll teach you how to do the same in \<10 minutes.

“Minting an NFT” is the act of publishing a unique instance of your ERC-721 token on the blockchain. Using our smart contract from [Part 1 of this NFT tutorial series](/developers/tutorials/how-to-write-and-deploy-an-nft/), let’s flex our Web3 skills and mint an NFT. At the end of this tutorial, you’ll be able to mint as many NFTs as your heart (and wallet) desires!

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ Now that we’re inside our project folder, we’ll use npm init to initialize t

It doesn’t really matter how you answer the installation questions; here is how we did it for reference:

```json
package name: (my-nft)
version: (1.0.0)
description: My first NFT!
Expand All @@ -95,6 +96,7 @@ It doesn’t really matter how you answer the installation questions; here is ho
"author": "",
"license": "ISC"
}
```

Approve the package.json, and we’re good to go!

Expand Down Expand Up @@ -255,6 +257,7 @@ We’ve added several dependencies and plugins so far, now we need to update har

Update your hardhat.config.js to look like this:

```js
/**
* @type import('hardhat/config').HardhatUserConfig
*/
Expand All @@ -272,6 +275,7 @@ Update your hardhat.config.js to look like this:
}
},
}
```

## Step 14: Compile our contract {#compile-contract}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ Contracts are always executed from the first byte. This is the initial part of t
| 4 | MSTORE | Empty |
| 5 | PUSH1 0x04 | 0x04 |
| 7 | CALLDATASIZE | CALLDATASIZE 0x04 |
| 8 | LT | CALLDATASIZE<4 |
| 9 | PUSH2 0x005e | 0x5E CALLDATASIZE<4 |
| 8 | LT | CALLDATASIZE\<4 |
| 9 | PUSH2 0x005e | 0x5E CALLDATASIZE\<4 |
| C | JUMPI | Empty |

This code does two things:
Expand Down Expand Up @@ -117,8 +117,8 @@ The `NOT` is bitwise, so it reverses the value of every bit in the call value.
| -----: | ------------ | --------------------------------------------------------------------------- |
| 1AC | DUP3 | Value\* 2^256-CALLVALUE-1 0x00 Value\* CALLVALUE 0x75 0 6 CALLVALUE |
| 1AD | GT | Value\*>2^256-CALLVALUE-1 0x00 Value\* CALLVALUE 0x75 0 6 CALLVALUE |
| 1AE | ISZERO | Value\*<=2^256-CALLVALUE-1 0x00 Value\* CALLVALUE 0x75 0 6 CALLVALUE |
| 1AF | PUSH2 0x01df | 0x01DF Value\*<=2^256-CALLVALUE-1 0x00 Value\* CALLVALUE 0x75 0 6 CALLVALUE |
| 1AE | ISZERO | Value\*\<=2^256-CALLVALUE-1 0x00 Value\* CALLVALUE 0x75 0 6 CALLVALUE |
| 1AF | PUSH2 0x01df | 0x01DF Value\*\<=2^256-CALLVALUE-1 0x00 Value\* CALLVALUE 0x75 0 6 CALLVALUE |
| 1B2 | JUMPI |

We jump if `Value*` is smaller than 2^256-CALLVALUE-1 or equal to it. This looks like logic to prevent overflow. And indeed, we see that after a few nonsense operations (writing to memory is about to get deleted, for example) at offset 0x01DE the contract reverts if the overflow is detected, which is normal behavior.
Expand Down Expand Up @@ -429,7 +429,7 @@ The code in offsets 0x138-0x143 is identical to what we saw in 0x103-0x10E in `s
| 194 | DUP3 | 0x04 0x20 0x00 0x04 CALLDATASIZE 0x0153 0xDA |
| 195 | DUP5 | CALLDATASIZE 0x04 0x20 0x00 0x04 CALLDATASIZE 0x0153 0xDA |
| 196 | SUB | CALLDATASIZE-4 0x20 0x00 0x04 CALLDATASIZE 0x0153 0xDA |
| 197 | SLT | CALLDATASIZE-4<32 0x00 0x04 CALLDATASIZE 0x0153 0xDA |
| 197 | SLT | CALLDATASIZE-4\<32 0x00 0x04 CALLDATASIZE 0x0153 0xDA |
| 198 | ISZERO | CALLDATASIZE-4>=32 0x00 0x04 CALLDATASIZE 0x0153 0xDA |
| 199 | PUSH2 0x01a0 | 0x01A0 CALLDATASIZE-4>=32 0x00 0x04 CALLDATASIZE 0x0153 0xDA |
| 19C | JUMPI | 0x00 0x04 CALLDATASIZE 0x0153 0xDA |
Expand Down Expand Up @@ -469,8 +469,8 @@ Let's see what happens if the function _does_ get the call data it needs.
| 172 | DUP2 | 0x04 calldataload(4) 0x04 calldataload(4) 0xDA |
| 173 | SLOAD | Storage[4] calldataload(4) 0x04 calldataload(4) 0xDA |
| 174 | DUP2 | calldataload(4) Storage[4] calldataload(4) 0x04 calldataload(4) 0xDA |
| 175 | LT | calldataload(4)<Storage[4] calldataload(4) 0x04 calldataload(4) 0xDA |
| 176 | PUSH2 0x017e | 0x017EC calldataload(4)<Storage[4] calldataload(4) 0x04 calldataload(4) 0xDA |
| 175 | LT | calldataload(4)\<Storage[4] calldataload(4) 0x04 calldataload(4) 0xDA |
| 176 | PUSH2 0x017e | 0x017EC calldataload(4)\<Storage[4] calldataload(4) 0x04 calldataload(4) 0xDA |
| 179 | JUMPI | calldataload(4) 0x04 calldataload(4) 0xDA |

If the first word is not less than Storage[4], the function fails. It reverts without any returned value:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ This is what we will be using in this tutorial.

Okay, now that we have a few of these questions out of the way, let’s move on to the tutorial. Feel free to ask questions anytime in the Alchemy [discord](https://discord.gg/gWuC7zB)!

### 7\. How to send secure, gas-optimized, and private transactions? {how-to-send-secure-gas-optimized-and-private-transactions}
### 7\. How to send secure, gas-optimized, and private transactions? {#how-to-send-secure-gas-optimized-and-private-transactions}

- [Alchemy has a suite of Transact APIs](https://docs.alchemy.com/reference/transact-api-quickstart). You can use these to send reinforced transactions, simulate transactions before they happen, send private transactions, and send gas-optimized transactions
- You can also use the [Notify API](https://docs.alchemy.com/docs/alchemy-notify) to be alerted when your transaction is pulled from the mempool and added to the chain
Expand Down
Loading