Skip to content

Commit 9f02c6a

Browse files
committed
update to sol 0.8.34
1 parent a7c5728 commit 9f02c6a

2,660 files changed

Lines changed: 334272 additions & 434 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

01_HelloWeb3/HelloWeb3.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity ^0.8.21;
2+
pragma solidity ^0.8.34;
33
contract HelloWeb3{
44
string public _string = "Hello Web3!";
55
}

02_ValueTypes/ValueTypes.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity ^0.8.21;
2+
pragma solidity ^0.8.34;
33
contract ValueTypes{
44
// 布尔值
55
bool public _bool = true;

03_Function/Function.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity ^0.8.21;
2+
pragma solidity ^0.8.34;
33
contract FunctionTypes{
44
uint256 public number = 5;
55

04_Return/Return.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity ^0.8.21;
2+
pragma solidity ^0.8.34;
33

44
// 返回多个变量
55
// 命名式返回

05_DataStorage/DataStorage.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity ^0.8.21;
2+
pragma solidity ^0.8.34;
33

44
contract DataStorage {
55
// The data location of x is storage.

06_ArrayAndStruct/ArrayAndStruct.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity ^0.8.21;
2+
pragma solidity ^0.8.34;
33
contract ArrayTypes {
44

55
// 固定长度 Array
@@ -32,7 +32,7 @@ contract ArrayTypes {
3232
}
3333
}
3434

35-
pragma solidity ^0.8.21;
35+
pragma solidity ^0.8.34;
3636
contract StructTypes {
3737
// 结构体 Struct
3838
struct Student{
@@ -65,7 +65,7 @@ contract StructTypes {
6565
}
6666
}
6767

68-
pragma solidity ^0.8.21;
68+
pragma solidity ^0.8.34;
6969
contract EnumTypes {
7070
// 将uint 0, 1, 2表示为Buy, Hold, Sell
7171
enum ActionSet { Buy, Hold, Sell }

07_Mapping/Mapping.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity ^0.8.21;
2+
pragma solidity ^0.8.34;
33
contract Mapping {
44
mapping(uint => address) public idToAddress; // id映射到地址
55
mapping(address => address) public swapPair; // 币对的映射,地址到地址

08_InitialValue/InitialValue.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity ^0.8.21;
2+
pragma solidity ^0.8.34;
33

44
contract InitialValue {
55
// Value Types

09_Constant/Constant.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity ^0.8.21;
2+
pragma solidity ^0.8.34;
33
contract Constant {
44
// constant变量必须在声明的时候初始化,之后不能改变
55
uint256 public constant CONSTANT_NUM = 10;

10_InsertionSort/InsertionSort.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity ^0.8.21;
2+
pragma solidity ^0.8.34;
33
contract InsertionSort {
44
// if else
55
function ifElseTest(uint256 _number) public pure returns(bool){

0 commit comments

Comments
 (0)