Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
11254890 | 1501 days ago | 0.00174854 ETH | ||||
11254890 | 1501 days ago | 0.00169352 ETH | ||||
11254890 | 1501 days ago | 0.00005501 ETH | ||||
7516793 | 2088 days ago | 0.00243177 ETH | ||||
7516793 | 2088 days ago | 0.00241677 ETH | ||||
7516793 | 2088 days ago | 0.000015 ETH | ||||
6402619 | 2281 days ago | 0.00539663 ETH | ||||
6402619 | 2281 days ago | 0.00518468 ETH | ||||
6402619 | 2281 days ago | 0.00021195 ETH | ||||
6278152 | 2301 days ago | 0.0066853 ETH | ||||
6278152 | 2301 days ago | 0.00514014 ETH | ||||
6278152 | 2301 days ago | 0.00154516 ETH | ||||
6184865 | 2317 days ago | 0.00695215 ETH | ||||
6184865 | 2317 days ago | 0.00693873 ETH | ||||
6184865 | 2317 days ago | 0.00001341 ETH | ||||
6167662 | 2320 days ago | 0.00858597 ETH | ||||
6167662 | 2320 days ago | 0.00857022 ETH | ||||
6167662 | 2320 days ago | 0.00001575 ETH | ||||
6160486 | 2321 days ago | 0.01056897 ETH | ||||
6160486 | 2321 days ago | 0.01052381 ETH | ||||
6160486 | 2321 days ago | 0.00004516 ETH | ||||
6158509 | 2321 days ago | 0.01299242 ETH | ||||
6158509 | 2321 days ago | 0.01297742 ETH | ||||
6158509 | 2321 days ago | 0.000015 ETH | ||||
6154434 | 2322 days ago | 0.01600749 ETH |
Loading...
Loading
Contract Name:
POOHMOWHALE
Compiler Version
v0.4.24+commit.e67f0147
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2018-07-29 */ pragma solidity ^0.4.21; contract POOHMOWHALE { /** * Modifiers */ modifier onlyOwner() { require(msg.sender == owner); _; } modifier notPOOH(address aContract) { require(aContract != address(poohContract)); _; } /** * Events */ event Deposit(uint256 amount, address depositer); event Purchase(uint256 amountSpent, uint256 tokensReceived); event Sell(); event Payout(uint256 amount, address creditor); event Transfer(uint256 amount, address paidTo); /** * Global Variables */ address owner; address game; bool payDoublr; uint256 tokenBalance; POOH poohContract; DOUBLR doublr; /** * Constructor */ constructor() public { owner = msg.sender; poohContract = POOH(address(0x4C29d75cc423E8Adaa3839892feb66977e295829)); doublr = DOUBLR(address(0xd69b75D5Dc270E4F6cD664Ac2354d12423C5AE9e)); tokenBalance = 0; payDoublr = true; } function() payable public { } /** * Only way to give POOHMOWHALE ETH is via by using fallback */ function donate() public payable // make it public payable instead of internal { //You have to send more than 1000000 wei require(msg.value > 1000000 wei); uint256 ethToTransfer = address(this).balance; //if we are in doublr-mode, pay the assigned doublr if(payDoublr) { if(ethToTransfer > 0) { address(doublr).transfer(ethToTransfer); // dump entire balance doublr.payout(); } } else { uint256 PoohEthInContract = address(poohContract).balance; // if POOH contract balance is less than 5 ETH, POOH is dead and there's no use pumping it if(PoohEthInContract < 5 ether) { poohContract.exit(); tokenBalance = 0; ethToTransfer = address(this).balance; owner.transfer(ethToTransfer); emit Transfer(ethToTransfer, address(owner)); } //let's buy/sell tokens to give dividends to POOH tokenholders else { tokenBalance = myTokens(); //if token balance is greater than 0, sell and rebuy if(tokenBalance > 0) { poohContract.exit(); tokenBalance = 0; ethToTransfer = address(this).balance; if(ethToTransfer > 0) { poohContract.buy.value(ethToTransfer)(0x0); } else { poohContract.buy.value(msg.value)(0x0); } } else { //we have no tokens, let's buy some if we have eth if(ethToTransfer > 0) { poohContract.buy.value(ethToTransfer)(0x0); tokenBalance = myTokens(); //Emit a deposit event. emit Deposit(msg.value, msg.sender); } } } } } /** * Number of tokens the contract owns. */ function myTokens() public view returns(uint256) { return poohContract.myTokens(); } /** * Number of dividends owed to the contract. */ function myDividends() public view returns(uint256) { return poohContract.myDividends(true); } /** * ETH balance of contract */ function ethBalance() public view returns (uint256) { return address(this).balance; } /** * Address of game contract that ETH gets sent to */ function assignedDoublrContract() public view returns (address) { return address(doublr); } /** * A trap door for when someone sends tokens other than the intended ones so the overseers can decide where to send them. */ function transferAnyERC20Token(address tokenAddress, address tokenOwner, uint tokens) public onlyOwner() notPOOH(tokenAddress) returns (bool success) { return ERC20Interface(tokenAddress).transfer(tokenOwner, tokens); } /** * Owner can update which Doublr the POOHMOWHALE pays to */ function changeDoublr(address doublrAddress) public onlyOwner() { doublr = DOUBLR(doublrAddress); } /** * Owner can update POOHMOWHALE to stop paying doublr and act as whale */ function switchToWhaleMode(bool answer) public onlyOwner() { payDoublr = answer; } } //Define the POOH token for the POOHMOWHALE contract POOH { function buy(address) public payable returns(uint256); function sell(uint256) public; function withdraw() public; function myTokens() public view returns(uint256); function myDividends(bool) public view returns(uint256); function exit() public; function totalEthereumBalance() public view returns(uint); } //Define the Doublr contract for the POOHMOWHALE contract DOUBLR { function payout() public; function myDividends() public view returns(uint256); function withdraw() public; } //Define ERC20Interface.transfer, so POOHMOWHALE can transfer tokens accidently sent to it. contract ERC20Interface { function transfer(address to, uint256 tokens) public returns (bool success); }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[],"name":"assignedDoublrContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"myDividends","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ethBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"doublrAddress","type":"address"}],"name":"changeDoublr","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"answer","type":"bool"}],"name":"switchToWhaleMode","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"myTokens","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"tokenAddress","type":"address"},{"name":"tokenOwner","type":"address"},{"name":"tokens","type":"uint256"}],"name":"transferAnyERC20Token","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"donate","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"depositer","type":"address"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amountSpent","type":"uint256"},{"indexed":false,"name":"tokensReceived","type":"uint256"}],"name":"Purchase","type":"event"},{"anonymous":false,"inputs":[],"name":"Sell","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"creditor","type":"address"}],"name":"Payout","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"paidTo","type":"address"}],"name":"Transfer","type":"event"}]
Contract Creation Code
608060405234801561001057600080fd5b5060008054600160a060020a031990811633178255600380548216734c29d75cc423e8adaa3839892feb66977e2958291790556004805490911673d69b75d5dc270e4f6cd664ac2354d12423c5ae9e1790556002556001805460a060020a60ff021916740100000000000000000000000000000000000000001790556108d68061009b6000396000f3006080604052600436106100745763ffffffff60e060020a6000350416631ddf147f81146100765780633151ecfc146100a75780634e6630b0146100ce57806368d967dd146100e35780637f5a448c14610104578063949e8acd1461011e578063d493b9ac14610133578063ed88c68e14610171575b005b34801561008257600080fd5b5061008b610179565b60408051600160a060020a039092168252519081900360200190f35b3480156100b357600080fd5b506100bc610188565b60408051918252519081900360200190f35b3480156100da57600080fd5b506100bc61021f565b3480156100ef57600080fd5b50610074600160a060020a0360043516610224565b34801561011057600080fd5b50610074600435151561026a565b34801561012a57600080fd5b506100bc6102c1565b34801561013f57600080fd5b5061015d600160a060020a0360043581169060243516604435610320565b604080519115158252519081900360200190f35b6100746103ed565b600454600160a060020a031690565b600354604080517f688abbf7000000000000000000000000000000000000000000000000000000008152600160048201529051600092600160a060020a03169163688abbf791602480830192602092919082900301818787803b1580156101ee57600080fd5b505af1158015610202573d6000803e3d6000fd5b505050506040513d602081101561021857600080fd5b5051905090565b303190565b600054600160a060020a0316331461023b57600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a0316331461028157600080fd5b60018054911515740100000000000000000000000000000000000000000274ff000000000000000000000000000000000000000019909216919091179055565b600354604080517f949e8acd0000000000000000000000000000000000000000000000000000000081529051600092600160a060020a03169163949e8acd91600480830192602092919082900301818787803b1580156101ee57600080fd5b60008054600160a060020a0316331461033857600080fd5b6003548490600160a060020a038083169116141561035557600080fd5b84600160a060020a031663a9059cbb85856040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156103b857600080fd5b505af11580156103cc573d6000803e3d6000fd5b505050506040513d60208110156103e257600080fd5b505195945050505050565b600080620f424034116103ff57600080fd5b6001543031925074010000000000000000000000000000000000000000900460ff16156104e45760008211156104df57600454604051600160a060020a039091169083156108fc029084906000818181858888f19350505050158015610469573d6000803e3d6000fd5b5060048054604080517f63bd1d4a0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216926363bd1d4a92828201926000929082900301818387803b1580156104c657600080fd5b505af11580156104da573d6000803e3d6000fd5b505050505b6108a6565b50600354600160a060020a031631674563918244f400008110156105fb57600360009054906101000a9004600160a060020a0316600160a060020a031663e9fad8ee6040518163ffffffff1660e060020a028152600401600060405180830381600087803b15801561055557600080fd5b505af1158015610569573d6000803e3d6000fd5b505060006002819055805460405130319650600160a060020a0390911693506108fc86150292508591818181858888f193505050501580156105af573d6000803e3d6000fd5b5060005460408051848152600160a060020a03909216602083015280517fabe1dcf9fcb8e5fb309db76bcab112a217aa5754d0f038921282bfe7907aa5169281900390910190a16108a6565b6106036102c1565b6002819055600010156107c257600360009054906101000a9004600160a060020a0316600160a060020a031663e9fad8ee6040518163ffffffff1660e060020a028152600401600060405180830381600087803b15801561066357600080fd5b505af1158015610677573d6000803e3d6000fd5b505060006002819055303194508411159150610729905057600354604080517ff088d547000000000000000000000000000000000000000000000000000000008152600060048201529051600160a060020a039092169163f088d547918591602480830192602092919082900301818588803b1580156106f657600080fd5b505af115801561070a573d6000803e3d6000fd5b50505050506040513d602081101561072157600080fd5b506104df9050565b600354604080517ff088d547000000000000000000000000000000000000000000000000000000008152600060048201529051600160a060020a039092169163f088d547913491602480830192602092919082900301818588803b15801561079057600080fd5b505af11580156107a4573d6000803e3d6000fd5b50505050506040513d60208110156107bb57600080fd5b50506108a6565b60008211156108a657600354604080517ff088d547000000000000000000000000000000000000000000000000000000008152600060048201529051600160a060020a039092169163f088d547918591602480830192602092919082900301818588803b15801561083257600080fd5b505af1158015610846573d6000803e3d6000fd5b50505050506040513d602081101561085d57600080fd5b5061086890506102c1565b6002556040805134815233602082015281517f4bcc17093cdf51079c755de089be5a85e70fa374ec656c194480fbdcda224a53929181900390910190a15b50505600a165627a7a7230582022797941ec38a274164905778a0d3e9c52cc7729a5f55706b5479528ccb49d800029
Deployed Bytecode
0x6080604052600436106100745763ffffffff60e060020a6000350416631ddf147f81146100765780633151ecfc146100a75780634e6630b0146100ce57806368d967dd146100e35780637f5a448c14610104578063949e8acd1461011e578063d493b9ac14610133578063ed88c68e14610171575b005b34801561008257600080fd5b5061008b610179565b60408051600160a060020a039092168252519081900360200190f35b3480156100b357600080fd5b506100bc610188565b60408051918252519081900360200190f35b3480156100da57600080fd5b506100bc61021f565b3480156100ef57600080fd5b50610074600160a060020a0360043516610224565b34801561011057600080fd5b50610074600435151561026a565b34801561012a57600080fd5b506100bc6102c1565b34801561013f57600080fd5b5061015d600160a060020a0360043581169060243516604435610320565b604080519115158252519081900360200190f35b6100746103ed565b600454600160a060020a031690565b600354604080517f688abbf7000000000000000000000000000000000000000000000000000000008152600160048201529051600092600160a060020a03169163688abbf791602480830192602092919082900301818787803b1580156101ee57600080fd5b505af1158015610202573d6000803e3d6000fd5b505050506040513d602081101561021857600080fd5b5051905090565b303190565b600054600160a060020a0316331461023b57600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a0316331461028157600080fd5b60018054911515740100000000000000000000000000000000000000000274ff000000000000000000000000000000000000000019909216919091179055565b600354604080517f949e8acd0000000000000000000000000000000000000000000000000000000081529051600092600160a060020a03169163949e8acd91600480830192602092919082900301818787803b1580156101ee57600080fd5b60008054600160a060020a0316331461033857600080fd5b6003548490600160a060020a038083169116141561035557600080fd5b84600160a060020a031663a9059cbb85856040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156103b857600080fd5b505af11580156103cc573d6000803e3d6000fd5b505050506040513d60208110156103e257600080fd5b505195945050505050565b600080620f424034116103ff57600080fd5b6001543031925074010000000000000000000000000000000000000000900460ff16156104e45760008211156104df57600454604051600160a060020a039091169083156108fc029084906000818181858888f19350505050158015610469573d6000803e3d6000fd5b5060048054604080517f63bd1d4a0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216926363bd1d4a92828201926000929082900301818387803b1580156104c657600080fd5b505af11580156104da573d6000803e3d6000fd5b505050505b6108a6565b50600354600160a060020a031631674563918244f400008110156105fb57600360009054906101000a9004600160a060020a0316600160a060020a031663e9fad8ee6040518163ffffffff1660e060020a028152600401600060405180830381600087803b15801561055557600080fd5b505af1158015610569573d6000803e3d6000fd5b505060006002819055805460405130319650600160a060020a0390911693506108fc86150292508591818181858888f193505050501580156105af573d6000803e3d6000fd5b5060005460408051848152600160a060020a03909216602083015280517fabe1dcf9fcb8e5fb309db76bcab112a217aa5754d0f038921282bfe7907aa5169281900390910190a16108a6565b6106036102c1565b6002819055600010156107c257600360009054906101000a9004600160a060020a0316600160a060020a031663e9fad8ee6040518163ffffffff1660e060020a028152600401600060405180830381600087803b15801561066357600080fd5b505af1158015610677573d6000803e3d6000fd5b505060006002819055303194508411159150610729905057600354604080517ff088d547000000000000000000000000000000000000000000000000000000008152600060048201529051600160a060020a039092169163f088d547918591602480830192602092919082900301818588803b1580156106f657600080fd5b505af115801561070a573d6000803e3d6000fd5b50505050506040513d602081101561072157600080fd5b506104df9050565b600354604080517ff088d547000000000000000000000000000000000000000000000000000000008152600060048201529051600160a060020a039092169163f088d547913491602480830192602092919082900301818588803b15801561079057600080fd5b505af11580156107a4573d6000803e3d6000fd5b50505050506040513d60208110156107bb57600080fd5b50506108a6565b60008211156108a657600354604080517ff088d547000000000000000000000000000000000000000000000000000000008152600060048201529051600160a060020a039092169163f088d547918591602480830192602092919082900301818588803b15801561083257600080fd5b505af1158015610846573d6000803e3d6000fd5b50505050506040513d602081101561085d57600080fd5b5061086890506102c1565b6002556040805134815233602082015281517f4bcc17093cdf51079c755de089be5a85e70fa374ec656c194480fbdcda224a53929181900390910190a15b50505600a165627a7a7230582022797941ec38a274164905778a0d3e9c52cc7729a5f55706b5479528ccb49d800029
Swarm Source
bzzr://22797941ec38a274164905778a0d3e9c52cc7729a5f55706b5479528ccb49d80
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.