Transaction Hash:
Block:
7592423 at Apr-18-2019 03:11:57 PM +UTC
Transaction Fee:
0.0040107243 ETH
$9.35
Gas Used:
1,215,371 Gas / 3.3 Gwei
Emitted Events:
Account State Difference:
| Address | Before | After | State Difference | ||
|---|---|---|---|---|---|
| 0x2e5D809a...aD604A261 |
4.9866889728 Eth
Nonce: 34
|
4.9826782485 Eth
Nonce: 35
| 0.0040107243 | ||
|
0x5A0b54D5...D3E029c4c
Miner
| (Spark Pool) | 3,170.685851985047958151 Eth | 3,170.689862709347958151 Eth | 0.0040107243 | |
| 0xed5a231e...FeacD4C8f |
Execution Trace
BatchTokenSender.batchSend( _token=0xed5a231eCC0fa775980ad7b86e49872FeacD4C8f, _lotSize=1, _transfers=[29230032746618058365053607117306286184679430449853374996876190686945, 29230032746618058365414789413324119342706200666667897495250640569663, 29230032746618058364353307957595323606908184394889970482954408613721, 29230032746618058364234614297388722258460192998524139711531780626455, 21922524559963543773249745128750674774686771421171300454947830761521, 29230032746618058365011085637332931350627844537999253286350444147478, 29230032746618058364755204062522323226655749876750871189254178753359, 29230032746618058364335614223153437235513298156753950093234537234172, 29230032746618058365341956149535516277250851418491001450050627684411, 29230032746618058364234284420928506286840226337304919947802302819603, 29230032746618058364942443375514826679403973528241815309306611067080, 29230032746618058365456751493436215465364782769344118132863942711603, 29230032746618058365189799000536752715407026975781563389113764546460, 29230032746618058365311836472646420689847322185271526765557081870431, 29230032746618058365253712603797818108943298923883471290017960250569, 29230032746618058364302665572989914820936275893188737899966932455087, 29230032746618058364329990215963705923800728798538242859043231634614, 29230032746618058364174897019705699130086427088476346641340262325937, 29230032746618058365059787149005345131904777152813120470763401515544, 29230032746618058365250229007811143743855111832830415616181337304961, 29230032746618058365419366179047733041809822893429216812625470150397, 29230032746618058364350634984214449582573401006405578165977463502962, 29230032746618058364538271502631401460064508501783365309915286592816, 29230032746618058365131774589599115136742176345191549094887916177551, 29230032746618058364939256466630798697239025834394305340331155126971, 29230032746618058365037143367260137372345946888086766756145657754855, 29230032746618058365198917758688208807508023155225436619843551627112, 29230032746618058364599507905140197791862117988931839115113699476405, 29230032746618058364638318046733144306056408002165570062897646774898, 29230032746618058364187824701034347715244313414375187133384209135955] )
-
LuckyBucks.transferFrom( from=0x2e5D809aD8FA173e509d67e2cf30a52aD604A261, to=0xABa4B471dD0aB77f650B2e210f5E422e0A0E1Ee1, value=20000000000000000000 ) => ( True )
-
LuckyBucks.transferFrom( from=0x2e5D809aD8FA173e509d67e2cf30a52aD604A261, to=0xEae8aDDd5412Ac877c3ACe7D07c0e0Fc47D4053F, value=20000000000000000000 ) => ( True )
-
LuckyBucks.transferFrom( from=0x2e5D809aD8FA173e509d67e2cf30a52aD604A261, to=0x30Fa34588C82804D30A359d709410d27F29cd759, value=20000000000000000000 ) => ( True )
-
LuckyBucks.transferFrom( from=0x2e5D809aD8FA173e509d67e2cf30a52aD604A261, to=0x1C2Fcbf2eBb0c7DfAf3ec98261F5F2b4833f5817, value=20000000000000000000 ) => ( True )
-
LuckyBucks.transferFrom( from=0x2e5D809aD8FA173e509d67e2cf30a52aD604A261, to=0x221074666a482d81Ed17e07f082E78e9E4620831, value=15000000000000000000 ) => ( True )
-
LuckyBucks.transferFrom( from=0x2e5D809aD8FA173e509d67e2cf30a52aD604A261, to=0xA431F9Cb1ec817ca0E02501Db3c87f36B989b316, value=20000000000000000000 ) => ( True )
-
LuckyBucks.transferFrom( from=0x2e5D809aD8FA173e509d67e2cf30a52aD604A261, to=0x775fD95EF260CF387EC8267f893B688D22Ee4B4F, value=20000000000000000000 ) => ( True )
-
LuckyBucks.transferFrom( from=0x2e5D809aD8FA173e509d67e2cf30a52aD604A261, to=0x2De0CA3C586C06FC90057a073edDaa9b6cBBFEfC, value=20000000000000000000 ) => ( True )
-
LuckyBucks.transferFrom( from=0x2e5D809aD8FA173e509d67e2cf30a52aD604A261, to=0xdE26B8FFFD6227E71687d6309e33056fc99DC83B, value=20000000000000000000 ) => ( True )
-
LuckyBucks.transferFrom( from=0x2e5D809aD8FA173e509d67e2cf30a52aD604A261, to=0x1C21012721Ccf0b854A815572cDe2990A9892d13, value=20000000000000000000 ) => ( True )
-
LuckyBucks.transferFrom( from=0x2e5D809aD8FA173e509d67e2cf30a52aD604A261, to=0x982Bf345a21473a170E900472A49DfFc46C368C8, value=20000000000000000000 ) => ( True )
-
LuckyBucks.transferFrom( from=0x2e5D809aD8FA173e509d67e2cf30a52aD604A261, to=0xf24252eBA134E0451D641DdDBaf07a215A9Ad933, value=20000000000000000000 ) => ( True )
-
LuckyBucks.transferFrom( from=0x2e5D809aD8FA173e509d67e2cf30a52aD604A261, to=0xc37fc29746Cf3fcF59749501Be3927327db6079C, value=20000000000000000000 ) => ( True )
-
LuckyBucks.transferFrom( from=0x2e5D809aD8FA173e509d67e2cf30a52aD604A261, to=0xd8E01C10E9146B0908e265CE18D7F94e2442905f, value=20000000000000000000 ) => ( True )
-
LuckyBucks.transferFrom( from=0x2e5D809aD8FA173e509d67e2cf30a52aD604A261, to=0xCEB1BeC6363866F6A67788F9aBca77E945814CC9, value=20000000000000000000 ) => ( True )
-
LuckyBucks.transferFrom( from=0x2e5D809aD8FA173e509d67e2cf30a52aD604A261, to=0x281B524802614E52CF5e38058d0bcc11F5580EAF, value=20000000000000000000 ) => ( True )
-
LuckyBucks.transferFrom( from=0x2e5D809aD8FA173e509d67e2cf30a52aD604A261, to=0x2ce499Cca4E4c3689C0A64e3Cd31CE42B13814B6, value=20000000000000000000 ) => ( True )
-
LuckyBucks.transferFrom( from=0x2e5D809aD8FA173e509d67e2cf30a52aD604A261, to=0x11B9fB38837298670bfbfdfb42895B2A1EBd1eb1, value=20000000000000000000 ) => ( True )
-
LuckyBucks.transferFrom( from=0x2e5D809aD8FA173e509d67e2cf30a52aD604A261, to=0xACB9d3BAbD22B64AE98756b9b46eE905d2F21218, value=20000000000000000000 ) => ( True )
-
LuckyBucks.transferFrom( from=0x2e5D809aD8FA173e509d67e2cf30a52aD604A261, to=0xCE15890Db46010ffe5839Bb0fbfdab5cA8bbaf81, value=20000000000000000000 ) => ( True )
-
LuckyBucks.transferFrom( from=0x2e5D809aD8FA173e509d67e2cf30a52aD604A261, to=0xEbB5E88EF615F2a44c5222c836092D4a98abd6fD, value=20000000000000000000 ) => ( True )
-
LuckyBucks.transferFrom( from=0x2e5D809aD8FA173e509d67e2cf30a52aD604A261, to=0x3082581dC6acf959FB94679e68019ec3aDe1b872, value=20000000000000000000 ) => ( True )
-
LuckyBucks.transferFrom( from=0x2e5D809aD8FA173e509d67e2cf30a52aD604A261, to=0x516041b64b36714bd504E121d290D8f2Db91DD30, value=20000000000000000000 ) => ( True )
-
LuckyBucks.transferFrom( from=0x2e5D809aD8FA173e509d67e2cf30a52aD604A261, to=0xB955DB051Bf09a645c26730752E28F5E3776088F, value=20000000000000000000 ) => ( True )
-
LuckyBucks.transferFrom( from=0x2e5D809aD8FA173e509d67e2cf30a52aD604A261, to=0x979D0B5a28A221B8c47173B072FF26ee4c41fAbb, value=20000000000000000000 ) => ( True )
-
LuckyBucks.transferFrom( from=0x2e5D809aD8FA173e509d67e2cf30a52aD604A261, to=0xa8C271DCee943e4fA8295FcE41CeCA0dFbDf34e7, value=20000000000000000000 ) => ( True )
-
LuckyBucks.transferFrom( from=0x2e5D809aD8FA173e509d67e2cf30a52aD604A261, to=0xC518A8cd02aEb2A0B4796f5d94fEdfe8b58c0768, value=20000000000000000000 ) => ( True )
-
LuckyBucks.transferFrom( from=0x2e5D809aD8FA173e509d67e2cf30a52aD604A261, to=0x5C1A312354067e5609FBE372C282902e7cE403B5, value=20000000000000000000 ) => ( True )
-
LuckyBucks.transferFrom( from=0x2e5D809aD8FA173e509d67e2cf30a52aD604A261, to=0x62E67FB6d22EEA9A4A10bfB137389601dA91Aa72, value=20000000000000000000 ) => ( True )
-
LuckyBucks.transferFrom( from=0x2e5D809aD8FA173e509d67e2cf30a52aD604A261, to=0x13fDaDb970Ec9a5f1fDb91fe85ceE5003Ea2f953, value=20000000000000000000 ) => ( True )
batchSend[BatchTokenSender (ln:43)]
transferFrom[BatchTokenSender (ln:51)]revert[BatchTokenSender (ln:51)]
File 1 of 2: BatchTokenSender
File 2 of 2: LuckyBucks
pragma solidity ^0.4.17;
/**
* Allows one to send EIP-20 tokens to multiple addresses cheaply.
* Copyright © 2017 by ABDK Consulting https://abdk.consulting/
* Author: Mikhail Vladimirov <mikhail.vladimirov[at]gmail.com>
*/
contract BatchTokenSender {
/**
* If you like this contract, you may send some ether to this address and
* it will be used to develop more useful contracts available to everyone.
*/
address public donationAddress;
/**
* Create new Batch Token Sender with given donation address.
*
* @param _donationAddress donation address
*/
function BatchTokenSender (address _donationAddress) public {
donationAddress = _donationAddress;
}
/**
* Encode transfer amount and recepient address as a single uin256 value.
*
* @param _lotsNumber transfer amount as number of lots
* @param _to transfer recipient address
* @return encoded transfer
*/
function encodeTransfer (uint96 _lotsNumber, address _to)
public pure returns (uint256 _encodedTransfer) {
return (_lotsNumber << 160) | uint160 (_to);
}
/**
* Perform multiple token transfers from message sender's address.
*
* @param _token EIP-20 token smart contract that manages tokens to be sent
* @param _lotSize number of tokens in lot
* @param _transfers an array or encoded transfers to perform
*/
function batchSend (
Token _token, uint160 _lotSize, uint256 [] _transfers) public {
uint256 count = _transfers.length;
for (uint256 i = 0; i < count; i++) {
uint256 transfer = _transfers [i];
uint256 value = (transfer >> 160) * _lotSize;
address to = address (
transfer & 0x00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);
if (!_token.transferFrom (msg.sender, to, value)) revert ();
}
}
}
/**
* EIP-20 standard token interface, as defined
* <a href="https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md">here</a>.
*/
contract Token {
/**
* Get total number of tokens in circulation.
*
* @return total number of tokens in circulation
*/
function totalSupply ()
public constant returns (uint256 supply);
/**
* Get number of tokens currently belonging to given owner.
*
* @param _owner address to get number of tokens currently belonging to the
* owner of
* @return number of tokens currently belonging to the owner of given
* address
*/
function balanceOf (address _owner)
public constant returns (uint256 balance);
/**
* Transfer given number of tokens from message sender to given recipient.
*
* @param _to address to transfer tokens to the owner of
* @param _value number of tokens to transfer to the owner of given address
* @return true if tokens were transferred successfully, false otherwise
*/
function transfer (address _to, uint256 _value)
public returns (bool success);
/**
* Transfer given number of tokens from given owner to given recipient.
*
* @param _from address to transfer tokens from the owner of
* @param _to address to transfer tokens to the owner of
* @param _value number of tokens to transfer from given owner to given
* recipient
* @return true if tokens were transferred successfully, false otherwise
*/
function transferFrom (address _from, address _to, uint256 _value)
public returns (bool success);
/**
* Allow given spender to transfer given number of tokens from message
* sender.
*
* @param _spender address to allow the owner of to transfer tokens from
* message sender
* @param _value number of tokens to allow to transfer
* @return true if token transfer was successfully approved, false otherwise
*/
function approve (address _spender, uint256 _value)
public returns (bool success);
/**
* Tell how many tokens given spender is currently allowed to transfer from
* given owner.
*
* @param _owner address to get number of tokens allowed to be transferred
* from the owner of
* @param _spender address to get number of tokens allowed to be transferred
* by the owner of
* @return number of tokens given spender is currently allowed to transfer
* from given owner
*/
function allowance (address _owner, address _spender)
public constant returns (uint256 remaining);
/**
* Logged when tokens were transferred from one owner to another.
*
* @param _from address of the owner, tokens were transferred from
* @param _to address of the owner, tokens were transferred to
* @param _value number of tokens transferred
*/
event Transfer (address indexed _from, address indexed _to, uint256 _value);
/**
* Logged when owner approved his tokens to be transferred by some spender.
* @param _owner owner who approved his tokens to be transferred
* @param _spender spender who were allowed to transfer the tokens belonging
* to the owner
* @param _value number of tokens belonging to the owner, approved to be
* transferred by the spender
*/
event Approval (
address indexed _owner, address indexed _spender, uint256 _value);
}File 2 of 2: LuckyBucks
pragma solidity 0.5.1;
contract Ownable {
address public owner;
address public pendingOwner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
/**
* @dev Modifier throws if called by any account other than the pendingOwner.
*/
modifier onlyPendingOwner() {
require(msg.sender == pendingOwner);
_;
}
constructor() public {
owner = msg.sender;
}
/**
* @dev Allows the current owner to set the pendingOwner address.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner public {
pendingOwner = newOwner;
}
/**
* @dev Allows the pendingOwner address to finalize the transfer.
*/
function claimOwnership() onlyPendingOwner public {
emit OwnershipTransferred(owner, pendingOwner);
owner = pendingOwner;
pendingOwner = address(0);
}
}
contract Manageable is Ownable {
mapping(address => bool) public listOfManagers;
modifier onlyManager() {
require(listOfManagers[msg.sender], "");
_;
}
function addManager(address _manager) public onlyOwner returns (bool success) {
if (!listOfManagers[_manager]) {
require(_manager != address(0), "");
listOfManagers[_manager] = true;
success = true;
}
}
function removeManager(address _manager) public onlyOwner returns (bool success) {
if (listOfManagers[_manager]) {
listOfManagers[_manager] = false;
success = true;
}
}
function getInfo(address _manager) public view returns (bool) {
return listOfManagers[_manager];
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract LuckyBucks is IERC20, Manageable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
constructor() public {
_name = "Lucky Bucks";
_symbol = "LBT";
_decimals = 18;
_totalSupply = 1000000000 * (uint(10) ** _decimals);
_balances[0x3C5459BCDE2D5c1eDc4Cc6C6547d6cb360Ce5aE9] = _totalSupply;
emit Transfer(address(0), 0x3C5459BCDE2D5c1eDc4Cc6C6547d6cb360Ce5aE9, _totalSupply);
}
/**
* @return the name of the token.
*/
function name() public view returns (string memory) {
return _name;
}
/**
* @return the symbol of the token.
*/
function symbol() public view returns (string memory) {
return _symbol;
}
/**
* @return the number of decimals of the token.
*/
function decimals() public view returns (uint8) {
return _decimals;
}
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return _totalSupply;
}
/**
* @dev Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address owner) public view returns (uint256) {
return _balances[owner];
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param owner address The address which owns the funds.
* @param spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address owner, address spender) public view returns (uint256) {
return _allowed[owner][spender];
}
/**
* @dev Transfer token for a specified address
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function transfer(address to, uint256 value) public returns (bool) {
_transfer(msg.sender, to, value);
return true;
}
/**
* @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 spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
*/
function approve(address spender, uint256 value) public returns (bool) {
require(spender != address(0));
_allowed[msg.sender][spender] = value;
emit Approval(msg.sender, spender, value);
return true;
}
/**
* @dev Transfer tokens from one address to another.
* Note that while this function emits an Approval event, this is not required as per the specification,
* and other compliant implementations may not emit the event.
* @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 amount of tokens to be transferred
*/
function transferFrom(address from, address to, uint256 value) public returns (bool) {
_allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value);
_transfer(from, to, value);
emit Approval(from, msg.sender, _allowed[from][msg.sender]);
return true;
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed_[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO LuckyBucks.sol
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param addedValue The amount of tokens to increase the allowance by.
*/
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
require(spender != address(0));
_allowed[msg.sender][spender] = _allowed[msg.sender][spender].add(addedValue);
emit Approval(msg.sender, spender, _allowed[msg.sender][spender]);
return true;
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed_[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO LuckyBucks.sol
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
require(spender != address(0));
_allowed[msg.sender][spender] = _allowed[msg.sender][spender].sub(subtractedValue);
emit Approval(msg.sender, spender, _allowed[msg.sender][spender]);
return true;
}
/**
* @dev Function to mint tokens
* @param to The address that will receive the minted tokens.
* @param value The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address to, uint256 value) public onlyManager returns (bool) {
_mint(to, value);
return true;
}
/**
* @dev Transfer token for a specified addresses
* @param from The address to transfer from.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function _transfer(address from, address to, uint256 value) internal {
require(to != address(0));
_balances[from] = _balances[from].sub(value);
_balances[to] = _balances[to].add(value);
emit Transfer(from, to, value);
}
/**
* @dev Internal function that mints an amount of the token and assigns it to
* an account. This encapsulates the modification of balances such that the
* proper events are emitted.
* @param account The account that will receive the created tokens.
* @param value The amount that will be created.
*/
function _mint(address account, uint256 value) internal {
require(account != address(0));
_totalSupply = _totalSupply.add(value);
_balances[account] = _balances[account].add(value);
emit Transfer(address(0), account, value);
}
/**
* @dev Reclaim all ERC20Basic compatible tokens
* @param _token ERC20B The address of the token contract
*/
function reclaimToken(IERC20 _token) external onlyOwner {
uint256 balance = _token.balanceOf(address(this));
_token.transfer(owner, balance);
}
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
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;
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
assert(c >= a);
return c;
}
}