Skip to content

Commit 0c38313

Browse files
authored
Merge pull request #757 from daocore/main
[Translation] Basic Tasks 12
2 parents cfa9f59 + 614e267 commit 0c38313

File tree

4 files changed

+119
-25
lines changed

4 files changed

+119
-25
lines changed

basic/12-token-crowdfund/README-CN.md

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
中文 / [English](https://github.com/Dapp-Learning-DAO/Dapp-Learning/blob/main/basic/12-token-crowdfund/README.md)
2+
## 众筹合约
3+
4+
本样例演示众筹合约的基本流程,包括部署合约、合约以及启动众筹项目。
5+
6+
## 操作流程
7+
8+
- 配置 **.env**
9+
10+
```sh
11+
cp .env.example .env
12+
13+
## 修改 .env 中的 INFURA_ID 和 PRIVATE_KEY 为实际的值
14+
PRIVATE_KEY=xxxxxxxxxxxxxxxx
15+
INFURA_ID=yyyyyyyy
16+
```
17+
18+
- 安装依赖
19+
20+
```bash
21+
yarn
22+
```
23+
24+
- 编译合约
25+
26+
```bash
27+
npx hardhat compile
28+
```
29+
30+
- 测试合约
31+
32+
```bash
33+
npx hardhat test
34+
```
35+
36+
- 部署合约
37+
38+
```bash
39+
npx hardhat run scripts/deploy_crowdfunding.js --network rinkeby
40+
```
41+
42+
## Crowdsale 类型
43+
44+
- CappedCrowdsale
45+
- IndividuallyCappedCrowdsale
46+
- TimedCrowdsale
47+
- WhitelistedCrowdsale
48+
- FinalizableCrowdsale
49+
- PostDeliveryCrowdsale
50+
- RefundableCrowdsale
51+
- AllowanceCrowdsale
52+
- MintedCrowdsale
53+
- IncreasingPriceCrowdsale
54+
55+
## 参考链接
56+
57+
- https://medium.com/openberry/creating-a-simple-crowdfunding-dapp-with-ethereum-solidity-and-vue-js-69ddb8e132dd
58+
- https://medium.com/extropy-io/crowdsales-on-ethereum-with-openzeppelin-57bbdea95390
59+
- https://www.programmersought.com/article/1396206575/
60+
- https://github.com/OpenZeppelin/openzeppelin-contracts/tree/release-v2.3.0/contracts/crowdsale
61+
- 线性解锁: https://cloud.tencent.com/developer/article/1182701

basic/12-token-crowdfund/README.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
1-
## 众筹合约
1+
English / [中文](https://github.com/Dapp-Learning-DAO/Dapp-Learning/blob/main/basic/12-token-crowdfund/README-CN.md)
2+
## Crowdfunding Contract
3+
This sample demonstrates the basic process of a crowdfunding contract, including the deployment of the contract, the contract, and the launch of a crowdfunding project.
24

3-
本样例演示众筹合约的基本流程,包括部署合约,合约,启动众筹项目,
5+
## Operation Process
46

5-
## 操作流程
6-
7-
- 配置 .env
7+
- Config **.env**
88

99
```sh
1010
cp .env.example .env
1111

12-
## 修改 .env 中的 INFURA_ID PRIVATE_KEY 为实际的值
12+
## Modify .env to the actual values of INFURA_ID and PRIVATE_KEY
1313
PRIVATE_KEY=xxxxxxxxxxxxxxxx
1414
INFURA_ID=yyyyyyyy
1515
```
1616

17-
- 安装依赖
17+
- Install Dependencies
1818

1919
```bash
2020
yarn
2121
```
2222

23-
- 编译合约
23+
- Compile Contract
2424

2525
```bash
2626
npx hardhat compile
2727
```
2828

29-
- 测试合约
29+
- Test Contract
3030

3131
```bash
3232
npx hardhat test
3333
```
3434

35-
- 部署合约
35+
- Deploy Contract
3636

3737
```bash
3838
npx hardhat run scripts/deploy_crowdfunding.js --network rinkeby
3939
```
4040

41-
## Crowdsale 类型
41+
## Crowdsale Type
4242

4343
- CappedCrowdsale
4444
- IndividuallyCappedCrowdsale
@@ -51,10 +51,10 @@ npx hardhat run scripts/deploy_crowdfunding.js --network rinkeby
5151
- MintedCrowdsale
5252
- IncreasingPriceCrowdsale
5353

54-
## 参考链接
54+
## Refer to the link
5555

5656
- https://medium.com/openberry/creating-a-simple-crowdfunding-dapp-with-ethereum-solidity-and-vue-js-69ddb8e132dd
5757
- https://medium.com/extropy-io/crowdsales-on-ethereum-with-openzeppelin-57bbdea95390
5858
- https://www.programmersought.com/article/1396206575/
5959
- https://github.com/OpenZeppelin/openzeppelin-contracts/tree/release-v2.3.0/contracts/crowdsale
60-
- 线性解锁https://cloud.tencent.com/developer/article/1182701
60+
- Linear Unlockhttps://cloud.tencent.com/developer/article/1182701
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
中文 / [English](https://github.com/Dapp-Learning-DAO/Dapp-Learning/blob/main/basic/12-token-crowdfund/frontend/README.md)
2+
## 众筹合约前端
3+
本样例演示众筹合约的基本流程,包括部署合约、合约以及启动众筹项目。
4+
5+
## 操作流程
6+
- 配置私钥
7+
**.env** 中放入私钥,格式为
8+
```
9+
VITE_PRIVATE_KEY=xxxxxxxxxxxxxxxx //私钥
10+
VITE_INFURA_ID=yyyyyyyy //infura id
11+
VITE_CONTRACT_ADDRESS=zzzzzzzzzzzzz //合约地址
12+
```
13+
然后代码自动从中读取
14+
15+
- 安装依赖
16+
```
17+
yarn
18+
```
19+
20+
- 启动项目
21+
```
22+
yarn dev
23+
```
24+
25+
- 编译项目
26+
```
27+
yarn build
28+
```
29+
30+
## 参考链接
31+
https://medium.com/openberry/creating-a-simple-crowdfunding-dapp-with-ethereum-solidity-and-vue-js-69ddb8e132dd
32+
+13-12
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,32 @@
1-
## 众筹合约前端
2-
本样例演示众筹合约的基本流程,包括部署合约,合约,启动众筹项目,
1+
English / [中文](https://github.com/Dapp-Learning-DAO/Dapp-Learning/blob/main/basic/12-token-crowdfund/frontend/README-CN.md)
2+
## Crowdfunding Contract Front-End
3+
This sample demonstrates the basic process of a crowdfunding contract, including the deployment of the contract, the contract, and the launch of a crowdfunding project.
34

4-
## 操作流程
5-
- 配置私钥
6-
.env 中放入的私钥,格式为
5+
## Operation Process
6+
- Configure The Private Key
7+
Put the private key in the **.env** file and its format is as follows
78
```
8-
VITE_PRIVATE_KEY=xxxxxxxxxxxxxxxx //私钥
9+
VITE_PRIVATE_KEY=xxxxxxxxxxxxxxxx //the private key
910
VITE_INFURA_ID=yyyyyyyy //infura id
10-
VITE_CONTRACT_ADDRESS=zzzzzzzzzzzzz //合约地址
11+
VITE_CONTRACT_ADDRESS=zzzzzzzzzzzzz //contract address
1112
```
12-
然后代码自动从中读取
13+
Then the code automatically reads private key from **.env** file.
1314

14-
- 安装依赖
15+
- Install Dependencies
1516
```
1617
yarn
1718
```
1819

19-
- 启动项目
20+
- Start Project
2021
```
2122
yarn dev
2223
```
2324

24-
- 编译项目
25+
- Compile Project
2526
```
2627
yarn build
2728
```
2829

29-
## 参考链接
30+
## Refer to the link
3031
https://medium.com/openberry/creating-a-simple-crowdfunding-dapp-with-ethereum-solidity-and-vue-js-69ddb8e132dd
3132

0 commit comments

Comments
 (0)