More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 77 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw Dividen... | 8420208 | 1943 days ago | IN | 0 ETH | 0.0000832 | ||||
Withdraw Dividen... | 8394906 | 1947 days ago | IN | 0 ETH | 0.00020801 | ||||
Withdraw Dividen... | 8155708 | 1984 days ago | IN | 0 ETH | 0.0000624 | ||||
Transfer | 8138298 | 1987 days ago | IN | 0.835443 ETH | 0.00020113 | ||||
Transfer | 8110654 | 1991 days ago | IN | 0.835443 ETH | 0.0032 | ||||
Transfer | 8110643 | 1991 days ago | IN | 0.835443 ETH | 0.00089539 | ||||
Transfer | 8110634 | 1991 days ago | IN | 0.835443 ETH | 0.00090908 | ||||
Transfer | 8110628 | 1991 days ago | IN | 0.835443 ETH | 0.00032749 | ||||
Withdraw Dividen... | 7873800 | 2028 days ago | IN | 0 ETH | 0.00029121 | ||||
Withdraw Dividen... | 7623129 | 2067 days ago | IN | 0 ETH | 0.0000208 | ||||
Transfer | 7541094 | 2080 days ago | IN | 1.482036 ETH | 0.00119796 | ||||
Transfer | 7532425 | 2081 days ago | IN | 1.482036 ETH | 0.000945 | ||||
Transfer | 7532417 | 2081 days ago | IN | 1.482036 ETH | 0.000525 | ||||
Transfer | 7532414 | 2081 days ago | IN | 1.482036 ETH | 0.000245 | ||||
Transfer | 7532390 | 2081 days ago | IN | 1.482036 ETH | 0.00021212 | ||||
Transfer | 7445078 | 2095 days ago | IN | 0.307578 ETH | 0.00040227 | ||||
Transfer | 7444874 | 2095 days ago | IN | 0.307578 ETH | 0.00016399 | ||||
Withdraw Dividen... | 7036561 | 2171 days ago | IN | 0 ETH | 0.00022881 | ||||
Withdraw Dividen... | 7036494 | 2171 days ago | IN | 0 ETH | 0.00022881 | ||||
Transfer | 6945995 | 2187 days ago | IN | 0.883051 ETH | 0.00701665 | ||||
Transfer | 6915042 | 2192 days ago | IN | 1.05196 ETH | 0.0013691 | ||||
Transfer | 6843151 | 2204 days ago | IN | 0.413863 ETH | 0.00824665 | ||||
Transfer | 6842538 | 2204 days ago | IN | 0.413863 ETH | 0.001845 | ||||
Transfer | 6842529 | 2204 days ago | IN | 0.413863 ETH | 0.001435 | ||||
Transfer | 6763104 | 2217 days ago | IN | 0.340497 ETH | 0.001394 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
8420208 | 1943 days ago | 0.00417721 ETH | ||||
8394906 | 1947 days ago | 0.12434827 ETH | ||||
8155708 | 1984 days ago | 0.68924047 ETH | ||||
7873800 | 2028 days ago | 0.02900761 ETH | ||||
7623129 | 2067 days ago | 1.51222383 ETH | ||||
7036561 | 2171 days ago | 0.10029772 ETH | ||||
7036494 | 2171 days ago | 1.98479853 ETH | ||||
6653997 | 2235 days ago | 0.09892373 ETH | ||||
6322967 | 2289 days ago | 1.40526457 ETH | ||||
6317877 | 2290 days ago | 0.02086957 ETH | ||||
6300519 | 2293 days ago | 0.04002692 ETH | ||||
6300470 | 2293 days ago | 0.46844096 ETH | ||||
6242180 | 2303 days ago | 0.8844691 ETH | ||||
5929867 | 2356 days ago | 0.01732093 ETH | ||||
5920696 | 2357 days ago | 0.59237606 ETH | ||||
5857246 | 2368 days ago | 0.17276 ETH | ||||
5851693 | 2369 days ago | 0.5200775 ETH | ||||
5846034 | 2370 days ago | 0.12378062 ETH | ||||
5834400 | 2372 days ago | 0.56628062 ETH | ||||
5578107 | 2417 days ago | 0.56628062 ETH | ||||
5496190 | 2431 days ago | 0.31628062 ETH | ||||
5491772 | 2432 days ago | 1.6074 ETH | ||||
5491382 | 2432 days ago | 1.88 ETH | ||||
5478494 | 2434 days ago | 0.10385612 ETH | ||||
5414869 | 2445 days ago | 2.62589724 ETH |
Loading...
Loading
Contract Name:
DividendManager
Compiler Version
v0.4.19+commit.c4cbbb05
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *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
- No Contract Security Audit Submitted- Submit Audit Here
[{"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"}]
Contract Creation Code
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
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | Ether (ETH) | 100.00% | $3,382.33 | 1.7245 | $5,832.97 |
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.