0

I am trying to dynamically update the balance of an ethereum address in database. For this i want to setup such a scenario that whenever that address receives ethers, an event or call back should be triggered.

How can I achieve this using ethers.js?

1 Answer 1

1

I don't think you can achieve that easily with ethers since is not a blockchain explorer but a library to read and send transactions but not all hope is lost, you might want to look at Alchemy Api's or Infura apis, they've got a lot of functional apis that might help your purposes

Keep in mind these facts:

  • EOA Addresses (a regular wallet) does not emit events when getting ETH transfered
  • Contracts that transfer ETH or any token might implement 'events' in their code; these events you can track, for that you might want to
    use a service like alchemy notify which can keep track of events emitted by contracts

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.