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: move { Fr } imports to foundation/fields #2712

Merged
merged 1 commit into from
Oct 5, 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
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