Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Subscribe to smart contract events, which is currently broken on Lotus w/ Ethers@6

License

Notifications You must be signed in to change notification settings

filecoin-station/on-contract-event

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

on-contract-event

Subscribe to smart contract events, which is currently broken on Lotus w/ Ethers@6.

Usage

import { onContractEvent } from 'on-contract-event'

const it = onContractEvent({
  contract,
  provider,
  rpcUrl,
  rpcHeaders
})
for await (const event of it) {
  console.log({
    name: event.name,
    args: event.args
  })
}

API

onContractEvent()

Options:

  • contract: Ethers contract
  • provider: Ethers provider
  • rpcUrl: JSON-RPC endpoint URL
  • rpcHeader: JSON-RPC headers object
  • signal: Optional AbortSignal

About

Subscribe to smart contract events, which is currently broken on Lotus w/ Ethers@6

Resources

License

Stars

Watchers

Forks

Packages

No packages published