Skip to content

ava-vs/event-client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Overview:

Event_Hub

Simple Use Case

Oneshot_GameEvent

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 through the Event Hub Client frontend (example).

Dependencies

This project depends on evm_rpc canister.

Deployment

Mainnet

cd event_client
dfx deploy --ic

Local

dfx start --background
Deploy locally

Change the isLocal flag to true in src/frontend/src/routes/auth.js:

const isLocal = true;

then

dfx deploy
Test Publication with 4 Responses

Uncomment the PubTest component in src/frontend/src/routes/publication/+page.svelte and use the "Send Pub Test" button on the publish page.

Check the main page for results.

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

Motoko Event Client

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Svelte 43.1%
  • Motoko 29.7%
  • JavaScript 17.6%
  • SCSS 8.4%
  • CSS 0.9%
  • HTML 0.2%
  • TypeScript 0.1%