File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
public/content/translations/zh/developers/tutorials
how-to-mock-solidity-contracts-for-testing Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 6
6
tags :
7
7
- " erc-20"
8
8
skill : beginner
9
- published : 2022年8月15日
9
+ published : 2022-08-15
10
10
---
11
11
12
12
## 简介 {#introduction}
@@ -141,7 +141,7 @@ OpenZeppelin 提供两种机制来实现管理访问:
141
141
142
142
冻结和解冻合约需要几处更改:
143
143
144
- - [ ] ( https://www.tutorialspoint.com/solidity/solidity_mappings.htm ) 从地址到 [ 布尔值 ] ( https://en.wikipedia.org/wiki/Boolean_data_type ) 的映射来追踪哪些地址被冻结 。 所有值的初始值都是 0,对于布尔值来说,它被解释为“false”。 这正是我们想要的,因为默认情况下帐户不会被冻结。
144
+ - 从地址到 [ 布尔值 ] ( https://en.wikipedia.org/wiki/Boolean_data_type ) 的 [ 映射 ] ( https://www.tutorialspoint.com/solidity/solidity_mappings.htm ) 来追踪哪些地址被冻结 。 所有值的初始值都是 0,对于布尔值来说,它被解释为“false”。 这正是我们想要的,因为默认情况下帐户不会被冻结。
145
145
146
146
``` solidity
147
147
mapping(address => bool) public frozenAccounts;
Original file line number Diff line number Diff line change 9
9
- " 测试"
10
10
- " 模拟"
11
11
skill : intermediate
12
- published : 2020年05月02日
12
+ published : 2020-05-02
13
13
source : soliditydeveloper.com
14
14
sourceUrl : https://soliditydeveloper.com/mocking-contracts
15
15
---
You can’t perform that action at this time.
0 commit comments