ERC-7786: Cross-Chain Messaging Gateway

Official discussion thread for Add ERC: Cross-Chain Messaging Gateway by Amxx · Pull Request #673 · ethereum/ERCs · GitHub

8 Likes

What is the purpose of the return argument (bytes4) in executeMessage?

This is to mitigate selector clashes, to make sure the receiver acknowledges the protocol it’s engaging in.

1 Like

What would be an example of an attack / things going wrong if the Gateway does not check the return value of executeMessage?

I think I get it now, this is for ensuring that the Destination Gateway only can call the executeMessage function of the receiving application and not something else.