Skip to content

Commit 42107a5

Browse files
committed
Add study notes for 2025-08-17
1 parent 8e89452 commit 42107a5

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

JP3000.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,38 @@ INFJ,珠海,数据科学在读,目前在学习ai agent,ai应用开发,
1515
## Notes
1616

1717
<!-- Content_START -->
18+
# 2025-08-17
19+
20+
## 关于truffle部署测试网(sepolia)
21+
1、npm安装truffle
22+
```bash
23+
npm install -g truffle
24+
```
25+
2、创建项目
26+
```bash
27+
truffle init
28+
```
29+
3、可以在contracts文件夹中写智能合约代码
30+
4、使用dashboard进行钱包链接
31+
```bash
32+
truffle dashboard
33+
```
34+
5、在migrations文件夹中写部署脚本
35+
```javascript
36+
const MyContract = artifacts.require("MyContract");
37+
38+
module.exports = function (deployer) {
39+
deployer.deploy(MyContract);
40+
};
41+
```
42+
注意链接钱包时,要注意钱包网络设置,一般要设置为测试网钱包(如:sepolia)
43+
44+
6、执行部署
45+
```bash
46+
truffle migrate --network dashboard
47+
```
48+
7、部署成功后,可以在dashboard中查看合约地址
49+
1850
# 2025-08-16
1951

2052
### 简单Dapp开发

0 commit comments

Comments
 (0)