Skip to content

Refactor verify_u256_to_native_amount to be a wrapper function on verify_u128_to_native_amount #2500

@partylikeits1983

Description

@partylikeits1983

As discussed offline, we should have better error handling when the asset amount when moving assets from EVM to Miden is larger than $2^{128}$.

Additionally, verify_u256_to_native_amount_conversion should be refactored to call verify_u128_to_native_amount_conversion. The error ERR_X_TOO_LARGE should be called in the verify_u256_to_native_amount_conversion procedure if $X$ is larger than $2^{128}$.

The ERR_X_TOO_LARGE error string should be more descriptive, e.g. "The agglayer bridge in u256 value is larger than 2**128 and cannot be verifiably scaled to u64".

Metadata

Metadata

Labels

agglayerPRs or issues related to AggLayer bridging integration

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions