@cofhe/mock-contracts 0.0.0-alpha-20260409113701
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/CHANGELOG.md +86 -0
- package/README.md +180 -0
- package/contracts/ABITest.sol +99 -0
- package/contracts/MockACL.sol +342 -0
- package/contracts/MockCoFHE.sol +444 -0
- package/contracts/MockTaskManager.sol +676 -0
- package/contracts/MockThresholdNetwork.sol +199 -0
- package/contracts/MockZkVerifier.sol +140 -0
- package/contracts/Permissioned.sol +213 -0
- package/contracts/TestBed.sol +98 -0
- package/dist/index.d.mts +3193 -0
- package/dist/index.d.ts +3193 -0
- package/dist/index.js +2864 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2858 -0
- package/dist/index.mjs.map +1 -0
- package/foundry.toml +10 -0
- package/package.json +65 -0
- package/remappings.txt +5 -0
- package/src/MockACL.ts +620 -0
- package/src/MockTaskManager.ts +1211 -0
- package/src/MockThresholdNetwork.ts +457 -0
- package/src/MockZkVerifier.ts +266 -0
- package/src/TestBed.ts +311 -0
- package/src/index.ts +7 -0
- package/src/typechain-types/MockACL.ts +382 -0
- package/src/typechain-types/MockTaskManager.ts +565 -0
- package/src/typechain-types/MockThresholdNetwork.ts +247 -0
- package/src/typechain-types/MockZkVerifier.ts +205 -0
- package/src/typechain-types/TestBed.ts +172 -0
- package/src/typechain-types/common.ts +92 -0
- package/src/typechain-types/index.ts +8 -0
- package/src/types.ts +14 -0
package/foundry.toml
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
[profile.default]
|
|
2
|
+
src = "contracts"
|
|
3
|
+
out = "out"
|
|
4
|
+
libs = ["node_modules"]
|
|
5
|
+
auto_detect_remappings = false
|
|
6
|
+
|
|
7
|
+
[lint]
|
|
8
|
+
lint_on_build = false
|
|
9
|
+
|
|
10
|
+
# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options
|
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cofhe/mock-contracts",
|
|
3
|
+
"version": "0.0.0-alpha-20260409113701",
|
|
4
|
+
"description": "Mock smart contracts for testing CoFHE with FHE primitives locally",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.mjs",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/FhenixProtocol/cofhesdk.git",
|
|
13
|
+
"directory": "packages/mock-contracts"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist/**",
|
|
17
|
+
"src/**",
|
|
18
|
+
"contracts/**/*.sol",
|
|
19
|
+
"foundry.toml",
|
|
20
|
+
"remappings.txt",
|
|
21
|
+
"CHANGELOG.md"
|
|
22
|
+
],
|
|
23
|
+
"keywords": [
|
|
24
|
+
"blockchain",
|
|
25
|
+
"ethereum",
|
|
26
|
+
"smart-contracts",
|
|
27
|
+
"solidity",
|
|
28
|
+
"FHE",
|
|
29
|
+
"encryption",
|
|
30
|
+
"privacy",
|
|
31
|
+
"coprocessor",
|
|
32
|
+
"fhenix",
|
|
33
|
+
"cofhe"
|
|
34
|
+
],
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@fhenixprotocol/cofhe-contracts": "0.1.0",
|
|
37
|
+
"@openzeppelin/contracts": "^5.0.0",
|
|
38
|
+
"@openzeppelin/contracts-upgradeable": "^5.0.0"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@typechain/ethers-v6": "^0.5.1",
|
|
42
|
+
"@types/node": "^20.0.0",
|
|
43
|
+
"ethers": "^6.0.0",
|
|
44
|
+
"forge-std": "github:foundry-rs/forge-std",
|
|
45
|
+
"hardhat": "^2.24.1",
|
|
46
|
+
"tsx": "^4.20.5",
|
|
47
|
+
"tsup": "^8.0.2",
|
|
48
|
+
"typechain": "^8.3.2",
|
|
49
|
+
"@cofhe/sdk": "0.0.0-alpha-20260409113701",
|
|
50
|
+
"@cofhe/tsconfig": "0.1.2"
|
|
51
|
+
},
|
|
52
|
+
"publishConfig": {
|
|
53
|
+
"access": "public",
|
|
54
|
+
"registry": "https://registry.npmjs.org/"
|
|
55
|
+
},
|
|
56
|
+
"scripts": {
|
|
57
|
+
"build": "node scripts/build.mjs",
|
|
58
|
+
"test": "forge build -q && forge test -vvv",
|
|
59
|
+
"test:coverage": "forge coverage",
|
|
60
|
+
"anvil": "anvil --code-size-limit 100000",
|
|
61
|
+
"lint": "echo 'No linting configured for Solidity'",
|
|
62
|
+
"clean": "rm -rf out && rm -rf cache",
|
|
63
|
+
"dev": "anvil --code-size-limit 100000"
|
|
64
|
+
}
|
|
65
|
+
}
|
package/remappings.txt
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
forge-std/=node_modules/forge-std/src/
|
|
2
|
+
hardhat/=node_modules/hardhat/
|
|
3
|
+
@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/
|
|
4
|
+
@fhenixprotocol/cofhe-contracts/=node_modules/@fhenixprotocol/cofhe-contracts/
|
|
5
|
+
@cofhe/mock-contracts/=node_modules/@cofhe/mock-contracts/contracts/
|