Verified contractPartial
ImmAirDropB
Address0xa51fe7f0ef85c220e4b2c4e4fa131c67f6690d5a
- Balance
0 ETH
- Transactions
93
- Compiler
solc 0.4.21
- Same code
Only this contract
Details
- Compiler
- solc 0.4.21+commit.dfe3193c
- Language
- solidity
- Optimization
- No
- License
- Not stated
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 6,670,715
- Creation transaction
- 0x9a731a377d…dd56330964
ImmAirDropB.sol
pragma solidity ^0.4.21;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a / b;
return c;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
assert(c >= a);
return c;
}
}
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract ImmAirDropB{
using SafeMath for uint256;
uint256 public decimals = 18;
address public wallet;
ERC20 public token;
mapping (address => bool) public admins;
function ImmAirDropB(ERC20 _token, address _wallet) public {
require(_token != address(0));
token = _token;
admins[msg.sender] = true;
admins[_wallet] = true;
wallet = _wallet;
}
modifier onlyAdmin {
require(admins[msg.sender]);
_;
}
function addAdminWhitelist(address _userlist) public onlyAdmin{
if(_userlist != address(0) && !admins[_userlist]){
admins[_userlist] = true;
}
}
function signupUserWhitelist(address[] _userlist, uint256 _amttype) public onlyAdmin{
require(_userlist.length > 0);
uint256 useamt = _amttype * (10 ** uint256(decimals));
for (uint256 i = 0; i < _userlist.length; i++) {
if(_userlist[i] != address(0)){
token.transfer(_userlist[i], useamt);
}
}
}
function () external payable {
revert();
}
}Compiler settingsShow
{
"optimizer": {
"runs": 0,
"enabled": false
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.