Skip to content

Commit

Permalink
Merge branch 'main' into visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
dwightguth authored Aug 22, 2024
2 parents b1366a6 + 4fe43fa commit 93714d4
Show file tree
Hide file tree
Showing 6 changed files with 239 additions and 0 deletions.
99 changes: 99 additions & 0 deletions test/regression/arraystestcontract.ref
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<solidity>
<k>
.K
</k>
<current-body>
TestArraysContract
</current-body>
<ifaces>
.IfaceCellMap
</ifaces>
<contracts>
<contract>
<contract-id>
TestArraysContract
</contract-id>
<contract-state>
arr |-> uint256 [ ]
fixedSizeArr |-> uint256 [ 10 ]
</contract-state>
<contract-init>
.List
</contract-init>
<contract-fns>
<contract-fn>
<contract-fn-id>
arr
</contract-fn-id>
<contract-fn-visibility>
public
</contract-fn-visibility>
<contract-fn-arg-types>
.List
</contract-fn-arg-types>
<contract-fn-param-names>
.List
</contract-fn-param-names>
<contract-fn-return-types>
ListItem ( uint256 [ ] )
</contract-fn-return-types>
<contract-fn-body>
return arr ; .Statements
</contract-fn-body>
</contract-fn> <contract-fn>
<contract-fn-id>
constructor
</contract-fn-id>
<contract-fn-visibility>
public
</contract-fn-visibility>
<contract-fn-arg-types>
.List
</contract-fn-arg-types>
<contract-fn-param-names>
.List
</contract-fn-param-names>
<contract-fn-return-types>
.List
</contract-fn-return-types>
<contract-fn-body>
.Statements
</contract-fn-body>
</contract-fn>
</contract-fns>
</contract>
</contracts>
<exec>
<msg-sender>
1p160
</msg-sender>
<msg-value>
0p256
</msg-value>
<tx-origin>
1p160
</tx-origin>
<env>
.Map
</env>
<store>
.Map
</store>
<live-contracts>
<live-contract>
<contract-address>
2p160
</contract-address>
<contract-type>
TestArraysContract
</contract-type>
<contract-storage>
.Map
</contract-storage>
</live-contract>
</live-contracts>
<next-address>
3p160
</next-address>
</exec>
</solidity>
9 changes: 9 additions & 0 deletions test/regression/arraystestcontract.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
pragma solidity ^0.8.24;

contract TestArraysContract {

uint256[] public arr;
uint256[10] private fixedSizeArr;

constructor() {}
}
1 change: 1 addition & 0 deletions test/regression/arraystestcontract.txn
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
create(1, 0, TestArraysContract, )
119 changes: 119 additions & 0 deletions test/regression/mapstestcontract.ref
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
<solidity>
<k>
.K
</k>
<current-body>
TestMapsContract
</current-body>
<ifaces>
.IfaceCellMap
</ifaces>
<contracts>
<contract>
<contract-id>
TestMapsContract
</contract-id>
<contract-state>
testMap |-> mapping ( address => uint256 )
testMapWithOptIds |-> mapping ( address key => uint256 val )
testNestedMap |-> mapping ( address => mapping ( uint256 => address ) )
</contract-state>
<contract-init>
.List
</contract-init>
<contract-fns>
<contract-fn>
<contract-fn-id>
constructor
</contract-fn-id>
<contract-fn-visibility>
public
</contract-fn-visibility>
<contract-fn-arg-types>
.List
</contract-fn-arg-types>
<contract-fn-param-names>
.List
</contract-fn-param-names>
<contract-fn-return-types>
.List
</contract-fn-return-types>
<contract-fn-body>
.Statements
</contract-fn-body>
</contract-fn> <contract-fn>
<contract-fn-id>
testMap
</contract-fn-id>
<contract-fn-visibility>
public
</contract-fn-visibility>
<contract-fn-arg-types>
.List
</contract-fn-arg-types>
<contract-fn-param-names>
.List
</contract-fn-param-names>
<contract-fn-return-types>
ListItem ( mapping ( address => uint256 ) )
</contract-fn-return-types>
<contract-fn-body>
return testMap ; .Statements
</contract-fn-body>
</contract-fn> <contract-fn>
<contract-fn-id>
testMapWithOptIds
</contract-fn-id>
<contract-fn-visibility>
public
</contract-fn-visibility>
<contract-fn-arg-types>
.List
</contract-fn-arg-types>
<contract-fn-param-names>
.List
</contract-fn-param-names>
<contract-fn-return-types>
ListItem ( mapping ( address key => uint256 val ) )
</contract-fn-return-types>
<contract-fn-body>
return testMapWithOptIds ; .Statements
</contract-fn-body>
</contract-fn>
</contract-fns>
</contract>
</contracts>
<exec>
<msg-sender>
1p160
</msg-sender>
<msg-value>
0p256
</msg-value>
<tx-origin>
1p160
</tx-origin>
<env>
.Map
</env>
<store>
.Map
</store>
<live-contracts>
<live-contract>
<contract-address>
2p160
</contract-address>
<contract-type>
TestMapsContract
</contract-type>
<contract-storage>
.Map
</contract-storage>
</live-contract>
</live-contracts>
<next-address>
3p160
</next-address>
</exec>
</solidity>
10 changes: 10 additions & 0 deletions test/regression/mapstestcontract.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
pragma solidity ^0.8.24;

contract TestMapsContract {

mapping(address => uint256) public testMap;
mapping(address key => uint256 val) public testMapWithOptIds;
mapping(address => mapping(uint256 => address)) private testNestedMap;

constructor() {}
}
1 change: 1 addition & 0 deletions test/regression/mapstestcontract.txn
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
create(1, 0, TestMapsContract, )

0 comments on commit 93714d4

Please sign in to comment.