I have a smart contract in Remix and would like to be able to filter events using Infura. I know nothing on how to get started. I went to infura and created a project which has a project ID. What should I do next? How do I connect them together?

2 Answers 2


I don't know about the solution as a whole (event filtering), but I can help by connecting to Infura from Remix:

  1. Open "DEPLOY & RUN TRANSACTIONS" tab from the left panel (Eth logo and ">")
  2. In the "Environment" field choose "Web3 Provider"
  3. In the opened pop-up window put your Infura endpoint. Endpoint's example: "https://%NETWORK_NAME%.infura.io/v3/%PROJECT_ID%".
  4. Then you can deploy or import the contract.

you can not filter events with infura, but it is possible with web3, infura is RPC provider, follow this steps to interact with the contract:

1- create your API key with RPC provider (here is infura), user same network as your deployment network.(I recommend to user websocket in infura)

2-put your API key in .env and your network configuration in your network config(in truffle uncomment network in truffle-config.js)

3-read this question about web3 event filtering

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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