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

feat: contract ts interface to use only aztec.js imports #2876

Merged
merged 1 commit into from
Oct 17, 2023
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
2 changes: 1 addition & 1 deletion yarn-project/aztec.js/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export {
TxStatus,
emptyFunctionCall,
} from '@aztec/types';

export { ContractArtifact } from '@aztec/foundation/abi';
export { createDebugLogger, DebugLogger } from '@aztec/foundation/log';
export { fileURLToPath } from '@aztec/foundation/url';
export { sleep } from '@aztec/foundation/sleep';
23 changes: 19 additions & 4 deletions yarn-project/noir-compiler/src/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,25 @@ exports[`noir-compiler using nargo binary generates typescript interface 1`] = `
/* Autogenerated file, do not edit! */

/* eslint-disable */
import { AztecAddress, CompleteAddress, Contract, ContractBase, ContractFunctionInteraction, ContractMethod, DeployMethod, EthAddress, FieldLike, AztecAddressLike, EthAddressLike, Wallet } from '@aztec/aztec.js';
import { Fr, Point } from '@aztec/foundation/fields';
import { PXE, PublicKey } from '@aztec/types';
import { ContractArtifact } from '@aztec/foundation/abi';
import {
AztecAddress,
AztecAddressLike,
CompleteAddress,
Contract,
ContractArtifact,
ContractBase,
ContractFunctionInteraction,
ContractMethod,
DeployMethod,
EthAddress,
EthAddressLike,
FieldLike,
Fr,
PXE,
Point,
PublicKey,
Wallet,
} from '@aztec/aztec.js';
import TestContractContractArtifactJson from '../target/test.json' assert { type: 'json' };
export const TestContractContractArtifact = TestContractContractArtifactJson as ContractArtifact;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,25 @@ export function generateTypescriptContractInterface(input: ContractArtifact, art
/* Autogenerated file, do not edit! */

/* eslint-disable */
import { AztecAddress, CompleteAddress, Contract, ContractBase, ContractFunctionInteraction, ContractMethod, DeployMethod, EthAddress, FieldLike, AztecAddressLike, EthAddressLike, Wallet } from '@aztec/aztec.js';
import { Fr, Point } from '@aztec/foundation/fields';
import { PXE, PublicKey } from '@aztec/types';
import { ContractArtifact } from '@aztec/foundation/abi';
import {
AztecAddress,
AztecAddressLike,
CompleteAddress,
Contract,
ContractArtifact,
ContractBase,
ContractFunctionInteraction,
ContractMethod,
DeployMethod,
EthAddress,
EthAddressLike,
FieldLike,
Fr,
PXE,
Point,
PublicKey,
Wallet,
} from '@aztec/aztec.js';
${artifactStatement}

/**
Expand Down