Skip to content

Commit

Permalink
Revert "chore: move { Fr } imports to foundation/fields (#2712)"
Browse files Browse the repository at this point in the history
This reverts commit f6fc7f2.
  • Loading branch information
dan-aztec committed Oct 6, 2023
1 parent d518930 commit 3d04bea
Show file tree
Hide file tree
Showing 18 changed files with 18 additions and 24 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,7 +1,6 @@
import { PartialAddress } from '@aztec/circuits.js';
import { Fr, 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/foundation/fields';
import { Fr } from '@aztec/circuits.js';
import { AuthWitness, CompleteAddress, FunctionCall, TxExecutionRequest } from '@aztec/types';

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

import {
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/foundation/fields';
import { Fr, GrumpkinScalar } from '@aztec/circuits.js';
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,4 +1,3 @@
import { Fr } from '@aztec/foundation/fields';
import { Tuple } from '@aztec/foundation/serialize';

import {
Expand All @@ -12,6 +11,7 @@ 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 '@aztec/foundation/fields';
import { Fr } from '../index.js';

/**
* 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/foundation/fields';
import { Fr, GrumpkinScalar } from '@aztec/circuits.js';
import { DebugLogger } from '@aztec/foundation/log';
import { TokenContract } from '@aztec/noir-contracts/types';
import { AztecNode, PXE, TxStatus } from '@aztec/types';
Expand Down
3 changes: 1 addition & 2 deletions yarn-project/end-to-end/src/e2e_ordering.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Test suite for testing proper ordering of side effects
import { Wallet } from '@aztec/aztec.js';
import { FunctionSelector } from '@aztec/circuits.js';
import { Fr, 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: 1 addition & 2 deletions yarn-project/end-to-end/src/e2e_private_airdrop.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { CompleteAddress, NotePreimage, TxHash, Wallet } from '@aztec/aztec.js';
import { MAX_NEW_COMMITMENTS_PER_CALL } from '@aztec/circuits.js';
import { Fr } from '@aztec/foundation/fields';
import { Fr, MAX_NEW_COMMITMENTS_PER_CALL } from '@aztec/circuits.js';
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,5 +1,4 @@
import { GlobalVariables } from '@aztec/circuits.js';
import { Fr } from '@aztec/foundation/fields';
import { Fr, GlobalVariables } from '@aztec/circuits.js';
import { createDebugLogger } from '@aztec/foundation/log';

/**
Expand Down
3 changes: 1 addition & 2 deletions yarn-project/types/src/auth_witness.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Vector } from '@aztec/circuits.js';
import { Fr, 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 3d04bea

Please sign in to comment.