Skip to content

Commit fe6ed95

Browse files
revert
1 parent 2c8392a commit fe6ed95

1 file changed

Lines changed: 6 additions & 54 deletions

File tree

Lines changed: 6 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,16 @@
11

2-
3-
contract arrayLength {
2+
contract Test {
43
byte[] a;
5-
uint256[] IntergerArray;
6-
bytes bs;
74

8-
// arrary length
9-
function arrayPushValue() public returns (byte[] memory){
10-
a = new byte[](1);
5+
function ChangeSize() external returns(byte[] memory) {
116
a.push(0x01);
12-
return a;
13-
}
7+
a.length = 3;
148

15-
function arrayPush() public returns(byte[] memory){
16-
a = new byte[](1);
17-
a.push();
18-
return a;
19-
}
9+
a.length ++;
10+
a.length --;
11+
a.length --;
2012

21-
function arrayPop() public returns(byte[] memory){
22-
a = new byte[](1);
2313
a.pop();
2414
return a;
2515
}
26-
27-
// arrary push/pop return Value
28-
function arrayPushValueReturn() public {
29-
a = new byte[](1);
30-
return a.push(0x01);
31-
}
32-
33-
function arrayPushReturn() public returns (bytes1){
34-
a = new byte[](1);
35-
return a.push();
36-
}
37-
38-
function arrayPopReturn() public{
39-
a = new byte[](1);
40-
return a.pop();
41-
}
42-
43-
function uint256ArrayPushValue() public returns (byte[] memory){
44-
IntergerArray = [1,2,3];
45-
IntergerArray.push();
46-
return a;
47-
}
48-
49-
50-
// bytes
51-
function bytesPushValue() public {
52-
53-
return bs.push(0x01);
54-
}
55-
56-
function bytesPush() public returns (bytes1){
57-
return bs.push();
58-
}
59-
60-
function bytesPop() public {
61-
return bs.pop();
62-
}
63-
6416
}

0 commit comments

Comments
 (0)