diff --git a/yarn-project/end-to-end/src/e2e_inclusion_proofs_contract.test.ts b/yarn-project/end-to-end/src/e2e_inclusion_proofs_contract.test.ts index 94ec0016808..0fe30e0b8af 100644 --- a/yarn-project/end-to-end/src/e2e_inclusion_proofs_contract.test.ts +++ b/yarn-project/end-to-end/src/e2e_inclusion_proofs_contract.test.ts @@ -293,7 +293,7 @@ describe('e2e_inclusion_proofs_contract', () => { // This should fail because we choose a block number before the contract was deployed const blockNumber = deploymentBlockNumber - 1; const contractData = new NewContractData(contract.address, portalContractAddress, contractClassId); - const leaf = contractData.computeLeaf(); + const leaf = contractData.hash(); await expect( contract.methods diff --git a/yarn-project/sequencer-client/src/block_builder/solo_block_builder.test.ts b/yarn-project/sequencer-client/src/block_builder/solo_block_builder.test.ts index 20723f8299b..6196bc52879 100644 --- a/yarn-project/sequencer-client/src/block_builder/solo_block_builder.test.ts +++ b/yarn-project/sequencer-client/src/block_builder/solo_block_builder.test.ts @@ -136,7 +136,7 @@ describe('sequencer/solo_block_builder', () => { // Updates the expectedDb trees based on the new commitments, contracts, and nullifiers from these txs const updateExpectedTreesFromTxs = async (txs: ProcessedTx[]) => { - const newContracts = txs.flatMap(tx => tx.data.end.newContracts.map(cd => cd.computeLeaf())); + const newContracts = txs.flatMap(tx => tx.data.end.newContracts.map(cd => cd.hash())); for (const [tree, leaves] of [ [ MerkleTreeId.NOTE_HASH_TREE, @@ -235,7 +235,7 @@ describe('sequencer/solo_block_builder', () => { tx.data.combinedData.newNullifiers.map((n: SideEffectLinkedToNoteHash) => n.value), tx.data.combinedData.newL2ToL1Msgs, tx.data.combinedData.publicDataUpdateRequests.map(t => new PublicDataWrite(t.leafSlot, t.newValue)), - tx.data.combinedData.newContracts.map(cd => cd.computeLeaf()), + tx.data.combinedData.newContracts.map(cd => cd.hash()), tx.data.combinedData.newContracts.map(cd => new ContractData(cd.contractAddress, cd.portalContractAddress)), tx.encryptedLogs || new TxL2Logs([]), tx.unencryptedLogs || new TxL2Logs([]), diff --git a/yarn-project/sequencer-client/src/block_builder/solo_block_builder.ts b/yarn-project/sequencer-client/src/block_builder/solo_block_builder.ts index d65ce1bda9c..903b51a40d6 100644 --- a/yarn-project/sequencer-client/src/block_builder/solo_block_builder.ts +++ b/yarn-project/sequencer-client/src/block_builder/solo_block_builder.ts @@ -108,7 +108,7 @@ export class SoloBlockBuilder implements BlockBuilder { tx.data.combinedData.newNullifiers.map((n: SideEffectLinkedToNoteHash) => n.value), tx.data.combinedData.newL2ToL1Msgs, tx.data.combinedData.publicDataUpdateRequests.map(t => new PublicDataWrite(t.leafSlot, t.newValue)), - tx.data.combinedData.newContracts.map(cd => cd.computeLeaf()), + tx.data.combinedData.newContracts.map(cd => cd.hash()), tx.data.combinedData.newContracts.map(cd => new ContractData(cd.contractAddress, cd.portalContractAddress)), tx.encryptedLogs || new TxL2Logs([]), tx.unencryptedLogs || new TxL2Logs([]), @@ -602,7 +602,7 @@ export class SoloBlockBuilder implements BlockBuilder { // Update the contract and note hash trees with the new items being inserted to get the new roots // that will be used by the next iteration of the base rollup circuit, skipping the empty ones - const newContracts = tx.data.combinedData.newContracts.map(cd => cd.computeLeaf()); + const newContracts = tx.data.combinedData.newContracts.map(cd => cd.hash()); const newCommitments = tx.data.combinedData.newCommitments.map(x => x.value.toBuffer()); await this.db.appendLeaves(