@cofhe/foundry-plugin 0.8.0 → 1.0.0-alpha.0
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/README.md +1 -0
- package/contracts/CofheClient.sol +1 -1
- package/contracts/CofheTest.sol +12 -2
- package/foundry.toml +1 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -18,6 +18,7 @@ libs = ["node_modules", "lib"]
|
|
|
18
18
|
remappings = [
|
|
19
19
|
"forge-std/=node_modules/forge-std/src/",
|
|
20
20
|
"@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/",
|
|
21
|
+
"@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/",
|
|
21
22
|
"@fhenixprotocol/cofhe-contracts/=node_modules/@fhenixprotocol/cofhe-contracts/",
|
|
22
23
|
"@cofhe/mock-contracts/=node_modules/@cofhe/mock-contracts/",
|
|
23
24
|
"@cofhe/foundry-plugin/=node_modules/@cofhe/foundry-plugin/contracts/"
|
package/contracts/CofheTest.sol
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: UNLICENSED
|
|
2
|
-
pragma solidity ^0.8.
|
|
2
|
+
pragma solidity ^0.8.25;
|
|
3
3
|
|
|
4
4
|
import { Test } from 'forge-std/Test.sol';
|
|
5
5
|
import '@fhenixprotocol/cofhe-contracts/FHE.sol';
|
|
@@ -8,6 +8,7 @@ import { MockTaskManager } from '@cofhe/mock-contracts/contracts/MockTaskManager
|
|
|
8
8
|
import { MockACL } from '@cofhe/mock-contracts/contracts/MockACL.sol';
|
|
9
9
|
import { ACPTimestampRevoker } from '@cofhe/mock-contracts/contracts/ACPTimestampRevoker.sol';
|
|
10
10
|
import { ACPShareRegistry } from '@cofhe/mock-contracts/contracts/ACPShareRegistry.sol';
|
|
11
|
+
import { MockERC1967Proxy } from '@cofhe/mock-contracts/contracts/MockERC1967Proxy.sol';
|
|
11
12
|
import { MockZkVerifier } from '@cofhe/mock-contracts/contracts/MockZkVerifier.sol';
|
|
12
13
|
import { MockZkVerifierSigner } from './MockZkVerifierSigner.sol';
|
|
13
14
|
import { MockThresholdNetwork } from '@cofhe/mock-contracts/contracts/MockThresholdNetwork.sol';
|
|
@@ -74,7 +75,16 @@ abstract contract CofheTest is Test {
|
|
|
74
75
|
mockAcl.setDefaultRevokerContract(address(acpRevoker));
|
|
75
76
|
|
|
76
77
|
// ACP: on-chain hand-off for sharing ACPs
|
|
77
|
-
|
|
78
|
+
// the production contract (upgradeable): behind a proxy, initialized with this test as admin
|
|
79
|
+
ACPShareRegistry acpShareRegistryImpl = new ACPShareRegistry();
|
|
80
|
+
acpShareRegistry = ACPShareRegistry(
|
|
81
|
+
address(
|
|
82
|
+
new MockERC1967Proxy(
|
|
83
|
+
address(acpShareRegistryImpl),
|
|
84
|
+
abi.encodeCall(ACPShareRegistry.initialize, (address(this)))
|
|
85
|
+
)
|
|
86
|
+
)
|
|
87
|
+
);
|
|
78
88
|
vm.label(address(acpShareRegistry), 'ACPShareRegistry');
|
|
79
89
|
mockAcl.setShareRegistry(address(acpShareRegistry));
|
|
80
90
|
|
package/foundry.toml
CHANGED
|
@@ -7,6 +7,7 @@ remappings = [
|
|
|
7
7
|
"forge-std/=node_modules/forge-std/src/",
|
|
8
8
|
"hardhat/=node_modules/forge-std/src/",
|
|
9
9
|
"@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/",
|
|
10
|
+
"@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/",
|
|
10
11
|
"@fhenixprotocol/cofhe-contracts/=node_modules/@fhenixprotocol/cofhe-contracts/",
|
|
11
12
|
"@cofhe/mock-contracts/=node_modules/@cofhe/mock-contracts/"
|
|
12
13
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cofhe/foundry-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0-alpha.0",
|
|
4
4
|
"description": "Foundry plugin for CoFHE — Write and test FHE enabled contracts",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@fhenixprotocol/cofhe-contracts": "1.0.0",
|
|
28
28
|
"@openzeppelin/contracts": "5.4.0",
|
|
29
|
-
"@
|
|
29
|
+
"@openzeppelin/contracts-upgradeable": "5.4.0",
|
|
30
|
+
"@cofhe/mock-contracts": "1.0.0-alpha.0"
|
|
30
31
|
},
|
|
31
32
|
"devDependencies": {
|
|
32
33
|
"forge-std": "github:foundry-rs/forge-std#c0f966cb111f621bfb283b2a388bc7be18953bba",
|