Developers Forum for XinFin XDC Network

Discussion on: (Closed)Contract not working

Collapse
dendenski profile image
dendenski Author

Hi have you tried sending some XDC instead of 0? still getting tmap error even after changing the format

Collapse
gzliudan profile image
Daniel Liu

Should add function receive() into contract, so contract can receive ethers, then contract can transfer ethers to other accounts.

Collapse
gzliudan profile image
Daniel Liu • Edited on

I add a function receive() external payable {} in contract HummingbotMinerPayouts. And deployed it at xdc2e78f2ACd8A5CA6dD5B0B8Fb502E3ea160E54C00. Then transfer 100 XDC to this contract. At last call function disperseXdc with parameters ["0x48800ede4Be8DabAFDCD4bdb05b099dB2b236846","0x796c0E3A2e78a699502a35a65f9734a355210036"] and [1000000000000000000,1000000000000000000] successfully. You can check balance of xdc48800ede4Be8DabAFDCD4bdb05b099dB2b236846 and xdc796c0E3A2e78a699502a35a65f9734a355210036. Please check transaction explorer.apothem.network/txs/0x4ce... also.

Thread Thread
dendenski profile image
dendenski Author

thanks will try this

Thread Thread
rupps_blocksscan profile image
Rupali Mestry

We hope that the above issue is resolved, if the issue is still persist then please let us know about it so that the team can resolve it on priority. It will be grateful to get an update within 72 hours or else it will be considered resolved.