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?

1 Like

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

2 Likes

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

1 Like

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.

1 Like

I love this ERC!

This ERC uses a ‘push’ mechanism rather than a ‘pull’ mechanism for messaging. In my mind, a ‘push’ mechanism like the one described essentially uses a ‘pull’ mechanism under the hood - Whoever is calling the executeMessage function is pulling the message from the Destination Gateway. I don’t think there’s anything wrong with either approach; I just find it to be a useful mental model.

1 Like

Links to reference implementation with Axelar Network and audits: