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
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ We have collected a list of classic blockchain-related books to help developers
74
74
75
75
At the same time, feel free to keep expanding this [book list](./docs/books.md).
76
76
77
-
**Encryption course**
77
+
**Cryptographic course**
78
78
79
79
We have collected some crypto courses from top universities and the Ethereum community to help developers systematically understand blockchain and cryptocurrencies.
80
80
-[MIT Online Course: Blockchain and Money by Prof. Gary Gensler](https://ocw.mit.edu/courses/sloan-school-of-management/15-s12-blockchain-and-money-fall-2018/video-lectures/)
- NFT farming has similiarities to yield farming in DeFi sector but differs in that it involves NFTs as either stakings or rewards: Holders can stake NFTs for FTs and vice versa.As Dapp is developing so fast these years, even illiquid NFT could be used for farming.
7
+
8
+
- In a traditional manner, NFT Farming requires user to acquire specific token by depositing NFTs, then add it to some NFT-token pairs to farm.
9
+
10
+
- In a gamefied manner, where the lifecyle of NFTs is encapusulated into games, you can swap in-game items for tokens to do yield farming.
We present a demo in which you can airdrop to your friends on holiday!
21
+
### 抢红包
23
22
24
-
Please refer to the code: contracts/redpacket
23
+
本样例演示了抢红包合约的功能, 在节假日的时候可以部署相应的合约进行红包发放.
24
+
对应合约路径为 contracts/redpacket
25
25
26
-
## Demo instruction
26
+
## 合约功能说明
27
27
28
28
- ERC721Basic
29
-
The most simple demo where the issuer can airdrop NFT to specific address by calling "mint" :
29
+
最简单的 NFT 空投合约, 项目方直接调用 mint 接口, 对指定账户投放 NFT
30
30
31
31
```js
32
32
//
@@ -36,23 +36,22 @@ Please refer to the code: contracts/redpacket
36
36
```
37
37
38
38
- ERC721LazyMint
39
-
This is a demo where airdropping happens after verification. Considier the following case: Before the real "mint" is called on blockchain, the issuer firstly send an email containing the token id to the user, who will respond with a signature created with this token id. Then, the issuer wraps user address(fetched from some database), token id and signature as input to calls "redeem" of the NFT contract, which will mint a new NFT to the target user on verification success.
In the above example, we create signature with a parameter maybe friendly to machine but not that friendly to humans. Moreover, when Metamask pops up for signing we do not know what is being signed. We prefer a more structured, more readable scheme for us to see what data will be signed. EIP-712 address this point; It can display the data to be signed to user, and the generated signature will be verified by smart contract. The whole process is similiar to that in ERC721LazyMint.
54
-
55
-
Here is a example for creating signature by EIP-712:
0 commit comments