Vitiv / event-broadcaster

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Motoko Event Hub

This repository contains the implementation of the Event Hub in Motoko programming language for Internet Computer.

Summary:

Event Hub is a draft ICRC72 Motoko pub-sub pattern implementation for managing events, subscribers, and sending events to subscribers.

Event Hub also provides interoperability with Ethereum RPC methods.

Features:

  • Subscriber Management: Functions for subscribing (subscribe) and unsubscribing (unsubscribe) to events.
  • Publication Managment: Register a new publication and publish events to subscribers.
  • Broadcaster: Distribute messages to subscribers
  • Ethereum Interaction: Functions are provided to call Ethereum RPC methods (callEthgetLogs, callEthgetBlockByNumber, callEthsendRawTransaction).

Usage

Subscriptions and publications can be made and explored through the Candid.

Dependencies

This project depends on evm_rpc canister.

Deployment

Mainnet

cd event_broadcaster
dfx deploy --ic

Local

dfx start --background

Locally deploy the evm_rpc canister

dfx deps pull
dfx deps init evm_rpc --argument '(record { nodesInSubnet = 28 })'
dfx deps deploy
dfx deploy

Contributing

Contributions are welcome. Please submit a pull request or open an issue to discuss your ideas.

License

This project is licensed under the terms of the MIT license.

About


Languages

Language:Motoko 66.4%Language:Svelte 27.0%Language:JavaScript 5.3%Language:HTML 1.0%Language:SCSS 0.3%Language:Shell 0.1%