,
-amount: Field,
-```
-
-> Source code: noir-projects/aztec-nr/value-note/src/utils.nr#L27-L30
-
-Note that this will create a new note in the set of notes passed as the first argument.
-For example:
-
-```rust title="increment_valuenote" showLineNumbers
-increment(storage.notes.at(owner), value, owner, sender);
-```
-
-> Source code: noir-projects/noir-contracts/contracts/test/benchmarking_contract/src/main.nr#L24-L26
-
-The `decrement` function works similarly except the `amount` is the number that the value will be decremented by, and it will fail if the sum of the selected notes is less than the amount.
-
-## Learn more
-
-- [Keys, including nullifier keys and outgoing viewer](../../../../../aztec/concepts/accounts/keys.md)
-- [How to implement a note](./implementing_a_note.md)
-- [ValueNote reference](../../../../reference/smart_contract_reference/aztec-nr/value-note/value_note.md)
diff --git a/docs/versioned_docs/version-alpha-testnet/developers/guides/smart_contracts/writing_contracts/portals/communicate_with_portal.md b/docs/versioned_docs/version-alpha-testnet/developers/guides/smart_contracts/writing_contracts/portals/communicate_with_portal.md
deleted file mode 100644
index b38399539fd6..000000000000
--- a/docs/versioned_docs/version-alpha-testnet/developers/guides/smart_contracts/writing_contracts/portals/communicate_with_portal.md
+++ /dev/null
@@ -1,381 +0,0 @@
----
-title: Communicating with L1
-tags: [contracts, portals]
----
-
-Follow the [token bridge tutorial](../../../../../developers/tutorials/codealong/js_tutorials/token_bridge.md) for hands-on experience writing and deploying a Portal contract.
-
-## Passing data to the rollup
-
-Whether it is tokens or other information being passed to the rollup, the portal should use the `Inbox` to do it.
-
-The `Inbox` can be seen as a mailbox to the rollup, portals put messages into the box, and the sequencer then consumes a batch of messages from the box and include it in their blocks.
-
-When sending messages, we need to specify quite a bit of information beyond just the content that we are sharing. Namely we need to specify:
-
-| Name | Type | Description |
-| ----------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| Recipient | `L2Actor` | The message recipient. This **MUST** match the rollup version and an Aztec contract that is **attached** to the contract making this call. If the recipient is not attached to the caller, the message cannot be consumed by it. |
-| Secret Hash | `field` (~254 bits) | A hash of a secret that is used when consuming the message on L2. Keep this preimage a secret to make the consumption private. To consume the message the caller must know the pre-image (the value that was hashed) - so make sure your app keeps track of the pre-images! Use `computeSecretHash` to compute it from a secret. |
-| Content | `field` (~254 bits) | The content of the message. This is the data that will be passed to the recipient. The content is limited to be a single field. If the content is small enough it can just be passed along, otherwise it should be hashed and the hash passed along (you can use our [`Hash` (GitHub link)](https://github.com/AztecProtocol/aztec-packages/blob/master/l1-contracts/src/core/libraries/Hash.sol) utilities with `sha256ToField` functions) |
-
-With all that information at hand, we can call the `sendL2Message` function on the Inbox. The function will return a `field` (inside `bytes32`) that is the hash of the message. This hash can be used as an identifier to spot when your message has been included in a rollup block.
-
-```solidity title="send_l1_to_l2_message" showLineNumbers
-/**
- * @notice Inserts a new message into the Inbox
- * @dev Emits `MessageSent` with data for easy access by the sequencer
- * @param _recipient - The recipient of the message
- * @param _content - The content of the message (application specific)
- * @param _secretHash - The secret hash of the message (make it possible to hide when a specific message is consumed on L2)
- * @return The key of the message in the set and its leaf index in the tree
- */
-function sendL2Message(
- DataStructures.L2Actor memory _recipient,
- bytes32 _content,
- bytes32 _secretHash
-) external returns (bytes32, uint256);
-```
-
-> Source code: l1-contracts/src/core/interfaces/messagebridge/IInbox.sol#L21-L35
-
-A sequencer will consume the message batch your message was included in and include it in their block.
-Upon inclusion, it is made available to be consumed on L2 via the L2 outbox.
-
-To consume the message, we can use the `consume_l1_to_l2_message` function within the `context` struct.
-
-- The `msg_key` is the hash of the message returned by the `sendL2Message` call and is used to help the RPC find the correct message.
-- The `content` is the content of the message, limited to one Field element. For content larger than one Field, we suggest using the `sha256` hash function truncated to a single Field element. `sha256` is suggested as it is cheap on L1 while still being manageable on L2.
-- The `secret` is the pre-image hashed using Pedersen to compute the `secretHash`.
-- If the `content` or `secret` does not match the entry at `msg_key` the message will not be consumed, and the transaction will revert.
-
-:::info
-Note that while the `secret` and the `content` are both hashed, they are actually hashed with different hash functions!
-:::
-
-```rust title="context_consume_l1_to_l2_message" showLineNumbers
-pub fn consume_l1_to_l2_message(
- &mut self,
- content: Field,
- secret: Field,
- sender: EthAddress,
- leaf_index: Field,
-) {
-```
-
-> Source code: noir-projects/aztec-nr/aztec/src/context/private_context.nr#L293-L302
-
-### Token bridge example
-
-Computing the `content` must currently be done manually, as we are still adding a number of bytes utilities. A good example exists within the [Token bridge example (codealong tutorial)](../../../../../developers/tutorials/codealong/js_tutorials/token_bridge.md).
-
-```rust title="claim_public" showLineNumbers
-// Consumes a L1->L2 message and calls the token contract to mint the appropriate amount publicly
-#[public]
-fn claim_public(to: AztecAddress, amount: u128, secret: Field, message_leaf_index: Field) {
- let content_hash = get_mint_to_public_content_hash(to, amount);
-
- let config = storage.config.read();
-
- // Consume message and emit nullifier
- context.consume_l1_to_l2_message(content_hash, secret, config.portal, message_leaf_index);
-
- // Mint tokens
- Token::at(config.token).mint_to_public(to, amount).call(&mut context);
-}
-```
-
-> Source code: noir-projects/noir-contracts/contracts/app/token_bridge_contract/src/main.nr#L57-L71
-
-:::info
-The `content_hash` is a sha256 truncated to a field element (~ 254 bits). In Aztec.nr, you can use our `sha256_to_field()` to do a sha256 hash which fits in one field element
-:::
-
-### Token portal hash library
-
-```rust title="mint_to_public_content_hash_nr" showLineNumbers
-use dep::aztec::prelude::{AztecAddress, EthAddress};
-use dep::aztec::protocol_types::{hash::sha256_to_field, traits::ToField};
-
-// Computes a content hash of a deposit/mint_to_public message.
-// Refer TokenPortal.sol for reference on L1.
-pub fn get_mint_to_public_content_hash(owner: AztecAddress, amount: u128) -> Field {
- let mut hash_bytes = [0; 68];
- let recipient_bytes: [u8; 32] = owner.to_field().to_be_bytes();
- let amount_bytes: [u8; 32] = (amount as Field).to_be_bytes();
-
- // The purpose of including the following selector is to make the message unique to that specific call. Note that
- // it has nothing to do with calling the function.
- let selector =
- comptime { keccak256::keccak256("mint_to_public(bytes32,uint256)".as_bytes(), 31) };
-
- for i in 0..4 {
- hash_bytes[i] = selector[i];
- }
-
- for i in 0..32 {
- hash_bytes[i + 4] = recipient_bytes[i];
- hash_bytes[i + 36] = amount_bytes[i];
- }
-
- let content_hash = sha256_to_field(hash_bytes);
- content_hash
-}
-```
-
-> Source code: noir-projects/noir-contracts/contracts/libs/token_portal_content_hash_lib/src/lib.nr#L1-L29
-
-### Token Portal contract
-
-In Solidity, you can use our `Hash.sha256ToField()` method:
-
-```solidity title="content_hash_sol_import" showLineNumbers
-import {Hash} from "@aztec/core/libraries/crypto/Hash.sol";
-```
-
-> Source code: l1-contracts/test/portals/TokenPortal.sol#L12-L14
-
-```solidity title="deposit_public" showLineNumbers
-/**
- * @notice Deposit funds into the portal and adds an L2 message which can only be consumed publicly on Aztec
- * @param _to - The aztec address of the recipient
- * @param _amount - The amount to deposit
- * @param _secretHash - The hash of the secret consumable message. The hash should be 254 bits (so it can fit in a Field element)
- * @return The key of the entry in the Inbox and its leaf index
- */
-function depositToAztecPublic(bytes32 _to, uint256 _amount, bytes32 _secretHash)
- external
- returns (bytes32, uint256)
-```
-
-> Source code: l1-contracts/test/portals/TokenPortal.sol#L55-L66
-
-The `secret_hash` uses the pederson hash which fits in a field element. You can use the utility method `computeSecretHash()`in `@aztec/aztec.js` npm package to generate a secret and its corresponding hash.
-
-After the transaction has been mined, the message is consumed, a nullifier is emitted and the tokens have been minted on Aztec and are ready for claiming.
-
-Since the message consumption is emitting a nullifier, the same message cannot be consumed again. The index in the message tree is used as part of the nullifier computation, ensuring that the same content and secret being inserted will be distinct messages that can each be consumed. Without the index in the nullifier, it would be possible to perform a kind of attack known as `Faerie Gold` attacks where two seemingly good messages are inserted, but only one of them can be consumed later.
-
-## Passing data to L1
-
-To pass data to L1, we use the `Outbox`. The `Outbox` is the mailbox for L2 to L1 messages. This is the location on L1 where all the messages from L2 will live, and where they can be consumed from.
-
-:::danger
-
-Similarly to messages going to L2 from L1, a message can only be consumed by the specified recipient. But it is up to the portal contract to ensure that the sender is as expected! Any L2 contract can send a message to a portal contract on L1, but the portal contract should only consume messages from the expected sender.
-
-:::
-
-The portal must ensure that the sender is as expected. One flexible solution is to have an `initialize` function in the portal contract which can be used to set the address of the Aztec contract. In this model, the portal contract can check that the sender matches the value it has in storage.
-
-To send a message to L1 from your Aztec contract, you must use the `message_portal` function on the `context`. When messaging to L1, only the `content` is required (as a `Field`).
-
-```rust title="context_message_portal" showLineNumbers
-pub fn message_portal(&mut self, recipient: EthAddress, content: Field) {
-```
-
-> Source code: noir-projects/aztec-nr/aztec/src/context/private_context.nr#L286-L288
-
-When sending a message from L2 to L1 we don't need to pass in a secret.
-
-:::danger
-Access control on the L1 portal contract is essential to prevent consumption of messages sent from the wrong L2 contract.
-:::
-
-### Token bridge
-
-As earlier, we can use a token bridge as an example. In this case, we are burning tokens on L2 and sending a message to the portal to free them on L1.
-
-```rust title="exit_to_l1_private" showLineNumbers
-// Burns the appropriate amount of tokens and creates a L2 to L1 withdraw message privately
-// Requires `msg.sender` (caller of the method) to give approval to the bridge to burn tokens on their behalf using witness signatures
-#[private]
-fn exit_to_l1_private(
- token: AztecAddress,
- recipient: EthAddress, // ethereum address to withdraw to
- amount: u128,
- caller_on_l1: EthAddress, // ethereum address that can call this function on the L1 portal (0x0 if anyone can call)
- nonce: Field, // nonce used in the approval message by `msg.sender` to let bridge burn their tokens on L2
-) {
- let config = storage.config.read();
-
- // Assert that user provided token address is same as seen in storage.
- assert_eq(config.token, token, "Token address is not the same as seen in storage");
-
- // Send an L2 to L1 message
- let content = get_withdraw_content_hash(recipient, amount, caller_on_l1);
- context.message_portal(config.portal, content);
-
- // Burn tokens
- Token::at(token).burn_private(context.msg_sender(), amount, nonce).call(&mut context);
-}
-```
-
-> Source code: noir-projects/noir-contracts/contracts/app/token_bridge_contract/src/main.nr#L125-L150
-
-When the transaction is included in a rollup block and published to Ethereum the message will be inserted into the `Outbox` on Ethereum, where the recipient portal can consume it from. When consuming, the `msg.sender` must match the `recipient` meaning that only portal can actually consume the message.
-
-```solidity title="l2_to_l1_msg" showLineNumbers
-/**
- * @notice Struct containing a message from L2 to L1
- * @param sender - The sender of the message
- * @param recipient - The recipient of the message
- * @param content - The content of the message (application specific) padded to bytes32 or hashed if larger.
- * @dev Not to be confused with L2ToL1Message in Noir circuits
- */
-struct L2ToL1Msg {
- DataStructures.L2Actor sender;
- DataStructures.L1Actor recipient;
- bytes32 content;
-}
-```
-
-> Source code: l1-contracts/src/core/libraries/DataStructures.sol#L53-L66
-
-#### Outbox `consume`
-
-```solidity title="outbox_consume" showLineNumbers
-/**
- * @notice Consumes an entry from the Outbox
- * @dev Only useable by portals / recipients of messages
- * @dev Emits `MessageConsumed` when consuming messages
- * @param _message - The L2 to L1 message
- * @param _l2BlockNumber - The block number specifying the block that contains the message we want to consume
- * @param _leafIndex - The index inside the merkle tree where the message is located
- * @param _path - The sibling path used to prove inclusion of the message, the _path length directly depends
- * on the total amount of L2 to L1 messages in the block. i.e. the length of _path is equal to the depth of the
- * L1 to L2 message tree.
- */
-function consume(
- DataStructures.L2ToL1Msg calldata _message,
- uint256 _l2BlockNumber,
- uint256 _leafIndex,
- bytes32[] calldata _path
-) external;
-```
-
-> Source code: l1-contracts/src/core/interfaces/messagebridge/IOutbox.sol#L35-L53
-
-#### Withdraw
-
-As noted earlier, the portal contract should check that the sender is as expected. In the example below, we support only one sender contract (stored in `l2TokenAddress`) so we can just pass it as the sender, that way we will only be able to consume messages from that contract.
-
-It is possible to support multiple senders from L2. You could use a have `mapping(address => bool) allowed` and check that `allowed[msg.sender]` is `true`.
-
-```solidity title="token_portal_withdraw" showLineNumbers
-/**
- * @notice Withdraw funds from the portal
- * @dev Second part of withdraw, must be initiated from L2 first as it will consume a message from outbox
- * @param _recipient - The address to send the funds to
- * @param _amount - The amount to withdraw
- * @param _withCaller - Flag to use `msg.sender` as caller, otherwise address(0)
- * @param _l2BlockNumber - The address to send the funds to
- * @param _leafIndex - The amount to withdraw
- * @param _path - Flag to use `msg.sender` as caller, otherwise address(0)
- * Must match the caller of the message (specified from L2) to consume it.
- */
-function withdraw(
- address _recipient,
- uint256 _amount,
- bool _withCaller,
- uint256 _l2BlockNumber,
- uint256 _leafIndex,
- bytes32[] calldata _path
-) external {
- // The purpose of including the function selector is to make the message unique to that specific call. Note that
- // it has nothing to do with calling the function.
- DataStructures.L2ToL1Msg memory message = DataStructures.L2ToL1Msg({
- sender: DataStructures.L2Actor(l2Bridge, rollupVersion),
- recipient: DataStructures.L1Actor(address(this), block.chainid),
- content: Hash.sha256ToField(
- abi.encodeWithSignature(
- "withdraw(address,uint256,address)",
- _recipient,
- _amount,
- _withCaller ? msg.sender : address(0)
- )
- )
- });
-
- outbox.consume(message, _l2BlockNumber, _leafIndex, _path);
-
- underlying.transfer(_recipient, _amount);
-}
-```
-
-> Source code: l1-contracts/test/portals/TokenPortal.sol#L122-L161
-
-## Considerations
-
-### Structure of messages
-
-Application developers should consider creating messages that follow a function call structure e.g., using a function signature and arguments. This will make it easier to prevent producing messages that could be misinterpreted by the recipient.
-
-An example of a bad format would be using `amount, token_address, recipient_address` as the message for a withdraw function and `amount, token_address, on_behalf_of_address` for a deposit function. Any deposit could then also be mapped to a withdraw or vice versa.
-
-```solidity
-// Don't to this!
-bytes memory message = abi.encode(
- _amount,
- _token,
- _to
-);
-
-// Do this!
-bytes memory message abi.encodeWithSignature(
- "withdraw(uint256,address,address)",
- _amount,
- _token,
- _to
-);
-```
-
-### Error Handling
-
-Handling error when moving cross chain can quickly get tricky. Since the L1 and L2 calls are async and independent of each other, the L1 part of a deposit might execute just fine, with the L2 part failing. If this is not handled well, the funds may be lost forever! Developers should consider ways their application can fail cross chain, and handle all cases explicitly.
-
-First, entries in the outboxes **SHOULD** only be consumed if the execution is successful. For an L2 -> L1 call, the L1 execution can revert the transaction completely if anything fails. As the tx is atomic, the failure also reverts consumption.
-
-If it is possible to enter a state where the second part of the execution fails forever, the application builder should consider including additional failure mechanisms (for token withdraws this could be depositing them again etc).
-
-Generally it is good practice to keep cross-chain calls simple to avoid too many edge cases and state reversions.
-
-:::info
-Error handling for cross chain messages is handled by the application contract and not the protocol. The protocol only delivers the messages, it does not ensure that they are executed successfully.
-:::
-
-### Designated caller
-
-Designating a caller grants the ability to specify who should be able to call a function that consumes a message. This is useful for ordering of batched messages.
-
-When performing multiple cross-chain calls in one action it is important to consider the order of the calls. Say for example, that you want to perform a uniswap trade on L1. You would withdraw funds from the rollup, swap them on L1, and then deposit the swapped funds back into the rollup. This is a straightforward process, but it requires that the calls are done in the correct order (e.g. if the swap is called before the funds are withdrawn, the swap will fail).
-
-The message boxes (Inbox and Outbox) will only allow the recipient portal to consume the message, and we can use this to ensure that the calls are done in the correct order. Say that we include a designated "caller" in the messages, and that the portal contract checks that the caller matches the designated caller or designated as `address(0)` (if anyone can call). When the messages are to be consumed on L1, it can compute the message as seen below:
-
-```solidity
-bytes memory message = abi.encodeWithSignature(
- "withdraw(uint256,address,address)",
- _amount,
- _to,
- _withCaller ? msg.sender : address(0)
-);
-```
-
-This way, the message can be consumed by the portal contract, but only if the caller is the specified caller. In the logic of the contract that is the designated caller, we can ensure that the calls are done in the correct order.
-
-For example, we could require that the Uniswap portal is the caller of the withdrawal, and ensure that the uniswap portal contract implementation is executing the withdrawal before the swap.
-The order of execution can be specified in the contract. Since all of the messages are emitted to L1 in the same transaction, we can leverage transaction atomicity to ensure success of failure of all messages.
-
-Note, that crossing the L1/L2 chasm is asynchronous, so there could be a situation where the user has burned their assets on L2 but the swap fails on L1! This could be due to major price movements for example. In such a case, the user could be stuck with funds on L1 that they cannot get back to L2 unless the portal contract implements a way to properly handle such errors.
-
-:::caution
-Designated callers are enforced at the contract level for contracts that are not the rollup itself, and should not be trusted to implement the contract correctly. The user should always be aware that it is possible for the developer to implement something that looks like designated caller without providing the abilities to the user.
-:::
-
-## Examples of portals
-
-- Token bridge (Portal contract built for L1 -> L2, i.e., a non-native L2 asset)
- - [Portal contract (GitHub link)](https://github.com/AztecProtocol/aztec-packages/blob/alpha-testnet/l1-contracts/test/portals/TokenPortal.sol)
- - [Aztec contract (GitHub link)](https://github.com/AztecProtocol/aztec-packages/blob/alpha-testnet/noir-projects/noir-contracts/contracts/app/token_bridge_contract/src/main.nr)
-
-For a full example of how to use a Portal, see the [Token Bridge tutorial](../../../../../developers/tutorials/codealong/js_tutorials/token_bridge.md).
diff --git a/docs/versioned_docs/version-alpha-testnet/developers/guides/smart_contracts/writing_contracts/storage/notes.md b/docs/versioned_docs/version-alpha-testnet/developers/guides/smart_contracts/writing_contracts/storage/notes.md
deleted file mode 100644
index e683bbd65cd2..000000000000
--- a/docs/versioned_docs/version-alpha-testnet/developers/guides/smart_contracts/writing_contracts/storage/notes.md
+++ /dev/null
@@ -1,169 +0,0 @@
----
-title: Writing Notes
-description: Core knowledge of Notes and how they work
-useful-for: dev
-tags: [contracts, storage, notes]
----
-
-Most prominent blockchain networks don't have privacy at the protocol level. Aztec contracts can define public and private functions, that can read/write public and private state.
-
-To be clear, "private" here is referring to the opposite of how things work on a public blockchain network, not the conventional syntax for visibility within code.
-
-For private state we need encryption and techniques to hide information about state changes. For private functions, we need local execution and proof of correct execution.
-
-### Some context
-
-- Public functions and storage work much like other blockchains in terms of having dedicated storage slots and being publicly visible
-- Private functions are executed locally with proofs generated for sound execution, and commitments to private variable updates are stored using append-only trees
-- "Note" types are part of Aztec.nr, a framework that facilitates use of Aztec's different storage trees to achieve things such as private variables
-
-This page will focus on how private variables are implemented with Notes and storage trees.
-
-#### Side-note about execution
-
-Under the hood, the Aztec protocol handles some important details around public and private function calls. Calls between them are asynchronous due to different execution contexts (local execution vs. node execution).
-A detailed explanation of the transaction lifecycle can be found [here](../../../../../aztec/concepts/transactions.md#simple-example-of-the-private-transaction-lifecycle).
-
-## Private state variables in Aztec
-
-State variables in an Aztec contract are defined inside a struct specifically named `Storage`, and must satisfy the [Note Interface (GitHub link)](https://github.com/AztecProtocol/aztec-packages/tree/alpha-testnet/noir-projects/aztec-nr/aztec/src/note/note_interface.nr) and contain a [Note header (GitHub link)](https://github.com/AztecProtocol/aztec-packages/tree/alpha-testnet/noir-projects/aztec-nr/aztec/src/note/note_header.nr).
-
-The Note header struct contains the contract address which the value is effectively siloed to, a nonce to ensure unique Note hashes, and a storage "slot" (or ID) to associate multiple notes.
-
-A couple of things to unpack here:
-
-#### Storage "slot"
-
-Storage slots are more literal for public storage, a place where a value is stored. For private storage, a storage slot is logical (more [here](../../../../../aztec/concepts/advanced/storage/storage_slots.md)).
-
-#### Silos
-
-The address of the contract is included in a Note's data to ensure that different contracts don't arrive at the same hash with an identical variable. This is handled in the protocol's execution.
-
-### Note types
-
-There is more than one Note type, such as the `PrivateSet` type is used for private variables. There are also `PrivateMutable` and `PrivateImmutable` types.
-
-Furthermore, notes can be completely custom types, storing any value or set of values that are desired by an application.
-
-### Initialization
-
-Private state variables are stored locally when the contract is created. Depending on the application, values may be privately shared by the creator with others via encrypted logs onchain.
-A hash of a note is stored in the append-only note hash tree on the network so as to prove existence of the current state of the note in a privacy preserving way.
-
-#### Note Hash Tree
-
-By virtue of being append only, notes are not edited. If two transactions amend a private value, multiple notes will be inserted into the tree to the note hash tree and the nullifier tree. The header will contain the same logical storage slot.
-
-### Reading Notes
-
-:::info
-
-Only those with appropriate keys/information will be able to successfully read private values that they have permission to. Notes can be read outside of a transaction or "off-chain" with no changes to data structures on-chain.
-
-:::
-
-When a note is read in a transaction, a subsequent read from another transaction of the same note would reveal a link between the two. So to preserve privacy, notes that are read in a transaction are said to be "consumed" (defined below), and new note(s) are then created with a unique hash.
-
-With type `PrviateSet`, a private variable's value is interpreted as the sum of values of notes with the same logical storage slot.
-
-Consuming, deleting, or otherwise "nullifying" a note is NOT done by deleting the Note hash; this would leak information. Rather a nullifier is created deterministically linked to the value. This nullifier is inserted into another the nullifier storage tree.
-
-When reading a value, the local private execution checks that its notes (of the corresponding storage slot/ID) have not been nullified.
-
-### Updating
-
-:::note
-Only those with appropriate keys/information will be able to successfully nullify a value that they have permission to.
-:::
-
-To update a value, its previous note hash(es) are nullified. The new note value is updated in the user's private execution environment (PXE), and the updated note hash inserted into the note hash tree.
-
-## Supplementary components
-
-Some optional background resources on notes can be found here:
-
-- [High level network architecture](../../../../../aztec/index.md), specifically the Private Execution Environment
-- [Transaction lifecycle (simple diagram)](../../../../../aztec/concepts/transactions.md#simple-example-of-the-private-transaction-lifecycle)
-- [Public and Private state](../../../../../aztec/concepts/storage/state_model.md)
-
-Notes touch several core components of the protocol, but we will focus on a the essentials first.
-
-### Some code context
-
-The way Aztec benefits from the Noir language is via three important components:
-
-- `Aztec.nr` - a Noir framework enabling contracts on Aztec, written in Noir. Includes useful Note implementations
-- `noir contracts` - example Aztec contracts
-- `noir-protocol-circuits` - a crate containing essential circuits for the protocol (public circuits and private wrappers)
-
-A lot of what we will look at will be in [aztec-nr/aztec/src/note (GitHub link)](https://github.com/AztecProtocol/aztec-packages/tree/alpha-testnet/noir-projects/aztec-nr/aztec/src/note), specifically the lifecycle and note interface.
-
-Looking at the noir circuits in these components, you will see references to the distinction between public/private execution and state.
-
-### Lifecycle functions
-
-Inside the [lifecycle (GitHub link)](https://github.com/AztecProtocol/aztec-packages/tree/alpha-testnet/noir-projects/aztec-nr/aztec/src/note/lifecycle.nr) circuits we see the functions to create and destroy a note, implemented as insertions of note hashes and nullifiers respectively. This is helpful for regular private variables.
-
-We also see a function to create a note hash from the public context, a way of creating a private variable from a public call (run in the sequencer). This could be used in application contracts to give private digital assets to users.
-
-### Note Interface functions
-
-To see a [note_interface (GitHub link)](https://github.com/AztecProtocol/aztec-packages/tree/alpha-testnet/noir-projects/aztec-nr/aztec/src/note/note_interface.nr) implementation, we will look at a simple [ValueNote GitHub link](https://github.com/AztecProtocol/aztec-packages/tree/alpha-testnet/noir-projects/aztec-nr/value-note/src/value_note.nr).
-
-The interface is required to work within an Aztec contract's storage, and a ValueNote is a specific type of note to hold a number (as a `Field`).
-
-#### Computing hashes and nullifiers
-
-A few key functions in the note interface are around computing the note hash and nullifier, with logic to get/use secret keys from the private context.
-
-In the ValueNote implementation you'll notice that it uses the `pedersen_hash` function. This is currently required by the protocol, but may be updated to another hashing function, like poseidon.
-
-As a convenience, the outer [note/utils.nr (GitHub link)](https://github.com/AztecProtocol/aztec-packages/tree/alpha-testnet/noir-projects/aztec-nr/aztec/src/note/utils.nr) contains implementations of functions that may be needed in Aztec contracts, for example computing note hashes.
-
-#### Serialization and deserialization
-
-Serialization/deserialization of content is used to convert between the Note's variables and a generic array of Field elements. The Field type is understood and used by lower level crypographic libraries.
-This is analogous to the encoding/decoding between variables and bytes in solidity.
-
-For example in ValueNote, the `serialize_content` function simply returns: the value, nullifying public key hash (as a field) and the note randomness; as an array of Field elements.
-
-### Value as a sum of Notes
-
-We recall that multiple notes are associated with a "slot" (or ID), and so the value of a numerical note (like ValueNote) is the sum of each note's value.
-The helper function in [balance_utils (GitHub link)](https://github.com/AztecProtocol/aztec-packages/blob/#include_/noir-projects/aztec-nr/value-note/src/balance_utils.nr) implements this logic taking a `PrivateSet` of `ValueNotes`.
-
-A couple of things worth clarifying:
-
-- A `PrivateSet` takes a Generic type, specified here as `ValueNote`, but can be any `Note` type (for all notes in the set)
-- A `PrivateSet` of notes also specifies _the_ slot of all Notes that it holds
-
-### Example - Notes in action
-
-The Aztec.nr framework includes examples of high-level states [easy_private_uint (GitHub link)](https://github.com/AztecProtocol/aztec-packages/tree/alpha-testnet/noir-projects/aztec-nr/easy-private-state/src/easy_private_uint.nr) for use in contracts.
-
-The struct (`EasyPrivateUint`) contains a Context, Set of ValueNotes, and storage_slot (used when setting the Set).
-
-Notice how the `add` function shows the simplicity of appending a new note to all existing ones. On the other hand, `sub` (subtraction), needs to first add up all existing values (consuming them in the process), and then insert a single new value of the difference between the sum and parameter.
-
----
-
-### Apply
-
-Try the [NFT tutorial](../../../../tutorials/codealong/contract_tutorials/nft_contract.md) to see what notes can achieve. In this section you will also find other tutorials using notes in different ways.
-
-### Further reading
-
-- [Proof of prior notes](../how_to_prove_history.md) - public/private reading of public/private proof of state (public or private)
-
-If you're curious about any of the following related topics, search the documentation for...
-
-- Private and public contexts
-- Encryption keys and events
-- Oracle's role in using notes
-- Value Serialization/Deserialization
-
-### References
-
-- ["Stable" state variable (GitHub link)](https://github.com/AztecProtocol/aztec-packages/issues/4130)
-- [Code: Aztec-Patterns (GitHub link)](https://github.com/defi-wonderland/aztec-patterns)
diff --git a/docs/versioned_docs/version-alpha-testnet/developers/guides/smart_contracts/writing_contracts/storage/storage_slots.md b/docs/versioned_docs/version-alpha-testnet/developers/guides/smart_contracts/writing_contracts/storage/storage_slots.md
deleted file mode 100644
index 407a35ec5a80..000000000000
--- a/docs/versioned_docs/version-alpha-testnet/developers/guides/smart_contracts/writing_contracts/storage/storage_slots.md
+++ /dev/null
@@ -1,69 +0,0 @@
----
-title: Storage slots
-tags: [contracts, storage]
----
-
-From the description of storage slots [in the Concepts](../../../../../aztec/concepts/advanced/storage/storage_slots.md) you will get an idea around the logic of storage slots. In this section we will go into more detail and walk through an entire example of how storage slots are computed for private state to improve our storage slot intuition. Recall, that storage slots in the private domain is just a logical construct, and are not "actually" used for lookups, but rather just as a value to constrain against.
-
-For the case of the example, we will look at what is inserted into the note hashes tree when adding a note in the Token contract. Specifically, we are looking at the last part of the `transfer` function:
-
-```rust title="increase_private_balance" showLineNumbers
-storage.balances.at(from).sub(from, amount).emit(encode_and_encrypt_note(
- &mut context,
- from,
- from,
-));
-```
-
-> Source code: noir-projects/noir-contracts/contracts/app/token_contract/src/main.nr#L374-L380
-
-This function is creating a new note and inserting it into the balance set of the recipient `to`. Recall that to ensure privacy, only the note hash is really inserted into the note hashes tree. To share the contents of the note with `to` the contract can emit an encrypted log (which this one does), or it can require an out-of-band data transfer sharing the information. Below, we will walk through the steps of how the note hash is computed and inserted into the tree. For this, we don't care about the encrypted log, so we are going to ignore that part of the function call for now.
-
-Outlining it in more detail below as a sequence diagram, we can see how the calls make their way down the stack.
-In the end a siloed note hash is computed in the kernel.
-
-:::info
-Some of the syntax below is a little butchered to make it easier to follow variables without the full code.
-:::
-
-```mermaid
-sequenceDiagram
- alt Call
- Token->>BalanceMap: Map::new(map_slot);
- Token->>Token: to_bal = storage.balances.at(to)
- Token->>BalanceMap: BalanceMap.at(to)
- BalanceMap->>BalanceMap: derived_slot = H(map_slot, to)
- BalanceMap->>BalanceSet: BalanceSet::new(to, derived_slot)
- Token->>BalanceSet: to_bal.add(amount)
- BalanceSet->>BalanceSet: note = UintNote::new(amount, to)
- BalanceSet->>Set: insert(note)
- Set->>LifeCycle: create_note(derived_slot, note)
- LifeCycle->>LifeCycle: note.header = NoteHeader { contract_address,
storage_slot: derived_slot, nonce: 0, note_hash_counter }
- Utils->>UintNote: note_hiding_point = note.compute_note_hiding_point()
- UintNote->>Utils: note_hash = note_hiding_point.x
- LifeCycle->>Context: push_note_hash(note_hash)
- end
- Context->>Kernel: unique_note_hash = H(nonce, note_hash)
- Context->>Kernel: siloed_note_hash = H(contract_address, unique_note_hash)
-```
-
-Notice the `siloed_note_hash` at the very end. It's a hash that will be inserted into the note hashes tree. To clarify what this really is, we "unroll" the values to their simplest components. This gives us a better idea around what is actually inserted into the tree.
-
-```rust
-siloed_note_hash = H(contract_address, unique_note_hash)
-siloed_note_hash = H(contract_address, H(nonce, note_hash))
-siloed_note_hash = H(contract_address, H(H(tx_hash, note_index_in_tx), note_hash))
-siloed_note_hash = H(contract_address, H(H(tx_hash, note_index_in_tx), MSM([G_amt, G_to, G_rand, G_slot], [amount, to, randomness, derived_slot]).x))
-```
-
-MSM is a multi scalar multiplication on a grumpkin curve and G\_\* values are generators.
-
-And `to` is the actor who receives the note, `amount` of the note and `randomness` is the randomness used to make the note hiding. Without the `randomness` the note could just as well be plaintext (computational cost of a preimage attack would be trivial in such a case).
-
-:::info
-Beware that this hash computation is what the aztec.nr library is doing, and not strictly required by the network (only the kernel computation is).
-:::
-
-With this note structure, the contract can require that only notes sitting at specific storage slots can be used by specific operations, e.g., if transferring funds from `from` to `to`, the notes to destroy should be linked to `H(map_slot, from)` and the new notes (except the change-note) should be linked to `H(map_slot, to)`.
-
-That way, we can have logical storage slots, without them really existing. This means that knowing the storage slot for a note is not enough to actually figure out what is in there (whereas it would be for looking up public state).
diff --git a/docs/versioned_docs/version-alpha-testnet/developers/index.md b/docs/versioned_docs/version-alpha-testnet/developers/index.md
deleted file mode 100644
index aa692db11222..000000000000
--- a/docs/versioned_docs/version-alpha-testnet/developers/index.md
+++ /dev/null
@@ -1,79 +0,0 @@
----
-id: index
-sidebar_position: 0
-title: Build
----
-
-# Build
-
-## Get Started
-
-
-
-
- Getting Started
-
-
- Get started on Aztec by installing the sandbox and playing with it
-
-
-
-
-## Build applications
-
-
-
-
- Contract Tutorials
-
-
- Go from zero to hero by following these tutorials in order, starting with a counter contract
-
-
-
-
-
- Full stack app on Aztec
-
-
- Learn how everything works together by building an app in JavaScript that connects to a contract
-
-
-
-
-## Clone a repo
-
-
-
-
-
-
- Full stack app on Aztec
-
-
- Learn how everything works together by building an app in JavaScript that connects to a contract
-
-
-
-## Get inspired
-
-
-
-
- What to build on Aztec
-
-
- Find requests for applications, potential designs, and existing ecosystem projects
-
-
-
diff --git a/docs/versioned_docs/version-alpha-testnet/developers/reference/considerations/limitations.md b/docs/versioned_docs/version-alpha-testnet/developers/reference/considerations/limitations.md
deleted file mode 100644
index 307badfae01b..000000000000
--- a/docs/versioned_docs/version-alpha-testnet/developers/reference/considerations/limitations.md
+++ /dev/null
@@ -1,157 +0,0 @@
----
-title: Limitations
-sidebar_position: 6
----
-
-The Aztec stack is a work in progress. Packages have been released early, to gather feedback on the capabilities of the protocol and user experiences.
-
-## What to expect?
-
-- Regular Breaking Changes;
-- Missing features;
-- Bugs;
-- An 'unpolished' UX;
-- Missing information.
-
-## Why participate?
-
-Front-run the future!
-
-Help shape and define:
-
-- Previously-impossible smart contracts and applications
-- Network tooling;
-- Network standards;
-- Smart contract syntax;
-- Educational content;
-- Core protocol improvements;
-
-## Limitations developers need to know about
-
-- It is a testing environment, it is insecure, and unaudited. It is only for testing purposes.
-- `msg_sender` is currently leaking when doing private -> public calls
- - The `msg_sender` will always be set, if you call a public function from the private world, the `msg_sender` will be set to the private caller's address.
- - There are patterns that can mitigate this.
-- The initial `msg_sender` is `-1`, which can be problematic for some contracts.
-- The number of side-effects attached to a tx (when sending the tx to the mempool) is leaky. At this stage of development, this is _intentional_, so that we can gauge appropriate choices for privacy sets. We have always had clear plans to implement privacy sets so that side effects are much less leaky, and these will be in place come mainnet.
-- A transaction can only emit a limited number of side-effects (notes, nullifiers, logs, l2->l1 messages), see [circuit limitations](#circuit-limitations).
- - We haven't settled on the final constants, since we're still in a testing phase. But users could find that certain compositions of nested private function calls (e.g. call stacks that are dynamic in size, based on runtime data) could accumulate so many side-effects as to exceed tx limits. Such txs would then be unprovable. We would love for you to open an issue if you encounter this, as it will help us decide on adequate sizes for our constants.
-- There are lots of features that we still want to implement. Checkout github and the forum for details. If you would like a feature, please open an issue on github!
-
-## WARNING
-
-Do not use real, meaningful secrets in Aztec's testnets. Some privacy features are still being worked on, including ensuring a secure "zk" property. Since the Aztec stack is still being worked on, there are no guarantees that real secrets will remain secret.
-
-## Limitations
-
-There are plans to resolve all of the below.
-
-### It is not audited
-
-None of the Aztec stack is audited. It's being iterated-on every day. It will not be audited for quite some time.
-
-### Under-constrained
-
-Some of our more-complex circuits are still being worked on, so they will still be be underconstrained.
-
-#### What are the consequences?
-
-Sound proofs are really only needed as a protection against malicious behavior, which we're not testing for at this stage.
-
-### Keys and Addresses are subject to change
-
-The way in which keypairs and addresses are derived is still being iterated on as we receive feedback.
-
-#### What are the consequences?
-
-This will impact the kinds of apps that you can build with the Sandbox, as it is today:
-
-Please open new discussions on [discourse](http://discourse.aztec.network) or open issues on [github](http://github.com/AztecProtocol/aztec-packages), if you have requirements that aren't-yet being met by the Sandbox's current key derivation scheme.
-
-### No privacy-preserving queries to nodes
-
-Ethereum has a notion of a 'full node' which keeps-up with the blockchain and stores the full chain state. Many users don't wish to run full nodes, so rely on 3rd-party 'full-node-as-a-service' infrastructure providers, who service blockchain queries from their users.
-
-This pattern is likely to develop in Aztec as well, except there's a problem: privacy. If a privacy-seeking user makes a query to a 3rd-party 'full node', that user might leak data about who they are, or about their historical network activity, or about their future intentions. One solution to this problem is "always run a full node", but pragmatically, not everyone will. To protect less-advanced users' privacy, research is underway to explore how a privacy-seeking user may request and receive data from a 3rd-party node without revealing what that data is, nor who is making the request.
-
-### No private data authentication
-
-Private data should not be returned to an app, unless the user authorizes such access to the app. An authorization layer is not-yet in place.
-
-#### What are the consequences?
-
-Any app can request and receive any private user data relating to any other private app. Obviously this sounds bad. But the Sandbox is a sandbox, and no meaningful value or credentials should be stored there; only test values and test credentials.
-
-An auth layer will be added in due course.
-
-### No bytecode validation
-
-For safety reasons, bytecode should not be executed unless the PXE/Wallet has validated that the user's intentions (the function signature and contract address) match the bytecode.
-
-#### What are the consequences?
-
-Without such 'bytecode validation', if the incorrect bytecode is executed, and that bytecode is malicious, it could read private data from some other contract and emit that private data to the world. Obviously this would be bad in production. But the Sandbox is a sandbox, and no meaningful value or credentials should be stored there; only test values and test credentials.
-
-There are plans to add bytecode validation soon.
-
-### Insecure hashes
-
-We are planning a full assessment of the protocol's hashes, including rigorous domain separation.
-
-#### What are the consequences?
-
-Collisions and other hash-related attacks might be possible in the Sandbox. Obviously that would be bad in production. But it's unlikely to cause problems at this early stage of testing.
-
-### `msg_sender` is leaked when making a private -> public call
-
-There are ongoing discussions [here](https://forum.aztec.network/t/what-is-msg-sender-when-calling-private-public-plus-a-big-foray-into-stealth-addresses/7527 (and some more recent discussions that need to be documented) around how to address this.
-
-### New Privacy Standards are required
-
-There are many [patterns](../../reference/considerations/privacy_considerations.md) which can leak privacy, even on Aztec. Standards haven't been developed yet, to encourage best practices when designing private smart contracts.
-
-#### What are the consequences?
-
-For example, until community standards are developed to reduce the uniqueness of ['Tx Fingerprints'](../../reference/considerations/privacy_considerations.md#function-fingerprints-and-tx-fingerprints) app developers might accidentally forfeit some function privacy.
-
-## Smart Contract limitations
-
-We will never be done with all the yummy features we want to add to aztec.nr. We have lots of features that we still want to implement. Please check out github, and please open new issues with any feature requests you might have.
-
-## Circuit limitations
-
-### Upper limits on function outputs and tx outputs
-
-Due to the rigidity of zk-SNARK circuits, there are upper bounds on the amount of computation a circuit can perform, and on the amount of data that can be passed into and out of a function.
-
-> Blockchain developers are no stranger to restrictive computational environments. Ethereum has gas limits, local variable stack limits, call stack limits, contract deployment size limits, log size limits, etc.
-
-Here are the current constants:
-
-#include_code constants /noir-projects/noir-protocol-circuits/crates/types/src/constants.nr rust
-
-#### What are the consequences?
-
-When you write an Aztec.nr function, there will be upper bounds on the following:
-
-- The number of public state reads and writes;
-- The number of note reads and nullifications;
-- The number of new notes that may be created;
-- The number of encrypted logs that may be emitted;
-- The number of unencrypted logs that may be emitted;
-- The number of L1->L2 messages that may be consumed;
-- The number of L2->L1 messages that may be submitted to L1;
-- The number of private function calls;
-- The number of public function calls that may be enqueued;
-
-Not only are there limits on a _per function_ basis, there are also limits on a _per transaction_ basis.
-
-**In particular, these _per-transaction_ limits will limit transaction call stack depths**. That means if a function call results in a cascade of nested function calls, and each of those function calls outputs lots of state reads and writes, or logs (etc.), then all of that accumulated output data might exceed the per-transaction limits that we currently have. This would cause such transactions to fail.
-
-There are plans to relax some of this rigidity, by providing many 'sizes' of circuit.
-
-> **In the mean time**, if you encounter a per-transaction limit when testing, please do open an issue to explain what you were trying to do; we'd love to hear about it. And if you're feeling adventurous, you could 'hack' the PXE to increase the limits. **However**, the limits cannot be increased indefinitely. So although we do anticipate that we'll be able to increase them a little bit, don't go mad and provide yourself with 1 million state transitions per transaction. That would be as unrealistic as artificially increasing Ethereum gas limits to 1 trillion.
-
-## There's more
-
-See the [GitHub issues (GitHub link)](https://github.com/AztecProtocol/aztec-packages/issues) for all known bugs fixes and features currently being worked on.
diff --git a/docs/versioned_docs/version-alpha-testnet/developers/reference/debugging/aztecnr-errors.md b/docs/versioned_docs/version-alpha-testnet/developers/reference/debugging/aztecnr-errors.md
deleted file mode 100644
index 62004b8dc9e4..000000000000
--- a/docs/versioned_docs/version-alpha-testnet/developers/reference/debugging/aztecnr-errors.md
+++ /dev/null
@@ -1,75 +0,0 @@
----
-title: Aztec.nr Errors
-tags: [contracts]
----
-
-This section contains some errors that you may encounter when writing and compiling contracts in Aztec.nr. If you run into an error that is not listed here, please [create an issue (GitHub link)](https://github.com/AztecProtocol/aztec-packages/issues/new).
-
-#### `Aztec dependency not found. Please add aztec as a dependency in your Nargo.toml`
-
-All smart contracts written in Aztec.nr need the `aztec` dependency. In your `Nargo.toml` under `[dependencies]`, add this:
-
-```toml
-aztec = { git="https://github.com/AztecProtocol/aztec-packages/", tag="alpha-testnet", directory="noir-projects/aztec-nr/aztec" }
-```
-
-You can learn more about dependencies and their paths [here](../smart_contract_reference/dependencies.md).
-
-#### `backend has encountered an error`
-
-This is likely due to a version mismatch or bad install of barretenberg. Try [reinstalling nargo](../../guides/local_env/versions-updating.md) or uninstalling barretenberg:
-
-```bash
-nargo backend uninstall acvm-backend-barretenberg
-```
-
-It will then reinstall when you compile.
-
-#### `Oracle callback {} not found` & `Oracle callback pedersenHash not found`
-
-This can occasionally happen when there are breaking releases. Make sure that your dependencies in `Nargo.toml` are [updated to the latest release](../../guides/local_env/versions-updating.md#dependency-versions).
-
-#### `error: Failed constraint: 'Public state writes only supported in public functions`
-
-Reading and writing to public state from private functions is currently not supported.
-This is because public values may change before the private function execution is posted on-chain.
-
-This may change in future versions.
-
-#### `Simulation error: Assertion failed:...`
-
-This is an assertion error that is thrown when a condition is not met.
-
-To address the error. find the line in the contract that is throwing the error and investigate why the condition is not met.
-
-#### `Unknown contract 0x0: add it to PXE by calling server.addContracts(...)`
-
-This error occurs when you are trying to interact with a smart contract via an Private Execution Environment (PXE) that does not have the necessary information to execute a transaction.
-
-To execute a transaction, the PXE needs to know the complete address of a contract and contract artifacts.
-
-To address the error, add the contract to the PXE by calling [`pxe.addContracts(...)`](../../../aztec/concepts/pxe/index.md).
-
-#### `Simulation error: No public key registered for address 0x0. Register it by calling pxe.registerRecipient(...) or pxe.registerAccount(...)`
-
-This error occurs when your contract is trying to get a public key via the `get_public_key` oracle call, but the PXE does not have the Complete Address (Complete Address contains the public key).
-
-Your contract typically needs a note recipient's public key when it wants to send a note to because the public key is used to encrypt notes.
-
-:::info
-Manually adding the recipient to the PXE should not be required in case the recipient contract has already been deployed and the PXE is fully synced.
-This is because this information is submitted on-chain when the recipient contract is deployed.
-:::
-
-#### `Could not process note because of "Error: Unknown account.". Skipping note...`
-
-This error occurs when your contract is trying to get a secret via the `get_secret` oracle call, but the PXE does not have the secret for the public key.
-
-This error might occur when you register an account only as a recipient and not as an account.
-To address the error, register the account by calling `server.registerAccount(...)`.
-
-#### `Failed to solve brillig function 'self._is_some`
-
-You may encounter this error when trying to send a transaction that is using an invalid contract. The contract may compile without errors and you only encounter this when sending the transaction.
-
-This error may arise when function parameters are not properly formatted, when trying to "double-spend" a note, or it may indicate that there is a bug deeper in the stack (e.g. a bug in the Aztec.nr library or deeper). If you hit this error, double-check your contract implementation, but also consider [opening an issue (GitHub link)](https://github.com/AztecProtocol/aztec-packages/issues/new).
diff --git a/docs/versioned_docs/version-alpha-testnet/developers/reference/environment_reference/cheat_codes.md b/docs/versioned_docs/version-alpha-testnet/developers/reference/environment_reference/cheat_codes.md
deleted file mode 100644
index acfaaa0c8b8e..000000000000
--- a/docs/versioned_docs/version-alpha-testnet/developers/reference/environment_reference/cheat_codes.md
+++ /dev/null
@@ -1,565 +0,0 @@
----
-title: Cheat Codes
-tags: [sandbox]
-sidebar_position: 4
----
-
-import Disclaimer from "@site/src/components/Disclaimers/\_wip_disclaimer.mdx";
-
-## Introduction
-
-To help with testing, the sandbox is shipped with a set of cheatcodes.
-
-Cheatcodes allow you to change the time of the Aztec block, load certain state or more easily manipulate Ethereum instead of having to write dedicated RPC calls to anvil or hardhat.
-
-:::info Prerequisites
-If you aren't familiar with [Anvil (Foundry)](https://book.getfoundry.sh/anvil/), we recommend reading up on that since Aztec Sandbox uses Anvil as the local Ethereum instance.
-:::
-
-### Aims
-
-The guide will cover how to manipulate the state of the:
-
-- Ethereum blockchain;
-- Aztec network.
-
-### Dependencies
-
-For this guide, the following Aztec packages are used:
-
-- @aztec/aztec.js
-
-### Initialization
-
-```ts
-import { createPXEClient, CheatCodes } from "@aztec/aztec.js";
-const pxeRpcUrl = "http://localhost:8080";
-const ethRpcUrl = "http://localhost:8545";
-const pxe = createPXEClient(pxeRpcUrl);
-const cc = await CheatCodes.create(ethRpcUrl, pxe);
-```
-
-There are two properties of the CheatCodes class - `eth` and `aztec` for cheatcodes relating to the Ethereum blockchain (L1) and the Aztec network (L2) respectively.
-
-## Ethereum related cheatcodes
-
-These are cheatcodes exposed from anvil/hardhat conveniently wrapped for ease of use in the Sandbox.
-
-### Interface
-
-```ts
-// Fetch current block number of Ethereum
-public async blockNumber(): Promise
-
-// Fetch chain ID of the local Ethereum instance
-public async chainId(): Promise
-
-// Fetch current timestamp on Ethereum
-public async timestamp(): Promise
-
-// Mine a given number of blocks on Ethereum. Mines 1 block by default
-public async mine(numberOfBlocks = 1): Promise
-
-// Set the timestamp for the next block on Ethereum.
-public async setNextBlockTimestamp(timestamp: number): Promise
-
-// Dumps the current Ethereum chain state to a given file.
-public async dumpChainState(fileName: string): Promise
-
-// Loads the Ethereum chain state from a file. You may use `dumpChainState()` to save the state of the Ethereum chain to a file and later load it.
-public async loadChainState(fileName: string): Promise
-
-// Load the value at a storage slot of a contract address on Ethereum
-public async load(contract: EthAddress, slot: bigint): Promise
-
-// Set the value at a storage slot of a contract address on Ethereum (e.g. modify a storage variable on your portal contract or even the rollup contract).
-public async store(contract: EthAddress, slot: bigint, value: bigint): Promise
-
-// Computes the slot value for a given map and key on Ethereum. A convenient wrapper to find the appropriate storage slot to load or overwrite the state.
-public keccak256(baseSlot: bigint, key: bigint): bigint
-
-// Let you send transactions on Ethereum impersonating an externally owned or contract, without knowing the private key.
-public async startImpersonating(who: EthAddress): Promise
-
-// Stop impersonating an account on Ethereum that you are currently impersonating.
-public async stopImpersonating(who: EthAddress): Promise
-
-// Set the bytecode for a Ethereum contract
-public async etch(contract: EthAddress, bytecode: `0x${string}`): Promise
-
-// Get the bytecode for a Ethereum contract
-public async getBytecode(contract: EthAddress): Promise<`0x${string}`>
-```
-
-### blockNumber
-
-#### Function Signature
-
-```ts
-public async blockNumber(): Promise
-```
-
-#### Description
-
-Fetches the current Ethereum block number.
-
-#### Example
-
-```ts
-const blockNumber = await cc.eth.blockNumber();
-```
-
-### chainId
-
-#### Function Signature
-
-```ts
-public async chainId(): Promise
-```
-
-#### Description
-
-Fetches the Ethereum chain ID
-
-#### Example
-
-```ts
-const chainId = await cc.eth.chainId();
-```
-
-### timestamp
-
-#### Function Signature
-
-```ts
-public async timestamp(): Promise
-```
-
-#### Description
-
-Fetches the current Ethereum timestamp.
-
-#### Example
-
-```ts
-const timestamp = await cc.eth.timestamp();
-```
-
-### mine
-
-#### Function Signature
-
-```ts
-public async mine(numberOfBlocks = 1): Promise
-```
-
-#### Description
-
-Mines the specified number of blocks on Ethereum (default 1).
-
-#### Example
-
-```ts
-const blockNum = await cc.eth.blockNumber();
-await cc.eth.mine(10); // mines 10 blocks
-const newBlockNum = await cc.eth.blockNumber(); // = blockNum + 10.
-```
-
-### setNextBlockTimestamp
-
-#### Function Signature
-
-```ts
-public async setNextBlockTimestamp(timestamp: number): Promise
-```
-
-#### Description
-
-Sets the timestamp (unix format in seconds) for the next mined block on Ethereum.
-Time can only be set in the future.
-If you set the timestamp to a time in the past, this method will throw an error.
-
-#### Example
-
-```ts
-// // Set next block timestamp to 16 Aug 2023 10:54:30 GMT
-await cc.eth.setNextBlockTimestamp(1692183270);
-// next transaction you will do will have the timestamp as 1692183270
-```
-
-### dumpChainState
-
-#### Function Signature
-
-```ts
-public async dumpChainState(fileName: string): Promise
-```
-
-#### Description
-
-Dumps the current Ethereum chain state to a file.
-Stores a hex string representing the complete state of the chain in a file with the provided path. Can be re-imported into a fresh/restarted instance of Anvil to reattain the same state.
-When combined with `loadChainState()` cheatcode, it can be let you easily import the current state of mainnet into the Anvil instance of the sandbox.
-
-#### Example
-
-```ts
-await cc.eth.dumpChainState("chain-state.json");
-```
-
-### loadChainState
-
-#### Function Signature
-
-```ts
-public async loadChainState(fileName: string): Promise
-```
-
-#### Description
-
-Loads the Ethereum chain state from a file which contains a hex string representing an Ethereum state.
-When given a file previously written to by `cc.eth.dumpChainState()`, it merges the contents into the current chain state. Will overwrite any colliding accounts/storage slots.
-
-#### Example
-
-```ts
-await cc.eth.loadChainState("chain-state.json");
-```
-
-### load
-
-#### Function Signature
-
-```ts
-public async load(contract: EthAddress, slot: bigint): Promise
-```
-
-#### Description
-
-Loads the value at a storage slot of a Ethereum contract.
-
-#### Example
-
-```solidity
-contract LeetContract {
- uint256 private leet = 1337; // slot 0
-}
-```
-
-```ts
-const leetContractAddress = EthAddress.fromString("0x1234...");
-const value = await cc.eth.load(leetContractAddress, BigInt(0));
-console.log(value); // 1337
-```
-
-### store
-
-#### Function Signature
-
-```ts
-public async store(contract: EthAddress, slot: bigint, value: bigint): Promise
-```
-
-#### Description
-
-Stores the value in storage slot on a Ethereum contract.
-
-#### Example
-
-```solidity
-contract LeetContract {
- uint256 private leet = 1337; // slot 0
-}
-```
-
-```ts
-const leetContractAddress = EthAddress.fromString("0x1234...");
-await cc.eth.store(leetContractAddress, BigInt(0), BigInt(1000));
-const value = await cc.eth.load(leetContractAddress, BigInt(0));
-console.log(value); // 1000
-```
-
-### keccak256
-
-#### Function Signature
-
-```ts
-public keccak256(baseSlot: bigint, key: bigint): bigint
-```
-
-#### Description
-
-Computes the storage slot for a map key.
-
-#### Example
-
-```solidity
-contract LeetContract {
- uint256 private leet = 1337; // slot 0
- mapping(address => uint256) public balances; // base slot 1
-}
-```
-
-```ts
-// find the storage slot for key `0xdead` in the balance map.
-const address = BigInt("0x000000000000000000000000000000000000dead");
-const slot = cc.eth.keccak256(1n, address);
-// store balance of 0xdead as 100
-await cc.eth.store(contractAddress, slot, 100n);
-```
-
-### startImpersonating
-
-#### Function Signature
-
-```ts
-public async startImpersonating(who: EthAddress): Promise
-```
-
-#### Description
-
-Start impersonating an Ethereum account.
-This allows you to use this address as a sender.
-
-#### Example
-
-```ts
-await cc.eth.startImpersonating(EthAddress.fromString(address));
-```
-
-### stopImpersonating
-
-#### Function Signature
-
-```ts
-public async stopImpersonating(who: EthAddress): Promise
-```
-
-#### Description
-
-Stop impersonating an Ethereum account.
-Stops an active impersonation started by startImpersonating.
-
-#### Example
-
-```ts
-await cc.eth.stopImpersonating(EthAddress.fromString(address));
-```
-
-### getBytecode
-
-#### Function Signature
-
-```ts
-public async getBytecode(contract: EthAddress): Promise<`0x${string}`>
-```
-
-#### Description
-
-Get the bytecode for an Ethereum contract.
-
-#### Example
-
-```ts
-const bytecode = await cc.eth.getBytecode(contract); // 0x6080604052348015610010...
-```
-
-### etch
-
-#### Function Signature
-
-```ts
-public async etch(contract: EthAddress, bytecode: `0x${string}`): Promise
-```
-
-#### Description
-
-Set the bytecode for an Ethereum contract.
-
-#### Example
-
-```ts
-const bytecode = `0x6080604052348015610010...`;
-await cc.eth.etch(contract, bytecode);
-console.log(await cc.eth.getBytecode(contract)); // 0x6080604052348015610010...
-```
-
-## Aztec related cheatcodes
-
-These are cheatcodes specific to manipulating the state of Aztec rollup.
-
-### Interface
-
-```ts
-// Get the current aztec block number
-public async blockNumber(): Promise
-
-// Set time of the next execution on aztec. It also modifies time on Ethereum for next execution and stores this time as the last rollup block on the rollup contract.
-public async warp(to: number): Promise
-
-// Loads the value stored at the given slot in the public storage of the given contract.
-public async loadPublic(who: AztecAddress, slot: Fr | bigint): Promise
-
-// Loads the value stored at the given slot in the private storage of the given contract.
-public async loadPrivate(owner: AztecAddress, contract: AztecAddress, slot: Fr | bigint): Promise
-
-// Computes the slot value for a given map and key.
-public computeSlotInMap(baseSlot: Fr | bigint, key: Fr | bigint): Fr
-```
-
-### blockNumber
-
-#### Function Signature
-
-```ts
-public async blockNumber(): Promise
-```
-
-#### Description
-
-Get the current aztec block number.
-
-#### Example
-
-```ts
-const blockNumber = await cc.aztec.blockNumber();
-```
-
-### warp
-
-#### Function Signature
-
-```ts
-public async warp(to: number): Promise
-```
-
-#### Description
-
-Sets the time on Ethereum and the time of the next block on Aztec.
-Like with the corresponding Ethereum cheatcode, time can only be set in the future, not the past.
-Otherwise, it will throw an error.
-
-#### Example
-
-```ts
-const timestamp = await cc.eth.timestamp();
-const newTimestamp = timestamp + 100_000_000;
-await cc.aztec.warp(newTimestamp);
-// any Aztec.nr contract calls that make use of current timestamp
-// and is executed in the next rollup block will now read `newTimestamp`
-```
-
-### computeSlotInMap
-
-#### Function Signature
-
-```ts
-public computeSlotInMap(baseSlot: Fr | bigint, key: Fr | bigint): Fr
-```
-
-#### Description
-
-Compute storage slot for a map key.
-The baseSlot is specified in the Aztec.nr contract.
-
-#### Example
-
-```rust
-#[storage]
-struct Storage {
- balances: Map>,
-}
-
-contract Token {
- ...
-}
-```
-
-```ts
-const slot = cc.aztec.computeSlotInMap(1n, key);
-```
-
-### loadPublic
-
-#### Function Signature
-
-```ts
-public async loadPublic(who: AztecAddress, slot: Fr | bigint): Promise
-```
-
-#### Description
-
-Loads the value stored at the given slot in the public storage of the given contract.
-
-Note: One Field element occupies a storage slot. Hence, structs with multiple field elements will be spread over multiple sequential slots. Using loadPublic will only load a single field of the struct (depending on the size of the attributes within it).
-
-#### Example
-
-```rust
-#[storage]
-struct Storage {
- balances: Map>,
-}
-
-contract Token {
- ...
-}
-```
-
-```ts
-const address = AztecAddress.fromString("0x123...");
-const slot = cc.aztec.computeSlotInMap(1n, key);
-const value = await cc.aztec.loadPublic(address, slot);
-```
-
-### loadPrivate
-
-#### Function Signature
-
-```ts
-public async loadPrivate(owner: AztecAddress, contract: AztecAddress, slot: Fr | bigint): Promise
-```
-
-#### Description
-
-Loads the value stored at the given slot in the private storage of the given contract.
-
-Note: One Field element occupies a storage slot. Hence, structs with multiple field elements will be spread over multiple sequential slots. Using loadPublic will only load a single field of the struct (depending on the size of the attributes within it).
-
-#### Example
-
-```typescript title="load_private_cheatcode" showLineNumbers
-const mintAmount = 100n;
-
-await mintTokensToPrivate(token, wallet, admin, mintAmount);
-await token.methods.sync_notes().simulate();
-
-const balancesAdminSlot = await cc.aztec.computeSlotInMap(
- TokenContract.storage.balances.slot,
- admin
-);
-
-// check if note was added to pending shield:
-const notes = await cc.aztec.loadPrivate(
- admin,
- token.address,
- balancesAdminSlot
-);
-
-// @note If you get pain for dinner, this guys is the reason.
-// Assuming that it is still testing the token contract, you need to look at the balances,
-// and then the type of note, currently a `UintNote` which stores fields: [owner, randomness, amount]
-const values = notes.map((note) => note.items[2]);
-const balance = values.reduce((sum, current) => sum + current.toBigInt(), 0n);
-expect(balance).toEqual(mintAmount);
-```
-
-> Source code: yarn-project/end-to-end/src/e2e_cheat_codes.test.ts#L182-L199
-
-## Participate
-
-Keep up with the latest discussion and join the conversation in the [Aztec forum](https://discourse.aztec.network).
-
-You can also use the above link to request more cheatcodes.
-
-
diff --git a/docs/versioned_docs/version-alpha-testnet/developers/reference/environment_reference/cli_reference.md b/docs/versioned_docs/version-alpha-testnet/developers/reference/environment_reference/cli_reference.md
deleted file mode 100644
index 5b8ee8dca8c5..000000000000
--- a/docs/versioned_docs/version-alpha-testnet/developers/reference/environment_reference/cli_reference.md
+++ /dev/null
@@ -1,375 +0,0 @@
----
-title: CLI Reference
-tags: [sandbox]
-sidebar_position: 2
----
-
-:::warning
-
-`aztec-builder` and `aztec-sandbox` have been deprecated in favor of `aztec` CLI
-
-:::
-- [Start](#starting-and-testing)
-- [Accounts](#account-management)
-- [Contract deployments and interaction](#contract-deployment-and-interaction)
-- [Network and node info](#network-and-node-information)
-- [Querying](#transaction-and-block-querying)
-- [Logging](#logging-and-data-retrieval)
-- [Debugging](#development-and-debugging-tools)
-- [L1 contracts](#l1-contract-management)
-- [Utils](#utility-commands)
-
-## Starting and testing
-
-### start
-
-Initiates various Aztec modules. It can be used to start individual components or the entire Aztec Sandbox.
-
-```
-aztec start [options]
-```
-
-Options:
-- `-sb, --sandbox`: Starts the Aztec Sandbox.
-- `-p, --port `: Specifies the port to run Aztec on (default: 8080).
-- `-n, --node [options]`: Starts the Aztec Node with specified options.
-- `-px, --pxe [options]`: Starts the PXE (Private eXecution Environment) with specified options.
-- `-a, --archiver [options]`: Starts the Archiver with specified options.
-- `-s, --sequencer [options]`: Starts the Sequencer with specified options.
-- `-r, --prover [options]`: Starts the Prover Agent with specified options.
-- `-o, --prover-node [options]`: Starts the Prover Node with specified options.
-- `-p2p, --p2p-bootstrap [options]`: Starts the P2P Bootstrap node with specified options.
-- `-t, --txe [options]`: Starts the TXE (Transaction Execution Environment) with specified options.
-
-### test
-
-Runs tests written in contracts.
-
-```
-aztec test [options]
-```
-
-Options:
-- `--workdir `: Sets the working directory inside the container (default: current directory).
-- `-e, --env `: Set environment variables (can be used multiple times).
-- `--no-tty`: Run the container without a TTY.
-- `--rm`: Automatically remove the container when it exits.
-- `-i, --interactive`: Keep STDIN open even if not attached.
-- `-t, --tty`: Allocate a pseudo-TTY.
-
-## Account Management
-
-### create-account
-Creates an Aztec account for sending transactions.
-
-```
-aztec create-account [options]
-```
-
-Options:
-- `--skip-initialization`: Skip initializing the account contract.
-- `--public-deploy`: Publicly deploys the account and registers the class if needed.
-- `--private-key `: Private key for the account (uses random by default).
-- `--register-only`: Just register the account on the PXE without deploying.
-- `--no-wait`: Skip waiting for the contract deployment.
-
-### get-accounts
-Retrieves all Aztec accounts stored in the PXE.
-
-```
-aztec get-accounts [options]
-```
-
-Options:
-- `--json`: Emit output as JSON.
-
-### get-account
-Retrieves an account given its Aztec address.
-
-```
-aztec get-account [options]
-```
-
-### register-recipient
-Registers a recipient in the PXE.
-
-```
-aztec register-recipient [options]
-```
-
-Required options:
-- `-a, --address `: The account's Aztec address.
-- `-p, --public-key `: The account public key.
-- `-pa, --partial-address `: The partially computed address of the account contract.
-
-## Contract Deployment and Interaction
-
-### deploy
-Deploys a compiled Aztec.nr contract to Aztec.
-
-```
-aztec deploy [options]
-```
-
-Options:
-- `--init `: The contract initializer function to call (default: "constructor").
-- `--no-init`: Leave the contract uninitialized.
-- `-a, --args `: Contract constructor arguments.
-- `-k, --public-key `: Optional encryption public key for this address.
-- `-s, --salt `: Optional deployment salt for generating the deployment address.
-- `--universal`: Do not mix the sender address into the deployment.
-- `--json`: Emit output as JSON.
-- `--no-wait`: Skip waiting for the contract deployment.
-- `--no-class-registration`: Don't register this contract class.
-- `--no-public-deployment`: Don't emit this contract's public bytecode.
-
-### send
-Calls a function on an Aztec contract.
-
-```
-aztec send [options]
-```
-
-Options:
-- `-a, --args [functionArgs...]`: Function arguments.
-- `-c, --contract-artifact `: Compiled Aztec.nr contract's ABI.
-- `-ca, --contract-address `: Aztec address of the contract.
-- `--no-wait`: Print transaction hash without waiting for it to be mined.
-
-### call
-Simulates the execution of a view (read-only) function on a deployed contract.
-
-```
-aztec call [options]
-```
-
-Options:
-- `-a, --args [functionArgs...]`: Function arguments.
-- `-c, --contract-artifact `: Compiled Aztec.nr contract's ABI.
-- `-ca, --contract-address `: Aztec address of the contract.
-- `-f, --from `: Aztec address of the caller.
-
-### add-contract
-Adds an existing contract to the PXE.
-
-```
-aztec add-contract [options]
-```
-
-Required options:
-- `-c, --contract-artifact `: Compiled Aztec.nr contract's ABI.
-- `-ca, --contract-address `: Aztec address of the contract.
-- `--init-hash `: Initialization hash.
-
-Optional:
-- `--salt `: Optional deployment salt.
-- `-p, --public-key `: Optional public key for this contract.
-- `--portal-address `: Optional address to a portal contract on L1.
-- `--deployer-address `: Optional address of the contract deployer.
-
-## Network and Node Information
-
-### get-node-info
-Retrieves information about an Aztec node at a URL.
-
-```
-aztec get-node-info [options]
-```
-
-### get-pxe-info
-Retrieves information about a PXE at a URL.
-
-```
-aztec get-pxe-info [options]
-```
-
-### block-number
-Retrieves the current Aztec L2 block number.
-
-```
-aztec block-number [options]
-```
-
-## Transaction and Block Querying
-
-### get-tx
-Retrieves the receipt for a specified transaction hash.
-
-```
-aztec get-tx [options]
-```
-
-### get-block
-Retrieves information for a given block or the latest block.
-
-```
-aztec get-block [blockNumber] [options]
-```
-
-Options:
-- `-f, --follow`: Keep polling for new blocks.
-
-## Logging and Data Retrieval
-
-### get-logs
-Retrieves unencrypted logs based on filter parameters.
-
-```
-aztec get-logs [options]
-```
-
-Options:
-- `-tx, --tx-hash `: Transaction hash to get the receipt for.
-- `-fb, --from-block `: Initial block number for getting logs.
-- `-tb, --to-block `: Up to which block to fetch logs.
-- `-al --after-log `: ID of a log after which to fetch the logs.
-- `-ca, --contract-address `: Contract address to filter logs by.
-- `--follow`: Keep polling for new logs until interrupted.
-
-## Development and Debugging Tools
-
-### flamegraph
-Generates a flamegraph of the gate counts of a private function call.
-
-```
-[SERVE=1] aztec flamegraph
-```
-
-### codegen
-Validates and generates an Aztec Contract ABI from Noir ABI.
-
-```
-aztec codegen [options]
-```
-
-Options:
-- `-o, --outdir `: Output folder for the generated code.
-- `--force`: Force code generation even when the contract has not changed.
-
-### update
-Updates Nodejs and Noir dependencies.
-
-```
-aztec update [projectPath] [options]
-```
-
-Options:
-- `--contract [paths...]`: Paths to contracts to update dependencies.
-- `--aztec-version `: The version to update Aztec packages to (default: latest).
-
-### inspect-contract
-Shows a list of external callable functions for a contract.
-
-```
-aztec inspect-contract
-```
-
-### parse-parameter-struct
-Helper for parsing an encoded string into a contract's parameter struct.
-
-```
-aztec parse-parameter-struct [options]
-```
-
-Required options:
-- `-c, --contract-artifact `: Compiled Aztec.nr contract's ABI.
-- `-p, --parameter `: The name of the struct parameter to decode into.
-
-## L1 Contract Management
-
-### deploy-l1-contracts
-Deploys all necessary Ethereum contracts for Aztec.
-
-```
-aztec deploy-l1-contracts [options]
-```
-
-Required options:
-- `-u, --rpc-urls `: List of URLs of Ethereum nodes (comma separated).
-- `-pk, --private-key `: The private key to use for deployment.
-
-### deploy-l1-verifier
-Deploys the rollup verifier contract.
-
-```
-aztec deploy-l1-verifier [options]
-```
-
-Required options:
-- `--eth-rpc-urls `: List of URLs of Ethereum nodes (comma separated).
-- `-pk, --private-key `: The private key to use for deployment.
-- `--verifier `: Either 'mock' or 'real'.
-
-### bridge-fee-juice
-Bridges (and optionally mints) L1 Fee Juice and pushes them to L2.
-
-```
-aztec bridge-fee-juice [options]
-```
-
-Required option:
-- `--l1-rpc-urls `: List of URLs of Ethereum nodes (comma separated).
-
-### get-l1-balance
-Gets the balance of ETH or an ERC20 token on L1 for a given Ethereum address.
-
-```
-aztec get-l1-balance [options]
-```
-
-Required option:
-- `--l1-rpc-urls `: List of URLs of Ethereum nodes (comma separated).
-
-## Utility Commands
-
-### generate-keys
-Generates encryption and signing private keys.
-
-```
-aztec generate-keys [options]
-```
-
-Option:
-- `-m, --mnemonic`: Optional mnemonic string for private key generation.
-
-### generate-p2p-private-key
-Generates a LibP2P peer private key.
-
-```
-aztec generate-p2p-private-key
-```
-
-### example-contracts
-Lists the example contracts available to deploy from @aztec/noir-contracts.js.
-
-```
-aztec example-contracts
-```
-
-### compute-selector
-Computes a selector for a given function signature.
-
-```
-aztec compute-selector
-```
-
-### bootstrap
-Bootstraps the blockchain.
-
-```
-aztec bootstrap [options]
-```
-
-### sequencers
-Manages or queries registered sequencers on the L1 rollup contract.
-
-```
-aztec sequencers [who] [options]
-```
-
-Commands: list, add, remove, who-next
-
-Required option:
-- `--l1-rpc-urls `: List of URLs of Ethereum nodes (comma separated).
-
-Note: Most commands accept a `--rpc-url` option to specify the Aztec node URL, and many accept fee-related options for gas limit and price configuration.
diff --git a/docs/versioned_docs/version-alpha-testnet/developers/reference/environment_reference/cli_wallet_reference.md b/docs/versioned_docs/version-alpha-testnet/developers/reference/environment_reference/cli_wallet_reference.md
deleted file mode 100644
index e80b1388f177..000000000000
--- a/docs/versioned_docs/version-alpha-testnet/developers/reference/environment_reference/cli_wallet_reference.md
+++ /dev/null
@@ -1,711 +0,0 @@
----
-title: CLI Wallet
-tags: [sandbox, wallet, cli]
-keywords: [wallet, cli wallet]
-sidebar_position: 3
----
-
-For development, it may be useful to deploy, transact, or create notes in a non-programmatic way. You can use the CLI wallet (`aztec-wallet`) for thing such as:
-
-- Deploying contracts
-- Sending transactions
-- Bridging L1 "Fee Juice" into Aztec
-- Pushing arbitrary [notes](../../guides/smart_contracts/writing_contracts/notes/index.md) to your PXE
-- Creating [authwits](../../guides/smart_contracts/writing_contracts/authwit.md)
-- Aliasing info and secrets for further usage
-- Proving your transactions and profile gate counts
-
-`aztec-wallet` functions as a user wallet. It runs a PXE and has persistent storage to remember user accounts, notes and registered contracts.
-
-:::info
-
-At any time, you can get an updated version of the existing commands and subcommands by adding `-h`. For example:
-
-```bash
-aztec-wallet create-account -h
-```
-
-:::
-
-### Global Options
-
-The CLI wallet supports several global options that can be used with any command:
-
-- `-V, --version`: Output the version number
-- `-d, --data-dir `: Storage directory for wallet data (default: "~/.aztec/wallet")
-- `-p, --prover `: The type of prover the wallet uses (choices: "wasm", "native", "none", default: "native", env: `PXE_PROVER`)
-- `--remote-pxe`: Connect to an external PXE RPC server instead of the local one (env: `REMOTE_PXE`)
-- `-n, --node-url `: URL of the Aztec node to connect to (default: "http://host.docker.internal:8080", env: `AZTEC_NODE_URL`)
-- `-h, --help`: Display help for command
-
-:::info
-
-Many options can be set using environment variables. For example:
-
-- `PXE_PROVER`: Set the prover type
-- `REMOTE_PXE`: Enable remote PXE connection
-- `AZTEC_NODE_URL`: Set the node URL
-- `SECRET_KEY`: Set the secret key for account operations
-
-:::
-
-### Proving transactions
-
-You can prove a transaction using the aztec-wallet with a running sandbox. Follow the guide [here](../../guides/local_env/sandbox_proving.md#proving-with-aztec-wallet). Proving transactions is required when interacting with the testnet.
-
-## Aliases
-
-The CLI wallet makes extensive use of aliases, that is, when an address, artifact, secret, or other information is given a name that can be later used to reference it.
-
-Aliases have different types like `address` or `artifact` or `contract`. You can see a list of these types by running the help command `aztec-wallet alias -h`. You can then specify a type with the `:` character whenever needed. For example `accounts:master_yoda` or `artifacts:light_saber`.
-
-:::tip
-
-The wallet writes to the `last` alias if it's likely that you use that same alias in the next command.
-
-It will also try to determine which type is expected. For example, if the alias `master_yoda` is an account, you don't need to prepend `account:` if, for example, you're deploying a contract.
-
-You can create arbitrary aliases with the `alias` command. For example `aztec-wallet alias accounts test_alias 0x2c37902cdade7710bd2355e5949416dc5e43a16e0b13a5560854d2451d92d289`.
-
-:::
-
-## Paying Fees
-
-import { Why_Fees, CLI_Fees } from '@site/src/components/Snippets/general_snippets';
-
-
-
-Below are all the payment methods available to pay transaction fees on Aztec, starting with the simplest.
-
-### Fee Paying Contract
-
-Fee paying contracts specify their own criteria of payment in exchange for paying the fee juice of a transaction, e.g. an FPC
-be written to accept some banana tokens to pay for another's transaction fee.
-
-Before using a fee paying contract, you need to register it in the PXE, passing the address of the contract and specifying the `from` account (in this case `main`). For example:
-
-```bash
-aztec-wallet register-contract $FPC_ADDRESS FPCContract -f main
-```
-
-With an alias corresponding to the FPC's address (`bananaFPC`) this would be:
-
-```bash
-aztec-wallet --payment method=fpc,fpc-contract=contracts:bananaFPC
-```
-
-### Sponsored Fee Paying Contract
-
-Before using a Sponsored Fee Paying Contract (FPC), you need to register it in the PXE, passing the address of the contract and specifying the `from` account (in this case `main`). For example:
-
-```bash
-aztec-wallet register-contract $FPC_ADDRESS SponsoredFPC -f main
-```
-
-This is a special type of FPC that can be used to pay for account deployment and regular txs.
-Eg: to create an account paid for by the sponsoredFPC:
-
-```bash
-aztec-wallet create-account -a main --payment method=fpc-sponsored,fpc=$FPC_ADDRESS
-```
-
-:::note
-In the sandbox, the sponsored FPC address is printed at the end of its initial logs.
-:::
-
-### Fee Juice from Sandbox Test accounts
-
-In the sandbox pre-loaded test accounts can be used to cover fee juice when deploying contracts.
-
-First import them:
-
-```bash title="import-test-accounts" showLineNumbers
-aztec-wallet import-test-accounts
-```
-
-> Source code: yarn-project/cli-wallet/test/flows/basic.sh#L9-L11
-
-Then use the alias (test0, test1...) when paying in fee juice. Eg to create accounts:
-
-```bash title="declare-accounts" showLineNumbers
-aztec-wallet create-account -a alice --payment method=fee_juice,feePayer=test0
-aztec-wallet create-account -a bob --payment method=fee_juice,feePayer=test0
-```
-
-> Source code: yarn-project/end-to-end/src/guides/up_quick_start.sh#L21-L24
-
-### Mint and Bridge Fee Juice
-
-#### On Sandbox
-
-First register an account, mint the fee asset on L1 and bridge it to fee juice:
-
-```bash title="bridge-fee-juice" showLineNumbers
-aztec-wallet create-account -a main --register-only
-aztec-wallet bridge-fee-juice 1000000000000000000 main --mint --no-wait
-```
-
-> Source code: yarn-project/cli-wallet/test/flows/create_account_pay_native.sh#L8-L11
-
-You'll have to wait for two blocks to pass for bridged fee juice to be ready on Aztec.
-For the sandbox you do this by putting through two arbitrary transactions. Eg:
-
-```bash title="force-two-blocks" showLineNumbers
-aztec-wallet import-test-accounts # if you haven't already imported the test accounts
-aztec-wallet deploy Counter --init initialize --args 0 accounts:test0 -f test0 -a counter
-aztec-wallet send increment -ca counter --args accounts:test0 accounts:test0 -f test0
-```
-
-> Source code: yarn-project/cli-wallet/test/flows/create_account_pay_native.sh#L17-L20
-
-Now the funded account can deploy itself with the bridged fees, claiming the bridged fee juice and deploying the contract in one transaction:
-
-```bash title="claim-deploy-account" showLineNumbers
-aztec-wallet deploy-account -f main --payment method=fee_juice,claim
-```
-
-> Source code: yarn-project/cli-wallet/test/flows/create_account_pay_native.sh#L25-L27
-
-#### Minting on Testnet
-
-This will mint the specified amount of fee juice on L1 and bridge it to L2.
-
-```bash
-aztec-wallet bridge-fee-juice -n --mint --l1-rpc-urls --l1-private-key --l1-chain-id 11155111 # sepolia
-```
-
-## Connect to the Testnet
-
-To connect to the testnet, pass the `AZTEC_NODE_URL` to the wallet with the `--node-url` (`-n`) option.
-
-```bash
-export AZTEC_NODE_URL=
-export SPONSORED_FPC_ADDRESS=0x0b27e30667202907fc700d50e9bc816be42f8141fae8b9f2281873dbdb9fc2e5
-# Register a new account
-aztec-wallet create-account --register-only -a main -n $AZTEC_NODE_URL
-aztec-wallet register-contract $SPONSORED_FPC_ADDRESS SponsoredFPC --from main -n $AZTEC_NODE_URL --salt 0 -a sponsoredfpc
-aztec-wallet create-account -n $AZTEC_NODE_URL --payment method=fpc-sponsored,fpc=$SPONSORED_FPC_ADDRESS
-```
-
-## Payment Options
-
-Many commands support payment options for transaction fees:
-
-```bash
---payment method=,feePayer=,asset=,fpc=,claim=,claimSecret=,claimAmount=,messageLeafIndex=,feeRecipient=
-```
-
-Valid payment methods:
-
-- `fee_juice`: Pay with fee juice (default)
-- `fpc-public`: Pay with a public FPC
-- `fpc-private`: Pay with a private FPC
-- `fpc-sponsored`: Pay with a sponsored FPC
-
-## Gas Options
-
-Commands that send transactions support gas-related options:
-
-```bash
---gas-limits
---max-fees-per-gas
---max-priority-fees-per-gas
---no-estimate-gas
---estimate-gas-only
-```
-
-## Account Management
-
-The wallet comes with some options for account deployment and management. You can register and deploy accounts, or only register them, and pass different options to serve your workflow.
-
-### Create Account
-
-Generates a secret key and deploys an account contract. Uses a Schnorr single-key account which uses the same key for encryption and authentication (not secure for production usage).
-
-#### Options
-
-- `--skip-initialization`: Skip initializing the account contract. Useful for publicly deploying an existing account.
-- `--public-deploy`: Publicly deploys the account and registers the class if needed.
-- `-p, --public-key `: Public key that identifies a private signing key stored outside of the wallet. Used for ECDSA SSH accounts over the secp256r1 curve.
-- `-u, --rpc-url `: URL of the PXE (default: "http://host.docker.internal:8080")
-- `-sk, --secret-key `: Secret key for account. Uses random by default. (env: `SECRET_KEY`)
-- `-a, --alias `: Alias for the account. Used for easy reference in subsequent commands.
-- `-t, --type `: Type of account to create (choices: "schnorr", "ecdsasecp256r1", "ecdsasecp256r1ssh", "ecdsasecp256k1", default: "schnorr")
-- `--register-only`: Just register the account on the PXE. Do not deploy or initialize the account contract.
-- `--json`: Emit output as json
-- `--no-wait`: Skip waiting for the contract to be deployed. Print the hash of deployment transaction
-- `--payment `: Fee payment method and arguments (see Payment Options section)
-- `--gas-limits `: Gas limits for the tx
-- `--max-fees-per-gas `: Maximum fees per gas unit for DA and L2 computation
-- `--max-priority-fees-per-gas `: Maximum priority fees per gas unit for DA and L2 computation
-- `--no-estimate-gas`: Whether to automatically estimate gas limits for the tx
-- `--estimate-gas-only`: Only report gas estimation for the tx, do not send it
-
-#### Example
-
-```bash
-aztec-wallet create-account -a master_yoda
-```
-
-#### Testnet Example
-
-```bash
-aztec-wallet create-account --register-only -a main -n $AZTEC_NODE_URL
-aztec-wallet register-contract $SPONSORED_FPC_ADDRESS SponsoredFPC --from main -n $AZTEC_NODE_URL --salt 0 -a sponsoredfpc
-aztec-wallet create-account -n $AZTEC_NODE_URL --payment method=fpc-sponsored,fpc=$SPONSORED_FPC_ADDRESS
-```
-
-### Deploy account
-
-Deploys an already registered aztec account that can be used for sending transactions.
-
-```bash
-aztec-wallet deploy-account [options]
-```
-
-#### Options
-
-- `-f, --from `: Alias or address of the account to deploy
-- `-u, --rpc-url `: URL of the PXE (default: "http://host.docker.internal:8080", env: `PXE_URL`)
-- `--json`: Emit output as json
-- `--no-wait`: Skip waiting for the contract to be deployed. Print the hash of deployment transaction
-- `--register-class`: Register the contract class (useful for when the contract class has not been deployed yet)
-- `--payment `: Fee payment method and arguments
- - Parameters:
- - `method`: Valid values: "fee_juice", "fpc-public", "fpc-private", "fpc-sponsored" (Default: fee_juice)
- - `feePayer`: The account paying the fee
- - `asset`: The asset used for fee payment (Required for "fpc-public" and "fpc-private")
- - `fpc`: The FPC contract that pays in fee juice (Not required for the "fee_juice" method)
- - `claim`: Whether to use a previously stored claim to bridge fee juice
- - `claimSecret`: The secret to claim fee juice on L1
- - `claimAmount`: The amount of fee juice to be claimed
- - `messageLeafIndex`: The index of the claim in the l1toL2Message tree
- - `feeRecipient`: Recipient of the fee
- - Format: `--payment method=name,feePayer=address,asset=address ...`
-- `--gas-limits `: Gas limits for the tx
-- `--max-fees-per-gas `: Maximum fees per gas unit for DA and L2 computation
-- `--max-priority-fees-per-gas `: Maximum priority fees per gas unit for DA and L2 computation
-- `--no-estimate-gas`: Whether to automatically estimate gas limits for the tx
-- `--estimate-gas-only`: Only report gas estimation for the tx, do not send it
-
-#### Example
-
-```bash
-$ aztec-wallet create-account --register-only -a master_yoda
-...
-$ aztec-wallet deploy-account -f master_yoda
-```
-
-When you are deploying an account on testnet, you need to either bridge fee juice or pay for the account deployment with an FPC to pay for the deployment. When using an FPC, you need to create an account, regsiter the FPC, and then you can use it. For example:
-
-```bash
-aztec-wallet create-account --register-only -a main -n $AZTEC_NODE_URL
-aztec-wallet register-contract $SPONSORED_FPC_ADDRESS SponsoredFPC --from main -n $AZTEC_NODE_URL --salt 0 -a sponsoredfpc
-aztec-wallet deploy-account -n $AZTEC_NODE_URL --payment method=fpc-sponsored,fpc=$SPONSORED_FPC_ADDRESS
-```
-
-## Contracts Actions
-
-### Deploy Contract
-
-Deploys a compiled Aztec.nr contract to Aztec.
-
-```bash
-aztec-wallet deploy [options] [artifact]
-```
-
-#### Arguments
-
-- `artifact`: Path to a compiled Aztec contract's artifact in JSON format. If executed inside a nargo workspace, a package and contract name can be specified as package@contract
-
-#### Options
-
-- `--init `: The contract initializer function to call (default: "constructor")
-- `--no-init`: Leave the contract uninitialized
-- `-k, --public-key `: Optional encryption public key for this address. Set this value only if this contract is expected to receive private notes, which will be encrypted using this public key
-- `-s, --salt `: Optional deployment salt as a hex string for generating the deployment address
-- `--universal`: Do not mix the sender address into the deployment
-- `-u, --rpc-url `: URL of the PXE (default: "http://host.docker.internal:8080", env: `PXE_URL`)
-- `--args [args...]`: Constructor arguments (default: [])
-- `-sk, --secret-key `: The sender's secret key (env: `SECRET_KEY`)
-- `-f, --from `: Alias or address of the account to deploy from
-- `-a, --alias `: Alias for the contract. Used for easy reference subsequent commands
-- `--json`: Emit output as json
-- `--no-wait`: Skip waiting for the contract to be deployed. Print the hash of deployment transaction
-- `--no-class-registration`: Don't register this contract class
-- `--no-public-deployment`: Don't emit this contract's public bytecode
-- `--payment `: Fee payment method and arguments
- - Parameters:
- - `method`: Valid values: "fee_juice", "fpc-public", "fpc-private", "fpc-sponsored" (Default: fee_juice)
- - `asset`: The asset used for fee payment (Required for "fpc-public" and "fpc-private")
- - `fpc`: The FPC contract that pays in fee juice (Not required for the "fee_juice" method)
- - `claim`: Whether to use a previously stored claim to bridge fee juice
- - `claimSecret`: The secret to claim fee juice on L1
- - `claimAmount`: The amount of fee juice to be claimed
- - `messageLeafIndex`: The index of the claim in the l1toL2Message tree
- - `feeRecipient`: Recipient of the fee
- - Format: `--payment method=name,asset=address,fpc=address ...`
-- `--gas-limits `: Gas limits for the tx
-- `--max-fees-per-gas `: Maximum fees per gas unit for DA and L2 computation
-- `--max-priority-fees-per-gas `: Maximum priority fees per gas unit for DA and L2 computation
-- `--no-estimate-gas`: Whether to automatically estimate gas limits for the tx
-- `--estimate-gas-only`: Only report gas estimation for the tx, do not send it
-
-#### Example
-
-```bash
-aztec-wallet deploy ./target/jedi_code.nr --arg accounts:master_yoda --from master_yoda --alias jedi_order
-```
-
-### Register Contract
-
-Registers a contract in this wallet's PXE. A contract must be registered in the user's PXE in order to interact with it.
-
-```bash
-aztec-wallet register-contract [options] [address] [artifact]
-```
-
-#### Arguments
-
-- `address`: The address of the contract to register
-- `artifact`: Path to a compiled Aztec contract's artifact in JSON format. If executed inside a nargo workspace, a package and contract name can be specified as package@contract
-
-#### Options
-
-- `--init `: The contract initializer function to call (default: "constructor")
-- `-k, --public-key `: Optional encryption public key for this address. Set this value only if this contract is expected to receive private notes, which will be encrypted using this public key
-- `-s, --salt `: Optional deployment salt as a hex string for generating the deployment address
- Sends a transaction by calling a function on an Aztec contract.
-- `--args [args...]`: Constructor arguments (default: [])
-- `-u, --rpc-url `: URL of the PXE (default: "http://host.docker.internal:8080", env: `PXE_URL`)
-- `-f, --from `: Alias or address of the account to simulate from
-- `-a, --alias `: Alias for the contact. Used for easy reference in subsequent commands
-
-#### Example
-
-```bash
-aztec-wallet register-contract -a
-```
-
-### Send Transaction
-
-Sends a transaction by calling a function on an Aztec contract.
-
-```bash
-aztec-wallet send [options]
-```
-
-#### Arguments
-
-- `functionName`: Name of function to execute
-
-#### Options
-
-- `-u, --rpc-url `: URL of the PXE (default: "http://host.docker.internal:8080", env: `PXE_URL`)
-- `--args [args...]`: Function arguments (default: [])
-- `-c, --contract-artifact `: Path to a compiled Aztec contract's artifact in JSON format. If executed inside a nargo workspace, a package and contract name can be specified as package@contract
-- `-ca, --contract-address `: Aztec address of the contract
-- `-a, --alias `: Alias for the transaction hash. Used for easy reference in subsequent commands
-- `-sk, --secret-key `: The sender's secret key (env: `SECRET_KEY`)
-- `-aw, --auth-witness `: Authorization witness to use for the transaction. If using multiple, pass a comma separated string
-- `-f, --from `: Alias or address of the account to send the transaction from
-- `--no-wait`: Print transaction hash without waiting for it to be mined
-- `--no-cancel`: Do not allow the transaction to be cancelled. This makes for cheaper transactions
-- `--payment `: Fee payment method and arguments
- - Parameters:
- - `method`: Valid values: "fee_juice", "fpc-public", "fpc-private", "fpc-sponsored" (Default: fee_juice)
- - `asset`: The asset used for fee payment (Required for "fpc-public" and "fpc-private")
- - `fpc`: The FPC contract that pays in fee juice (Not required for the "fee_juice" method)
- - `claim`: Whether to use a previously stored claim to bridge fee juice
- - `claimSecret`: The secret to claim fee juice on L1
- - `claimAmount`: The amount of fee juice to be claimed
- - `messageLeafIndex`: The index of the claim in the l1toL2Message tree
- - `feeRecipient`: Recipient of the fee
- - Format: `--payment method=name,asset=address,fpc=address ...`
-- `--gas-limits `: Gas limits for the tx
-- `--max-fees-per-gas `: Maximum fees per gas unit for DA and L2 computation
-- `--max-priority-fees-per-gas `: Maximum priority fees per gas unit for DA and L2 computation
-- `--no-estimate-gas`: Whether to automatically estimate gas limits for the tx
-- `--estimate-gas-only`: Only report gas estimation for the tx, do not send it
-
-#### Example
-
-```bash
-aztec-wallet send --from master_yoda --contract-address jedi_order --args "luke skywalker" train_jedi
-```
-
-:::note
-
-On testnet, you might sometimes see a `transaction failed: timeout error`. This is not an actual failure - your transaction has been sent to the mempool and it is just timed out waiting to be mined. You can use `aztec-wallet get-tx ` to check status.
-
-:::
-
-### Simulate Transaction
-
-Simulates the execution of a function on an Aztec contract.
-
-```bash
-aztec-wallet simulate [options]
-```
-
-#### Arguments
-
-- `functionName`: Name of function to simulate
-
-#### Options
-
-- `-u, --rpc-url `: URL of the PXE (default: "http://host.docker.internal:8080", env: `PXE_URL`)
-- `--args [args...]`: Function arguments (default: [])
-- `-ca, --contract-address `: Aztec address of the contract
-- `-c, --contract-artifact `: Path to a compiled Aztec contract's artifact in JSON format. If executed inside a nargo workspace, a package and contract name can be specified as package@contract
-- `-sk, --secret-key `: The sender's secret key (env: `SECRET_KEY`)
-- `-aw, --auth-witness `: Authorization witness to use for the simulation
-- `-f, --from `: Alias or address of the account to simulate from
-
-#### Example
-
-```bash
-aztec-wallet simulate --from master_yoda --contract-address jedi_order --args "luke_skywalker" train_jedi
-```
-
-### Profile Transaction
-
-Profiles a private function by counting the unconditional operations in its execution steps.
-
-```bash
-aztec-wallet profile [options]
-```
-
-#### Arguments
-
-- `functionName`: Name of function to simulate
-
-#### Options
-
-- `-u, --rpc-url `: URL of the PXE (default: "http://host.docker.internal:8080", env: `PXE_URL`)
-- `--args [args...]`: Function arguments (default: [])
-- `-ca, --contract-address `: Aztec address of the contract
-- `-c, --contract-artifact `: Path to a compiled Aztec contract's artifact in JSON format. If executed inside a nargo workspace, a package and contract name can be specified as package@contract
-- `--debug-execution-steps-dir `: Directory to write execution step artifacts for bb profiling/debugging
-- `-sk, --secret-key