Skip to content

Implement getLeafValue() in MASM #2220

@partylikeits1983

Description

@partylikeits1983

This should be a relatively straight forward procedure to implement in MASM using the keccak256::hash_bytes procedure. This is used both for the Agglayer GER & GET in bridge out & bridge in flows.

In Solidity: https://github.com/agglayer/agglayer-contracts/blob/e468f9b0967334403069aa650d9f1164b1731ebb/contracts/lib/DepositContract.sol#L130

This procedure should live in a crypto_utils.masm (or similarly named file) in the miden-agglayer crate. Testing set up would be similar to the existing agglayer asset conversion module.

Example of how this is tested in the agglayer repo: https://github.com/agglayer/agglayer-contracts/blob/e468f9b0967334403069aa650d9f1164b1731ebb/test/contracts/depositContractMock.test.js#L56

Needed for the CLAIM note: #2188

This is not a blocker for #2188, but is needed for the full CLAIM note functionality.

Metadata

Metadata

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions