General Message Passing, explained
General Message Passing is more than wrapping assets and transferring them between chains: it enables a developer building on one chain to call any function on any other connected chain. (We use the word “function” to encompass both smart contracts at the application layer and functions built at the protocol layer, as in Cosmos, for example.) That means complete composability, across Web3. Developers can choose the chain that is best for the use case, and build a complete experience for users that lets them interact with any asset, any application, on any chain, with one click.
With GMP you can:
- Call a contract on chain B from chain A.
- Call a contract on chain B from chain A and attach some tokens.
How General Message Passing works:
- An application developer implements the Axelar Executable interface in the destination contract.
- The user initiates a call function (or a call function + tokens) from Source Chain.
- The call enters the Axelar Gateway from Source Chain.
- Axelar network confirms the call, subtracts the usage fee (in native Source Chain tokens), and prepares an outgoing transaction on the Destination Chain.
- The call is approved and emerges from the Axelar Gateway on the Destination Chain.
- From there, the call function executes as if it had been made on the Source Chain and results accordingly.
Gateway-to-gateway, this process takes roughly 120 seconds. You can read full instructions for developers in our technical documentation for developers. Discussion and answers to your questions can be found in the
#developers channel in Axelar Discord.
Start building with Axelar using General Message Passing:
Example dApps: github.com/axelarnetwork/axelar-local-gmp-examples