Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fixing test contract fixture #9909

Merged
merged 1 commit into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions yarn-project/circuit-types/src/interfaces/pxe.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { type JsonRpcTestContext, createJsonRpcTestSetup } from '@aztec/foundati
import { fileURLToPath } from '@aztec/foundation/url';
import { loadContractArtifact } from '@aztec/types/abi';

import { jest } from '@jest/globals';
import { deepStrictEqual } from 'assert';
import { readFileSync } from 'fs';
import omit from 'lodash.omit';
Expand All @@ -43,6 +44,8 @@ import { TxExecutionRequest } from '../tx_execution_request.js';
import { type EventMetadataDefinition, type PXE, type PXEInfo, PXESchema } from './pxe.js';
import { type SyncStatus } from './sync-status.js';

jest.setTimeout(12_000);

describe('PXESchema', () => {
let handler: MockPXE;
let context: JsonRpcTestContext<PXE>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ describe('unconstrained_function_membership_proof', () => {
expect(artifact.functions.filter(isUnconstrained).length).toBe(1);

const unconstrainedFunction = unconstrainedFns[0];
const selector = FunctionSelector.fromNameAndParameters(unconstrainedFunction);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needed to be fixed because previously it was using the selector set on L24 which is not the same selector as the unconstrained function set here !


const proof = createUnconstrainedFunctionMembershipProof(selector, artifact);
expect(proof.artifactTreeSiblingPath.length).toBe(0);

Expand Down
4 changes: 2 additions & 2 deletions yarn-project/circuits.js/src/tests/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ export function getBenchmarkContractArtifact(): ContractArtifact {
return loadContractArtifact(content);
}

// Copied from the build output for the contract `Benchmarking` in noir-contracts
// Copied from the build output for the contract `Test` in noir-contracts
export function getTestContractArtifact(): ContractArtifact {
const path = getPathToFixture('Benchmarking.test.json');
const path = getPathToFixture('Test.test.json');
const content = JSON.parse(readFileSync(path).toString()) as NoirCompiledContract;
return loadContractArtifact(content);
}
Expand Down
Loading