@crisp-e3/contracts 0.5.10 → 0.5.11

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.
@@ -6,6 +6,7 @@
6
6
  pragma solidity >=0.8.27;
7
7
 
8
8
  import { E3 } from "@enclave-e3/contracts/contracts/interfaces/IE3.sol";
9
+ import { IEnclave } from "@enclave-e3/contracts/contracts/interfaces/IEnclave.sol";
9
10
  import { IE3Program } from "@enclave-e3/contracts/contracts/interfaces/IE3Program.sol";
10
11
  import { IDecryptionVerifier } from "@enclave-e3/contracts/contracts/interfaces/IDecryptionVerifier.sol";
11
12
 
@@ -22,11 +23,9 @@ contract MockEnclave {
22
23
  seed: 0,
23
24
  threshold: [uint32(1), uint32(2)],
24
25
  requestBlock: 0,
25
- startWindow: [uint256(0), uint256(0)],
26
- duration: 0,
27
- expiration: 0,
26
+ inputWindow: [uint256(0), uint256(0)],
28
27
  encryptionSchemeId: bytes32(0),
29
- e3Program: IE3Program(program),
28
+ e3Program: IE3Program(address(0)),
30
29
  e3ProgramParams: bytes(""),
31
30
  customParams: abi.encode(address(0), nextE3Id, 2, 0, 0),
32
31
  decryptionVerifier: IDecryptionVerifier(address(0)),
@@ -36,7 +35,7 @@ contract MockEnclave {
36
35
  requester: address(0)
37
36
  });
38
37
 
39
- IE3Program(program).validate(nextE3Id, 0, bytes(""), bytes(""), abi.encode(address(0), nextE3Id, 2));
38
+ IE3Program(program).validate(nextE3Id, 0, bytes(""), bytes(""), abi.encode(address(0), nextE3Id, 2, 0, 0));
40
39
 
41
40
  nextE3Id++;
42
41
  }
@@ -49,15 +48,17 @@ contract MockEnclave {
49
48
  committeePublicKey = publicKeyHash;
50
49
  }
51
50
 
51
+ function getE3Stage(uint256) external view returns (IEnclave.E3Stage) {
52
+ return IEnclave.E3Stage.KeyPublished;
53
+ }
54
+
52
55
  function getE3(uint256) external view returns (E3 memory) {
53
56
  return
54
57
  E3({
55
58
  seed: 0,
56
59
  threshold: [uint32(1), uint32(2)],
57
60
  requestBlock: 0,
58
- startWindow: [uint256(0), uint256(0)],
59
- duration: 0,
60
- expiration: 0,
61
+ inputWindow: [uint256(0), block.timestamp + 100],
61
62
  encryptionSchemeId: bytes32(0),
62
63
  e3Program: IE3Program(address(0)),
63
64
  e3ProgramParams: bytes(""),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crisp-e3/contracts",
3
- "version": "0.5.10",
3
+ "version": "0.5.11",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "contracts",
@@ -31,7 +31,7 @@
31
31
  "@zk-kit/lazy-imt.sol": "2.0.0-beta.12",
32
32
  "poseidon-solidity": "^0.0.5",
33
33
  "solady": "^0.1.13",
34
- "@enclave-e3/contracts": "0.1.8"
34
+ "@enclave-e3/contracts": "0.1.14"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@nomicfoundation/hardhat-ethers": "4",
@@ -59,8 +59,8 @@
59
59
  "typechain": "^8.3.0",
60
60
  "typescript": "5.8.3",
61
61
  "viem": "2.30.6",
62
- "@crisp-e3/zk-inputs": "^0.5.10",
63
- "@crisp-e3/sdk": "^0.5.10"
62
+ "@crisp-e3/zk-inputs": "^0.5.11",
63
+ "@crisp-e3/sdk": "^0.5.11"
64
64
  },
65
65
  "scripts": {
66
66
  "compile": "hardhat compile",