ETH Price: $3,378.89 (-7.90%)

Contract

0xb58F5F3AdCBE928EA343c12D047656C59B3c1f2A
 

Overview

ETH Balance

1.7245439564642816 ETH

Eth Value

$5,827.05 (@ $3,378.89/ETH)

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw Dividen...84202082019-08-25 15:35:221943 days ago1566747322IN
0xb58F5F3A...59B3c1f2A
0 ETH0.00008324
Withdraw Dividen...83949062019-08-21 17:10:241947 days ago1566407424IN
0xb58F5F3A...59B3c1f2A
0 ETH0.0002080110
Withdraw Dividen...81557082019-07-15 12:55:111984 days ago1563195311IN
0xb58F5F3A...59B3c1f2A
0 ETH0.00006243
Transfer81382982019-07-12 20:08:171987 days ago1562962097IN
0xb58F5F3A...59B3c1f2A
0.835443 ETH0.000201131
Transfer81106542019-07-08 12:43:361991 days ago1562589816IN
0xb58F5F3A...59B3c1f2A
0.835443 ETH0.003240
Transfer81106432019-07-08 12:41:461991 days ago1562589706IN
0xb58F5F3A...59B3c1f2A
0.835443 ETH0.0008953919.69897501
Transfer81106342019-07-08 12:38:481991 days ago1562589528IN
0xb58F5F3A...59B3c1f2A
0.835443 ETH0.0009090820
Transfer81106282019-07-08 12:36:341991 days ago1562589394IN
0xb58F5F3A...59B3c1f2A
0.835443 ETH0.0003274915.59479553
Withdraw Dividen...78738002019-06-01 12:53:582028 days ago1559393638IN
0xb58F5F3A...59B3c1f2A
0 ETH0.0002912114
Withdraw Dividen...76231292019-04-23 10:04:162067 days ago1556013856IN
0xb58F5F3A...59B3c1f2A
0 ETH0.00002081
Transfer75410942019-04-10 15:13:032080 days ago1554909183IN
0xb58F5F3A...59B3c1f2A
1.482036 ETH0.001197967
Transfer75324252019-04-09 6:56:012081 days ago1554792961IN
0xb58F5F3A...59B3c1f2A
1.482036 ETH0.0009457
Transfer75324172019-04-09 6:54:542081 days ago1554792894IN
0xb58F5F3A...59B3c1f2A
1.482036 ETH0.0005257
Transfer75324142019-04-09 6:53:572081 days ago1554792837IN
0xb58F5F3A...59B3c1f2A
1.482036 ETH0.0002457
Transfer75323902019-04-09 6:46:172081 days ago1554792377IN
0xb58F5F3A...59B3c1f2A
1.482036 ETH0.000212127
Transfer74450782019-03-26 15:46:492095 days ago1553615209IN
0xb58F5F3A...59B3c1f2A
0.307578 ETH0.000402272
Transfer74448742019-03-26 14:58:192095 days ago1553612299IN
0xb58F5F3A...59B3c1f2A
0.307578 ETH0.000163997.80934194
Withdraw Dividen...70365612019-01-09 11:14:462171 days ago1547032486IN
0xb58F5F3A...59B3c1f2A
0 ETH0.0002288111
Withdraw Dividen...70364942019-01-09 10:57:402171 days ago1547031460IN
0xb58F5F3A...59B3c1f2A
0 ETH0.0002288111
Transfer69459952018-12-24 19:16:102187 days ago1545678970IN
0xb58F5F3A...59B3c1f2A
0.883051 ETH0.0070166541
Transfer69150422018-12-19 13:09:352192 days ago1545224975IN
0xb58F5F3A...59B3c1f2A
1.05196 ETH0.00136918
Transfer68431512018-12-07 14:41:072204 days ago1544193667IN
0xb58F5F3A...59B3c1f2A
0.413863 ETH0.0082466541
Transfer68425382018-12-07 12:19:012204 days ago1544185141IN
0xb58F5F3A...59B3c1f2A
0.413863 ETH0.00184541
Transfer68425292018-12-07 12:17:302204 days ago1544185050IN
0xb58F5F3A...59B3c1f2A
0.413863 ETH0.00143541
Transfer67631042018-11-24 9:22:592217 days ago1543051379IN
0xb58F5F3A...59B3c1f2A
0.340497 ETH0.00139441
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
84202082019-08-25 15:35:221943 days ago1566747322
0xb58F5F3A...59B3c1f2A
0.00417721 ETH
83949062019-08-21 17:10:241947 days ago1566407424
0xb58F5F3A...59B3c1f2A
0.12434827 ETH
81557082019-07-15 12:55:111984 days ago1563195311
0xb58F5F3A...59B3c1f2A
0.68924047 ETH
78738002019-06-01 12:53:582028 days ago1559393638
0xb58F5F3A...59B3c1f2A
0.02900761 ETH
76231292019-04-23 10:04:162067 days ago1556013856
0xb58F5F3A...59B3c1f2A
1.51222383 ETH
70365612019-01-09 11:14:462171 days ago1547032486
0xb58F5F3A...59B3c1f2A
0.10029772 ETH
70364942019-01-09 10:57:402171 days ago1547031460
0xb58F5F3A...59B3c1f2A
1.98479853 ETH
66539972018-11-06 12:20:342235 days ago1541506834
0xb58F5F3A...59B3c1f2A
0.09892373 ETH
63229672018-09-13 8:03:392289 days ago1536825819
0xb58F5F3A...59B3c1f2A
1.40526457 ETH
63178772018-09-12 11:39:282290 days ago1536752368
0xb58F5F3A...59B3c1f2A
0.02086957 ETH
63005192018-09-09 14:26:222293 days ago1536503182
0xb58F5F3A...59B3c1f2A
0.04002692 ETH
63004702018-09-09 14:14:282293 days ago1536502468
0xb58F5F3A...59B3c1f2A
0.46844096 ETH
62421802018-08-30 18:56:032303 days ago1535655363
0xb58F5F3A...59B3c1f2A
0.8844691 ETH
59298672018-07-08 23:05:482356 days ago1531091148
0xb58F5F3A...59B3c1f2A
0.01732093 ETH
59206962018-07-07 8:54:392357 days ago1530953679
0xb58F5F3A...59B3c1f2A
0.59237606 ETH
58572462018-06-26 11:38:562368 days ago1530013136
0xb58F5F3A...59B3c1f2A
0.17276 ETH
58516932018-06-25 12:13:412369 days ago1529928821
0xb58F5F3A...59B3c1f2A
0.5200775 ETH
58460342018-06-24 12:36:502370 days ago1529843810
0xb58F5F3A...59B3c1f2A
0.12378062 ETH
58344002018-06-22 13:21:392372 days ago1529673699
0xb58F5F3A...59B3c1f2A
0.56628062 ETH
55781072018-05-08 13:34:432417 days ago1525786483
0xb58F5F3A...59B3c1f2A
0.56628062 ETH
54961902018-04-24 7:17:062431 days ago1524554226
0xb58F5F3A...59B3c1f2A
0.31628062 ETH
54917722018-04-23 12:44:532432 days ago1524487493
0xb58F5F3A...59B3c1f2A
1.6074 ETH
54913822018-04-23 11:06:492432 days ago1524481609
0xb58F5F3A...59B3c1f2A
1.88 ETH
54784942018-04-21 6:24:552434 days ago1524291895
0xb58F5F3A...59B3c1f2A
0.10385612 ETH
54148692018-04-10 10:49:472445 days ago1523357387
0xb58F5F3A...59B3c1f2A
2.62589724 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DividendManager

Compiler Version
v0.4.19+commit.c4cbbb05

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2018-09-10
*/

pragma solidity ^0.4.18;

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 Substracts 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;
    }
}

interface UnicornDividendTokenInterface {
    function totalSupply() external view returns (uint256);
    function balanceOf(address who) external view returns (uint256);
    function transfer(address to, uint256 value) external returns (bool);
    event Transfer(address indexed from, address indexed to, uint256 value);

    function allowance(address owner, address spender) external view returns (uint256);
    function transferFrom(address from, address to, uint256 value) external returns (bool);
    function approve(address spender, uint256 value) external returns (bool);
    event Approval(address indexed owner, address indexed spender, uint256 value);

    function getHolder(uint256) external view returns (address);
    function getHoldersCount() external view returns (uint256);
}

contract DividendManager {
    using SafeMath for uint256;

    /* Our handle to the UnicornToken contract. */
    UnicornDividendTokenInterface unicornDividendToken;

    /* Handle payments we couldn't make. */
    mapping (address => uint256) public pendingWithdrawals;

    /* Indicates a payment is now available to a shareholder */
    event WithdrawalAvailable(address indexed holder, uint256 amount);

    /* Indicates a payment is payed to a shareholder */
    event WithdrawalPayed(address indexed holder, uint256 amount);

    /* Indicates a dividend payment was made. */
    event DividendPayment(uint256 paymentPerShare);

    /* Create our contract with references to other contracts as required. */
    function DividendManager(address _unicornDividendToken) public{
        /* Setup access to our other contracts and validate their versions */
        unicornDividendToken = UnicornDividendTokenInterface(_unicornDividendToken);
    }

    uint256 public retainedEarning = 0;


    // Makes a dividend payment - we make it available to all senders then send the change back to the caller.  We don't actually send the payments to everyone to reduce gas cost and also to
    // prevent potentially getting into a situation where we have recipients throwing causing dividend failures and having to consolidate their dividends in a separate process.

    function () public payable {
        payDividend();
    }

    function payDividend() public payable {
        retainedEarning = retainedEarning.add(msg.value);
        require(retainedEarning > 0);

        /* Determine how much to pay each shareholder. */
        uint256 totalSupply = unicornDividendToken.totalSupply();
        uint256 paymentPerShare = retainedEarning.div(totalSupply);
        if (paymentPerShare > 0) {
            uint256 totalPaidOut = 0;
            /* Enum all accounts and send them payment */
            for (uint256 i = 1; i <= unicornDividendToken.getHoldersCount(); i++) {
                address holder = unicornDividendToken.getHolder(i);
                uint256 withdrawal = paymentPerShare * unicornDividendToken.balanceOf(holder);
                pendingWithdrawals[holder] = pendingWithdrawals[holder].add(withdrawal);
                WithdrawalAvailable(holder, withdrawal);
                totalPaidOut = totalPaidOut.add(withdrawal);
            }
            retainedEarning = retainedEarning.sub(totalPaidOut);
        }
        DividendPayment(paymentPerShare);
    }

    /* Allows a user to request a withdrawal of their dividend in full. */
    function withdrawDividend() public {
        uint amount = pendingWithdrawals[msg.sender];
        require (amount > 0);
        pendingWithdrawals[msg.sender] = 0;
        msg.sender.transfer(amount);
        WithdrawalPayed(msg.sender, amount);
    }
}

Contract Security Audit

Contract ABI

[{"constant":false,"inputs":[],"name":"payDividend","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[],"name":"withdrawDividend","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"retainedEarning","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"pendingWithdrawals","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_unicornDividendToken","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"holder","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"WithdrawalAvailable","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"holder","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"WithdrawalPayed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"paymentPerShare","type":"uint256"}],"name":"DividendPayment","type":"event"}]

60606040526000600255341561001457600080fd5b6040516020806107f683398101604052808051906020019091905050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610776806100806000396000f300606060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630b6826ca1461006c5780636a47400214610076578063752329ec1461008b578063f3f43703146100b4575b61006a610101565b005b610074610101565b005b341561008157600080fd5b6100896105b1565b005b341561009657600080fd5b61009e6106da565b6040518082815260200191505060405180910390f35b34156100bf57600080fd5b6100eb600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506106e0565b6040518082815260200191505060405180910390f35b60008060008060008061011f346002546106f890919063ffffffff16565b600281905550600060025411151561013657600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15156101c357600080fd5b6102c65a03f115156101d457600080fd5b5050506040518051905095506101f58660025461071690919063ffffffff16565b945060008511156105725760009350600192505b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166373889f4a6000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b151561029657600080fd5b6102c65a03f115156102a757600080fd5b5050506040518051905083111515610556576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e8a96b46846000604051602001526040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b151561035157600080fd5b6102c65a03f1151561036257600080fd5b5050506040518051905091506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231836000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b151561043257600080fd5b6102c65a03f1151561044357600080fd5b50505060405180519050850290506104a381600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546106f890919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff167fc01f5431b0115fdcf7e402c897faa3faad99d1a9f0c380e85cb52352c6b3881b826040518082815260200191505060405180910390a261054781856106f890919063ffffffff16565b93508280600101935050610209565b61056b8460025461073190919063ffffffff16565b6002819055505b7f23b3a9e74bec74a80a1b99fd645e2c39c1de9cbf9dd755dbb426f1449efeda91856040518082815260200191505060405180910390a1505050505050565b6000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008111151561060457600080fd5b6000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561068957600080fd5b3373ffffffffffffffffffffffffffffffffffffffff167fc03f16347217ec95b1d2a942bd11bd3c6dde728406dd9b548cc22acc8e44d66d826040518082815260200191505060405180910390a250565b60025481565b60016020528060005260406000206000915090505481565b600080828401905083811015151561070c57fe5b8091505092915050565b600080828481151561072457fe5b0490508091505092915050565b600082821115151561073f57fe5b8183039050929150505600a165627a7a7230582039894a694450773307b508ccc9c5bd208b7002ed2d1991cb043f794a4d13f5a40029000000000000000000000000c6a5cc090b709ee71080effff3b0dddbd9d9d8e4

Deployed Bytecode

0x606060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630b6826ca1461006c5780636a47400214610076578063752329ec1461008b578063f3f43703146100b4575b61006a610101565b005b610074610101565b005b341561008157600080fd5b6100896105b1565b005b341561009657600080fd5b61009e6106da565b6040518082815260200191505060405180910390f35b34156100bf57600080fd5b6100eb600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506106e0565b6040518082815260200191505060405180910390f35b60008060008060008061011f346002546106f890919063ffffffff16565b600281905550600060025411151561013657600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15156101c357600080fd5b6102c65a03f115156101d457600080fd5b5050506040518051905095506101f58660025461071690919063ffffffff16565b945060008511156105725760009350600192505b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166373889f4a6000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b151561029657600080fd5b6102c65a03f115156102a757600080fd5b5050506040518051905083111515610556576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e8a96b46846000604051602001526040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b151561035157600080fd5b6102c65a03f1151561036257600080fd5b5050506040518051905091506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231836000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b151561043257600080fd5b6102c65a03f1151561044357600080fd5b50505060405180519050850290506104a381600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546106f890919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff167fc01f5431b0115fdcf7e402c897faa3faad99d1a9f0c380e85cb52352c6b3881b826040518082815260200191505060405180910390a261054781856106f890919063ffffffff16565b93508280600101935050610209565b61056b8460025461073190919063ffffffff16565b6002819055505b7f23b3a9e74bec74a80a1b99fd645e2c39c1de9cbf9dd755dbb426f1449efeda91856040518082815260200191505060405180910390a1505050505050565b6000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008111151561060457600080fd5b6000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561068957600080fd5b3373ffffffffffffffffffffffffffffffffffffffff167fc03f16347217ec95b1d2a942bd11bd3c6dde728406dd9b548cc22acc8e44d66d826040518082815260200191505060405180910390a250565b60025481565b60016020528060005260406000206000915090505481565b600080828401905083811015151561070c57fe5b8091505092915050565b600080828481151561072457fe5b0490508091505092915050565b600082821115151561073f57fe5b8183039050929150505600a165627a7a7230582039894a694450773307b508ccc9c5bd208b7002ed2d1991cb043f794a4d13f5a40029

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000c6a5cc090b709ee71080effff3b0dddbd9d9d8e4

-----Decoded View---------------
Arg [0] : _unicornDividendToken (address): 0xC6a5cC090b709eE71080EffFF3B0DddbD9d9D8E4

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000c6a5cc090b709ee71080effff3b0dddbd9d9d8e4


Swarm Source

bzzr://39894a694450773307b508ccc9c5bd208b7002ed2d1991cb043f794a4d13f5a4

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.