Skip to content
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

fix: code highlight #496

Merged
merged 1 commit into from
May 11, 2023
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
2 changes: 1 addition & 1 deletion 37_Signature/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ ethereum.request({method: "personal_sign", params: [account, hash]})
![浏览器console调用metamask进行签名](./img/37-4.jpg)

**3-2. 利用web3.py签名:** 批量调用中更倾向于使用代码进行签名,以下是基于web3.py的实现。
```
```py
from web3 import Web3, HTTPProvider
from eth_account.messages import encode_defunct

Expand Down
2 changes: 1 addition & 1 deletion 38_NFTSwap/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ discord:[WTF Academy](https://discord.gg/5akcruXrsk)

`ERC721`的安全转账函数会检查接收合约是否实现了`onERC721Received()`函数,并返回正确的选择器`selector`。用户下单之后,需要将`NFT`发送给`NFTSwap`合约。因此`NFTSwap`继承`IERC721Receiver`接口,并实现`onERC721Received()`函数:

```
```solidity
contract NFTSwap is IERC721Receiver{

// 实现{IERC721Receiver}的onERC721Received,能够接收ERC721代币
Expand Down
2 changes: 1 addition & 1 deletion 41_WETH/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ discord:[WTF Academy](https://discord.gg/5akcruXrsk)

2. 取款:拆包装,用户销毁`WETH`,并获得等量的`ETH`。

```
```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

Expand Down
1 change: 0 additions & 1 deletion 43_TokenVesting/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ tags:
- `ERC20Released`:提币事件,当受益人提取释放代币时释放。

```solidity

contract TokenVesting {
// 事件
event ERC20Released(address indexed token, uint256 amount); // 提币事件
Expand Down