Skip to content

Commit

Permalink
fix: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
LHerskind committed Apr 19, 2024
1 parent 8eb5abd commit 486c9e5
Show file tree
Hide file tree
Showing 15 changed files with 7 additions and 27 deletions.
14 changes: 2 additions & 12 deletions yarn-project/circuits.js/src/structs/call_context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,12 @@ export class CallContext {
* @returns A new instance of CallContext with zero msg sender, storage contract address.
*/
public static empty(): CallContext {
return new CallContext(
AztecAddress.ZERO,
AztecAddress.ZERO,
FunctionSelector.empty(),
false,
false,
0,
);
return new CallContext(AztecAddress.ZERO, AztecAddress.ZERO, FunctionSelector.empty(), false, false, 0);
}

isEmpty() {
return (
this.msgSender.isZero() &&
this.storageContractAddress.isZero() &&
this.functionSelector.isEmpty() &&
Fr.ZERO
this.msgSender.isZero() && this.storageContractAddress.isZero() && this.functionSelector.isEmpty() && Fr.ZERO
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
type ContractClassWithId,
type ContractInstanceWithAddress,
type DebugLogger,
EthAddress,
Fr,
type PXE,
TxStatus,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {
AztecAddress,
ContractDeployer,
type DebugLogger,
EthAddress,
Fr,
type PXE,
TxStatus,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { MerkleTreeId } from '@aztec/circuit-types';
import {
AztecAddress,
EthAddress,
FunctionSelector,
NOTE_HASH_TREE_HEIGHT,
computeContractAddressFromInstance,
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/pxe/src/kernel_prover/kernel_prover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export class KernelProver {
publicCallRequests: CallRequest[],
noteHashReadRequestMembershipWitnesses: NoteHashReadRequestMembershipWitness[],
) {
const { contractAddress, functionData, publicInputs } = callStackItem;
const { contractAddress, functionData } = callStackItem;

// Pad with empty items to reach max/const length expected by circuit.
const privateCallStack = padArrayEnd(
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/pxe/src/pxe_service/pxe_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -558,14 +558,14 @@ export class PXEService implements PXE {
functionArtifact: {
...functionArtifact,
debug,
}
},
};
}

async #simulate(txRequest: TxExecutionRequest, msgSender?: AztecAddress): Promise<ExecutionResult> {
// TODO - Pause syncing while simulating.

const { contractAddress, functionArtifact} = await this.#getSimulationParameters(txRequest);
const { contractAddress, functionArtifact } = await this.#getSimulationParameters(txRequest);

this.log.debug('Executing simulator...');
try {
Expand Down
1 change: 0 additions & 1 deletion yarn-project/pxe/src/simulator_oracle/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
import {
type AztecAddress,
type CompleteAddress,
type EthAddress,
type Fr,
type FunctionSelector,
type Header,
Expand Down
1 change: 0 additions & 1 deletion yarn-project/simulator/src/avm/avm_simulator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { computeVarArgsHash } from '@aztec/circuits.js/hash';
import { EventSelector, FunctionSelector } from '@aztec/foundation/abi';
import { AztecAddress } from '@aztec/foundation/aztec-address';
import { keccak256, pedersenHash, poseidon2Hash, sha256 } from '@aztec/foundation/crypto';
import { EthAddress } from '@aztec/foundation/eth-address';
import { Fr } from '@aztec/foundation/fields';
import { type Fieldable } from '@aztec/foundation/serialize';
import { AvmNestedCallsTestContractArtifact, AvmTestContractArtifact } from '@aztec/noir-contracts.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
} from '@aztec/circuit-types';
import {
CallContext,
EthAddress,
FunctionData,
FunctionSelector,
type Header,
Expand Down
1 change: 0 additions & 1 deletion yarn-project/simulator/src/client/db_oracle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
import { type CompleteAddress, type Header } from '@aztec/circuits.js';
import { type FunctionArtifactWithDebugMetadata, type FunctionSelector } from '@aztec/foundation/abi';
import { type AztecAddress } from '@aztec/foundation/aztec-address';
import { type EthAddress } from '@aztec/foundation/eth-address';
import { type Fr } from '@aztec/foundation/fields';
import { type ContractInstance } from '@aztec/types/contracts';

Expand Down
1 change: 0 additions & 1 deletion yarn-project/simulator/src/mocks/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
CallContext,
CallRequest,
type ContractStorageUpdateRequest,
EthAddress,
Fr,
FunctionData,
Gas,
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/simulator/src/public/avm_executor.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AztecAddress, CallContext, EthAddress, FunctionData, FunctionSelector, type Header } from '@aztec/circuits.js';
import { AztecAddress, CallContext, FunctionData, FunctionSelector, type Header } from '@aztec/circuits.js';
import { makeHeader } from '@aztec/circuits.js/testing';
import { randomInt } from '@aztec/foundation/crypto';
import { Fr } from '@aztec/foundation/fields';
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/simulator/src/public/db.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type NullifierMembershipWitness } from '@aztec/circuit-types';
import { type EthAddress, type FunctionSelector, type L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/circuits.js';
import { type FunctionSelector, type L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/circuits.js';
import { type AztecAddress } from '@aztec/foundation/aztec-address';
import { type Fr } from '@aztec/foundation/fields';
import { type ContractInstanceWithAddress } from '@aztec/types/contracts';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
PublicContextInputs,
} from '@aztec/circuits.js';
import { type AztecAddress } from '@aztec/foundation/aztec-address';
import { EthAddress } from '@aztec/foundation/eth-address';
import { Fr } from '@aztec/foundation/fields';
import { createDebugLogger } from '@aztec/foundation/log';
import { type ContractInstance } from '@aztec/types/contracts';
Expand Down
1 change: 0 additions & 1 deletion yarn-project/simulator/src/public/public_executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
type AztecAddress,
ContractClassRegisteredEvent,
ContractInstanceDeployedEvent,
type EthAddress,
Fr,
type FunctionSelector,
type L1_TO_L2_MSG_TREE_HEIGHT,
Expand Down

0 comments on commit 486c9e5

Please sign in to comment.