Skip to content

Commit

Permalink
docs: img add default alt and format table (#694)
Browse files Browse the repository at this point in the history
* 文档:img添加alt默认字段,格式化表格

* 文档:img添加alt默认字段,格式化表格

* Update docs/course/contract-compile-deploy.zh-CN.md

* Update docs/course/contract-compile-deploy.md

* Update docs/course/contract-compile-deploy.md

* Update docs/course/contract-compile-deploy.md

---------

Co-authored-by: “付韶桓” <“fu_shao_huan@163.com”>
Co-authored-by: thinkasany <480968828@qq.com>
  • Loading branch information
3 people committed Mar 26, 2024
1 parent efd6bbd commit da02146
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 59 deletions.
6 changes: 3 additions & 3 deletions docs/course/contract-compile-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ Click the drop-down box of `ENVIRONMENT`, you can see many options to choose fro

Then, `MetaMask` will pop up a window and prompt to connect it to `Remix`. After connecting `MetaMask` to `Remix`, the side panel will be updated to display the connected network and account. Deploying to the testnet also requires testnet tokens. You can find the corresponding testnet token faucet on the network for recharging.

<img src='./img/changeNode.png' width="33%">
<img src='./img/changeNode.png' width="33%" alt="choose Injected Provider - MetaMask" />

<img src='./img/connect1.png' width="33%">
<img src='./img/connect1.png' width="33%" alt="connecting MetaMask to Remix" />

<img src='./img/connect2.png' width="33%">
<img src='./img/connect2.png' width="33%" alt="display the connected network and account" />

Now, the wallet connection is complete, and you can start deploying the contract. Since a simple `ERC721` smart contract is being deployed, the default `Gas Limit` set by `Remix` is 3 million, which is enough, and there is no need to specify the value sent with the deployment. For this, you can perform the following steps to deploy the contract:

Expand Down
6 changes: 3 additions & 3 deletions docs/course/contract-compile-deploy.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ order: 3

随后,`MetaMask` 将跳出弹窗并提示将其连接至 `Remix`。将`MetaMask` 连接至 `Remix` 后,侧面板将更新显示所连接的网络和账户。部署到测试网也需要测试网的代币,你可以在网络上查找对应的测试网代币水龙头充值使用。

<img src='./img/changeNode.png' width="33%">
<img src='./img/connect1.png' width="33%">
<img src='./img/connect2.png' width="33%">
<img src='./img/changeNode.png' width="33%" alt="选择 Injected Provider - MetaMask" />
<img src='./img/connect1.png' width="33%" alt="将 MetaMask 连接到 Remix" />
<img src='./img/connect2.png' width="33%" alt="显示连接的网络和账户" />

现在,已完成钱包连接,可以开始部署合约。由于正在部署一个简单的 `ERC721` 智能合约,因此 `Remix` 设置的默认 `Gas Limit` 为 300 万就足够了,无需指定随部署一同发送的值。为此,您可以执行以下步骤部署合约:

Expand Down
10 changes: 5 additions & 5 deletions docs/course/contract-dev-test.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ order: 2
具体要修改的内有:

1.`initialOwner` 设置为合约发行人,这样在部署合约的时候就会更简单,不用指定 `initialOwner`
1. 定义了一个名为 `_nextTokenId` 类型为`uint256`合约私有变量`private`,用来标记当前的进度,每新增一个 NFT 该值需要加一;
1.`mint` 方法中要求传入的类型为 `uint256``quantity`,代表这次要铸造多少个 NFT。在这里,我们先简化逻辑,限制每次只能铸造一个。
1. 去掉 `onlyOwner` 修饰符,这样就可以让任何人都可以调用 `mint` 方法了。
1. 添加 `payable` 修饰符,这样就可以让调用 `mint` 方法的人可以同时向合约转账了。
1. `_safeMint` 也要改为 `_mint`,这个主要是为了避免在后面通过 Remix 合约调用合约来测试的时候报错,`to` 也对应改为 `msg.sender`,代表 NFT 铸造给发起交易的地址。
2. 定义了一个名为 `_nextTokenId` 类型为`uint256`合约私有变量`private`,用来标记当前的进度,每新增一个 NFT 该值需要加一;
3.`mint` 方法中要求传入的类型为 `uint256``quantity`,代表这次要铸造多少个 NFT。在这里,我们先简化逻辑,限制每次只能铸造一个。
4. 去掉 `onlyOwner` 修饰符,这样就可以让任何人都可以调用 `mint` 方法了。
5. 添加 `payable` 修饰符,这样就可以让调用 `mint` 方法的人可以同时向合约转账了。
6. `_safeMint` 也要改为 `_mint`,这个主要是为了避免在后面通过 Remix 合约调用合约来测试的时候报错,`to` 也对应改为 `msg.sender`,代表 NFT 铸造给发起交易的地址。

代码如下:

Expand Down
2 changes: 1 addition & 1 deletion docs/course/contract-init.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ We will demonstrate through the `Create` button in this tutorial. When we click

When you select an `ERC721` template of the `OpenZeppelin` library, you can add additional features.

> [ERC721](https://eips.ethereum.org/EIPS/eip-721) (Ethereum Request for Comments 721), proposed by William Entriken, Dieter Shirley, Jacob Evans, Nastassia Sachs in January 2018, is a non-homogeneous token standard that implements token APIs in smart contracts. [OpenZeppelin](https://docs.openzeppelin.com/contracts/5.x/) is a library for secure smart contract development, which contains the standard implementation of many commonly used contracts.
> [ERC721](https://eips.ethereum.org/EIPS/eip-721) (Ethereum Request for Comments 721), proposed by William Entriken, Dieter Shirley, Jacob Evans, Nastasia Sachs in January 2018, is a non-homogeneous token standard that implements token APIs in smart contracts. [OpenZeppelin](https://docs.openzeppelin.com/contracts/5.x/) is a library for secure smart contract development, which contains the standard implementation of many commonly used contracts.
![](./img/create.png) ![](./img/mintable.png)

Expand Down
46 changes: 23 additions & 23 deletions docs/guide/ant-design-web3.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,26 @@ Why use Ant Design Web3?
There are more features:

| Feature | Supported |
| -------------------------------------------------------------------------------- | --------- |
| [Theme customization](https://web3.ant.design/guide/theme) ||
| [Internationalization](https://web3.ant.design/guide/intl) ||
| 100% test coverage ||
| TypeScript support ||
| Responsive design ||
| Quick and easy wallet connection component ||
| [NFT component](https://web3.ant.design/components/nft-card) ||
| More practical components such as Address ||
| [Rich icon library](https://web3.ant.design/components/icons) ||
| Support EIP6963 ||
| Support WalletConnect ||
| [Support Ethereum and its L2](https://web3.ant.design/components/wagmi) ||
| [Support Solana](https://web3.ant.design/components/solana) ||
| [Adapt to non-EVM chains such as Bitcoin](https://web3.ant.design/guide/adapter) ||
| [Course](https://web3.ant.design/course/introduction) ||
| Use with wagmi ||
| Use with ethers ||
| Use with web3.js ||
| Use with umi ||
| Use with Next.js ||
| Use with Remix ||
| Use with Tailwind CSS ||
|----------------------------------------------------------------------------------|-----------|
| [Theme customization](https://web3.ant.design/guide/theme) | |
| [Internationalization](https://web3.ant.design/guide/intl) | |
| 100% test coverage | |
| TypeScript support | |
| Responsive design | |
| Quick and easy wallet connection component | |
| [NFT component](https://web3.ant.design/components/nft-card) | |
| More practical components such as Address | |
| [Rich icon library](https://web3.ant.design/components/icons) | |
| Support EIP6963 | |
| Support WalletConnect | |
| [Support Ethereum and its L2](https://web3.ant.design/components/wagmi) | |
| [Support Solana](https://web3.ant.design/components/solana) | |
| [Adapt to non-EVM chains such as Bitcoin](https://web3.ant.design/guide/adapter) | |
| [Course](https://web3.ant.design/course/introduction) | |
| Use with wagmi | |
| Use with ethers | |
| Use with web3.js | |
| Use with umi | |
| Use with Next.js | |
| Use with Remix | |
| Use with Tailwind CSS | |
48 changes: 24 additions & 24 deletions docs/guide/ant-design-web3.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,27 @@ Ant Design Web3 是一个基于 [Ant Design](https://ant.design/index-cn) 的 We

还有更多特性:

| 特性 | 是否支持 |
| ----------------------------------------------------------------- | -------- |
| [主题定制](https://web3.ant.design/guide/theme-cn) | |
| [国际化](https://web3.ant.design/guide/intl-cn) | |
| 测试覆盖率 100% | |
| TypeScript 支持 | |
| 响应式设计 | |
| 快速简单的连接钱包组件 | |
| [NFT 组件](https://web3.ant.design/components/nft-card-cn) | |
| Address 等更多实用组件 | |
| [丰富的图标库](https://web3.ant.design/components/icons-cn) | |
| 支持 EIP6963 | |
| 支持 WalletConnect | |
| [支持以太坊及其 L2](https://web3.ant.design/components/wagmi-cn) | |
| [支持 Solana](https://web3.ant.design/components/solana-cn) | |
| [适配比特币等非 EVM 链](https://web3.ant.design/guide/adapter-cn) | |
| [课程](https://web3.ant.design/course/introduction-cn) | |
| 和 wagmi 一起使用 | |
| 和 ethers 一起使用 | |
| 和 web3.js 一起使用 | |
| 和 umi 一起使用 | |
| 和 Next.js 一起使用 | |
| 和 Remix 一起使用 | |
| 和 Tailwind CSS 一起使用 | |
| 特性 | 是否支持 |
|-----------------------------------------------------------|------|
| [主题定制](https://web3.ant.design/guide/theme-cn) ||
| [国际化](https://web3.ant.design/guide/intl-cn) ||
| 测试覆盖率 100% ||
| TypeScript 支持 ||
| 响应式设计 ||
| 快速简单的连接钱包组件 | |
| [NFT 组件](https://web3.ant.design/components/nft-card-cn) ||
| Address 等更多实用组件 ||
| [丰富的图标库](https://web3.ant.design/components/icons-cn) ||
| 支持 EIP6963 ||
| 支持 WalletConnect ||
| [支持以太坊及其 L2](https://web3.ant.design/components/wagmi-cn) ||
| [支持 Solana](https://web3.ant.design/components/solana-cn) ||
| [适配比特币等非 EVM 链](https://web3.ant.design/guide/adapter-cn) ||
| [课程](https://web3.ant.design/course/introduction-cn) ||
| 和 wagmi 一起使用 ||
| 和 ethers 一起使用 ||
| 和 web3.js 一起使用 ||
| 和 umi 一起使用 ||
| 和 Next.js 一起使用 ||
| 和 Remix 一起使用 ||
| 和 Tailwind CSS 一起使用 ||

0 comments on commit da02146

Please sign in to comment.