Skip to content

Commit 6a49405

Browse files
authored
chore: check artifact consistency (#10271)
1 parent bfd9fa6 commit 6a49405

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
import { type ContractArtifact } from '@aztec/foundation/abi';
2-
import { loadContractArtifact } from '@aztec/types/abi';
3-
import type { NoirCompiledContract } from '@aztec/types/noir';
42

5-
import { readFileSync } from 'fs';
6-
7-
import { getPathToFixture, getTestContractArtifact } from '../tests/fixtures.js';
3+
import { getTestContractArtifact } from '../tests/fixtures.js';
84
import { computeArtifactHash } from './artifact_hash.js';
95

10-
const TEST_CONTRACT_ARTIFACT_HASH = `"0x19142676527045a118066698e292cc35db16ab4d7bd16610d35d2e1c607eb8b2"`;
11-
126
describe('ArtifactHash', () => {
137
it('calculates the artifact hash', () => {
148
const emptyArtifact: ContractArtifact = {
@@ -31,19 +25,8 @@ describe('ArtifactHash', () => {
3125
const testArtifact = getTestContractArtifact();
3226

3327
const calculatedArtifactHash = computeArtifactHash(testArtifact).toString();
34-
expect(calculatedArtifactHash).toMatchInlineSnapshot(TEST_CONTRACT_ARTIFACT_HASH);
3528
for (let i = 0; i < 1000; i++) {
3629
expect(computeArtifactHash(testArtifact).toString()).toBe(calculatedArtifactHash);
3730
}
3831
});
39-
40-
it('calculates the test contract artifact hash', () => {
41-
const path = getPathToFixture('Test.test.json');
42-
const content = JSON.parse(readFileSync(path).toString()) as NoirCompiledContract;
43-
content.outputs.structs.functions.reverse();
44-
45-
const testArtifact = loadContractArtifact(content);
46-
47-
expect(computeArtifactHash(testArtifact).toString()).toMatchInlineSnapshot(TEST_CONTRACT_ARTIFACT_HASH);
48-
});
4932
});

0 commit comments

Comments
 (0)