-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy pathpublic_vs_external_test.sol
50 lines (37 loc) · 1.03 KB
/
public_vs_external_test.sol
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
contract MinimalTest {
uint256 private _number;
function fucntion_public_positive() public view returns (uint256) {
return _number;
}
function fucntion_public_positive2() public view returns (uint256) {
return _number;
}
function fucntion_public_negative() public view returns (uint256) {
return _number;
}
function function_external_negative() external {
uint256 k = fucntion_public_negative();
}
}
contract MinimalTest2 {
uint256 private _number;
function fucntion_public_positive3() public view returns (uint256) {
return _number;
}
function fucntion_public_negative3() public view returns (uint256) {
return _number;
}
function function_external_negative3() external {
uint256 k = fucntion_public_negative3();
}
}
contract ConstructorTest {
constructor() {
}
}
contract ConstructorTest2 {
constructor(uint256 a, uint8 b) {
}
}