Skip to content

Commit 71eb825

Browse files
committed
2 parents bdd074b + bb23d0b commit 71eb825

35 files changed

+1483
-223
lines changed

ARMIN_WICL1st.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@
6969

7070
### 07.16
7171

72-
XXX
72+
- 今日学习时间:2h
73+
- 学习内容小结:补完了昨天的腾讯会议,看了一下技术文档以及 awesome-web3 中的一些应用
74+
- Homework 部分(如果有安排需要填写证明完成)
75+
- Question and Ideas:感觉有很多东西可以去做,有了一些大致的想法,关于什么需要上链这个古老的问题还是需要再斟酌一下
7376

7477
### 07.17
7578

An_WICL1st.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@
6969

7070

7171
### 07.16
72-
73-
XXX
72+
- 今日学习时间:40 min
73+
- 学习内容小结:WEB3 URL 解析模式 [笔记](https://pinto-zinnia-ba1.notion.site/9e311050da8844cdb081483cd8249f0e?pvs=25)
7474

7575
### 07.17
7676

Antigone4224_WICL1st.md

+94-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,100 @@ slides里提供了两种使用web3:// 协议的方式,一种是[火狐浏览
139139

140140
### 07.16
141141

142-
XXX
142+
博客链接:[web3-url-colearning-day2 (antigone4224.github.io)](https://antigone4224.github.io/web3-url-colearning-day2)
143+
144+
完成了hw1
145+
146+
# hw1:
147+
148+
## Find the ownership of an your favor NFT
149+
150+
查询一下slides里展示的cyberbrokers吧
151+
152+
ERC721有ownerOf方法可以通过tokenid查询owner的地址
153+
154+
![image-20240716151628876](https://github.com/antigone4224/blog-img/blob/main/image-20240716151628876.png?raw=true)
155+
156+
在etherscan上查询的合约地址可以调用ownerOf方法,然而cyberbrokers-meta这个地址却不能
157+
158+
![image-20240716151915929](https://github.com/antigone4224/blog-img/blob/main/image-20240716151915929.png?raw=ture)
159+
160+
再尝试了一下发现那个0x89的合约地址同样也无法执行renderBroker的方法
161+
162+
ens上查询了一下0x8b开头的一个合约地址能renderBroker
163+
164+
还是有点不太明白怎么回事暂时。
165+
166+
## Find the balance of an account in an ERC-20 contract (USDC / USDT)
167+
168+
ERC20 有个balanceOf方法可以查询余额
169+
170+
web3:// (addr of contract)/balanceOf/(acc addr)?returns=(uint256)
171+
172+
![image-20240716144143413](https://github.com/antigone4224/blog-img/blob/main/image-20240716144143413.png?raw=true)
173+
174+
## Deploy a contract in auto model and say “hello world”
175+
176+
很明显是要我们关注ERC 6860关于 解析模式(resolve mode)的定义了
177+
178+
```
179+
Resolve Mode
180+
Once the “To” address and chainid are determined, the protocol will check the resolver mode of contract by calling the resolveMode method of the “To” address. The Solidity signature of resolveMode is:
181+
182+
function resolveMode() external returns (bytes32);
183+
The protocol currently supports two resolve modes: auto and manual.
184+
185+
The manual mode will be used if the resolveMode return value is 0x6d616e75616c0000000000000000000000000000000000000000000000000000, i.e., “manual” in bytes32
186+
The auto mode will be used if :
187+
the resolveMode return value is 0x6175746f00000000000000000000000000000000000000000000000000000000, i.e, “auto” in bytes32, or
188+
the resolveMode return value is 0x0000000000000000000000000000000000000000000000000000000000000000, or
189+
the call to resolveMode throws an error (method not implemented or error thrown from the method)
190+
Otherwise, the protocol will fail the request with the error “unsupported resolve mode”.
191+
```
192+
193+
合约地址:0xea100cb127d5547793172248e730e1b4b6524984
194+
195+
部署在sepolia
196+
197+
代码:
198+
199+
```
200+
pragma solidity >=0.7.0 <0.9.0;
201+
202+
contract Hello_world_auto {
203+
function sayHelloWorld() public pure returns (string memory) {
204+
return "Hello World";
205+
}
206+
207+
function resolveMode() pure external returns (bytes32) {
208+
return bytes32("auto");
209+
}
210+
}
211+
```
212+
213+
214+
215+
![image-20240716200355477](https://github.com/antigone4224/blog-img/blob/main/image-20240716200355597.png?raw=ture)
216+
217+
## Deploy a contract in manual model and say “hello world”
218+
219+
同理
220+
221+
```
222+
pragma solidity >=0.7.0 <0.9.0;
223+
224+
contract Hello_world_manual {
225+
function sayHelloWorld() public pure returns (string memory) {
226+
return "Hello World";
227+
}
228+
229+
function resolveMode() pure external returns (bytes32) {
230+
return bytes32("manual");
231+
}
232+
}
233+
```
234+
235+
不过我还没有比较过manual,和auto访问时候的特性,这个丢到明天来继续。
143236

144237
### 07.17
145238

Box_WICL1st.md

+9-5
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,22 @@
5959
<!-- Content_START -->
6060
### 07.15
6161

62-
举例示范:
63-
64-
- 今日学习时间:XXXX
65-
- 学习内容小结:XXXX
62+
- 今日学习时间:1h
63+
- 学习内容小结:
64+
- 学习了EIP6860协议,目前web3://主要是一个用于快捷数据访问的eip。主要功能等效于在前端倒入webjs,然后通过contract address读取对应的内容,但是通过web3协议可以将这段功能性代码压缩成一行url。
65+
- 目前web3://的访问方式并不是完全的去中心化的,至少现在来说还需要一个中心化的网关,同时网关决定返回内容。
6666
- Homework 部分(如果有安排需要填写证明完成)
6767
- Question and Ideas(有什么疑问/或者想法,可以记在这里,也可以分享到共学频道群讨论交流)
6868

6969

7070

7171
### 07.16
7272

73-
XXX
73+
- 今日学习时间:0.5h
74+
- 学习内容小结:
75+
- 对EIP6860提出了一些建议
76+
- Homework 部分(如果有安排需要填写证明完成)
77+
- Question and Ideas(有什么疑问/或者想法,可以记在这里,也可以分享到共学频道群讨论交流)
7478

7579
### 07.17
7680

Bruce_WICL1st.md

+32-12
Original file line numberDiff line numberDiff line change
@@ -88,29 +88,49 @@ timezone: Asia/Shanghai
8888
- web3://eth-store.eth/ => https://eth-store.w3eth.io/
8989
- w3link.io is the current gateway for multi-chain: web3://w3url.eth:11155111/ => https://w3url.11155111.w3link.io/
9090

91-
-
92-
9391
- Homework 部分(如果有安排需要填写证明完成)
9492
- Question and Ideas(有什么疑问/或者想法,可以记在这里,也可以分享到共学频道群讨论交流)
9593

94+
### 07.16
95+
96+
- 今日学习时间:0.5h
97+
- 学习内容小结:
98+
99+
- 可能的一些应用
100+
- 去中心化的博客、Dropbox、邮件、git 等
101+
- 目前需要的帮助
102+
103+
- 浏览器原生支持和 EF 的帮助
104+
- gateway 因为一些原因,被举报封禁了
105+
- 存储费用太高了,放在主网上面
106+
107+
- 第一节课 https://youtu.be/hmN77o-ex8I
108+
109+
- 需要有很多应用,这样应用驱动协议落地到主流浏览器上
110+
- 相比传统应用开发,其实可能更简单,只需要支付部署一次的 gas,然后就可以永久上线了
111+
- shisui 是一个 Portal Network 的轻客户端,这样就可以从前到后都包括了
112+
- 欢迎创建 Solana 的版本
113+
- 以太坊适合读的应用,性能和节点都不错,但是写的应用就不太行了
114+
96115
TODO:
97116

98117
- 查看对应的 ERC 原文
99118
- https://eip.fun/eips/eip-4804
100119
- https://eip.fun/eips/eip-6860
101120
- 查看官网 https://web3url.io/
102121
- 原生支持的浏览器实现 https://github.com/web3-protocol/evm-browser
103-
104-
### 07.16
105-
106-
- 今日学习时间:0.5h
107-
- 学习内容小结:
108-
109-
- Homework 部分(如果有安排需要填写证明完成)
110-
- Question and Ideas(有什么疑问/或者想法,可以记在这里,也可以分享到共学频道群讨论交流)
122+
- 第一节课 https://youtu.be/hmN77o-ex8I
123+
- 查看 https://github.com/ethstorage/awesome-web3
124+
- EthStorage 是怎么扩容以太坊的,通过很低的 costs
125+
- ERC5018: Filesystem-Like Interface https://eips.ethereum.org/EIPS/eip-5018 ethfs-uploader to synchronize folder/files https://www.npmjs.com/package/ethfs-uploader
126+
- ERC5219, ERC6944: Contract Resource Requests Customized headers / error code for ERC4804
127+
- ERC6821: ENS => Address Mapping Standard
128+
- Homework 1
129+
- Find the ownership of an your favor NFT
130+
- Find the balance of an account in an ERC-20 contract (USDC / USDT)
131+
- Deploy a contract in auto model and say “hello world”
132+
- Deploy a contract in manual model and say “hello world”
111133

112134
### 07.17
113135

114-
XXX
115-
116136
<!-- Content_END -->

Bugmaker_WICL1st .md

+23
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,29 @@ modifier demo() {
119119
接口不能定义构造函数;
120120
接口不能定义状态变量;
121121

122+
### 07.16
123+
- 今日学习时间:7.16 8 p.m.--10 p.m.
124+
- 学习内容小结:Solidity 语法复习 +ether.js了解
125+
#### receive
126+
用于合约接受ether,必须为`external``payable`属性。
127+
receive属于solidity默认的逻辑。
128+
receive不接受任何参数传入,且没有返回值。如果有参数传入,则会调用fallback函数。
129+
*如果合约中既没有receive(),又没有fallback(),向合约中传入ether则会显示交易失败。*
130+
`receive() external payable{}`
131+
#### fallback
132+
fallback函数会在三种情况下被调用:
133+
1. 调用者尝试调用一个合约中不存在的函数时
134+
2. 用户给合约发Ether但是receive函数不存在
135+
3. 用户发Ether,receive存在,但是同时用户还发了别的数据(msg.data不为空)
136+
`fallback()external{}`
137+
#### 数据编码
138+
`abi.encode(data)`,将数据编码为字节码,以规范编程。data的数据类型可以为string,uint256等等
139+
`abi.decode(data,(uint256...))`,解码,data为要解码的数据,后面为要解码成的数据类型,可以解码为多种数据类型。
140+
`abi.encodePacked(data)`,这是一个与 abi.encode 类似但有所不同的全局函数。它也用于将参数编码为符合 ABI 标准的字节数组,但不会为每个参数添加其类型的长度信息,也不会在参数之间添加分隔符,结果是一个紧密打包的字节数组.
141+
#### FAQ
142+
>什么是ethers.js
143+
Ethers.js 是一个使用Typescript编写的库,用于构建去中心化应用程序(DApps)的前端,或者与以太坊网络进行交互。它抽象了许多复杂性,使开发人员能够简单直观地构建DApp。
144+
122145
### 07.17
123146

124147
XXX

Coooder_WICL1st.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,16 @@
5959

6060
举例示范:
6161

62-
- 今日学习时间:XXXX
63-
- 学习内容小结:XXXX
64-
- Homework 部分(如果有安排需要填写证明完成)
65-
- Question and Ideas(有什么疑问/或者想法,可以记在这里,也可以分享到共学频道群讨论交流)
66-
62+
- 今日学习时间:1.5h
63+
- 学习内容小结:听讲座
64+
- 主要听了老师的讲座,对整体的内容有了进一步的了解,btw 还填了英语共学的问卷,希望这次共学一切顺利~
6765

6866

6967
### 07.16
7068

71-
XXX
69+
- 今日学习时间:1h
70+
- 学习内容小结:看文档
71+
- 今天在看这个https://eips.ethereum.org/EIPS/eip-4804,但是没看完,明天继续研究
7272

7373
### 07.17
7474

Cora_WICL1st.md

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Web3 URL 残酷共学第 1 期残酷指引
2+
3+
> ⚠️ 正式开始前请确保你在身体上和精神上都处于合适的状态,请刻意练习,残酷面对 🆒。为方便检索 The First Web3 URL Intensive CoLearning 简写为 WICL1st,第 2 期即为 WICL2nd,第 3 期即为 WICL3rd,以此类推。
4+
5+
> ⚠️ 报名需要按要求认真填写下面 [ XXX ] 部分,方可通过报名审核,通过审核即可开始自主学习。
6+
7+
---
8+
9+
# [ 你的名字 ]
10+
11+
1. **自我介绍:**
12+
13+
Cora, 前端技术经理,研发 tiktok 数据分析平台。
14+
15+
参加的主要目的是学习 Web3 相关知识。
16+
17+
2. **组队期待:**
18+
19+
感兴趣一起组队的可以拉我~
20+
21+
3. **你认为你会完成本次 Web3 URL 的残酷学习吗?**
22+
23+
YES
24+
25+
---
26+
27+
## 第 1 期共学时间计划
28+
29+
- **7 月 8 日 - 7 月 14 日**
30+
31+
- 自我介绍:大家按要求更新上方自我介绍,方面大家互相了解,及后续自由组队方向。
32+
33+
- [Web3 URL 残酷共学频道](https://t.me/LXDAO/8748)报道:大家可以自由在残酷共学群里交流分享,互动答疑,根据自身学习阶段情况随时开启自由组队。
34+
35+
- 课前学习:了解残酷共学流程,GitHub 协作共学基础;Web3:// 协议课前学习。
36+
37+
- **7 月 15 日 - 7 月 21 日**
38+
39+
- **7 月 15 日 周一晚 8 点- 9 点(北京时间):** 第 1 次公开课分享
40+
- **本周共学内容:** 涉及 Web3:// 的背景和演进历史;支持 Web3:// 协议的访问方式 (gateway 和 EVM browser)来浏览以太坊上面的数据;熟悉使用 Web3:// 和 EthStorage 早期测试网来部署简单的去中心化网站。
41+
- **Homework1:**[课程 PPT](https://docs.google.com/presentation/d/1egJUKJrjC9wjkmOF9sLBkTSwHpd6hl8FXkWehPW7kFk/edit#slide=id.g1754f50a55c_0_11)
42+
43+
- **7 月 22 日 - 7 月 28 日**
44+
45+
- **7 月 22 日 周一晚 8 点- 9 点(北京时间):** 第 2 次公开课分享
46+
47+
- **本周共学内容:** 涉及 Web3:// 高级开发工具,包括:在命令行通过 web3curl 来通过 Web3:// 协议下载数据,通过 ethfs-uploader 批量上传网页数据,通过 manual 模式来搭建去中心化多人交互全链网站;及深入理解以太坊的存储模型和 gas 开销等。
48+
- **边学边用实战开发:** 根据组队情况自由安排。
49+
- **Homework2:**[课程 PPT](https://docs.google.com/presentation/d/1egJUKJrjC9wjkmOF9sLBkTSwHpd6hl8FXkWehPW7kFk/edit#slide=id.g1754f50a55c_0_11)
50+
51+
- **7 月 29 日 - 8 月 4 日**
52+
- **7 月 29 日 周一晚 8 点- 9 点(北京时间):** 第 3 次公开课分享
53+
- **本周共学内容:** 涉及实际应用案例分享及未来以太坊基础设施在 Web3:// 的重要作用及开发方向等。
54+
- **边学边用实战开发:** 根据组队情况自由安排。
55+
- **结营分享:** 具体时间及详情另在「Web3 URL 残酷共学频道」通知。
56+
57+
---
58+
59+
## 笔记证明 Notes Proof
60+
61+
<!-- Content_START -->
62+
63+
### 07.15
64+
65+
举例示范:
66+
67+
- 今日学习时间:2h
68+
- 学习内容小结:了解 ppt 内容 Introduction to Web3:// Access Protocol (CoLearning 2024)
69+
70+
### 07.16
71+
72+
- 今日学习时间:2h
73+
- 学习内容小结:学习[Web3URL 文档](https://docs.web3url.io)部分章节,介绍,背景等。
74+
- web3:// 是一种新协议,用于访问与 EVM 兼容的区块链中智能合约返回的内容。
75+
76+
### 07.17
77+
78+
XXX
79+
80+
<!-- Content_END -->

CureDreams_WICL1st.md

+6-11
Original file line numberDiff line numberDiff line change
@@ -115,19 +115,14 @@ timezone: Asia/Shanghai
115115
## 笔记证明 Notes Proof
116116
<!-- Content_START -->
117117
### 07.15
118-
119-
举例示范:
120-
121-
- 今日学习时间:XXXX
122-
- 学习内容小结:XXXX
123-
- Homework 部分(如果有安排需要填写证明完成)
124-
- Question and Ideas(有什么疑问/或者想法,可以记在这里,也可以分享到共学频道群讨论交流)
125-
126-
118+
- 今日学习时间:2h
119+
- 学习内容小结:主要跟随Qi Zhou老师进行了web3学习了web3://,之前有项目在链上传输了整个NFT数据,但是访问时还是并没有走这条路径,所以该项目应运而生,以EVM作为后端,调用智能合约读取链上数据,并且目前去中心化进程要改变的是中心化的网关。
120+
- Question and Ideas 目前对于传统中心化的链路以及evm不太熟悉,需要在接下来的时间里详细了解两者的区别,才能提出有建设性的想法。
127121

128122
### 07.16
129-
130-
XXX
123+
- 今日学习时间:2h
124+
- 学习内容小结:以《精通以太坊》作为学习资料,快速了解ETH的基础,目前已完成ETH通识基础,并且学习至智能合约与Solidity的入门阶段,例如上下文信息,错误处理函数,调用合约的几种方法以及其区别,EVM操作指令所使用的Gas开销等等,对于我理解ETH以及EVM更近一步。
125+
- Question and Ideas 暂无,预计明日完成该书的学习,后天即可开始web3://的实践。
131126

132127
### 07.17
133128

DawnBlackA_WICL1st.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,11 @@
7070

7171
### 07.16
7272

73-
XXX
73+
- 今日学习时间:4h
74+
- 学习内容小结:仔细阅读W3URL文档,尝试使用**ethfs-uploader**上传文件至链上。
75+
- Question and Ideas
76+
77+
没明白如何编译部署合约,使合约可以通过W3URL直接访问,文档中的例子也只提供了https的URL,不明白如何通过W3URL进行访问。
7478

7579
### 07.17
7680

0 commit comments

Comments
 (0)