1

I am using Node JS and ethereum smart-contract. Every time contract gets deployed new addresses generated.

Is there a way that node JS always gets an updated address of a contract? Any API so that I don't have to go and update in node to connect contract through new address every time I deploy.

1

I would suggest you register your contract with Ethereum Name System (ENS) during the deployment.

  • Create an ENS name

  • Update its ADDRESS record to point to the latest contract deployment during the deployment

https://medium.com/the-ethereum-name-service/new-text-records-now-available-for-ens-names-in-manager-a0ebb9cda73a

You can do this programmatically from JavaScript.

| improve this answer | |

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.