Skip to content

Commit

Permalink
move imports to foundation/fields
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-aztec committed Oct 5, 2023
1 parent 34b0209 commit a934f27
Show file tree
Hide file tree
Showing 18 changed files with 24 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Fr } from '@aztec/circuits.js';
import { Ecdsa } from '@aztec/circuits.js/barretenberg';
import { ContractAbi } from '@aztec/foundation/abi';
import { Fr } from '@aztec/foundation/fields';
import { AuthWitness, CompleteAddress } from '@aztec/types';

import EcdsaAccountContractAbi from '../../abis/ecdsa_account_contract.json' assert { type: 'json' };
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Fr } from '@aztec/circuits.js';
import { Schnorr } from '@aztec/circuits.js/barretenberg';
import { ContractAbi } from '@aztec/foundation/abi';
import { Fr } from '@aztec/foundation/fields';
import { AuthWitness, CompleteAddress, GrumpkinPrivateKey } from '@aztec/types';

import SchnorrAccountContractAbi from '../../abis/schnorr_account_contract.json' assert { type: 'json' };
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Fr, PartialAddress } from '@aztec/circuits.js';
import { PartialAddress } from '@aztec/circuits.js';
import { Schnorr } from '@aztec/circuits.js/barretenberg';
import { ContractAbi } from '@aztec/foundation/abi';
import { Fr } from '@aztec/foundation/fields';
import { AuthWitness, CompleteAddress, GrumpkinPrivateKey } from '@aztec/types';

import SchnorrSingleKeyAccountContractAbi from '../../abis/schnorr_single_key_account_contract.json' assert { type: 'json' };
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/aztec.js/src/account/interface.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Fr } from '@aztec/circuits.js';
import { Fr } from '@aztec/foundation/fields';
import { AuthWitness, CompleteAddress, FunctionCall, TxExecutionRequest } from '@aztec/types';

// docs:start:account-interface
Expand Down
3 changes: 2 additions & 1 deletion yarn-project/aztec.js/src/account/manager/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Fr, PublicKey, getContractDeploymentInfo } from '@aztec/circuits.js';
import { PublicKey, getContractDeploymentInfo } from '@aztec/circuits.js';
import { Fr } from '@aztec/foundation/fields';
import { CompleteAddress, GrumpkinPrivateKey, PXE } from '@aztec/types';

import { AccountWallet, ContractDeployer, DeployMethod, WaitOpts, generatePublicKey } from '../../index.js';
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/aztec.js/src/sandbox/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Fr, GrumpkinScalar } from '@aztec/circuits.js';
import { Fr, GrumpkinScalar } from '@aztec/foundation/fields';
import { sleep } from '@aztec/foundation/sleep';

import zip from 'lodash.zip';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Fr } from '@aztec/foundation/fields';
import { BufferReader, Tuple } from '@aztec/foundation/serialize';

import { privateKernelDummyPreviousKernel } from '../../cbind/circuits.gen.js';
import { CircuitsWasm, VK_TREE_HEIGHT, makeTuple } from '../../index.js';
import { serializeToBuffer } from '../../utils/serialize.js';
import { Fr } from '../index.js';
import { Proof, makeEmptyProof } from '../proof.js';
import { UInt32 } from '../shared.js';
import { VerificationKey } from '../verification_key.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Fr } from '@aztec/foundation/fields';
import { Tuple } from '@aztec/foundation/serialize';

import {
Expand All @@ -11,7 +12,6 @@ import {
import { FieldsOf } from '../../utils/jsUtils.js';
import { serializeToBuffer } from '../../utils/serialize.js';
import { PrivateCallStackItem } from '../call_stack_item.js';
import { Fr } from '../index.js';
import { MembershipWitness } from '../membership_witness.js';
import { Proof } from '../proof.js';
import { ReadRequestMembershipWitness } from '../read_request_membership_witness.js';
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/circuits.js/src/types/partial_address.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Fr } from '../index.js';
import { Fr } from '@aztec/foundation/fields';

/**
* A type which along with public key forms a preimage of a contract address. See the link bellow for more details
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/cli/src/encoding.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Fr } from '@aztec/aztec.js';
import { ABIParameter, ABIType, StructType } from '@aztec/foundation/abi';
import { Fr } from '@aztec/foundation/fields';

/**
* Parses a hex string into an ABI struct type.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { AccountWallet, AztecAddress, computeAuthWitMessageHash } from '@aztec/aztec.js';
import { Fr } from '@aztec/circuits.js';
import { EthAddress } from '@aztec/foundation/eth-address';
import { Fr } from '@aztec/foundation/fields';
import { DebugLogger } from '@aztec/foundation/log';
import { TokenBridgeContract, TokenContract } from '@aztec/noir-contracts/types';
import { TxStatus } from '@aztec/types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
generatePublicKey,
getSchnorrAccount,
} from '@aztec/aztec.js';
import { Fr, GrumpkinScalar } from '@aztec/circuits.js';
import { Fr, GrumpkinScalar } from '@aztec/foundation/fields';
import { DebugLogger } from '@aztec/foundation/log';
import { TokenContract } from '@aztec/noir-contracts/types';
import { AztecNode, PXE, TxStatus } from '@aztec/types';
Expand Down
3 changes: 2 additions & 1 deletion yarn-project/end-to-end/src/e2e_ordering.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Test suite for testing proper ordering of side effects
import { Wallet } from '@aztec/aztec.js';
import { Fr, FunctionSelector } from '@aztec/circuits.js';
import { FunctionSelector } from '@aztec/circuits.js';
import { toBigIntBE } from '@aztec/foundation/bigint-buffer';
import { Fr } from '@aztec/foundation/fields';
import { toBigInt } from '@aztec/foundation/serialize';
import { ChildContract, ParentContract } from '@aztec/noir-contracts/types';
import { L2BlockL2Logs, PXE, TxStatus, UnencryptedL2Log } from '@aztec/types';
Expand Down
3 changes: 2 additions & 1 deletion yarn-project/end-to-end/src/e2e_private_airdrop.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { CompleteAddress, NotePreimage, TxHash, Wallet } from '@aztec/aztec.js';
import { Fr, MAX_NEW_COMMITMENTS_PER_CALL } from '@aztec/circuits.js';
import { MAX_NEW_COMMITMENTS_PER_CALL } from '@aztec/circuits.js';
import { Fr } from '@aztec/foundation/fields';
import { DebugLogger } from '@aztec/foundation/log';
import { PrivateTokenAirdropContract } from '@aztec/noir-contracts/types';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { AccountWallet, AztecAddress, computeAuthWitMessageHash } from '@aztec/aztec.js';
import { Fr } from '@aztec/circuits.js';
import { EthAddress } from '@aztec/foundation/eth-address';
import { Fr } from '@aztec/foundation/fields';
import { DebugLogger } from '@aztec/foundation/log';
import { TokenBridgeContract, TokenContract } from '@aztec/noir-contracts/types';
import { TxStatus } from '@aztec/types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AccountWallet, AztecAddress, computeAuthWitMessageHash } from '@aztec/aztec.js';
import { Fr } from '@aztec/circuits.js';
import { deployL1Contract } from '@aztec/ethereum';
import { EthAddress } from '@aztec/foundation/eth-address';
import { Fr } from '@aztec/foundation/fields';
import { DebugLogger } from '@aztec/foundation/log';
import { UniswapPortalAbi, UniswapPortalBytecode } from '@aztec/l1-artifacts';
import { UniswapContract } from '@aztec/noir-contracts/types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Fr, GlobalVariables } from '@aztec/circuits.js';
import { GlobalVariables } from '@aztec/circuits.js';
import { Fr } from '@aztec/foundation/fields';
import { createDebugLogger } from '@aztec/foundation/log';

/**
Expand Down
3 changes: 2 additions & 1 deletion yarn-project/types/src/auth_witness.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Fr, Vector } from '@aztec/circuits.js';
import { Vector } from '@aztec/circuits.js';
import { BufferReader, serializeToBuffer } from '@aztec/circuits.js/utils';
import { Fr } from '@aztec/foundation/fields';

/**
* An authentication witness. Used to authorize an action by a user.
Expand Down

0 comments on commit a934f27

Please sign in to comment.