Developers Forum for XinFin XDC Network

Chris Buonocore
Chris Buonocore

Posted on

Error interacting with a XDC contract from ethers.js

Hey All,

Just started working with XDC Testnet and trying to interact with a deployed contract here using ethers.js

Was able to successfully deploy this contract above, however when I interact with it via ethers I get the below uncaught exception:

Image description

From a quick search, looks like the ENS error is typically associated with a unparseable address, might be the xdc prefix working with ethers?

Could also share code, but using new ethers.Contract(...) with this address. Appreciate any advice/help!

Discussion (2)

ruslan_wing profile image
ruslan wing

You can check out some of the similar issue which has been posted at Ether.js

cbonoz profile image
Chris Buonocore Author

Following up here in case others run into this - using the regular 0x prefix instead of xdc appears to have worked.

Thanks for the links otherwise Ruslan!