I'm working on integrating xrc20 tokens, we are using
const { Transaction } = require('@ethereumjs/tx')
to construct transactions but the issue is that it fails for xdc tokens with error
`Uncaught Error: Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: xdc49d3f7543335cf38fa10889ccff10207e22110b5`
Is there an alternative library to use for xinfin tokens (xrc20) as the above code is used for erc20 tokens which has been working fine for years. I working on this on behalf of a crypto exchange which is interested in integrating xrc20 tokens onto their platform.
Thanks!
Discussion (7)
Which RPC are you using?
He was using rpc.xinfin.network earlier and then I recommended using erpc.xinfin.network or rpc.xdc.org which are both 0x compatible but he said he is still facing the same issue
You can use earpc.xinfin.network/ or erpc.xinfin.network/. Please check configuration carefully if still face xdc-prefix problem again.
Hi am now testing the apothem network with cifi contract.
Im getting the following error from the explorer
explorer.apothem.network/txs/0x4c9...
im using rpc.apothem.network as the rpc and chainId = 51
Can you verify and publish the source codes of contract 0x3CB8fb59815A8a69c197fd46b112Dd70EBF0CDEa ?
Seems like the issue was with cifi contract, as I tried with PLI token and it worked fine.
explorer.apothem.network/txs/0xddf...
Which versions of solidity are your contracts using?