-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathairdrop.sol
More file actions
39 lines (25 loc) · 793 Bytes
/
airdrop.sol
File metadata and controls
39 lines (25 loc) · 793 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
contract Ownable {
address public owner;
function Ownable() {
owner = msg.sender;
}
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
}
interface Token {
function transfer(address _to, uint256 _value) external returns (bool);
function balanceOf(address _owner) external constant returns (uint256 balance);
}
contract AirDrop is Ownable {
Token token;
function multisend(address _tokenAddr, address[] _recipient, uint256 _value) onlyOwner external {
token = Token(_tokenAddr);
for (uint256 i = 0; i < _recipient.length; i++) {
if(token.balanceOf(_tokenAddr) >= _value) {
token.transfer(_recipient[i], _value);
}
}
}
}