Developers Forum for XinFin XDC Network

Chris Buonocore
Chris Buonocore

Posted on

Debugging invalid address using ethers deploy / openzepplin

Hey there,

Participating in the xdc fall 2022 hackathon and running into an error with the ethers deployer with a successfully compiled contract abi.

Deploy snippet:

Image description
Image description

Awaiting this yields the error below:

Image description

The contract extends Ownable from openzepplin

Is the owner address throwing an error with the xdc prefix while the ethers provider expects the 0x prefix? Any advice how to debug?

Thanks

Discussion (6)

Collapse
ruslan_wing profile image
ruslan wing

Please use the following RPC and issue will be solved erpc.xinfin.network as this RPC supports 0x prefix address.

Collapse
cbonoz profile image
Chris Buonocore Author • Edited on

Progress,

Does this only work for XDC mainnet currently though?

Seems to fail on RPC using the similarly constructed apothem RPC url. erpc.apothem.network/ Would like to test with TXDC ideally.

Collapse
cbonoz profile image
Chris Buonocore Author • Edited on

Screenshot below:

share.getcloudapp.com/L1u6Y8GA

though was initially getting cors errors on the rpc endpoint

Collapse
ruslan_wing profile image
ruslan wing

Please use the following RPC for apothem Test Network apothem.xdcrpc.com/ which has 0x prefix address output

Collapse
cbonoz profile image
Chris Buonocore Author • Edited on

Working now with the other rpc endpoints - thanks for the support

Collapse
supersnips profile image
Supersnips