1

I have a contract deployed in Binance smart chain. I have written a script that will help me read the events logs from the Blockchain. currently, I tested that with the local hardhat network itself, where the provider is

const provider = new ethers.providers.WebSocketProvider(
`http://127.0.0.1:8545/`

); and it's working fine.

I also research and found out the provider for ethereum mainnet is

wss://eth-mainnet.alchemyapi.io/v2/private_key

What is the url to connect to the binance smart chain?

2 Answers 2

1

Chainstack offers WebSocket endpoints for BSC

0

Here is an example of BSC smart contract events stream.

https://ide.bitquery.io/BSC-websocket-for-log-monitoring

You can subscribe to any smart contract or specfic event.

Learn more from their docs - https://docs.bitquery.io/docs/category/events/

Disclosure - I work for Bitquery

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.