Let's say Alice transferred 100 USDC to Bob on an L2 (e.g. Arbitrum One or Optimism) in a Transaction T of Block B.
I would like to prove in a Solidity Smart-Contract on the underlying L1 (Ethereum Mainnet) that
- (1) The transaction effectively happened on the L2
- (2) The transaction includes a transfer of 100 USDC (ERC20) to Bob
I believe we can achieve this without a custom bridge but rely only on the Rollup mechanism using proofs (Merkle or ZK?)
For (1)
- Retrieve the latest
root-hash
of the Layer2 in the Rollup Contract - Generate a Merkle proof to prove inclusion of the transaction hash
- Submit the transaction hash and proofs on the contract
For (2)
- Can I do something similar with the transaction receipt Merkle tree?
If anyone can point me to some snippet to achieve (1) and (2) with raw code on some tools that could help me with this problem?
Thanks