How trushaliphatak/smart-listener-cross-chain-interoperability works
This is a smart-listener cross-chain transaction framework. A source-chain event is observed by each listener, validated and persisted, then listener votes are checked for consensus; approved transactions are executed through a configured destination adapter and their state is exposed through an API and dashboard. The graph includes the documented monitoring, consensus, retry, storage, and Fabric integration branches. Some implementation details, including the API server and contract internals, were not excerpted, so their links are limited to indexed references or documented behavior.
Main entry points: listenerProcess.ts Listener coordinator · executor.ts Execution and retries · types.ts Transaction types · db.ts Transaction and vote store
Components 17
Chain contracts
- Sender contract
contracts/SenderContract.sol - Receiver mock
contracts/ReceiverMock.sol
Listener runtime
- Listener coordinator
listener/src/listenerProcess.ts - EVM event adapter
listener/src/sourceAdapter/evmAdapter.ts - Vote consensus
listener/src/consensus.ts - Execution and retries
listener/src/executor.ts - Simulated destination
listener/src/destinationAdapter/simulatedAdapter.ts - Fabric destination
listener/src/destinationAdapter/fabricAdapter.ts - Runtime configuration
listener/src/config.ts - Transaction types
listener/src/types.ts
Storage and API
- Transaction and vote store
listener/src/db.ts - Listener API
listener/src/apiServer.ts
Dashboard
- Dashboard API client
dashboard/src/api.ts - Transaction detail view
dashboard/src/components/TransactionDetail.tsx - Dashboard entry
dashboard/src/main.tsx
Other components
- Source EVM chain
- Transaction sender
Connections 24
- Transaction sender → Sender contract: submits request
- Sender contract → Source EVM chain: emits events
- Source EVM chain → EVM event adapter: provides events
listener/src/sourceAdapter/evmAdapter.ts - EVM event adapter → Listener coordinator: delivers events
listener/src/listenerProcess.ts - Listener coordinator → Transaction and vote store: stores transactions and votes
listener/src/listenerProcess.ts - Listener coordinator → Vote consensus: evaluates votes
listener/src/listenerProcess.ts - Listener coordinator → Execution and retries: starts execution
listener/src/listenerProcess.ts - Execution and retries → Transaction and vote store: reads and updates state
listener/src/executor.ts - Execution and retries → Simulated destination: dispatches execution
listener/src/executor.ts - Execution and retries → Fabric destination: dispatches execution
listener/src/executor.ts - Listener coordinator → Runtime configuration: uses settings
listener/src/listenerProcess.ts - EVM event adapter → Runtime configuration: uses settings
listener/src/sourceAdapter/evmAdapter.ts - Execution and retries → Runtime configuration: uses retry settings
listener/src/executor.ts - Transaction and vote store → Runtime configuration: selects backend
listener/src/db.ts - Listener coordinator → Transaction types: uses transaction types
listener/src/listenerProcess.ts - Vote consensus → Transaction types: uses vote types
listener/src/consensus.ts - Execution and retries → Transaction types: uses transaction types
listener/src/executor.ts - Simulated destination → Transaction types: uses result types
listener/src/destinationAdapter/simulatedAdapter.ts - Fabric destination → Transaction types: uses result types
listener/src/destinationAdapter/fabricAdapter.ts - Listener API → Transaction and vote store: reads transaction data
listener/src/apiServer.ts - Dashboard API client → Listener API: requests API data
dashboard/src/api.ts - Transaction detail view → Dashboard API client: loads transaction data
dashboard/src/components/TransactionDetail.tsx - Dashboard entry → Transaction detail view: renders view
- Simulated destination → Receiver mock: simulates destination
listener/src/destinationAdapter/simulatedAdapter.ts