I have a scenario to test/deploy a contract using Truffle Suite.
I am trying to deploy contract in XDC, using truffle toolbox, but I get the following errors.
Error: Given address "xdc0000000000000000000000000000000000000000" is not a valid Ethereum address.
I think, truffle is not supporting XDC chain. Anyone has solutions or suggestions for the same?
Truffle Suite design to handle only 0x prefix, We would suggest you to use below Ethereum Compatible RPC Endpoints for XinFin XDC Network.
MainNet :- eRPC.XinFin.Network
TestNet :- eRPC.Apothem.Network
Thank you, yes it make sense.
I tried using testnet url provided in truffle and it errored out..
Error: PollingBlockTracker - encountered an error while attempting to update latest block:
Where as Mainnet -> working fine!..
We can use erpc.xinfin.network and erpc.apothem.network now. These 2 RPC nodes support 0x pefiex address. So xdc is compatible with hardhat and truffle.
@anilchinchawale @daniel what changes are made in these two servers to enable that?
If I have test XDC master node, how do I make it support 0x format just like how erpc.xinfin.network and erpc.apothem.network, to enable truffle support?
In fact, I deployed contracts to XDC chain by truffle and hardhat successfully in early august. But I encounter the same error when I use truffle or hardhat now. If the jsonrpc of xdc chain is not modifed, maybe you can try to downgrade truffle.
I found the reason why I deployed contracts with hardhat and truffle successfully in July. The prefix of address is still 0x in Jul, but it is changed to xdc in August. I opened 2 issues on hardhat and truffle today. Maybe they have a solution.
great to hear!, sure will give a try.. For now, I have used evm compatible rpc to go with 0x :)