zkjson 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/contracts/NORollup.sol +15 -0
- package/package.json +1 -1
@@ -0,0 +1,15 @@
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
2
|
+
|
3
|
+
pragma solidity >=0.7.0 <0.9.0;
|
4
|
+
import "./ZKQuery.sol";
|
5
|
+
|
6
|
+
contract NORollup is ZKQuery {
|
7
|
+
address public committer;
|
8
|
+
|
9
|
+
function _validateQuery(uint[] memory zkp, uint size_path, uint size_val) internal view returns(uint[] memory){
|
10
|
+
require(zkp[8] == 1, "value doesn't exist");
|
11
|
+
uint[] memory value = new uint[](size_val);
|
12
|
+
for(uint i = 9 + size_path; i < 9 + size_path + size_val; i++) value[i - (9 + size_path)] = zkp[i];
|
13
|
+
return toArr(value);
|
14
|
+
}
|
15
|
+
}
|