Address Contract Partially Verified
Address
0x8992273ed68bAc36d55f69054140FF4284FAf627
Balance
0 ETH
Nonce
1
Code Size
7163 bytes
Creator
0x9C7a11DF...84FB at tx 0x1a3d7c02...d66bdf
Indexed Transactions
0
Contract Bytecode
7163 bytes
0x608060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631785f53c1461007d57806325245b26146100d8578063429b62e51461018c578063704b6c02146101e7578063aee2561314610242578063d9caed1214610323575b600080fd5b34801561008957600080fd5b506100be600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506103a8565b604051808215151515815260200191505060405180910390f35b610172600480360381019080803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929050505061055b565b604051808215151515815260200191505060405180910390f35b34801561019857600080fd5b506101cd600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a8f565b604051808215151515815260200191505060405180910390f35b3480156101f357600080fd5b50610228600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610aaf565b604051808215151515815260200191505060405180910390f35b34801561024e57600080fd5b50610309600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290505050610c60565b604051808215151515815260200191505060405180910390f35b34801561032f57600080fd5b5061038e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061106d565b604051808215151515815260200191505060405180910390f35b6000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561046b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4d75737420626520616e2061646d696e0000000000000000000000000000000081525060200191505060405180910390fd5b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167fa3b62bc36326052d97ea62d63c3d60308ed4c3ea8ac079dd8499f1e9c4f80c0f60405160405180910390a2600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16159050919050565b6000806000806000809054906101000a900460ff1615151561060b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001807f5265656e7472616e63792047756172643a205265656e7472616e742063616c6c81526020017f206465746563746564210000000000000000000000000000000000000000000081525060400191505060405180910390fd5b60016000806101000a81548160ff021916908315150217905550845186511415156106c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260318152602001807f526563697069656e7473206172726179206d75737420686176652073616d652081526020017f6c656e67746820617320616d6f756e747300000000000000000000000000000081525060400191505060405180910390fd5b60009250600091505b85518210156109165784828151811015156106e457fe5b9060200190602002015183019250348311151515610790576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b8152602001807f52616e206f7574206f662066756e64732e202776616c7565272073686f756c6481526020017f206265206174206c656173742073756d206f6620616d6f756e7473000000000081525060400191505060405180910390fd5b858281518110151561079e57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1685838151811015156107cc57fe5b9060200190602002015160405160006040518083038185875af192505050151561085e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4661696c656420746f2073656e6400000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16868381518110151561088457fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd1398bee19313d6bf672ccb116e51f4a1a947e91c757907f51fbb5b5e56c698f88868151811015156108ea57fe5b906020019060200201516040518082815260200191505060405180910390a481806001019250506106cd565b82340390506000811115610a68573373ffffffffffffffffffffffffffffffffffffffff168160405160006040518083038185875af19250505015156109ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001807f4661696c656420746f2073656e642072656d61696e696e67206261636b20746f81526020017f2073656c6600000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fd1398bee19313d6bf672ccb116e51f4a1a947e91c757907f51fbb5b5e56c698f846040518082815260200191505060405180910390a45b6001935060008060006101000a81548160ff02191690831515021790555050505092915050565b60016020528060005260406000206000915054906101000a900460ff1681565b6000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610b72576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4d75737420626520616e2061646d696e0000000000000000000000000000000081525060200191505060405180910390fd5b60018060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167f8fe72c3e0020beb3234e76ae6676fa576fbfcae600af1c4fea44784cf0db329c60405160405180910390a2600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b60008060008084518651141515610d05576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260318152602001807f526563697069656e7473206172726179206d75737420686176652073616d652081526020017f6c656e67746820617320616d6f756e747300000000000000000000000000000081525060400191505060405180910390fd5b86925060009150600090505b8551811015610d43578481815181101515610d2857fe5b90602001906020020151820191508080600101915050610d11565b818373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e33306040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b158015610e1357600080fd5b505af1158015610e27573d6000803e3d6000fd5b505050506040513d6020811015610e3d57600080fd5b810190808051906020019092919050505010151515610ec4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f496e73756666696369656e7420746f6b656e20616c6c6f77616e63650000000081525060200191505060405180910390fd5b600090505b855181101561105f5760011515610f31338884815181101515610ee857fe5b906020019060200201518885815181101515610f0057fe5b906020019060200201518773ffffffffffffffffffffffffffffffffffffffff16611453909392919063ffffffff16565b1515141515610fa8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4661696c656420746f207472616e73666572000000000000000000000000000081525060200191505060405180910390fd5b8673ffffffffffffffffffffffffffffffffffffffff168682815181101515610fcd57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd1398bee19313d6bf672ccb116e51f4a1a947e91c757907f51fbb5b5e56c698f888581518110151561103357fe5b906020019060200201516040518082815260200191505060405180910390a48080600101915050610ec9565b600193505050509392505050565b6000806000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515611133576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4d75737420626520616e2061646d696e0000000000000000000000000000000081525060200191505060405180910390fd5b8491508173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156111d157600080fd5b505af11580156111e5573d6000803e3d6000fd5b505050506040513d60208110156111fb57600080fd5b81019080805190602001909291905050509050600081111515611286576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f546865726520617265206e6f20746f6b656e7320746f2077697468647261770081525060200191505060405180910390fd5b838110151515611324576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260318152602001807f417474656d7074696e6720746f207769746864726177206d6f726520746f6b6581526020017f6e73207468616e20617661696c61626c6500000000000000000000000000000081525060400191505060405180910390fd5b6001151561135387868573ffffffffffffffffffffffffffffffffffffffff166118b59092919063ffffffff16565b15151415156113ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4661696c656420746f207472616e7366657220746f6b656e730000000000000081525060200191505060405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fd1398bee19313d6bf672ccb116e51f4a1a947e91c757907f51fbb5b5e56c698f876040518082815260200191505060405180910390a46001925050509392505050565b6000808573ffffffffffffffffffffffffffffffffffffffff166370a08231866040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156114f157600080fd5b505af1158015611505573d6000803e3d6000fd5b505050506040513d602081101561151b57600080fd5b81019080805190602001909291905050509050828110806116445750828673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e87306040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561160757600080fd5b505af115801561161b573d6000803e3d6000fd5b505050506040513d602081101561163157600080fd5b8101908080519060200190929190505050105b1561165257600091506118ac565b8573ffffffffffffffffffffffffffffffffffffffff16858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200193505050506040516020818303038152906040527f23b872dd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060405180828051906020019080838360005b8381101561178c578082015181840152602081019050611771565b50505050905090810190601f1680156117b95780820380516001836020036101000a031916815260200191505b509150506000604051808303816000865af1915050508573ffffffffffffffffffffffffffffffffffffffff166370a08231866040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561186a57600080fd5b505af115801561187e573d6000803e3d6000fd5b505050506040513d602081101561189457600080fd5b81019080805190602001909291905050508382031491505b50949350505050565b6000808473ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561195357600080fd5b505af1158015611967573d6000803e3d6000fd5b505050506040513d602081101561197d57600080fd5b81019080805190602001909291905050509050828110156119a15760009150611bc7565b8473ffffffffffffffffffffffffffffffffffffffff168484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001925050506040516020818303038152906040527fa9059cbb000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060405180828051906020019080838360005b83811015611aa7578082015181840152602081019050611a8c565b50505050905090810190601f168015611ad45780820380516001836020036101000a031916815260200191505b509150506000604051808303816000865af1915050508473ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015611b8557600080fd5b505af1158015611b99573d6000803e3d6000fd5b505050506040513d6020811015611baf57600080fd5b81019080805190602001909291905050508382031491505b5093925050505600a165627a7a72305820d43ea2eb8564af42a85943fdc8febeefa34fcc9a19b9bd785efc36f6b0c279a10029
Verified Source Code Partial Match
Compiler: v0.4.26+commit.4563c3fc
EVM: byzantium
Optimization: No
IERC20.sol 13 lines
pragma solidity ^0.4.23;
contract IERC20 {
function totalSupply() public constant returns (uint);
function balanceOf(address tokenOwner) public constant returns (uint balance);
function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
MultiSend.sol 102 lines
pragma solidity ^0.4.23;
import "./IERC20.sol";
import "./SafeERC20.sol";
contract MultiSend {
using SafeERC20 for IERC20;
bool private locked; // Re-entrancy protection
mapping(address => bool) public admins;
event AdminSet(address indexed newAdmin);
event AdminRemoved(address indexed oldAdmin);
event Transfer(address indexed from, address indexed to, address indexed tokenAddress, uint tokens);
constructor() public {
admins[msg.sender] = true;
emit AdminSet(msg.sender);
}
modifier onlyAdmin() {
require(admins[msg.sender], "Must be an admin");
_;
}
// Reentrancy guard modifier
modifier reentrancyGuard() {
require(!locked, "Reentrancy Guard: Reentrant call detected!");
locked = true;
_;
locked = false;
}
function setAdmin(address admin) external onlyAdmin returns(bool success){
admins[admin] = true;
emit AdminSet(admin);
return admins[admin];
}
function removeAdmin(address admin) external onlyAdmin returns(bool success){
admins[admin] = false;
emit AdminRemoved(admin);
return !admins[admin];
}
// withdraw tokens stuck in the contract
function withdraw(address returnee, address tokenAddress, uint256 amount)external onlyAdmin returns(bool success){
IERC20 token = IERC20(tokenAddress);
uint256 balance = token.balanceOf(address(this));
require(balance > 0, "There are no tokens to withdraw");
require(balance >= amount, "Attempting to withdraw more tokens than available");
require(token.safeTransfer(returnee, amount) == true, "Failed to transfer tokens");
emit Transfer(address(this), returnee, tokenAddress, amount);
return true;
}
function sendEth(address[] memory recipients, uint256[] memory amounts) public payable reentrancyGuard returns (bool) {
// input validation
require(recipients.length == amounts.length, "Recipients array must have same length as amounts");
// count values for refunding sender
uint256 sentTotal = 0;
// loop through recipients and send amount
for (uint i = 0; i < recipients.length; i++) {
sentTotal = sentTotal + amounts[i];
require(sentTotal <= msg.value, "Ran out of funds. 'value' should be at least sum of amounts");
require(recipients[i].call.value(amounts[i])(), "Failed to send");
emit Transfer(msg.sender, recipients[i], address(0), amounts[i]);
}
// send back remaining value to sender
uint256 remainingValue = msg.value - sentTotal;
if (remainingValue > 0) {
require(msg.sender.call.value(remainingValue)(), "Failed to send remaining back to self");
emit Transfer(address(this), msg.sender, address(0), remainingValue);
}
return true;
}
function sendErc20(address tokenAddress, address[] memory recipients, uint256[] memory amounts) public returns (bool) {
// input validation
require(recipients.length == amounts.length, "Recipients array must have same length as amounts");
// use the erc20 abi
IERC20 token = IERC20(tokenAddress);
// check if contract is allowed to send total amount
uint256 total = 0;
for (uint i = 0; i < recipients.length; i++) {
total += amounts[i];
}
require(token.allowance(msg.sender, address(this)) >= total, "Insufficient token allowance");
// loop through recipients and send amount
for (i = 0; i < recipients.length; i++) {
require(token.safeTransferFrom(msg.sender, recipients[i], amounts[i]) == true, "Failed to transfer");
emit Transfer(msg.sender, recipients[i], tokenAddress, amounts[i]);
}
return true;
}
}
SafeERC20.sol 112 lines
pragma solidity ^0.4.23;
import "./IERC20.sol";
/**
* @dev Library to perform safe calls to standard method for ERC20 tokens.
*
* Why Transfers: transfer methods could have a return value (bool), throw or revert for insufficient funds or
* unathorized value.
*
* Why Approve: approve method could has a return value (bool) or does not accept 0 as a valid value (BNB token).
* The common strategy used to clean approvals.
*
* We use the Solidity call instead of interface methods because in the case of transfer, it will fail
* for tokens with an implementation without returning a value.
* Since versions of Solidity 0.4.22 the EVM has a new opcode, called RETURNDATASIZE.
* This opcode stores the size of the returned data of an external call. The code checks the size of the return value
* after an external call and reverts the transaction in case the return data is shorter than expected
*/
library SafeERC20 {
/**
* @dev Transfer token for a specified address
* @param _token erc20 The address of the ERC20 contract
* @param _to address The address which you want to transfer to
* @param _value uint256 the _value of tokens to be transferred
* @return bool whether the transfer was successful or not
*/
function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {
uint256 prevBalance = _token.balanceOf(address(this));
if (prevBalance < _value) {
// Insufficient funds
return false;
}
address(_token).call(
abi.encodeWithSignature("transfer(address,uint256)", _to, _value)
);
// Fail if the new balance its not equal than previous balance sub _value
return prevBalance - _value == _token.balanceOf(address(this));
}
/**
* @dev Transfer tokens from one address to another
* @param _token erc20 The address of the ERC20 contract
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the _value of tokens to be transferred
* @return bool whether the transfer was successful or not
*/
function safeTransferFrom(
IERC20 _token,
address _from,
address _to,
uint256 _value
) internal returns (bool)
{
uint256 prevBalance = _token.balanceOf(_from);
if (
prevBalance < _value || // Insufficient funds
_token.allowance(_from, address(this)) < _value // Insufficient allowance
) {
return false;
}
address(_token).call(
abi.encodeWithSignature("transferFrom(address,address,uint256)", _from, _to, _value)
);
// Fail if the new balance its not equal than previous balance sub _value
return prevBalance - _value == _token.balanceOf(_from);
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* @param _token erc20 The address of the ERC20 contract
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
* @return bool whether the approve was successful or not
*/
function safeApprove(IERC20 _token, address _spender, uint256 _value) internal returns (bool) {
address(_token).call(
abi.encodeWithSignature("approve(address,uint256)",_spender, _value)
);
// Fail if the new allowance its not equal than _value
return _token.allowance(address(this), _spender) == _value;
}
/**
* @dev Clear approval
* Note that if 0 is not a valid value it will be set to 1.
* @param _token erc20 The address of the ERC20 contract
* @param _spender The address which will spend the funds.
*/
function clearApprove(IERC20 _token, address _spender) internal returns (bool) {
bool success = safeApprove(_token, _spender, 0);
if (!success) {
success = safeApprove(_token, _spender, 1);
}
return success;
}
}
Read Contract
admins 0x429b62e5 → bool
Write Contract 5 functions
These functions modify contract state and require a wallet transaction to execute.
removeAdmin 0x1785f53c
address admin
returns: bool
sendErc20 0xaee25613
address tokenAddress
address[] recipients
uint256[] amounts
returns: bool
sendEth 0x25245b26
address[] recipients
uint256[] amounts
returns: bool
setAdmin 0x704b6c02
address admin
returns: bool
withdraw 0xd9caed12
address returnee
address tokenAddress
uint256 amount
returns: bool
Recent Transactions
No transactions found for this address