0

I have contract A in Avalanche FUJI C-chain.

When I'm on C-chain testnet, I can get events from A using getPastEvents() in web3.js, but when I change the testnet (for example, to Goerli), I receive an empty array.

How can I get A-events on a C-chain while I'm in Goerli testnet?

0

The web3 api doesn't natively support connections to multiple blockchains at once, so you would need to initialize another web3 object using a node url that is on the network you want to query. You can then manage both web3 objects and query both networks.

1
  • Thanks! Next week I'll try to do that
    – Kud8
    Jun 11 at 18:17

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.