-
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 #305 from EYBlockchain/lydia/MappingtoStruct
fix: in orchestration do not input local variables mapping keys to the proof
- Loading branch information
Showing
5 changed files
with
83 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// SPDX-License-Identifier: CC0 | ||
|
||
pragma solidity ^0.8.0; | ||
contract Assign { | ||
secret uint256 private a; | ||
address public immutable owner; | ||
secret mapping(uint256 => uint256) private b; | ||
secret mapping(uint256 => uint256) private c; | ||
|
||
struct myStruct { | ||
uint256 prop1; | ||
uint256 prop2; | ||
uint256 prop3; | ||
} | ||
secret mapping(uint256 => myStruct) private d; | ||
|
||
|
||
modifier onlyOwner() { | ||
require( | ||
msg.sender == owner | ||
); | ||
_; | ||
} | ||
|
||
constructor() { | ||
owner = msg.sender; | ||
} | ||
|
||
|
||
function add(secret uint256 value) public onlyOwner { | ||
secret uint256 index1 = 0; | ||
d[index1].prop1 = value; | ||
d[index1].prop2 = value +1; | ||
d[index1].prop3 = value +2; | ||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
} |
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,30 @@ | ||
// SPDX-License-Identifier: CC0 | ||
|
||
pragma solidity ^0.8.0; | ||
contract Assign { | ||
|
||
secret mapping(uint256 => uint256) private d; | ||
|
||
uint256 public j; | ||
|
||
|
||
function add(secret uint256 value) public { | ||
secret uint256 index1 = 0; | ||
d[index1] = value; | ||
} | ||
|
||
function add1(secret uint256 value, secret uint256 index1) public { | ||
d[index1] = value; | ||
} | ||
|
||
|
||
function add2(secret uint256 value) public { | ||
j++; | ||
d[j] = value; | ||
} | ||
|
||
|
||
|
||
|
||
|
||
} |