Skip to content

Latest commit

 

History

History
58 lines (35 loc) · 2.11 KB

README.md

File metadata and controls

58 lines (35 loc) · 2.11 KB

FORCERELAY CKB Contracts

License GitHub Actions

⚠️ WARNING This repository is still in the proof-of-concept stage.

This project consists of two CKB contracts serving for Forcerelay/Eth and Forcerelay/Axon respectively, which are all in one project, Forcerelay.

Contracts for Forcerelay/Eth

Mock Contracts

ETH Light Client

Contracts for Forcerelay/Axon

ibc-ckb-contracts for Forcerelay/Axon are IBC-compatible contracts that validate CKB transactions and parse payloads therefrom. These payloads, in the format of bytes, can be converted into IBC objects, which will be used to complete further verification representing the underlying logic of the IBC protocol. ibc-ckb-contracts mainly include Connection, Channel, and Packet contracts.

Note: To see the fundamental verification logic, please refer to the ckb-ics library.

Transaction Structure

We designed connection, channel, and packet cells, each of them contains unique data that corresponds to its specific IBC protocol that defines how these cells operate respectively.

For instance, in a transaction representing the MsgChannelOpenInit message, a new channel cell is created simultaneously with adjustments to the current connection cell status. This results in the following transaction structure:

celldeps:
    connection contract cell

inputs:
    old connection cell

outputs:
    new connection cell
    new channel cell

witnesses:
    preimage of connection cell
    preimage of channel cell

License

Licensed under MIT License.