@cofhe/mock-contracts 0.2.0 → 0.2.1
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 +7 -0
- package/contracts/MockACL.sol +4 -0
- package/dist/index.d.mts +13 -10
- package/dist/index.d.ts +13 -10
- package/dist/index.js +75 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +75 -15
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/MockACL.ts +65 -6
- package/src/MockQueryDecrypter.ts +5 -6
- package/src/MockTaskManager.ts +4 -5
- package/src/MockZkVerifier.ts +5 -6
- package/src/TestBed.ts +4 -5
- package/src/types.ts +12 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @cofhe/mock-contracts Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ac47e2f: Add `PermitUtils.checkValidityOnChain` to validate permits against the on-chain deployed ACL (source of truth).
|
|
8
|
+
- 0000d5e: Mock contracts deployed to alternate fixed addresses to avoid collision with hardhat pre-compiles.
|
|
9
|
+
|
|
3
10
|
## 0.2.0
|
|
4
11
|
|
|
5
12
|
### Minor Changes
|
package/contracts/MockACL.sol
CHANGED
|
@@ -335,4 +335,8 @@ contract MockACL is MockPermissioned {
|
|
|
335
335
|
) public view withPermission(permission) returns (bool) {
|
|
336
336
|
return isAllowed(handle, permission.issuer);
|
|
337
337
|
}
|
|
338
|
+
|
|
339
|
+
function checkPermitValidity(Permission memory permission) public view withPermission(permission) returns (bool) {
|
|
340
|
+
return true;
|
|
341
|
+
}
|
|
338
342
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
type
|
|
1
|
+
type MockArtifact = {
|
|
2
2
|
contractName: string;
|
|
3
|
-
fixedAddress: string;
|
|
4
3
|
abi: any;
|
|
4
|
+
} & ({
|
|
5
|
+
isFixed: true;
|
|
6
|
+
fixedAddress: string;
|
|
5
7
|
deployedBytecode: string;
|
|
8
|
+
} | {
|
|
9
|
+
isFixed: false;
|
|
6
10
|
bytecode: string;
|
|
7
|
-
};
|
|
11
|
+
});
|
|
8
12
|
|
|
9
13
|
declare const MockTaskManagerArtifact: {
|
|
10
14
|
contractName: string;
|
|
15
|
+
isFixed: true;
|
|
11
16
|
fixedAddress: string;
|
|
12
17
|
abi: ({
|
|
13
18
|
type: string;
|
|
@@ -66,12 +71,11 @@ declare const MockTaskManagerArtifact: {
|
|
|
66
71
|
anonymous?: undefined;
|
|
67
72
|
})[];
|
|
68
73
|
deployedBytecode: string;
|
|
69
|
-
bytecode: string;
|
|
70
74
|
};
|
|
71
75
|
|
|
72
76
|
declare const MockACLArtifact: {
|
|
73
77
|
contractName: string;
|
|
74
|
-
|
|
78
|
+
isFixed: false;
|
|
75
79
|
abi: ({
|
|
76
80
|
type: string;
|
|
77
81
|
inputs: never[];
|
|
@@ -128,12 +132,12 @@ declare const MockACLArtifact: {
|
|
|
128
132
|
outputs?: undefined;
|
|
129
133
|
anonymous?: undefined;
|
|
130
134
|
})[];
|
|
131
|
-
deployedBytecode: string;
|
|
132
135
|
bytecode: string;
|
|
133
136
|
};
|
|
134
137
|
|
|
135
138
|
declare const MockZkVerifierArtifact: {
|
|
136
139
|
contractName: string;
|
|
140
|
+
isFixed: true;
|
|
137
141
|
fixedAddress: string;
|
|
138
142
|
abi: ({
|
|
139
143
|
type: string;
|
|
@@ -176,11 +180,11 @@ declare const MockZkVerifierArtifact: {
|
|
|
176
180
|
stateMutability?: undefined;
|
|
177
181
|
})[];
|
|
178
182
|
deployedBytecode: string;
|
|
179
|
-
bytecode: string;
|
|
180
183
|
};
|
|
181
184
|
|
|
182
185
|
declare const MockQueryDecrypterArtifact: {
|
|
183
186
|
contractName: string;
|
|
187
|
+
isFixed: true;
|
|
184
188
|
fixedAddress: string;
|
|
185
189
|
abi: ({
|
|
186
190
|
type: string;
|
|
@@ -214,11 +218,11 @@ declare const MockQueryDecrypterArtifact: {
|
|
|
214
218
|
stateMutability?: undefined;
|
|
215
219
|
})[];
|
|
216
220
|
deployedBytecode: string;
|
|
217
|
-
bytecode: string;
|
|
218
221
|
};
|
|
219
222
|
|
|
220
223
|
declare const TestBedArtifact: {
|
|
221
224
|
contractName: string;
|
|
225
|
+
isFixed: true;
|
|
222
226
|
fixedAddress: string;
|
|
223
227
|
abi: ({
|
|
224
228
|
type: string;
|
|
@@ -261,7 +265,6 @@ declare const TestBedArtifact: {
|
|
|
261
265
|
stateMutability?: undefined;
|
|
262
266
|
})[];
|
|
263
267
|
deployedBytecode: string;
|
|
264
|
-
bytecode: string;
|
|
265
268
|
};
|
|
266
269
|
|
|
267
|
-
export { MockACLArtifact, MockQueryDecrypterArtifact, MockTaskManagerArtifact, MockZkVerifierArtifact,
|
|
270
|
+
export { MockACLArtifact, type MockArtifact, MockQueryDecrypterArtifact, MockTaskManagerArtifact, MockZkVerifierArtifact, TestBedArtifact };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
type
|
|
1
|
+
type MockArtifact = {
|
|
2
2
|
contractName: string;
|
|
3
|
-
fixedAddress: string;
|
|
4
3
|
abi: any;
|
|
4
|
+
} & ({
|
|
5
|
+
isFixed: true;
|
|
6
|
+
fixedAddress: string;
|
|
5
7
|
deployedBytecode: string;
|
|
8
|
+
} | {
|
|
9
|
+
isFixed: false;
|
|
6
10
|
bytecode: string;
|
|
7
|
-
};
|
|
11
|
+
});
|
|
8
12
|
|
|
9
13
|
declare const MockTaskManagerArtifact: {
|
|
10
14
|
contractName: string;
|
|
15
|
+
isFixed: true;
|
|
11
16
|
fixedAddress: string;
|
|
12
17
|
abi: ({
|
|
13
18
|
type: string;
|
|
@@ -66,12 +71,11 @@ declare const MockTaskManagerArtifact: {
|
|
|
66
71
|
anonymous?: undefined;
|
|
67
72
|
})[];
|
|
68
73
|
deployedBytecode: string;
|
|
69
|
-
bytecode: string;
|
|
70
74
|
};
|
|
71
75
|
|
|
72
76
|
declare const MockACLArtifact: {
|
|
73
77
|
contractName: string;
|
|
74
|
-
|
|
78
|
+
isFixed: false;
|
|
75
79
|
abi: ({
|
|
76
80
|
type: string;
|
|
77
81
|
inputs: never[];
|
|
@@ -128,12 +132,12 @@ declare const MockACLArtifact: {
|
|
|
128
132
|
outputs?: undefined;
|
|
129
133
|
anonymous?: undefined;
|
|
130
134
|
})[];
|
|
131
|
-
deployedBytecode: string;
|
|
132
135
|
bytecode: string;
|
|
133
136
|
};
|
|
134
137
|
|
|
135
138
|
declare const MockZkVerifierArtifact: {
|
|
136
139
|
contractName: string;
|
|
140
|
+
isFixed: true;
|
|
137
141
|
fixedAddress: string;
|
|
138
142
|
abi: ({
|
|
139
143
|
type: string;
|
|
@@ -176,11 +180,11 @@ declare const MockZkVerifierArtifact: {
|
|
|
176
180
|
stateMutability?: undefined;
|
|
177
181
|
})[];
|
|
178
182
|
deployedBytecode: string;
|
|
179
|
-
bytecode: string;
|
|
180
183
|
};
|
|
181
184
|
|
|
182
185
|
declare const MockQueryDecrypterArtifact: {
|
|
183
186
|
contractName: string;
|
|
187
|
+
isFixed: true;
|
|
184
188
|
fixedAddress: string;
|
|
185
189
|
abi: ({
|
|
186
190
|
type: string;
|
|
@@ -214,11 +218,11 @@ declare const MockQueryDecrypterArtifact: {
|
|
|
214
218
|
stateMutability?: undefined;
|
|
215
219
|
})[];
|
|
216
220
|
deployedBytecode: string;
|
|
217
|
-
bytecode: string;
|
|
218
221
|
};
|
|
219
222
|
|
|
220
223
|
declare const TestBedArtifact: {
|
|
221
224
|
contractName: string;
|
|
225
|
+
isFixed: true;
|
|
222
226
|
fixedAddress: string;
|
|
223
227
|
abi: ({
|
|
224
228
|
type: string;
|
|
@@ -261,7 +265,6 @@ declare const TestBedArtifact: {
|
|
|
261
265
|
stateMutability?: undefined;
|
|
262
266
|
})[];
|
|
263
267
|
deployedBytecode: string;
|
|
264
|
-
bytecode: string;
|
|
265
268
|
};
|
|
266
269
|
|
|
267
|
-
export { MockACLArtifact, MockQueryDecrypterArtifact, MockTaskManagerArtifact, MockZkVerifierArtifact,
|
|
270
|
+
export { MockACLArtifact, type MockArtifact, MockQueryDecrypterArtifact, MockTaskManagerArtifact, MockZkVerifierArtifact, TestBedArtifact };
|