-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #345 from EYBlockchain/lydia/mappingtostructsbackup
allow for mappings to structs in BackupDataRetriever
- Loading branch information
Showing
5 changed files
with
110 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// SPDX-License-Identifier: CC0 | ||
|
||
pragma solidity ^0.8.0; | ||
contract Assign { | ||
secret uint256 private a; | ||
address public immutable owner; | ||
|
||
struct myStruct { | ||
uint256 prop1; | ||
uint256 prop2; | ||
uint256 prop3; | ||
} | ||
secret mapping(uint256 => myStruct) private d; | ||
|
||
|
||
|
||
function add(secret uint256 value) public { | ||
secret uint256 index1 = 0; | ||
secret uint256 index2 = 5; | ||
d[index1].prop1 = value; | ||
d[index1].prop2 = value +1; | ||
d[index1].prop3 = value +2; | ||
d[index2].prop1 = 5; | ||
d[index2].prop2 = 1; | ||
d[index2].prop3 = 1; | ||
|
||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
} |