diff --git a/noir-projects/noir-contracts/contracts/token_contract/src/main.nr b/noir-projects/noir-contracts/contracts/token_contract/src/main.nr index 685b6bd7e69a..a05b56b83e3b 100644 --- a/noir-projects/noir-contracts/contracts/token_contract/src/main.nr +++ b/noir-projects/noir-contracts/contracts/token_contract/src/main.nr @@ -207,20 +207,7 @@ contract Token { storage.total_supply.write(supply); } // docs:end:mint_public - // docs:start:mint_private - // TODO(benesjan): To be nuked in a followup PR. - #[public] - fn mint_private_old(amount: Field, secret_hash: Field) { - assert(storage.minters.at(context.msg_sender()).read(), "caller is not minter"); - let pending_shields = storage.pending_shields; - let mut note = TransparentNote::new(amount, secret_hash); - let supply = storage.total_supply.read().add(U128::from_integer(amount)); - storage.total_supply.write(supply); - // docs:start:insert_from_public - pending_shields.insert_from_public(&mut note); - // docs:end:insert_from_public - } - // docs:end:mint_private + // docs:start:shield #[public] fn shield(from: AztecAddress, amount: Field, secret_hash: Field, nonce: Field) { diff --git a/yarn-project/end-to-end/src/e2e_synching.test.ts b/yarn-project/end-to-end/src/e2e_synching.test.ts index cc526217ef8f..0d6b17ab5777 100644 --- a/yarn-project/end-to-end/src/e2e_synching.test.ts +++ b/yarn-project/end-to-end/src/e2e_synching.test.ts @@ -36,7 +36,6 @@ import { getSchnorrAccount } from '@aztec/accounts/schnorr'; import { createArchiver } from '@aztec/archiver'; import { AztecNodeService } from '@aztec/aztec-node'; import { - type AccountWallet, type AccountWalletWithSecretKey, AnvilTestWatcher, BatchCall, @@ -48,7 +47,7 @@ import { sleep, } from '@aztec/aztec.js'; // eslint-disable-next-line no-restricted-imports -import { ExtendedNote, L2Block, LogType, Note, type TxHash } from '@aztec/circuit-types'; +import { L2Block, LogType } from '@aztec/circuit-types'; import { type AztecAddress } from '@aztec/circuits.js'; import { getL1ContractsConfigEnvVars } from '@aztec/ethereum'; import { Timer } from '@aztec/foundation/timer'; @@ -184,27 +183,6 @@ class TestVariant { } } - private async addPendingShieldNoteToPXE(args: { - amount: bigint; - secretHash: Fr; - txHash: TxHash; - accountAddress: AztecAddress; - assetAddress: AztecAddress; - wallet: AccountWallet; - }) { - const { accountAddress, assetAddress, amount, secretHash, txHash, wallet } = args; - const note = new Note([new Fr(amount), secretHash]); - const extendedNote = new ExtendedNote( - note, - accountAddress, - assetAddress, - TokenContract.storage.pending_shields.slot, - TokenContract.notes.TransparentNote.id, - txHash, - ); - await wallet.addNote(extendedNote); - } - async createAndSendTxs() { if (!this.pxe) { throw new Error('Undefined PXE'); diff --git a/yarn-project/end-to-end/src/shared/cross_chain_test_harness.ts b/yarn-project/end-to-end/src/shared/cross_chain_test_harness.ts index 1180e308cd20..921ffe1cefee 100644 --- a/yarn-project/end-to-end/src/shared/cross_chain_test_harness.ts +++ b/yarn-project/end-to-end/src/shared/cross_chain_test_harness.ts @@ -4,17 +4,14 @@ import { type AztecNode, type DebugLogger, EthAddress, - ExtendedNote, type FieldsOf, Fr, type L1TokenManager, L1TokenPortalManager, type L2AmountClaim, type L2RedeemableAmountClaim, - Note, type PXE, type SiblingPath, - type TxHash, type TxReceipt, type Wallet, deployL1Contract, @@ -343,20 +340,6 @@ export class CrossChainTestHarness { await this.l2Token.methods.transfer_to_private(this.ownerAddress, shieldAmount).send().wait(); } - async addPendingShieldNoteToPXE(shieldAmount: bigint, secretHash: Fr, txHash: TxHash) { - this.logger.info('Adding note to PXE'); - const note = new Note([new Fr(shieldAmount), secretHash]); - const extendedNote = new ExtendedNote( - note, - this.ownerAddress, - this.l2Token.address, - TokenContract.storage.pending_shields.slot, - TokenContract.notes.TransparentNote.id, - txHash, - ); - await this.ownerWallet.addNote(extendedNote); - } - async transferToPublicOnL2(amount: bigint, nonce = Fr.ZERO) { this.logger.info('Transferring tokens to public'); await this.l2Token.methods.transfer_to_public(this.ownerAddress, this.ownerAddress, amount, nonce).send().wait();