Cross-chain Bridge
Last updated
Last updated
The bridge is responsible for receiving messages from the single token pool and facilitating message transmission using cross-chain messaging protocols such as Wormhole and Layerzero. The bridge only allows calls from the single token pool and the protocol core. The single token pool receives user deposit and withdrawal operations, encodes addresses and quantities, and provides secure deposit and withdrawal guarantees for the protocol.
The bridge serves as an adapter for different cross-chain messaging protocols. To achieve interoperability among different public chains, the protocol will establish uniform message specifications. Among these specifications, attribute types are converted into 64-bit integers for numerical uniformity, addresses are converted into byte types, and other data is also represented in byte types. After receiving messages from the single token pool and completing type conversion, the bridge calls different interfaces of cross-chain messaging protocols to facilitate message transmission.