DEV Community

loading...
Cover image for Airdrop XDC to multiple user at a time Smartcontract deployed on XinFin XDC Network.

Airdrop XDC to multiple user at a time Smartcontract deployed on XinFin XDC Network.

mahalakshmiper7 profile image MahaLakshmi Perumal ・1 min read

Created and deployed a smartcontract on XinFin XDC Network that Airdrop XDC to multiple user at a time.
Check the Code for the deployment:
pragma solidity ^0.4.25;
contract XDC01 {
function transfer(address _recipient, uint256 _value) public returns (bool success);
}
contract Airdrop {
function drop(XDC01 token, address[] recipients, uint256[] values) public {
for (uint256 i = 0; i < recipients.length; i++) {
token.transfer(recipients[i], values[i]);
}
}
}

Discussion

pic
Editor guide