XTalk Deep Dive
Last updated
Last updated
X-Talk Flow Contract includes X-Talk Port Contract, X-Talk Commander Contract, X-Talk Helm and X-Talk Customs Contract as building blocks for the X-Talk Flow Contract. These contracts process instructions based on X-Talk messaging standard or instruction sets.
X-Talk Port Contract
The X-Talk Port Contract lives on the Listener Node.
The X-Talk Port Contract is responsible to bring data into the L1X Protocol and providing it to the X-Talk Commander Contract.
Data include real-world data (Oracle), event data from other protocols and custom data insertion scripts that bring data from applications or configured endpoints through API's.
The data is transformed into a standard serialisable format (X-Talk Message) which is then pushed towards validation.
The Event Listening Nodes validate the data attaching a unique identifier and send it to the Scheduler for further processing.
The Scheduler is responsible to group and send the serialised data according to filters and specific rules around the filters such as type of information, event types which is then sent to the responsible cluster.
X-Talk Commander Contract
The X-Talk Commander Contract is the main orchestrator in defining and instructing the flow of the contract.
Its allows developers to build modular logic around cross-chain applications with interfaces that include Contract Storage, Flow Logic and Business Logic Entrypoints.
Contract Storage allows you to load and save complete or specific state of the contract such as events, default and/or transformed payloads, business logic and other defined states.
Flow Logic includes required methods which are save_event_data(...), entrypoint_Business() and get_payload_to_sign(...).
save_event_data(...) method saves event data to the contract. Based on the source ID and event type, it categorises the event and processes it accordingly. It then checks existing events and sets up payloads to be executed, depending on the nature of the event.
entrypoint_Business() is where core business logic would be added which will pass control to the entrypoint function. This will allow you to store the default event data and apply transformation to it before creating the payload.
get_payload_to_sign(...) method fetches the payload related to a given global transaction ID. The payload can then be signed for cross-chain verification.
Business Logic Entrypoints allow you to transform payload through the same contract or cross-contract calls including L1X VM and L1X EVM which extend X-Talk and Solidity contracts while maintaining the instruction flow.
X-Talk Helm
X-Talk Helm includes implementation to Route, get data and provide instruction to the X-Talk Customs contract to sign and broadcast payload to internal contracts or cross-chain contracts.
It provides modularity that will allow routing and selecting the appropriate signing-broadcasting nodes to interact with the default or transformed payload.
X-Talk Customs Contract
X-Talk Customs Contract is responsible to provide the right signing to the payload before it broadcast it to the appropriate destination.