Connector
The connector contract enables contracts to send messages of arbitrary data and ZETA tokens between smart contract-enabled connected chains.
| Network | Connector contract address |
|---|---|
| Testnet | 0x239e96c8f17C85c30100AC26F635Ea15f23E9c67 |
| Mainnet | 0x239e96c8f17C85c30100AC26F635Ea15f23E9c67 |
To create a contract that uses ZetaChain's connector, use:
connector.sendto send a message- implement a
onZetaMessagefunction to handle incoming messages - implement a
onZetaRevertfunction to handle reverted messages
You can find in-depth tutorials on how to use connector to send messages in the "Tutorials" section of the docs:
Please, note that the connector API is separate from the onCrossChainCall
functionality.
A universal app must implement onCrossChainCall, but it may also use the
connector API to send and receive messages to and from ZetaChain's Universal
EVM.
- When sending messages to ZetaChain or native gas or supported ERC-20 tokens,
use
onCrossChainCall. - When sending messages from ZetaChain or transferring ZETA, use the connector.
Continue Learning
Continue with the next part or try a related tutorial