会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
apeNote
博客园
首页
新随笔
联系
管理
订阅
随笔- 107 文章- 1 评论- 3 阅读-
22702
05 2022 档案
solidity基础-Memory 和 Storage
摘要:Solidity 语法里面用到的两种变量类型 Memory 和 Storage 的关系就像电脑的内存和硬盘的,memory 是和内存一样是暂时存储,storage 像硬盘一样是永久存储。 memory 是值传递,storage 是引用类型 在合约里面,函数外的变量默认通过 storage 存储,函数
阅读全文
posted @
2022-05-13 21:57
apeNote
阅读(524)
评论(0)
推荐(0)
编辑
solidity基础-Map
摘要:Map 例子 contract MapTest { mapping(address => uint256) public account; function getAccount(address _addr) public view returns (uint256){ return account
阅读全文
posted @
2022-05-09 22:31
apeNote
阅读(285)
评论(0)
推荐(0)
编辑
solidity基础-数组和枚举
摘要:数组 例子 contract ArrayTest { uint256[] public array01; uint256[] public array02=[1,2,3]; function push(uint256 i) public{ array01.push(i); } function po
阅读全文
posted @
2022-05-09 22:18
apeNote
阅读(118)
评论(0)
推荐(0)
编辑
solidity基础-循环
摘要:循环代码 contract LoopTest { uint256 public counter; function loopTest(uint n) public { for(uint i=0; i<n; i++){ counter += 1; } } } 输出
阅读全文
posted @
2022-05-05 08:59
apeNote
阅读(64)
评论(0)
推荐(0)
编辑
solidity基础-异常
摘要:assert contract ErrorTest { uint256 public balance; function deposit(uint256 _amount) public{ balance = balance + _amount; } function withdraw(uint256
阅读全文
posted @
2022-05-05 08:54
apeNote
阅读(10)
评论(0)
推荐(0)
编辑
solidity基础-事件
摘要:test contract EventTest { event Log1(address sender, uint256 val); string log; function test() external{ emit Log1(msg.sender, 100); log = 'logTest';
阅读全文
posted @
2022-05-05 00:41
apeNote
阅读(26)
评论(0)
推荐(0)
编辑
公告
昵称:
apeNote
园龄:
3年1个月
粉丝:
1
关注:
1
+加关注
<
2025年3月
>
日
一
二
三
四
五
六
23
24
25
26
27
28
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
搜索
常用链接
我的随笔
我的评论
我的参与
最新评论
我的标签
更多链接
随笔分类
Solidity基础(17)
智能合约带react(4)
智能合约全栈demo(5)
随笔档案
2024年10月(6)
2024年9月(1)
2024年8月(11)
2024年7月(2)
2023年5月(2)
2023年2月(6)
2023年1月(3)
2022年12月(6)
2022年11月(6)
2022年7月(26)
2022年6月(12)
2022年5月(6)
2022年4月(8)
2022年3月(4)
2022年2月(8)
阅读排行榜
1. Cannot read properties of null (reading 'pickAlgorithm')(5049)
2. react 报错(2226)
3. truffle安装问题-无法加载文件 C:\Users .... 因为在此系统上禁止运行脚本。有关详细信息,请参阅 http s:/go.microsoft.com/fwlink/?LinkID=135170(965)
4. 智能合约全栈开发示例(二)-- 安装使用metamask并设置本地测试网络(818)
5. 公钥密码学的基本原理(734)
评论排行榜
1. solidity基础-payable实现合约存入提出token(2)
2. 身体是革命的本钱(1)
推荐排行榜
1. 身体是革命的本钱(1)
最新评论
1. Re:solidity基础-payable实现合约存入提出token
@dcy01 是的,当时没考虑...
--apeNote
2. Re:添加主网
这不禁让我想起来一句话,不死就能永远的活着。
--无疆先生
3. Re:solidity基础-payable实现合约存入提出token
你这个代码 function withdraw() public { payable(msg.sender).transfer(account[msg.sender]); account[msg.se...
--dcy01
点击右上角即可分享