Skip to content

Commit

Permalink
Fixes post rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
spalladino committed Mar 11, 2024
1 parent 0f6fc65 commit ca6b13f
Show file tree
Hide file tree
Showing 7 changed files with 161 additions and 210 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ contract AppSubscription {

global SUBSCRIPTION_DURATION_IN_BLOCKS = 5;
global SUBSCRIPTION_TXS = 5;
global CANONICAL_GAS_TOKEN_ADDRESS = AztecAddress::from_field(0x256a0a818c8631dac7fbeb0534a0da522418b8ef3ef171533bf0b8e9b9ded5f3);
global CANONICAL_GAS_TOKEN_ADDRESS = AztecAddress::from_field(0x1ffec73ac535628f98088b70f766f47989801a0dfc754cf4996f505cfd8f082);

#[aztec(private)]
fn entrypoint(payload: pub DAppPayload, user_address: pub AztecAddress) {
Expand Down
7 changes: 1 addition & 6 deletions yarn-project/archiver/src/archiver/archiver.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@ import { AztecAddress } from '@aztec/foundation/aztec-address';
import { EthAddress } from '@aztec/foundation/eth-address';
import { Fr } from '@aztec/foundation/fields';
import { sleep } from '@aztec/foundation/sleep';
import {
AvailabilityOracleAbi,
InboxAbi,
NewInboxAbi,
RollupAbi,
} from '@aztec/l1-artifacts';
import { AvailabilityOracleAbi, InboxAbi, NewInboxAbi, RollupAbi } from '@aztec/l1-artifacts';

import { MockProxy, mock } from 'jest-mock-extended';
import { Chain, HttpTransport, Log, PublicClient, Transaction, encodeFunctionData, toHex } from 'viem';
Expand Down
15 changes: 2 additions & 13 deletions yarn-project/archiver/src/archiver/eth_log_handlers.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
import {
Body,
L1Actor,
L1ToL2Message,
L2Actor,
NewInboxLeaf,
} from '@aztec/circuit-types';
import { Body, L1Actor, L1ToL2Message, L2Actor, NewInboxLeaf } from '@aztec/circuit-types';
import { AppendOnlyTreeSnapshot, Header } from '@aztec/circuits.js';
import { AztecAddress } from '@aztec/foundation/aztec-address';
import { EthAddress } from '@aztec/foundation/eth-address';
import { Fr } from '@aztec/foundation/fields';
import { numToUInt32BE } from '@aztec/foundation/serialize';
import {
AvailabilityOracleAbi,
InboxAbi,
NewInboxAbi,
RollupAbi,
} from '@aztec/l1-artifacts';
import { AvailabilityOracleAbi, InboxAbi, NewInboxAbi, RollupAbi } from '@aztec/l1-artifacts';

import { Hex, Log, PublicClient, decodeFunctionData, getAbiItem, getAddress, hexToBytes } from 'viem';

Expand Down
1 change: 0 additions & 1 deletion yarn-project/circuit-types/src/l2_block_code_to_purge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ function makePartialStateReference(seed = 0): PartialStateReference {
makeAppendOnlyTreeSnapshot(seed),
makeAppendOnlyTreeSnapshot(seed + 1),
makeAppendOnlyTreeSnapshot(seed + 2),
makeAppendOnlyTreeSnapshot(seed + 3),
);
}

Expand Down
35 changes: 2 additions & 33 deletions yarn-project/circuit-types/src/mocks_to_purge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ import {
CallRequest,
CallerContext,
CombinedConstantData,
ContractDeploymentData,
EthAddress,
Fq,
Fr,
FunctionData,
FunctionSelector,
G1AffineElement,
MAX_NEW_CONTRACTS_PER_TX,
MAX_NEW_L2_TO_L1_MSGS_PER_TX,
MAX_NON_REVERTIBLE_NOTE_HASHES_PER_TX,
MAX_NON_REVERTIBLE_NULLIFIERS_PER_TX,
Expand All @@ -22,7 +20,6 @@ import {
MAX_REVERTIBLE_NOTE_HASHES_PER_TX,
MAX_REVERTIBLE_NULLIFIERS_PER_TX,
MAX_REVERTIBLE_PUBLIC_CALL_STACK_LENGTH_PER_TX,
NewContractData,
Point,
PrivateAccumulatedNonRevertibleData,
PrivateAccumulatedRevertibleData,
Expand Down Expand Up @@ -149,19 +146,9 @@ export function makeFinalAccumulatedData(seed = 1, full = false): PrivateAccumul
tupleGenerator(2, fr, seed + 0x800), // unencrypted logs hash
fr(seed + 0x900), // encrypted_log_preimages_length
fr(seed + 0xa00), // unencrypted_log_preimages_length
tupleGenerator(MAX_NEW_CONTRACTS_PER_TX, makeNewContractData, seed + 0xb00),
);
}

/**
* Creates arbitrary contract data.
* @param seed - The seed to use for generating the contract data.
* @returns A contract data.
*/
export function makeNewContractData(seed = 1): NewContractData {
return new NewContractData(makeAztecAddress(seed), makeEthAddress(seed + 1), fr(seed + 2));
}

/**
* Makes arbitrary eth address.
* @param seed - The seed to use for generating the eth address.
Expand All @@ -185,25 +172,9 @@ export function makeConstantData(seed = 1): CombinedConstantData {
* @param seed - The seed to use for generating the tx context.
* @returns A tx context.
*/
export function makeTxContext(seed: number): TxContext {
export function makeTxContext(_seed: number): TxContext {
// @todo @LHerskind should probably take value for chainId as it will be verified later.
// @todo @LHerskind should probably take value for version as it will be verified later.
return new TxContext(false, false, true, makeContractDeploymentData(seed), Fr.ZERO, Fr.ZERO);
}

/**
* Makes arbitrary contract deployment data.
* @param seed - The seed to use for generating the contract deployment data.
* @returns A contract deployment data.
*/
export function makeContractDeploymentData(seed = 1) {
return new ContractDeploymentData(
makePoint(seed),
fr(seed + 1),
fr(seed + 2),
fr(seed + 3),
makeEthAddress(seed + 4),
);
return new TxContext(false, false, Fr.ZERO, Fr.ZERO);
}

/**
Expand All @@ -229,7 +200,6 @@ export function makePublicCallRequest(seed = 1): PublicCallRequest {
functionSelector: makeSelector(seed + 3),
isStaticCall: false,
isDelegateCall: false,
isContractDeployment: false,
startSideEffectCounter: 0,
});
return new PublicCallRequest(
Expand All @@ -255,7 +225,6 @@ export function makeCallContext(seed = 0, storageContractAddress = makeAztecAddr
makeSelector(seed + 3),
false,
false,
false,
0,
);
}
Expand Down
Loading

0 comments on commit ca6b13f

Please sign in to comment.