I am trying to send messages between L1 and the L2 zkEVM via the Bridge Contract.
Unfortunately, the documentation and the public repo is a bit lacking on actual execution of claimMessage on the destination chain. Most notably, how specifically the SMT Proof has to be generated + where to get the index argument.
For other zkEVM’s you can simply can call your RPC of your choice with an eth_getProof and call it a day. I have no idea how to do it with the polygon zkEVM. the mainnetExitRoot/rollupExitRoot isnt straightforward either to calculate / where to get from
Summarized,
I’m trying to generate an SMT Proof & index to execute claimMessage , but I see no resources on how to do it except of running the entire polygon bridge backend + node on my local machine, which would hamper development massively.
Hey @Bender_Rodriguez
So sorry it took long to get to this message. Are you still experiencing difficulties? Which documentation have you found that is not specific enough?
I had the chance to talk to Steph @EthGlobal Tokyo, and hopefully the zkTeam will approach me eventually, the tickets I submitted 2 weeks ago have been closed without resolution.
The claimMessage(or claimAssets) argument sources are undocumented, and I found a workaround using the Polygon GitHub repo for the backend bridge ( or actually the hidden API link that isn’t being shared anywhere officially, which I can ping for the index of the leaf and the smt proof ).
Given that there are zero resources or pointers in the docs about the api, I am guessing it’s not documented properly or hidden in a doc page?
That’s the only doc page that’s touching the topic.
I’ve solved the issue and have my own dApp bridge now leveraging the API, but I think the path there could be improved with simply mentioning the API
exit: and maybe an API documentation for the API/bridges ? The Hermez or zkEVM explorer API docs don’t include that at all
As you mentioned the issue is related to an API that is currently not documented on the bridge-service or just not being anywhere in the documentation.
The team is updating this information, thanks to you bringing this up. As soon as it is ready. I will share it here.
I am really sorry you had to go out of your way to solve it. But THANK YOU!
Search for open-source projects or code repositories that involve the polygon zkEVM or similar technologies. There may be code samples or projects available that demonstrate the generation of SMT proofs and the execution of claimMessage. Review such examples can provide valuable insights into the process and help you adapt it to your specific requirements.
When working with emerging technologies and specific implementations, finding comprehensive documentation or working examples can sometimes be challenges.
Regards and best wishes