@cofhe/mock-contracts 0.5.0 → 0.5.2
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 +8 -0
- package/contracts/MockTaskManager.sol +25 -0
- package/contracts/TestBed.sol +6 -1
- package/dist/index.d.mts +77 -1
- package/dist/index.d.ts +77 -1
- package/dist/index.js +58 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +58 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/MockTaskManager.ts +58 -0
- package/src/typechain-types/MockTaskManager.ts +38 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cofhe/mock-contracts",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "Mock smart contracts for testing CoFHE with FHE primitives locally",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"cofhe"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@fhenixprotocol/cofhe-contracts": "0.1.
|
|
36
|
+
"@fhenixprotocol/cofhe-contracts": "0.1.3",
|
|
37
37
|
"@openzeppelin/contracts": "5.4.0",
|
|
38
38
|
"@openzeppelin/contracts-upgradeable": "5.4.0"
|
|
39
39
|
},
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"tsx": "4.21.0",
|
|
47
47
|
"tsup": "8.5.0",
|
|
48
48
|
"typechain": "8.3.2",
|
|
49
|
-
"@cofhe/sdk": "0.5.
|
|
49
|
+
"@cofhe/sdk": "0.5.2",
|
|
50
50
|
"@cofhe/tsconfig": "0.1.2"
|
|
51
51
|
},
|
|
52
52
|
"publishConfig": {
|
package/src/MockTaskManager.ts
CHANGED
|
@@ -754,6 +754,64 @@ export const MockTaskManagerArtifact = {
|
|
|
754
754
|
],
|
|
755
755
|
stateMutability: 'view',
|
|
756
756
|
},
|
|
757
|
+
{
|
|
758
|
+
type: 'function',
|
|
759
|
+
name: 'verifyDecryptResultBatch',
|
|
760
|
+
inputs: [
|
|
761
|
+
{
|
|
762
|
+
name: 'ctHashes',
|
|
763
|
+
type: 'uint256[]',
|
|
764
|
+
internalType: 'uint256[]',
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
name: 'results',
|
|
768
|
+
type: 'uint256[]',
|
|
769
|
+
internalType: 'uint256[]',
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
name: 'signatures',
|
|
773
|
+
type: 'bytes[]',
|
|
774
|
+
internalType: 'bytes[]',
|
|
775
|
+
},
|
|
776
|
+
],
|
|
777
|
+
outputs: [
|
|
778
|
+
{
|
|
779
|
+
name: '',
|
|
780
|
+
type: 'bool',
|
|
781
|
+
internalType: 'bool',
|
|
782
|
+
},
|
|
783
|
+
],
|
|
784
|
+
stateMutability: 'view',
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
type: 'function',
|
|
788
|
+
name: 'verifyDecryptResultBatchSafe',
|
|
789
|
+
inputs: [
|
|
790
|
+
{
|
|
791
|
+
name: 'ctHashes',
|
|
792
|
+
type: 'uint256[]',
|
|
793
|
+
internalType: 'uint256[]',
|
|
794
|
+
},
|
|
795
|
+
{
|
|
796
|
+
name: 'results',
|
|
797
|
+
type: 'uint256[]',
|
|
798
|
+
internalType: 'uint256[]',
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
name: 'signatures',
|
|
802
|
+
type: 'bytes[]',
|
|
803
|
+
internalType: 'bytes[]',
|
|
804
|
+
},
|
|
805
|
+
],
|
|
806
|
+
outputs: [
|
|
807
|
+
{
|
|
808
|
+
name: '',
|
|
809
|
+
type: 'bool[]',
|
|
810
|
+
internalType: 'bool[]',
|
|
811
|
+
},
|
|
812
|
+
],
|
|
813
|
+
stateMutability: 'view',
|
|
814
|
+
},
|
|
757
815
|
{
|
|
758
816
|
type: 'function',
|
|
759
817
|
name: 'verifyDecryptResultSafe',
|
|
@@ -109,6 +109,8 @@ export interface MockTaskManagerInterface extends Interface {
|
|
|
109
109
|
| 'setVerifierSigner'
|
|
110
110
|
| 'sliceString'
|
|
111
111
|
| 'verifyDecryptResult'
|
|
112
|
+
| 'verifyDecryptResultBatch'
|
|
113
|
+
| 'verifyDecryptResultBatchSafe'
|
|
112
114
|
| 'verifyDecryptResultSafe'
|
|
113
115
|
| 'verifyInput'
|
|
114
116
|
): FunctionFragment;
|
|
@@ -162,6 +164,14 @@ export interface MockTaskManagerInterface extends Interface {
|
|
|
162
164
|
encodeFunctionData(functionFragment: 'setVerifierSigner', values: [AddressLike]): string;
|
|
163
165
|
encodeFunctionData(functionFragment: 'sliceString', values: [string, BigNumberish, BigNumberish]): string;
|
|
164
166
|
encodeFunctionData(functionFragment: 'verifyDecryptResult', values: [BigNumberish, BigNumberish, BytesLike]): string;
|
|
167
|
+
encodeFunctionData(
|
|
168
|
+
functionFragment: 'verifyDecryptResultBatch',
|
|
169
|
+
values: [BigNumberish[], BigNumberish[], BytesLike[]]
|
|
170
|
+
): string;
|
|
171
|
+
encodeFunctionData(
|
|
172
|
+
functionFragment: 'verifyDecryptResultBatchSafe',
|
|
173
|
+
values: [BigNumberish[], BigNumberish[], BytesLike[]]
|
|
174
|
+
): string;
|
|
165
175
|
encodeFunctionData(
|
|
166
176
|
functionFragment: 'verifyDecryptResultSafe',
|
|
167
177
|
values: [BigNumberish, BigNumberish, BytesLike]
|
|
@@ -206,6 +216,8 @@ export interface MockTaskManagerInterface extends Interface {
|
|
|
206
216
|
decodeFunctionResult(functionFragment: 'setVerifierSigner', data: BytesLike): Result;
|
|
207
217
|
decodeFunctionResult(functionFragment: 'sliceString', data: BytesLike): Result;
|
|
208
218
|
decodeFunctionResult(functionFragment: 'verifyDecryptResult', data: BytesLike): Result;
|
|
219
|
+
decodeFunctionResult(functionFragment: 'verifyDecryptResultBatch', data: BytesLike): Result;
|
|
220
|
+
decodeFunctionResult(functionFragment: 'verifyDecryptResultBatchSafe', data: BytesLike): Result;
|
|
209
221
|
decodeFunctionResult(functionFragment: 'verifyDecryptResultSafe', data: BytesLike): Result;
|
|
210
222
|
decodeFunctionResult(functionFragment: 'verifyInput', data: BytesLike): Result;
|
|
211
223
|
}
|
|
@@ -401,6 +413,18 @@ export interface MockTaskManager extends BaseContract {
|
|
|
401
413
|
'view'
|
|
402
414
|
>;
|
|
403
415
|
|
|
416
|
+
verifyDecryptResultBatch: TypedContractMethod<
|
|
417
|
+
[ctHashes: BigNumberish[], results: BigNumberish[], signatures: BytesLike[]],
|
|
418
|
+
[boolean],
|
|
419
|
+
'view'
|
|
420
|
+
>;
|
|
421
|
+
|
|
422
|
+
verifyDecryptResultBatchSafe: TypedContractMethod<
|
|
423
|
+
[ctHashes: BigNumberish[], results: BigNumberish[], signatures: BytesLike[]],
|
|
424
|
+
[boolean[]],
|
|
425
|
+
'view'
|
|
426
|
+
>;
|
|
427
|
+
|
|
404
428
|
verifyDecryptResultSafe: TypedContractMethod<
|
|
405
429
|
[ctHash: BigNumberish, result: BigNumberish, signature: BytesLike],
|
|
406
430
|
[boolean],
|
|
@@ -503,6 +527,20 @@ export interface MockTaskManager extends BaseContract {
|
|
|
503
527
|
getFunction(
|
|
504
528
|
nameOrSignature: 'verifyDecryptResult'
|
|
505
529
|
): TypedContractMethod<[ctHash: BigNumberish, result: BigNumberish, signature: BytesLike], [boolean], 'view'>;
|
|
530
|
+
getFunction(
|
|
531
|
+
nameOrSignature: 'verifyDecryptResultBatch'
|
|
532
|
+
): TypedContractMethod<
|
|
533
|
+
[ctHashes: BigNumberish[], results: BigNumberish[], signatures: BytesLike[]],
|
|
534
|
+
[boolean],
|
|
535
|
+
'view'
|
|
536
|
+
>;
|
|
537
|
+
getFunction(
|
|
538
|
+
nameOrSignature: 'verifyDecryptResultBatchSafe'
|
|
539
|
+
): TypedContractMethod<
|
|
540
|
+
[ctHashes: BigNumberish[], results: BigNumberish[], signatures: BytesLike[]],
|
|
541
|
+
[boolean[]],
|
|
542
|
+
'view'
|
|
543
|
+
>;
|
|
506
544
|
getFunction(
|
|
507
545
|
nameOrSignature: 'verifyDecryptResultSafe'
|
|
508
546
|
): TypedContractMethod<[ctHash: BigNumberish, result: BigNumberish, signature: BytesLike], [boolean], 'view'>;
|