@cofhe/mock-contracts 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/dist/index.mjs CHANGED
@@ -1423,11 +1423,6 @@ var MockTaskManagerArtifact = {
1423
1423
  }
1424
1424
  ]
1425
1425
  },
1426
- {
1427
- type: "error",
1428
- name: "NotImplemented",
1429
- inputs: []
1430
- },
1431
1426
  {
1432
1427
  type: "error",
1433
1428
  name: "OnlyAggregatorAllowed",
@@ -2168,6 +2163,19 @@ var MockACLArtifact = {
2168
2163
  inputs: [],
2169
2164
  anonymous: false
2170
2165
  },
2166
+ {
2167
+ type: "event",
2168
+ name: "Initialized",
2169
+ inputs: [
2170
+ {
2171
+ name: "version",
2172
+ type: "uint64",
2173
+ indexed: false,
2174
+ internalType: "uint64"
2175
+ }
2176
+ ],
2177
+ anonymous: false
2178
+ },
2171
2179
  {
2172
2180
  type: "event",
2173
2181
  name: "NewDelegation",
@@ -2249,7 +2257,7 @@ var MockACLArtifact = {
2249
2257
  },
2250
2258
  {
2251
2259
  type: "error",
2252
- name: "InvalidShortString",
2260
+ name: "InvalidInitialization",
2253
2261
  inputs: []
2254
2262
  },
2255
2263
  {
@@ -2257,6 +2265,11 @@ var MockACLArtifact = {
2257
2265
  name: "InvalidTaskManagerAddress",
2258
2266
  inputs: []
2259
2267
  },
2268
+ {
2269
+ type: "error",
2270
+ name: "NotInitializing",
2271
+ inputs: []
2272
+ },
2260
2273
  {
2261
2274
  type: "error",
2262
2275
  name: "NotShared",
@@ -2309,17 +2322,6 @@ var MockACLArtifact = {
2309
2322
  }
2310
2323
  ]
2311
2324
  },
2312
- {
2313
- type: "error",
2314
- name: "StringTooLong",
2315
- inputs: [
2316
- {
2317
- name: "str",
2318
- type: "string",
2319
- internalType: "string"
2320
- }
2321
- ]
2322
- },
2323
2325
  {
2324
2326
  type: "error",
2325
2327
  name: "UnexpectedSharer",
@@ -2477,6 +2479,69 @@ var ACPShareRegistryArtifact = {
2477
2479
  contractName: "ACPShareRegistry",
2478
2480
  isFixed: false,
2479
2481
  abi: [
2482
+ {
2483
+ type: "constructor",
2484
+ inputs: [],
2485
+ stateMutability: "nonpayable"
2486
+ },
2487
+ {
2488
+ type: "function",
2489
+ name: "DEFAULT_ADMIN_ROLE",
2490
+ inputs: [],
2491
+ outputs: [
2492
+ {
2493
+ name: "",
2494
+ type: "bytes32",
2495
+ internalType: "bytes32"
2496
+ }
2497
+ ],
2498
+ stateMutability: "view"
2499
+ },
2500
+ {
2501
+ type: "function",
2502
+ name: "UPGRADER_ROLE",
2503
+ inputs: [],
2504
+ outputs: [
2505
+ {
2506
+ name: "",
2507
+ type: "bytes32",
2508
+ internalType: "bytes32"
2509
+ }
2510
+ ],
2511
+ stateMutability: "view"
2512
+ },
2513
+ {
2514
+ type: "function",
2515
+ name: "UPGRADE_INTERFACE_VERSION",
2516
+ inputs: [],
2517
+ outputs: [
2518
+ {
2519
+ name: "",
2520
+ type: "string",
2521
+ internalType: "string"
2522
+ }
2523
+ ],
2524
+ stateMutability: "view"
2525
+ },
2526
+ {
2527
+ type: "function",
2528
+ name: "getRoleAdmin",
2529
+ inputs: [
2530
+ {
2531
+ name: "role",
2532
+ type: "bytes32",
2533
+ internalType: "bytes32"
2534
+ }
2535
+ ],
2536
+ outputs: [
2537
+ {
2538
+ name: "",
2539
+ type: "bytes32",
2540
+ internalType: "bytes32"
2541
+ }
2542
+ ],
2543
+ stateMutability: "view"
2544
+ },
2480
2545
  {
2481
2546
  type: "function",
2482
2547
  name: "getShare",
@@ -2491,7 +2556,7 @@ var ACPShareRegistryArtifact = {
2491
2556
  {
2492
2557
  name: "",
2493
2558
  type: "tuple",
2494
- internalType: "struct ACP",
2559
+ internalType: "struct ACPShareRegistry.ShareHeader",
2495
2560
  components: [
2496
2561
  {
2497
2562
  name: "issuer",
@@ -2509,9 +2574,9 @@ var ACPShareRegistryArtifact = {
2509
2574
  internalType: "address"
2510
2575
  },
2511
2576
  {
2512
- name: "revokerData",
2513
- type: "uint256",
2514
- internalType: "uint256"
2577
+ name: "blockNumber",
2578
+ type: "uint64",
2579
+ internalType: "uint64"
2515
2580
  },
2516
2581
  {
2517
2582
  name: "revokerContract",
@@ -2519,40 +2584,70 @@ var ACPShareRegistryArtifact = {
2519
2584
  internalType: "address"
2520
2585
  },
2521
2586
  {
2522
- name: "scope",
2523
- type: "uint8",
2524
- internalType: "uint8"
2525
- },
2526
- {
2527
- name: "contracts",
2528
- type: "address[]",
2529
- internalType: "address[]"
2530
- },
2531
- {
2532
- name: "handles",
2533
- type: "bytes32[]",
2534
- internalType: "bytes32[]"
2535
- },
2536
- {
2537
- name: "sealingKey",
2538
- type: "bytes32",
2539
- internalType: "bytes32"
2540
- },
2541
- {
2542
- name: "issuerSignature",
2543
- type: "bytes",
2544
- internalType: "bytes"
2545
- },
2546
- {
2547
- name: "recipientSignature",
2548
- type: "bytes",
2549
- internalType: "bytes"
2587
+ name: "revokerData",
2588
+ type: "uint256",
2589
+ internalType: "uint256"
2550
2590
  }
2551
2591
  ]
2552
2592
  }
2553
2593
  ],
2554
2594
  stateMutability: "view"
2555
2595
  },
2596
+ {
2597
+ type: "function",
2598
+ name: "grantRole",
2599
+ inputs: [
2600
+ {
2601
+ name: "role",
2602
+ type: "bytes32",
2603
+ internalType: "bytes32"
2604
+ },
2605
+ {
2606
+ name: "account",
2607
+ type: "address",
2608
+ internalType: "address"
2609
+ }
2610
+ ],
2611
+ outputs: [],
2612
+ stateMutability: "nonpayable"
2613
+ },
2614
+ {
2615
+ type: "function",
2616
+ name: "hasRole",
2617
+ inputs: [
2618
+ {
2619
+ name: "role",
2620
+ type: "bytes32",
2621
+ internalType: "bytes32"
2622
+ },
2623
+ {
2624
+ name: "account",
2625
+ type: "address",
2626
+ internalType: "address"
2627
+ }
2628
+ ],
2629
+ outputs: [
2630
+ {
2631
+ name: "",
2632
+ type: "bool",
2633
+ internalType: "bool"
2634
+ }
2635
+ ],
2636
+ stateMutability: "view"
2637
+ },
2638
+ {
2639
+ type: "function",
2640
+ name: "initialize",
2641
+ inputs: [
2642
+ {
2643
+ name: "initialAdmin",
2644
+ type: "address",
2645
+ internalType: "address"
2646
+ }
2647
+ ],
2648
+ outputs: [],
2649
+ stateMutability: "nonpayable"
2650
+ },
2556
2651
  {
2557
2652
  type: "function",
2558
2653
  name: "isShareValid",
@@ -2572,6 +2667,19 @@ var ACPShareRegistryArtifact = {
2572
2667
  ],
2573
2668
  stateMutability: "view"
2574
2669
  },
2670
+ {
2671
+ type: "function",
2672
+ name: "proxiableUUID",
2673
+ inputs: [],
2674
+ outputs: [
2675
+ {
2676
+ name: "",
2677
+ type: "bytes32",
2678
+ internalType: "bytes32"
2679
+ }
2680
+ ],
2681
+ stateMutability: "view"
2682
+ },
2575
2683
  {
2576
2684
  type: "function",
2577
2685
  name: "removeShare",
@@ -2585,6 +2693,42 @@ var ACPShareRegistryArtifact = {
2585
2693
  outputs: [],
2586
2694
  stateMutability: "nonpayable"
2587
2695
  },
2696
+ {
2697
+ type: "function",
2698
+ name: "renounceRole",
2699
+ inputs: [
2700
+ {
2701
+ name: "role",
2702
+ type: "bytes32",
2703
+ internalType: "bytes32"
2704
+ },
2705
+ {
2706
+ name: "callerConfirmation",
2707
+ type: "address",
2708
+ internalType: "address"
2709
+ }
2710
+ ],
2711
+ outputs: [],
2712
+ stateMutability: "nonpayable"
2713
+ },
2714
+ {
2715
+ type: "function",
2716
+ name: "revokeRole",
2717
+ inputs: [
2718
+ {
2719
+ name: "role",
2720
+ type: "bytes32",
2721
+ internalType: "bytes32"
2722
+ },
2723
+ {
2724
+ name: "account",
2725
+ type: "address",
2726
+ internalType: "address"
2727
+ }
2728
+ ],
2729
+ outputs: [],
2730
+ stateMutability: "nonpayable"
2731
+ },
2588
2732
  {
2589
2733
  type: "function",
2590
2734
  name: "share",
@@ -2650,6 +2794,11 @@ var ACPShareRegistryArtifact = {
2650
2794
  internalType: "bytes"
2651
2795
  }
2652
2796
  ]
2797
+ },
2798
+ {
2799
+ name: "metadata",
2800
+ type: "bytes",
2801
+ internalType: "bytes"
2653
2802
  }
2654
2803
  ],
2655
2804
  outputs: [
@@ -2673,9 +2822,14 @@ var ACPShareRegistryArtifact = {
2673
2822
  ],
2674
2823
  outputs: [
2675
2824
  {
2676
- name: "acps",
2825
+ name: "shareIds",
2826
+ type: "bytes32[]",
2827
+ internalType: "bytes32[]"
2828
+ },
2829
+ {
2830
+ name: "headers",
2677
2831
  type: "tuple[]",
2678
- internalType: "struct ACP[]",
2832
+ internalType: "struct ACPShareRegistry.ShareHeader[]",
2679
2833
  components: [
2680
2834
  {
2681
2835
  name: "issuer",
@@ -2693,9 +2847,9 @@ var ACPShareRegistryArtifact = {
2693
2847
  internalType: "address"
2694
2848
  },
2695
2849
  {
2696
- name: "revokerData",
2697
- type: "uint256",
2698
- internalType: "uint256"
2850
+ name: "blockNumber",
2851
+ type: "uint64",
2852
+ internalType: "uint64"
2699
2853
  },
2700
2854
  {
2701
2855
  name: "revokerContract",
@@ -2703,40 +2857,140 @@ var ACPShareRegistryArtifact = {
2703
2857
  internalType: "address"
2704
2858
  },
2705
2859
  {
2706
- name: "scope",
2707
- type: "uint8",
2708
- internalType: "uint8"
2709
- },
2710
- {
2711
- name: "contracts",
2712
- type: "address[]",
2713
- internalType: "address[]"
2714
- },
2715
- {
2716
- name: "handles",
2717
- type: "bytes32[]",
2718
- internalType: "bytes32[]"
2719
- },
2720
- {
2721
- name: "sealingKey",
2722
- type: "bytes32",
2723
- internalType: "bytes32"
2724
- },
2725
- {
2726
- name: "issuerSignature",
2727
- type: "bytes",
2728
- internalType: "bytes"
2729
- },
2730
- {
2731
- name: "recipientSignature",
2732
- type: "bytes",
2733
- internalType: "bytes"
2734
- }
2860
+ name: "revokerData",
2861
+ type: "uint256",
2862
+ internalType: "uint256"
2863
+ }
2735
2864
  ]
2736
2865
  }
2737
2866
  ],
2738
2867
  stateMutability: "view"
2739
2868
  },
2869
+ {
2870
+ type: "function",
2871
+ name: "supportsInterface",
2872
+ inputs: [
2873
+ {
2874
+ name: "interfaceId",
2875
+ type: "bytes4",
2876
+ internalType: "bytes4"
2877
+ }
2878
+ ],
2879
+ outputs: [
2880
+ {
2881
+ name: "",
2882
+ type: "bool",
2883
+ internalType: "bool"
2884
+ }
2885
+ ],
2886
+ stateMutability: "view"
2887
+ },
2888
+ {
2889
+ type: "function",
2890
+ name: "upgradeToAndCall",
2891
+ inputs: [
2892
+ {
2893
+ name: "newImplementation",
2894
+ type: "address",
2895
+ internalType: "address"
2896
+ },
2897
+ {
2898
+ name: "data",
2899
+ type: "bytes",
2900
+ internalType: "bytes"
2901
+ }
2902
+ ],
2903
+ outputs: [],
2904
+ stateMutability: "payable"
2905
+ },
2906
+ {
2907
+ type: "event",
2908
+ name: "Initialized",
2909
+ inputs: [
2910
+ {
2911
+ name: "version",
2912
+ type: "uint64",
2913
+ indexed: false,
2914
+ internalType: "uint64"
2915
+ }
2916
+ ],
2917
+ anonymous: false
2918
+ },
2919
+ {
2920
+ type: "event",
2921
+ name: "RoleAdminChanged",
2922
+ inputs: [
2923
+ {
2924
+ name: "role",
2925
+ type: "bytes32",
2926
+ indexed: true,
2927
+ internalType: "bytes32"
2928
+ },
2929
+ {
2930
+ name: "previousAdminRole",
2931
+ type: "bytes32",
2932
+ indexed: true,
2933
+ internalType: "bytes32"
2934
+ },
2935
+ {
2936
+ name: "newAdminRole",
2937
+ type: "bytes32",
2938
+ indexed: true,
2939
+ internalType: "bytes32"
2940
+ }
2941
+ ],
2942
+ anonymous: false
2943
+ },
2944
+ {
2945
+ type: "event",
2946
+ name: "RoleGranted",
2947
+ inputs: [
2948
+ {
2949
+ name: "role",
2950
+ type: "bytes32",
2951
+ indexed: true,
2952
+ internalType: "bytes32"
2953
+ },
2954
+ {
2955
+ name: "account",
2956
+ type: "address",
2957
+ indexed: true,
2958
+ internalType: "address"
2959
+ },
2960
+ {
2961
+ name: "sender",
2962
+ type: "address",
2963
+ indexed: true,
2964
+ internalType: "address"
2965
+ }
2966
+ ],
2967
+ anonymous: false
2968
+ },
2969
+ {
2970
+ type: "event",
2971
+ name: "RoleRevoked",
2972
+ inputs: [
2973
+ {
2974
+ name: "role",
2975
+ type: "bytes32",
2976
+ indexed: true,
2977
+ internalType: "bytes32"
2978
+ },
2979
+ {
2980
+ name: "account",
2981
+ type: "address",
2982
+ indexed: true,
2983
+ internalType: "address"
2984
+ },
2985
+ {
2986
+ name: "sender",
2987
+ type: "address",
2988
+ indexed: true,
2989
+ internalType: "address"
2990
+ }
2991
+ ],
2992
+ anonymous: false
2993
+ },
2740
2994
  {
2741
2995
  type: "event",
2742
2996
  name: "ShareRemoved",
@@ -2756,7 +3010,7 @@ var ACPShareRegistryArtifact = {
2756
3010
  {
2757
3011
  name: "shareId",
2758
3012
  type: "bytes32",
2759
- indexed: false,
3013
+ indexed: true,
2760
3014
  internalType: "bytes32"
2761
3015
  }
2762
3016
  ],
@@ -2781,22 +3035,167 @@ var ACPShareRegistryArtifact = {
2781
3035
  {
2782
3036
  name: "shareId",
2783
3037
  type: "bytes32",
2784
- indexed: false,
3038
+ indexed: true,
2785
3039
  internalType: "bytes32"
3040
+ },
3041
+ {
3042
+ name: "acp",
3043
+ type: "tuple",
3044
+ indexed: false,
3045
+ internalType: "struct ACP",
3046
+ components: [
3047
+ {
3048
+ name: "issuer",
3049
+ type: "address",
3050
+ internalType: "address"
3051
+ },
3052
+ {
3053
+ name: "expiration",
3054
+ type: "uint64",
3055
+ internalType: "uint64"
3056
+ },
3057
+ {
3058
+ name: "recipient",
3059
+ type: "address",
3060
+ internalType: "address"
3061
+ },
3062
+ {
3063
+ name: "revokerData",
3064
+ type: "uint256",
3065
+ internalType: "uint256"
3066
+ },
3067
+ {
3068
+ name: "revokerContract",
3069
+ type: "address",
3070
+ internalType: "address"
3071
+ },
3072
+ {
3073
+ name: "scope",
3074
+ type: "uint8",
3075
+ internalType: "uint8"
3076
+ },
3077
+ {
3078
+ name: "contracts",
3079
+ type: "address[]",
3080
+ internalType: "address[]"
3081
+ },
3082
+ {
3083
+ name: "handles",
3084
+ type: "bytes32[]",
3085
+ internalType: "bytes32[]"
3086
+ },
3087
+ {
3088
+ name: "sealingKey",
3089
+ type: "bytes32",
3090
+ internalType: "bytes32"
3091
+ },
3092
+ {
3093
+ name: "issuerSignature",
3094
+ type: "bytes",
3095
+ internalType: "bytes"
3096
+ },
3097
+ {
3098
+ name: "recipientSignature",
3099
+ type: "bytes",
3100
+ internalType: "bytes"
3101
+ }
3102
+ ]
3103
+ },
3104
+ {
3105
+ name: "metadata",
3106
+ type: "bytes",
3107
+ indexed: false,
3108
+ internalType: "bytes"
3109
+ }
3110
+ ],
3111
+ anonymous: false
3112
+ },
3113
+ {
3114
+ type: "event",
3115
+ name: "Upgraded",
3116
+ inputs: [
3117
+ {
3118
+ name: "implementation",
3119
+ type: "address",
3120
+ indexed: true,
3121
+ internalType: "address"
2786
3122
  }
2787
3123
  ],
2788
3124
  anonymous: false
2789
3125
  },
3126
+ {
3127
+ type: "error",
3128
+ name: "AccessControlBadConfirmation",
3129
+ inputs: []
3130
+ },
3131
+ {
3132
+ type: "error",
3133
+ name: "AccessControlUnauthorizedAccount",
3134
+ inputs: [
3135
+ {
3136
+ name: "account",
3137
+ type: "address",
3138
+ internalType: "address"
3139
+ },
3140
+ {
3141
+ name: "neededRole",
3142
+ type: "bytes32",
3143
+ internalType: "bytes32"
3144
+ }
3145
+ ]
3146
+ },
3147
+ {
3148
+ type: "error",
3149
+ name: "AddressEmptyCode",
3150
+ inputs: [
3151
+ {
3152
+ name: "target",
3153
+ type: "address",
3154
+ internalType: "address"
3155
+ }
3156
+ ]
3157
+ },
2790
3158
  {
2791
3159
  type: "error",
2792
3160
  name: "AlreadyShared",
2793
3161
  inputs: []
2794
3162
  },
3163
+ {
3164
+ type: "error",
3165
+ name: "ERC1967InvalidImplementation",
3166
+ inputs: [
3167
+ {
3168
+ name: "implementation",
3169
+ type: "address",
3170
+ internalType: "address"
3171
+ }
3172
+ ]
3173
+ },
3174
+ {
3175
+ type: "error",
3176
+ name: "ERC1967NonPayable",
3177
+ inputs: []
3178
+ },
3179
+ {
3180
+ type: "error",
3181
+ name: "FailedCall",
3182
+ inputs: []
3183
+ },
3184
+ {
3185
+ type: "error",
3186
+ name: "InvalidInitialization",
3187
+ inputs: []
3188
+ },
2795
3189
  {
2796
3190
  type: "error",
2797
3191
  name: "IssuerSignatureMissing",
2798
3192
  inputs: []
2799
3193
  },
3194
+ {
3195
+ type: "error",
3196
+ name: "NotInitializing",
3197
+ inputs: []
3198
+ },
2800
3199
  {
2801
3200
  type: "error",
2802
3201
  name: "NotIssuer",
@@ -2822,6 +3221,22 @@ var ACPShareRegistryArtifact = {
2822
3221
  name: "ShareExpired",
2823
3222
  inputs: []
2824
3223
  },
3224
+ {
3225
+ type: "error",
3226
+ name: "UUPSUnauthorizedCallContext",
3227
+ inputs: []
3228
+ },
3229
+ {
3230
+ type: "error",
3231
+ name: "UUPSUnsupportedProxiableUUID",
3232
+ inputs: [
3233
+ {
3234
+ name: "slot",
3235
+ type: "bytes32",
3236
+ internalType: "bytes32"
3237
+ }
3238
+ ]
3239
+ },
2825
3240
  {
2826
3241
  type: "error",
2827
3242
  name: "UnknownShare",
@@ -2830,6 +3245,79 @@ var ACPShareRegistryArtifact = {
2830
3245
  ]
2831
3246
  };
2832
3247
 
3248
+ // src/MockERC1967Proxy.ts
3249
+ var MockERC1967ProxyArtifact = {
3250
+ contractName: "MockERC1967Proxy",
3251
+ isFixed: false,
3252
+ abi: [
3253
+ {
3254
+ type: "constructor",
3255
+ inputs: [
3256
+ {
3257
+ name: "implementation",
3258
+ type: "address",
3259
+ internalType: "address"
3260
+ },
3261
+ {
3262
+ name: "data",
3263
+ type: "bytes",
3264
+ internalType: "bytes"
3265
+ }
3266
+ ],
3267
+ stateMutability: "payable"
3268
+ },
3269
+ {
3270
+ type: "fallback",
3271
+ stateMutability: "payable"
3272
+ },
3273
+ {
3274
+ type: "event",
3275
+ name: "Upgraded",
3276
+ inputs: [
3277
+ {
3278
+ name: "implementation",
3279
+ type: "address",
3280
+ indexed: true,
3281
+ internalType: "address"
3282
+ }
3283
+ ],
3284
+ anonymous: false
3285
+ },
3286
+ {
3287
+ type: "error",
3288
+ name: "AddressEmptyCode",
3289
+ inputs: [
3290
+ {
3291
+ name: "target",
3292
+ type: "address",
3293
+ internalType: "address"
3294
+ }
3295
+ ]
3296
+ },
3297
+ {
3298
+ type: "error",
3299
+ name: "ERC1967InvalidImplementation",
3300
+ inputs: [
3301
+ {
3302
+ name: "implementation",
3303
+ type: "address",
3304
+ internalType: "address"
3305
+ }
3306
+ ]
3307
+ },
3308
+ {
3309
+ type: "error",
3310
+ name: "ERC1967NonPayable",
3311
+ inputs: []
3312
+ },
3313
+ {
3314
+ type: "error",
3315
+ name: "FailedCall",
3316
+ inputs: []
3317
+ }
3318
+ ]
3319
+ };
3320
+
2833
3321
  // src/MockZkVerifier.ts
2834
3322
  var MockZkVerifierArtifact = {
2835
3323
  contractName: "MockZkVerifier",
@@ -3592,6 +4080,6 @@ var MockThresholdNetworkArtifact = {
3592
4080
  ]
3593
4081
  };
3594
4082
 
3595
- export { ACPShareRegistryArtifact, ACPTimestampRevokerArtifact, MockACLArtifact, MockCoFHEAddressBookArtifact, MockTaskManagerArtifact, MockThresholdNetworkArtifact, MockZkVerifierArtifact };
4083
+ export { ACPShareRegistryArtifact, ACPTimestampRevokerArtifact, MockACLArtifact, MockCoFHEAddressBookArtifact, MockERC1967ProxyArtifact, MockTaskManagerArtifact, MockThresholdNetworkArtifact, MockZkVerifierArtifact };
3596
4084
  //# sourceMappingURL=index.mjs.map
3597
4085
  //# sourceMappingURL=index.mjs.map