Skip to content
Merged
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@

### Changes

- [BREAKING] Separated `EthAddress` (plain 20-byte Ethereum address) and `EthEmbeddedAccountId` (Miden AccountId encoded as Ethereum address) into distinct types, replacing the single `EthAddressFormat` struct. ([#2622](https://github.com/0xMiden/protocol/pull/2622)).
- [BREAKING] Renamed `AccountComponent::get_procedures()` to `procedures()`, returning `impl Iterator<Item = (AccountProcedureRoot, bool)>` ([#2597](https://github.com/0xMiden/protocol/pull/2597)).
- [BREAKING] Removed `NoteAssets::add_asset`; `OutputNoteBuilder` now accumulates assets in a `Vec` and computes the commitment only when `build()` is called, avoiding rehashing on every asset addition. ([#2577](https://github.com/0xMiden/protocol/pull/2577))
- [BREAKING] Made `supported_types` a required parameter of `AccountComponentMetadata::new()`; removed `with_supported_type`, `with_supported_types`, `with_supports_all_types`, and `with_supports_regular_types` builder methods; added `AccountType::all()` and `AccountType::regular()` helpers ([#2554](https://github.com/0xMiden/protocol/pull/2554)).
Expand Down
6 changes: 3 additions & 3 deletions crates/miden-agglayer/src/b2agg_note.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use miden_protocol::note::{
use miden_standards::note::{NetworkAccountTarget, NoteExecutionHint};
use miden_utils_sync::LazyLock;

use crate::EthAddressFormat;
use crate::EthAddress;

// NOTE SCRIPT
// ================================================================================================
Expand Down Expand Up @@ -88,7 +88,7 @@ impl B2AggNote {
/// Returns an error if note creation fails.
pub fn create<R: FeltRng>(
destination_network: u32,
destination_address: EthAddressFormat,
destination_address: EthAddress,
assets: NoteAssets,
target_account_id: AccountId,
sender_account_id: AccountId,
Expand Down Expand Up @@ -120,7 +120,7 @@ impl B2AggNote {
/// - 5 felts: destination_address (20 bytes as 5 u32 values)
fn build_note_storage(
destination_network: u32,
destination_address: EthAddressFormat,
destination_address: EthAddress,
) -> Result<NoteStorage, NoteError> {
let mut elements = Vec::with_capacity(6);

Expand Down
3 changes: 2 additions & 1 deletion crates/miden-agglayer/src/bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ pub use crate::{
B2AggNote,
ClaimNoteStorage,
ConfigAggBridgeNote,
EthAddressFormat,
EthAddress,
EthAmount,
EthAmountError,
EthEmbeddedAccountId,
ExitRoot,
GlobalIndex,
GlobalIndexError,
Expand Down
6 changes: 3 additions & 3 deletions crates/miden-agglayer/src/claim_note.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use miden_protocol::errors::NoteError;
use miden_protocol::note::{Note, NoteAssets, NoteMetadata, NoteRecipient, NoteStorage, NoteType};
use miden_standards::note::{NetworkAccountTarget, NoteExecutionHint};

use crate::{EthAddressFormat, EthAmount, GlobalIndex, MetadataHash, claim_script};
use crate::{EthAddress, EthAmount, GlobalIndex, MetadataHash, claim_script};

// CLAIM NOTE STRUCTURES
// ================================================================================================
Expand Down Expand Up @@ -112,11 +112,11 @@ pub struct LeafData {
/// Origin network identifier (uint32)
pub origin_network: u32,
/// Origin token address
pub origin_token_address: EthAddressFormat,
pub origin_token_address: EthAddress,
/// Destination network identifier (uint32)
pub destination_network: u32,
/// Destination address
pub destination_address: EthAddressFormat,
pub destination_address: EthAddress,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a CLAIM, the origin address is always an EVM address, but D=destination address is on the Miden side - should this be EthEmbeddedAccountId instead?

/// Amount of tokens (uint256)
pub amount: EthAmount,
/// Metadata hash (32 bytes)
Expand Down
4 changes: 2 additions & 2 deletions crates/miden-agglayer/src/config_note.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use miden_protocol::vm::Program;
use miden_standards::note::{NetworkAccountTarget, NoteExecutionHint};
use miden_utils_sync::LazyLock;

use crate::EthAddressFormat;
use crate::EthAddress;

// NOTE SCRIPT
// ================================================================================================
Expand Down Expand Up @@ -93,7 +93,7 @@ impl ConfigAggBridgeNote {
/// Returns an error if note creation fails.
pub fn create<R: FeltRng>(
faucet_account_id: AccountId,
origin_token_address: &EthAddressFormat,
origin_token_address: &EthAddress,
sender_account_id: AccountId,
target_account_id: AccountId,
rng: &mut R,
Expand Down
236 changes: 0 additions & 236 deletions crates/miden-agglayer/src/eth_types/address.rs

This file was deleted.

Loading
Loading